diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 3ca819048..2f3e8464e 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h @@ -825,6 +825,11 @@ static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi, return uvsupertx_size_lookup[txsize_sqr_map[mbmi->tx_size]] [pd->subsampling_x][pd->subsampling_y]; #endif // CONFIG_SUPERTX + +#if CONFIG_CB4X4 + assert(mbmi->tx_size > TX_2X2); +#endif + uv_txsize = uv_txsize_lookup[mbmi->sb_type][mbmi->tx_size][pd->subsampling_x] [pd->subsampling_y]; assert(uv_txsize != TX_INVALID); diff --git a/av1/common/common_data.h b/av1/common/common_data.h index e0391b88c..6518cfabf 100644 --- a/av1/common/common_data.h +++ b/av1/common/common_data.h @@ -837,9 +837,11 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { { // BLOCK_4X4 #if CONFIG_CB4X4 + { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, + { { TX_4X4, TX_2X2 }, { TX_2X2, TX_2X2 } }, +#else { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, -#endif - { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#endif // CONFIG_CB4X4 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -856,9 +858,11 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { { // BLOCK_4X8 #if CONFIG_CB4X4 + { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, + { { TX_4X4, TX_2X2 }, { TX_2X2, TX_2X2 } }, +#else { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif - { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -875,9 +879,11 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { { // BLOCK_8X4 #if CONFIG_CB4X4 + { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, + { { TX_4X4, TX_2X2 }, { TX_2X2, TX_2X2 } }, +#else { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif - { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },