From 0ebf548c752ef25ff8e9a65037fd9aee6420184e Mon Sep 17 00:00:00 2001 From: Deb Mukherjee Date: Fri, 27 Jul 2012 17:46:33 -0700 Subject: Merging and bug-fix in enhanced_interp experiment Merged the enhanced_interp experiment. Found and fixed a bug in the include files framework, whereby certain encoder files were still using the old INTERP_EXTEND value of 3 instead of 4. The thresholds for mv range mcomp.c need a small adjustment to prevent crashes. The results are more or less unchanged. Change-Id: Iac5008390f1efc97ce1102fbb5f8989c847fb579 --- vp8/encoder/mcomp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'vp8/encoder/mcomp.c') diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c index 0b08ed3a9..891b47952 100644 --- a/vp8/encoder/mcomp.c +++ b/vp8/encoder/mcomp.c @@ -257,10 +257,14 @@ int vp8_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int buf_r1, buf_r2, buf_c1, buf_c2; // Clamping to avoid out-of-range data access - buf_r1 = ((bestmv->as_mv.row - INTERP_EXTEND) < x->mv_row_min) ? (bestmv->as_mv.row - x->mv_row_min) : INTERP_EXTEND; - buf_r2 = ((bestmv->as_mv.row + INTERP_EXTEND) > x->mv_row_max) ? (x->mv_row_max - bestmv->as_mv.row) : INTERP_EXTEND; - buf_c1 = ((bestmv->as_mv.col - INTERP_EXTEND) < x->mv_col_min) ? (bestmv->as_mv.col - x->mv_col_min) : INTERP_EXTEND; - buf_c2 = ((bestmv->as_mv.col + INTERP_EXTEND) > x->mv_col_max) ? (x->mv_col_max - bestmv->as_mv.col) : INTERP_EXTEND; + buf_r1 = ((bestmv->as_mv.row - INTERP_EXTEND) < x->mv_row_min) ? + (bestmv->as_mv.row - x->mv_row_min) : INTERP_EXTEND - 1; + buf_r2 = ((bestmv->as_mv.row + INTERP_EXTEND) > x->mv_row_max) ? + (x->mv_row_max - bestmv->as_mv.row) : INTERP_EXTEND - 1; + buf_c1 = ((bestmv->as_mv.col - INTERP_EXTEND) < x->mv_col_min) ? + (bestmv->as_mv.col - x->mv_col_min) : INTERP_EXTEND - 1; + buf_c2 = ((bestmv->as_mv.col + INTERP_EXTEND) > x->mv_col_max) ? + (x->mv_col_max - bestmv->as_mv.col) : INTERP_EXTEND - 1; y_stride = 32; /* Copy to intermediate buffer before searching. */ -- cgit v1.2.3