From a81baae7c7711e0abc39a3673287c0f6b6ba5f93 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Thu, 28 Jun 2012 17:03:29 -0700 Subject: [PATCH] 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 --- vp8/common/reconinter.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 ; -- 2.40.0