From 92b199061a13173d29247257f4ef906d38b012bf Mon Sep 17 00:00:00 2001 From: hkuang Date: Wed, 6 May 2015 10:55:56 -0700 Subject: [PATCH] Correct the inter prediction coordinate calculation which greatly reduced the times of border extension. Change-Id: I8e5bd590cc696ee71cfe1f4cc66c12fb24aaf44e --- vp9/decoder/vp9_decodeframe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 81f87cd..eb9b797 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1896,10 +1896,10 @@ void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd, // width/height is not a multiple of 8 pixels. if (is_scaled || scaled_mv.col || scaled_mv.row || (frame_width & 0x7) || (frame_height & 0x7)) { - int y1 = ((y0_16 + (h - 1) * ys) >> SUBPEL_BITS) + 1; + int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS; // Get reference block bottom right horizontal coordinate. - int x1 = ((x0_16 + (w - 1) * xs) >> SUBPEL_BITS) + 1; + int x1 = (x0_16 + (w - 1) * xs) >> SUBPEL_BITS; int x_pad = 0, y_pad = 0; if (subpel_x || (sf->x_step_q4 != SUBPEL_SHIFTS)) { -- 2.7.4