]> granicus.if.org Git - libvpx/commitdiff
change to enable encoder to clamp UV motion vector
authorYaowu Xu <yaowu@google.com>
Fri, 29 Jun 2012 00:03:29 +0000 (17:03 -0700)
committerYaowu Xu <yaowu@google.com>
Mon, 9 Jul 2012 22:04:07 +0000 (15:04 -0700)
This is to avoid a rare encoder/decoder mismatch for MB using SPLITMV
mode. In decoder, the UV mv can be determined to need clamp, but the
flag is never set in encoder motion vector selection process, and the
clamp is not done in encoding in encoder.

Change-Id: I60520d3f790354c7855dadf03f0978ea9b77e2c0

vp8/common/reconinter.c

index 384345c14506cc6bdb3a60b958d9df1cfd3c3de7..71a54e29eabab38c43ec2e38e285572b6344544a 100644 (file)
@@ -1296,10 +1296,10 @@ void build_4x4uvmvs(MACROBLOCKD *x)
 
             x->block[uoffset].bmi.as_mv.first.as_mv.col = (temp / 8) & x->fullpixel_mask;
 
-            if (x->mode_info_context->mbmi.need_to_clamp_mvs)
+            //if (x->mode_info_context->mbmi.need_to_clamp_mvs)
                 clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.first.as_mv, x);
 
-            if (x->mode_info_context->mbmi.need_to_clamp_mvs)
+            //if (x->mode_info_context->mbmi.need_to_clamp_mvs)
                 clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.first.as_mv, x);
 
             x->block[voffset].bmi.as_mv.first.as_mv.row =
@@ -1341,11 +1341,11 @@ void build_4x4uvmvs(MACROBLOCKD *x)
 
                 x->block[uoffset].bmi.as_mv.second.as_mv.col = (temp / 8) & x->fullpixel_mask;
 
-                if (x->mode_info_context->mbmi.need_to_clamp_mvs)
-                    clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x);
+                //if (x->mode_info_context->mbmi.need_to_clamp_mvs)
+                clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x);
 
-                if (x->mode_info_context->mbmi.need_to_clamp_mvs)
-                    clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x);
+                //if (x->mode_info_context->mbmi.need_to_clamp_mvs)
+                clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x);
 
                 x->block[voffset].bmi.as_mv.second.as_mv.row =
                     x->block[uoffset].bmi.as_mv.second.as_mv.row ;