Handle single ref mv pair in the candidate list for compound mode

This commit considers the case where a single reference motion
vector pair is found in the candidate list. It treats this pair
as the effective motion vector for nearestmv mode. This improves
the coding performance by 0.06% for stdhd sets.

Change-Id: I9ce12f456b52912933e05c18c3841a78c26155d2
This commit is contained in:
Jingning Han
2016-01-13 09:03:15 -08:00
parent 33cc1bd21d
commit 3944cfb14d
2 changed files with 35 additions and 28 deletions

View File

@@ -886,6 +886,15 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
mbmi->mode != ZEROMV) {
uint8_t ref_frame_type = vp10_ref_frame_type(mbmi->ref_frame);
if (xd->ref_mv_count[ref_frame_type] == 1 && mbmi->mode == NEARESTMV) {
int i;
nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv;
nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv;
for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i)
lower_mv_precision(&nearestmv[i].as_mv, allow_hp);
}
if (xd->ref_mv_count[ref_frame_type] > 1) {
int i;
nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv;