]> granicus.if.org Git - libvpx/commitdiff
VP9: Eliminate extra mv clamp in decoder
authorScott LaVarnway <slavarnway@google.com>
Wed, 10 Feb 2016 13:06:13 +0000 (05:06 -0800)
committerJames Zern <jzern@google.com>
Thu, 24 Mar 2016 04:04:37 +0000 (04:04 +0000)
The mv is clamped in dec_find_mv_refs() to a smaller region
than the clamp in dec_find_best_ref_mvs().  See clamp_mv_ref
and clamp_mv2.

Change-Id: I47dd5f7fa8b42f2cc593559b4d7c782fe7bcb1db

vp9/decoder/vp9_decodemv.c

index 3bd42ece6e9ba19d5222e1d420f075432172226e..596427c1ea15656c0782b2fe61babcf2e200eba4 100644 (file)
@@ -463,14 +463,13 @@ static int read_is_inter_block(VP9_COMMON *const cm, MACROBLOCKD *const xd,
   }
 }
 
-static void dec_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, int_mv *mvlist,
-                                  int_mv *best_mv, int refmv_count) {
+static void dec_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *best_mv,
+                                  int refmv_count) {
   int i;
 
   // Make sure all the candidates are properly clamped etc
   for (i = 0; i < refmv_count; ++i) {
     lower_mv_precision(&mvlist[i].as_mv, allow_hp);
-    clamp_mv2(&mvlist[i].as_mv, xd);
     *best_mv = mvlist[i];
   }
 }
@@ -778,7 +777,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
                                        tmp_mvs, mi_row, mi_col, -1, 0,
                                        fpm_sync, (void *)pbi);
 
-        dec_find_best_ref_mvs(xd, allow_hp, tmp_mvs, &best_ref_mvs[ref],
+        dec_find_best_ref_mvs(allow_hp, tmp_mvs, &best_ref_mvs[ref],
                               refmv_count);
       }
     }