From d7d20477f3a536bf4376573a9e11f18c2c1f6196 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Wed, 14 Dec 2016 11:13:48 -0800 Subject: [PATCH] Remove the use case of bmi->as_mode Remove the use case of bmi->as_mode in cb4x4 mode. Its function is covered by 4x4 level mode_info. Change-Id: I04abc1b7a0a97c12c3b6fddc1f16f7045512772e --- av1/common/blockd.c | 4 ++++ av1/common/blockd.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/av1/common/blockd.c b/av1/common/blockd.c index 8a887f92a..5011e3116 100644 --- a/av1/common/blockd.c +++ b/av1/common/blockd.c @@ -170,7 +170,11 @@ void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd, ENTROPY_CONTEXT *const l = pd->left_context + loff; const int txs_wide = tx_size_wide_unit[tx_size]; const int txs_high = tx_size_high_unit[tx_size]; +#if CONFIG_CB4X4 + const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; +#else const BLOCK_SIZE bsize = AOMMAX(xd->mi[0]->mbmi.sb_type, BLOCK_8X8); +#endif const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); // above diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 3c167d25d..93d496e29 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h @@ -353,7 +353,12 @@ typedef struct MODE_INFO { } MODE_INFO; static INLINE PREDICTION_MODE get_y_mode(const MODE_INFO *mi, int block) { +#if CONFIG_CB4X4 + (void)block; + return mi->mbmi.mode; +#else return mi->mbmi.sb_type < BLOCK_8X8 ? mi->bmi[block].as_mode : mi->mbmi.mode; +#endif } static INLINE int is_inter_block(const MB_MODE_INFO *mbmi) {