shithub: libvpx

Download patch

ref: 54f843c8915e65b2e9dea74188642d4c293362d1
parent: b27edc67d2122bf4c0b56295bdedc18d634ecb68
parent: 3e01ca6a19589448b733faf1a9d092a82235f5f5
author: Dmitry Kovalev <dkovalev@google.com>
date: Thu Apr 18 12:09:28 EDT 2013

Merge "Fixing rounding inside vp9_mv_bit_cost function." into experimental

--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -56,9 +56,9 @@
   MV v;
   v.row = mv->as_mv.row - ref->as_mv.row;
   v.col = mv->as_mv.col - ref->as_mv.col;
-  return ((mvjcost[vp9_get_mv_joint(&v)] +
-           mvcost[0][v.row] +
-           mvcost[1][v.col]) * weight) >> 7;
+  return ROUND_POWER_OF_TWO((mvjcost[vp9_get_mv_joint(&v)] +
+                             mvcost[0][v.row] +
+                             mvcost[1][v.col]) * weight, 7);
 }
 
 static int mv_err_cost(int_mv *mv, int_mv *ref, int *mvjcost, int *mvcost[2],
--