diff options
Diffstat (limited to 'vp8/decoder/decodemv.c')
-rw-r--r-- | vp8/decoder/decodemv.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index e8b4a1f67..8d0f94e65 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; @@ -837,25 +838,18 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, xd->pre.u_buffer = cm->yv12_fb[ref_fb_idx].u_buffer + recon_uvoffset; xd->pre.v_buffer = cm->yv12_fb[ref_fb_idx].v_buffer + recon_uvoffset; -#if CONFIG_NEW_MVREF // 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, + mbmi->ref_mvs[ref_frame], &best_mv, &nearest, &nearby); } #endif @@ -938,7 +932,6 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, mbmi->second_ref_frame, cm->ref_frame_sign_bias); -#if CONFIG_NEW_MVREF // Update stats on relative distance of chosen vector to the // possible best reference vectors. { @@ -947,16 +940,12 @@ 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, + mbmi->ref_mvs[mbmi->second_ref_frame], &best_mv_second, &nearest_second, &nearby_second); |