Commit 51e9788e authored by hkuang's avatar hkuang

Fix a bug in boundary checking.

Change-Id: Ifc741da9da6f61c8d3c1f675ec6b8a96570f877d
parent 2d8339ee
......@@ -389,7 +389,7 @@ static void dec_build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
}
// Skip border extension if block is inside the frame.
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width ||
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
y0 < 0 || y0 > frame_height - 1 || y1 < 0 || y1 > frame_height - 1) {
uint8_t *buf_ptr1 = ref_frame + y0 * pre_buf->stride + x0;
// Extend the border.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment