diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-04-09 15:23:16 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-04-09 15:23:16 -0700 |
commit | 60def47f21767ee690e5a5472314914b3bb0e546 (patch) | |
tree | ee5fb66a230c132de7d9a2aa2f3c57c027056cc6 /vp9 | |
parent | 22a3e30790d141033778e430a47ba7d558237362 (diff) | |
download | libvpx-60def47f21767ee690e5a5472314914b3bb0e546.tar libvpx-60def47f21767ee690e5a5472314914b3bb0e546.tar.gz libvpx-60def47f21767ee690e5a5472314914b3bb0e546.tar.bz2 libvpx-60def47f21767ee690e5a5472314914b3bb0e546.zip |
Revert "Converting set_prev_mi() to get_prev_mi()."
This reverts commit 22a3e30790d141033778e430a47ba7d558237362
Change-Id: I460d905edf5fb2006da58c18fbe02c04d0c631bb
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/common/vp9_mvref_common.c | 2 | ||||
-rw-r--r-- | vp9/common/vp9_onyxc_int.h | 14 | ||||
-rw-r--r-- | vp9/decoder/vp9_decodeframe.c | 6 | ||||
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 2 |
4 files changed, 14 insertions, 10 deletions
diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c index 1aab36205..61682c42d 100644 --- a/vp9/common/vp9_mvref_common.c +++ b/vp9/common/vp9_mvref_common.c @@ -195,7 +195,7 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd, int block, int mi_row, int mi_col) { const int *ref_sign_bias = cm->ref_frame_sign_bias; int i, refmv_count = 0; - const MODE_INFO *prev_mi = cm->prev_mi + const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi ? cm->prev_mi_grid_visible[mi_row * xd->mi_stride + mi_col] : NULL; const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL; diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index 32dc2d985..ea1b8856e 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -281,15 +281,15 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile, xd->left_available = (mi_col > tile->mi_col_start); } -static INLINE MODE_INFO *get_prev_mi(VP9_COMMON *cm) { - const int use_prev_mi = cm->coding_use_prev_mi && - cm->width == cm->last_width && - cm->height == cm->last_height && - !cm->intra_only && - cm->last_show_frame; +static INLINE void set_prev_mi(VP9_COMMON *cm) { + const int use_prev_in_find_mv_refs = cm->width == cm->last_width && + cm->height == cm->last_height && + !cm->intra_only && + cm->last_show_frame; // Special case: set prev_mi to NULL when the previous mode info // context cannot be used. - return use_prev_mi ? &cm->prev_mip[cm->mi_stride + 1] : NULL; + cm->prev_mi = use_prev_in_find_mv_refs ? + cm->prev_mip + cm->mi_stride + 1 : NULL; } static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) { diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index d2f814eb1..5a2e6f881 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1288,7 +1288,11 @@ int vp9_decode_frame(VP9D_COMP *pbi, } init_macroblockd(cm, &pbi->mb); - cm->prev_mi = get_prev_mi(cm); + + if (cm->coding_use_prev_mi) + set_prev_mi(cm); + else + cm->prev_mi = NULL; setup_plane_dequants(cm, xd, cm->base_qindex); vp9_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y); diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index b0fabb936..929722563 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3084,7 +3084,7 @@ static void encode_frame_internal(VP9_COMP *cpi) { vp9_zero(cpi->rd_tx_select_diff); vp9_zero(cpi->rd_tx_select_threshes); - cm->prev_mi = get_prev_mi(cm); + set_prev_mi(cm); if (cpi->sf.use_nonrd_pick_mode) { // Initialize internal buffer pointers for rtc coding, where non-RD |