Fix range checks in motion search

There were some situations that the start motion vectors were
out of range. This fix adjusted range checks to make sure they
are checked and clamped.

Change-Id: Ife83b7fed0882bba6d1fa559b6e63c054fd5065d
This commit is contained in:
Yunqing Wang
2011-07-27 10:37:33 -04:00
parent fe270dd527
commit bde2afbe23
3 changed files with 17 additions and 11 deletions

View File

@@ -669,8 +669,6 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
mvp_full.as_mv.col = mvp.as_mv.col>>3;
mvp_full.as_mv.row = mvp.as_mv.row>>3;
/* adjust mvp to make sure it is within MV range */
vp8_clamp_mv(&mvp_full, col_min, col_max, row_min, row_max);
}else
{
mvp.as_int = best_ref_mv.as_int;