Commit 3e01ca6a authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Fixing rounding inside vp9_mv_bit_cost function.

Change-Id: I7209a05919162a8155520bc543658ddb69ba12ce
Showing with 3 additions and 3 deletions
......@@ -56,9 +56,9 @@ int vp9_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvjcost, int *mvcost[2],
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],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment