From 24e0a184212b226ba29b196a23fd2b7083d154ca Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Sun, 20 Nov 2016 22:34:12 -0800 Subject: [PATCH] Merge simp_pred_mv changes into ref_mv Merge the modifications in simp_pred_mv to ref_mv. Change-Id: I5662124c1ac7133d76697522f06e42b277a4ad8d --- av1/common/mvref_common.c | 11 +---------- av1/common/mvref_common.h | 10 ++-------- av1/decoder/decodeframe.c | 2 +- av1/encoder/encodeframe.c | 2 +- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c index 2f49a7514..4d02dbebd 100644 --- a/av1/common/mvref_common.c +++ b/av1/common/mvref_common.c @@ -405,8 +405,7 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, mode_context[ref_frame] |= (1 << ZEROMV_OFFSET); } -// Scan the second outer area. -#if CONFIG_SIMP_MV_PRED + // Scan the second outer area. scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, -1, ref_mv_stack, refmv_count); for (idx = 2; idx <= 3; ++idx) { @@ -417,14 +416,6 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, } scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, -4, ref_mv_stack, refmv_count); -#else - for (idx = 2; idx <= 4; ++idx) { - scan_row_mbmi(cm, xd, mi_row, mi_col, block, rf, -idx, ref_mv_stack, - refmv_count); - scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, -idx, ref_mv_stack, - refmv_count); - } -#endif switch (nearest_refmv_count) { case 0: diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h index b3e5151d3..62472b1f0 100644 --- a/av1/common/mvref_common.h +++ b/av1/common/mvref_common.h @@ -289,15 +289,9 @@ static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv, static INLINE int_mv get_sub_block_pred_mv(const MODE_INFO *candidate, int which_mv, int search_col, int block_idx) { -#if CONFIG_SIMP_MV_PRED + (void)search_col; + (void)block_idx; return candidate->mbmi.mv[which_mv]; -#else - return block_idx >= 0 && candidate->mbmi.sb_type < BLOCK_8X8 - ? candidate - ->bmi[idx_n_column_to_subblock[block_idx][search_col == 0]] - .pred_mv[which_mv] - : candidate->mbmi.pred_mv[which_mv]; -#endif } #endif diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index f93a4256b..54f231043 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c @@ -4423,7 +4423,7 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt header length"); -#if CONFIG_SIMP_MV_PRED +#if CONFIG_REF_MV cm->setup_mi(cm); #endif diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 10595a5ff..e0e16a0d3 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c @@ -4823,7 +4823,7 @@ static void encode_frame_internal(AV1_COMP *cpi) { x->min_partition_size = AOMMIN(x->min_partition_size, cm->sb_size); x->max_partition_size = AOMMIN(x->max_partition_size, cm->sb_size); -#if CONFIG_SIMP_MV_PRED +#if CONFIG_REF_MV cm->setup_mi(cm); #endif -- GitLab