diff options
author | Paul Wilkins <paulwilkins@google.com> | 2012-09-07 12:46:41 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2012-09-07 12:46:41 +0100 |
commit | 38e1c7918518ac231b2787fabeb45990c8a7995a (patch) | |
tree | ec0ba1bbc0300564c1b6d8f7ddc6af0ff0235490 /vp8/decoder | |
parent | 00f9eb659034cb5cef0bf063c1b72c72c6333f36 (diff) | |
download | libvpx-38e1c7918518ac231b2787fabeb45990c8a7995a.tar libvpx-38e1c7918518ac231b2787fabeb45990c8a7995a.tar.gz libvpx-38e1c7918518ac231b2787fabeb45990c8a7995a.tar.bz2 libvpx-38e1c7918518ac231b2787fabeb45990c8a7995a.zip |
MV reference changes
Extend experiment to use both vectors from MBs
coded using compound prediction as candidates.
In final sort only consider best 4 candidates
for now but make sure 0,0 is always one of them.
Other minor changes to new MV reference code.
Pass in Mv list to vp8_find_best_ref_mvs().
Change-Id: Ib96220c33c6b80bd1d5e0fbe8b68121be7997095
Diffstat (limited to 'vp8/decoder')
-rw-r--r-- | vp8/decoder/decodemv.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index e8b4a1f67..403d13529 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -818,11 +818,12 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, #if CONFIG_NEWBESTREFMV { int ref_fb_idx; + MV_REFERENCE_FRAME ref_frame = mbmi->ref_frame; /* Select the appropriate reference frame for this MB */ - if (mbmi->ref_frame == LAST_FRAME) + if (ref_frame == LAST_FRAME) ref_fb_idx = cm->lst_fb_idx; - else if (mbmi->ref_frame == GOLDEN_FRAME) + else if (ref_frame == GOLDEN_FRAME) ref_fb_idx = cm->gld_fb_idx; else ref_fb_idx = cm->alt_fb_idx; @@ -841,21 +842,20 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, // Update stats on relative distance of chosen vector to the // possible best reference vectors. { - MV_REFERENCE_FRAME ref_frame = mbmi->ref_frame; - find_mv_refs(xd, mi, prev_mi, ref_frame, mbmi->ref_mvs[ref_frame], cm->ref_frame_sign_bias ); - - // Copy over the candidates. - vpx_memcpy(xd->ref_mv, mbmi->ref_mvs[ref_frame], - (MAX_MV_REFS * sizeof(int_mv)) ); } #endif vp8_find_best_ref_mvs(xd, xd->pre.y_buffer, recon_y_stride, +#if CONFIG_NEW_MVREF + mbmi->ref_mvs[ref_frame], +#else + xd->ref_mv, +#endif &best_mv, &nearest, &nearby); } #endif @@ -947,16 +947,17 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, find_mv_refs(xd, mi, prev_mi, ref_frame, mbmi->ref_mvs[ref_frame], cm->ref_frame_sign_bias ); - - // Copy over the mv candidates - vpx_memcpy(xd->ref_mv, mbmi->ref_mvs[ref_frame], - (MAX_MV_REFS * sizeof(int_mv)) ); } #endif vp8_find_best_ref_mvs(xd, xd->second_pre.y_buffer, recon_y_stride, +#if CONFIG_NEW_MVREF + mbmi->ref_mvs[mbmi->second_ref_frame], +#else + xd->ref_mv, +#endif &best_mv_second, &nearest_second, &nearby_second); |