diff options
author | Scott LaVarnway <slavarnway@google.com> | 2015-06-10 13:15:18 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-06-10 13:15:19 +0000 |
commit | 97880c332445cdc3cfbf82433bb4a6b6d6cfc010 (patch) | |
tree | 74d3f8edf12f8ef1a612eabe8c9a72dfc4f44645 /vp9/decoder | |
parent | 61c5c96ae1dcfbe30c00d5afbe22091102d70cfd (diff) | |
parent | baaaa5753346f3f102d62b0cd300b67aa809817d (diff) | |
download | libvpx-97880c332445cdc3cfbf82433bb4a6b6d6cfc010.tar libvpx-97880c332445cdc3cfbf82433bb4a6b6d6cfc010.tar.gz libvpx-97880c332445cdc3cfbf82433bb4a6b6d6cfc010.tar.bz2 libvpx-97880c332445cdc3cfbf82433bb4a6b6d6cfc010.zip |
Merge "Reducing size of MODE_INFO struct"
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/vp9_decodemv.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index 7ce3389e8..bc03caf0d 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -473,7 +473,9 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi, const BLOCK_SIZE bsize = mbmi->sb_type; const int allow_hp = cm->allow_high_precision_mv; int_mv nearestmv[2], nearmv[2]; - int inter_mode_ctx, ref, is_compound; + int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REF_CANDIDATES]; + int ref, is_compound; + uint8_t inter_mode_ctx[MAX_REF_FRAMES]; read_ref_frames(cm, xd, r, mbmi->segment_id, mbmi->ref_frame); is_compound = has_second_ref(mbmi); @@ -487,12 +489,10 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi, "Reference frame has invalid dimensions"); vp9_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col, &ref_buf->sf); - vp9_find_mv_refs(cm, xd, tile, mi, frame, mbmi->ref_mvs[frame], - mi_row, mi_col, fpm_sync, (void *)pbi); + vp9_find_mv_refs(cm, xd, tile, mi, frame, ref_mvs[frame], + mi_row, mi_col, fpm_sync, (void *)pbi, inter_mode_ctx); } - inter_mode_ctx = mbmi->mode_context[mbmi->ref_frame[0]]; - if (vp9_segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) { mbmi->mode = ZEROMV; if (bsize < BLOCK_8X8) { @@ -502,12 +502,13 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi, } } else { if (bsize >= BLOCK_8X8) - mbmi->mode = read_inter_mode(cm, xd, r, inter_mode_ctx); + mbmi->mode = read_inter_mode(cm, xd, r, + inter_mode_ctx[mbmi->ref_frame[0]]); } if (bsize < BLOCK_8X8 || mbmi->mode != ZEROMV) { for (ref = 0; ref < 1 + is_compound; ++ref) { - vp9_find_best_ref_mvs(xd, allow_hp, mbmi->ref_mvs[mbmi->ref_frame[ref]], + vp9_find_best_ref_mvs(xd, allow_hp, ref_mvs[mbmi->ref_frame[ref]], &nearestmv[ref], &nearmv[ref]); } } @@ -526,13 +527,16 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi, for (idx = 0; idx < 2; idx += num_4x4_w) { int_mv block[2]; const int j = idy * 2 + idx; - b_mode = read_inter_mode(cm, xd, r, inter_mode_ctx); + b_mode = read_inter_mode(cm, xd, r, inter_mode_ctx[mbmi->ref_frame[0]]); - if (b_mode == NEARESTMV || b_mode == NEARMV) + if (b_mode == NEARESTMV || b_mode == NEARMV) { + uint8_t dummy_mode_ctx[MAX_REF_FRAMES]; for (ref = 0; ref < 1 + is_compound; ++ref) vp9_append_sub8x8_mvs_for_idx(cm, xd, tile, j, ref, mi_row, mi_col, &nearest_sub8x8[ref], - &near_sub8x8[ref]); + &near_sub8x8[ref], + dummy_mode_ctx); + } if (!assign_mv(cm, xd, b_mode, block, nearestmv, nearest_sub8x8, near_sub8x8, |