Fix compound mv costing for ref-mv.
I believe this is necessary for computing the correct rate,
when not doing joint_motion_search.
Change-Id: I7634d6d7a5e6f0a6998edb4d577dd047d80df3c8
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c
index a50ee5a..f2f8291 100644
--- a/vp10/encoder/rdopt.c
+++ b/vp10/encoder/rdopt.c
@@ -6387,10 +6387,16 @@
joint_motion_search(cpi, x, bsize, frame_mv,
mi_row, mi_col, NULL, single_newmv, &rate_mv, 0);
} else {
+#if CONFIG_REF_MV
+ vp10_set_mvcost(x, mbmi->ref_frame[0]);
+#endif // CONFIG_REF_MV
rate_mv = vp10_mv_bit_cost(&frame_mv[refs[0]].as_mv,
&x->mbmi_ext->ref_mvs[refs[0]][0].as_mv,
x->nmvjointcost, x->mvcost,
MV_COST_WEIGHT);
+#if CONFIG_REF_MV
+ vp10_set_mvcost(x, mbmi->ref_frame[1]);
+#endif // CONFIG_REF_MV
rate_mv += vp10_mv_bit_cost(&frame_mv[refs[1]].as_mv,
&x->mbmi_ext->ref_mvs[refs[1]][0].as_mv,
x->nmvjointcost, x->mvcost,
@@ -6417,9 +6423,15 @@
mi_row, mi_col,
single_newmv, &rate_mv, 0);
} else {
+#if CONFIG_REF_MV
+ vp10_set_mvcost(x, mbmi->ref_frame[0]);
+#endif // CONFIG_REF_MV
rate_mv = vp10_mv_bit_cost(&frame_mv[refs[0]].as_mv,
&x->mbmi_ext->ref_mvs[refs[0]][0].as_mv,
x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
+#if CONFIG_REF_MV
+ vp10_set_mvcost(x, mbmi->ref_frame[1]);
+#endif // CONFIG_REF_MV
rate_mv += vp10_mv_bit_cost(&frame_mv[refs[1]].as_mv,
&x->mbmi_ext->ref_mvs[refs[1]][0].as_mv,
x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);