From: Yaowu Xu Date: Fri, 29 Jun 2012 00:03:29 +0000 (-0700) Subject: change to enable encoder to clamp UV motion vector X-Git-Tag: v1.3.0~1217^2~379^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a81baae7c7711e0abc39a3673287c0f6b6ba5f93;p=libvpx change to enable encoder to clamp UV motion vector This is to avoid a rare encoder/decoder mismatch for MB using SPLITMV mode. In decoder, the UV mv can be determined to need clamp, but the flag is never set in encoder motion vector selection process, and the clamp is not done in encoding in encoder. Change-Id: I60520d3f790354c7855dadf03f0978ea9b77e2c0 --- diff --git a/vp8/common/reconinter.c b/vp8/common/reconinter.c index 384345c14..71a54e29e 100644 --- a/vp8/common/reconinter.c +++ b/vp8/common/reconinter.c @@ -1296,10 +1296,10 @@ void build_4x4uvmvs(MACROBLOCKD *x) x->block[uoffset].bmi.as_mv.first.as_mv.col = (temp / 8) & x->fullpixel_mask; - if (x->mode_info_context->mbmi.need_to_clamp_mvs) + //if (x->mode_info_context->mbmi.need_to_clamp_mvs) clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.first.as_mv, x); - if (x->mode_info_context->mbmi.need_to_clamp_mvs) + //if (x->mode_info_context->mbmi.need_to_clamp_mvs) clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.first.as_mv, x); x->block[voffset].bmi.as_mv.first.as_mv.row = @@ -1341,11 +1341,11 @@ void build_4x4uvmvs(MACROBLOCKD *x) x->block[uoffset].bmi.as_mv.second.as_mv.col = (temp / 8) & x->fullpixel_mask; - if (x->mode_info_context->mbmi.need_to_clamp_mvs) - clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x); + //if (x->mode_info_context->mbmi.need_to_clamp_mvs) + clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x); - if (x->mode_info_context->mbmi.need_to_clamp_mvs) - clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x); + //if (x->mode_info_context->mbmi.need_to_clamp_mvs) + clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.as_mv.second.as_mv, x); x->block[voffset].bmi.as_mv.second.as_mv.row = x->block[uoffset].bmi.as_mv.second.as_mv.row ;