Commit a81baae7 authored by Yaowu Xu's avatar Yaowu Xu

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
parent c498aaca
......@@ -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 ;
......
Markdown is supported
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