diff options
author | Deb Mukherjee <debargha@google.com> | 2012-07-27 17:46:33 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2012-07-31 11:45:31 -0700 |
commit | 0ebf548c752ef25ff8e9a65037fd9aee6420184e (patch) | |
tree | 4bd5d3fe6f510857d66bff21bfe9c7a0046a3f66 /vp8/encoder/mcomp.c | |
parent | 5259744145fe4ff41d3c814514c0744444969ad3 (diff) | |
download | libvpx-0ebf548c752ef25ff8e9a65037fd9aee6420184e.tar libvpx-0ebf548c752ef25ff8e9a65037fd9aee6420184e.tar.gz libvpx-0ebf548c752ef25ff8e9a65037fd9aee6420184e.tar.bz2 libvpx-0ebf548c752ef25ff8e9a65037fd9aee6420184e.zip |
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
Diffstat (limited to 'vp8/encoder/mcomp.c')
-rw-r--r-- | vp8/encoder/mcomp.c | 12 |
1 files changed, 8 insertions, 4 deletions
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. */ |