]> granicus.if.org Git - libvpx/commitdiff
Use mv_check_bounds in sub8x8 rd loop
authorJingning Han <jingning@google.com>
Thu, 18 Jul 2013 00:12:02 +0000 (17:12 -0700)
committerJingning Han <jingning@google.com>
Thu, 18 Jul 2013 00:13:51 +0000 (17:13 -0700)
Make the use of mv_check_bounds consistent for mvs of both ref_frame[0]
and ref_frame[1].

Change-Id: I1ca24865cc7232ca9cbe5db566c53abad1592211

vp9/encoder/vp9_rdopt.c

index cb7a5860650e2fbddf8271a2056e227b89b11789..9e02876fc3fcd368495eb7e80b8fdde0a615ce69 100644 (file)
@@ -1996,12 +1996,8 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
                            x->mvcost, cpi);
 
         // Trap vectors that reach beyond the UMV borders
-        if (((mode_mv[this_mode].as_mv.row >> 3) < x->mv_row_min) ||
-            ((mode_mv[this_mode].as_mv.row >> 3) > x->mv_row_max) ||
-            ((mode_mv[this_mode].as_mv.col >> 3) < x->mv_col_min) ||
-            ((mode_mv[this_mode].as_mv.col >> 3) > x->mv_col_max)) {
+        if (mv_check_bounds(x, &mode_mv[this_mode]))
           continue;
-        }
         if (mbmi->ref_frame[1] > 0 &&
             mv_check_bounds(x, &second_mode_mv[this_mode]))
           continue;