]> granicus.if.org Git - libvpx/commitdiff
Remove double counting for mv costs
authorYue Chen <yuec@google.com>
Tue, 26 Apr 2016 20:01:52 +0000 (13:01 -0700)
committerYue Chen <yuec@google.com>
Tue, 26 Apr 2016 20:01:52 +0000 (13:01 -0700)
The bug is introduced by commit 1a0352d, in which mv costs are
counted twice in joint_motion_search() in ext_inter experiment.

Change-Id: Ibace453df999d3c2e781d73f1f0912038fee2d4e

vp10/encoder/rdopt.c

index 34d31cc6e371d189317c6992d59c12be8f408939..a546322183b9a301f9ce7ac4a1f148afe68dfff7 100644 (file)
@@ -4771,20 +4771,14 @@ static void joint_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
     }
 #if CONFIG_REF_MV
     vp10_set_mvcost(x, refs[ref]);
+#endif
+#if CONFIG_EXT_INTER
+    if (bsize >= BLOCK_8X8)
+#endif  // CONFIG_EXT_INTER
     *rate_mv += vp10_mv_bit_cost(&frame_mv[refs[ref]].as_mv,
                                  &x->mbmi_ext->ref_mvs[refs[ref]][0].as_mv,
                                  x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
-#else
-    *rate_mv += vp10_mv_bit_cost(&frame_mv[refs[ref]].as_mv,
-                                 &x->mbmi_ext->ref_mvs[refs[ref]][0].as_mv,
-                                 x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
-#endif
-
 #if CONFIG_EXT_INTER
-    if (bsize >= BLOCK_8X8)
-      *rate_mv += vp10_mv_bit_cost(&frame_mv[refs[ref]].as_mv,
-                                   &x->mbmi_ext->ref_mvs[refs[ref]][0].as_mv,
-                                   x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
     else
       *rate_mv += vp10_mv_bit_cost(&frame_mv[refs[ref]].as_mv,
                                    &ref_mv_sub8x8[ref]->as_mv,