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) {