From fe67ed6af26b20cb0bd29f3ec94786d76c1241aa Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" Date: Wed, 26 Apr 2017 16:53:47 -0700 Subject: [PATCH] cb4x4: Move sub-4X4 TX sizes behind CONFIG_CHROMA_2X2. cb4x4 itself should not require these sizes. This simplifies compatibility with other experiments, since we can first make them work with cb4x4 (which is now on by default), and then worry about chroma_2x2 (which is not) in separate steps. Encoder and decoder output should remain unchanged. Change-Id: I4e9fcdae49f238b5099a3c74a398fe993c2545f8 --- av1/common/av1_fwd_txfm2d.c | 16 ++-- av1/common/av1_inv_txfm2d.c | 16 ++-- av1/common/av1_loopfilter.c | 12 +-- av1/common/blockd.h | 19 ++--- av1/common/common_data.h | 151 ++++++++++++++++++++++++---------- av1/common/entropy.c | 18 ++-- av1/common/entropy.h | 6 +- av1/common/entropymode.c | 46 +++++------ av1/common/entropymode.h | 12 +-- av1/common/enums.h | 8 +- av1/common/idct.c | 8 +- av1/common/pred_common.h | 8 +- av1/common/reconintra.c | 6 +- av1/common/scan.c | 22 ++--- av1/encoder/bitstream.c | 3 - av1/encoder/hybrid_fwd_txfm.c | 8 +- av1/encoder/rd.c | 4 +- av1/encoder/rdopt.c | 16 ++-- examples/inspect.c | 2 +- test/av1_txfm_test.h | 4 +- 20 files changed, 219 insertions(+), 166 deletions(-) diff --git a/av1/common/av1_fwd_txfm2d.c b/av1/common/av1_fwd_txfm2d.c index 96443ac9d..f8d7b2333 100644 --- a/av1/common/av1_fwd_txfm2d.c +++ b/av1/common/av1_fwd_txfm2d.c @@ -127,14 +127,14 @@ void av1_fwd_txfm2d_64x64_c(const int16_t *input, int32_t *output, int stride, static const TXFM_1D_CFG *fwd_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { // DCT { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_col_cfg_dct_4, &fwd_txfm_1d_col_cfg_dct_8, &fwd_txfm_1d_col_cfg_dct_16, &fwd_txfm_1d_col_cfg_dct_32 }, // ADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_col_cfg_adst_4, &fwd_txfm_1d_col_cfg_adst_8, @@ -142,14 +142,14 @@ static const TXFM_1D_CFG *fwd_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { #if CONFIG_EXT_TX // FLIPADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_col_cfg_adst_4, &fwd_txfm_1d_col_cfg_adst_8, &fwd_txfm_1d_col_cfg_adst_16, &fwd_txfm_1d_col_cfg_adst_32 }, // IDENTITY { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_cfg_identity_4, &fwd_txfm_1d_cfg_identity_8, @@ -160,14 +160,14 @@ static const TXFM_1D_CFG *fwd_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { static const TXFM_1D_CFG *fwd_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = { // DCT { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_row_cfg_dct_4, &fwd_txfm_1d_row_cfg_dct_8, &fwd_txfm_1d_row_cfg_dct_16, &fwd_txfm_1d_row_cfg_dct_32 }, // ADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_row_cfg_adst_4, &fwd_txfm_1d_row_cfg_adst_8, @@ -175,14 +175,14 @@ static const TXFM_1D_CFG *fwd_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = { #if CONFIG_EXT_TX // FLIPADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_row_cfg_adst_4, &fwd_txfm_1d_row_cfg_adst_8, &fwd_txfm_1d_row_cfg_adst_16, &fwd_txfm_1d_row_cfg_adst_32 }, // IDENTITY { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &fwd_txfm_1d_cfg_identity_4, &fwd_txfm_1d_cfg_identity_8, diff --git a/av1/common/av1_inv_txfm2d.c b/av1/common/av1_inv_txfm2d.c index 6191053f0..e07f994c6 100644 --- a/av1/common/av1_inv_txfm2d.c +++ b/av1/common/av1_inv_txfm2d.c @@ -38,14 +38,14 @@ static INLINE TxfmFunc inv_txfm_type_to_func(TXFM_TYPE txfm_type) { static const TXFM_1D_CFG *inv_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { // DCT { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_col_cfg_dct_4, &inv_txfm_1d_col_cfg_dct_8, &inv_txfm_1d_col_cfg_dct_16, &inv_txfm_1d_col_cfg_dct_32 }, // ADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_col_cfg_adst_4, &inv_txfm_1d_col_cfg_adst_8, @@ -53,14 +53,14 @@ static const TXFM_1D_CFG *inv_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { #if CONFIG_EXT_TX // FLIPADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_col_cfg_adst_4, &inv_txfm_1d_col_cfg_adst_8, &inv_txfm_1d_col_cfg_adst_16, &inv_txfm_1d_col_cfg_adst_32 }, // IDENTITY { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_cfg_identity_4, &inv_txfm_1d_cfg_identity_8, @@ -71,14 +71,14 @@ static const TXFM_1D_CFG *inv_txfm_col_cfg_ls[TX_TYPES_1D][TX_SIZES] = { static const TXFM_1D_CFG *inv_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = { // DCT { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_row_cfg_dct_4, &inv_txfm_1d_row_cfg_dct_8, &inv_txfm_1d_row_cfg_dct_16, &inv_txfm_1d_row_cfg_dct_32 }, // ADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_row_cfg_adst_4, &inv_txfm_1d_row_cfg_adst_8, @@ -86,14 +86,14 @@ static const TXFM_1D_CFG *inv_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = { #if CONFIG_EXT_TX // FLIPADST { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_row_cfg_adst_4, &inv_txfm_1d_row_cfg_adst_8, &inv_txfm_1d_row_cfg_adst_16, &inv_txfm_1d_row_cfg_adst_32 }, // IDENTITY { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif &inv_txfm_1d_cfg_identity_4, &inv_txfm_1d_cfg_identity_8, diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c index 1f0cb3bec..af919a854 100644 --- a/av1/common/av1_loopfilter.c +++ b/av1/common/av1_loopfilter.c @@ -42,7 +42,7 @@ // // A loopfilter should be applied to every other 8x8 horizontally. static const uint64_t left_64x64_txform_mask[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 0xffffffffffffffffULL, // TX_2X2 #endif 0xffffffffffffffffULL, // TX_4X4 @@ -72,7 +72,7 @@ static const uint64_t left_64x64_txform_mask[TX_SIZES] = { // // A loopfilter should be applied to every other 4 the row vertically. static const uint64_t above_64x64_txform_mask[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 0xffffffffffffffffULL, // TX_4X4 #endif 0xffffffffffffffffULL, // TX_4X4 @@ -171,7 +171,7 @@ static const uint64_t above_border = 0x000000ff000000ffULL; // 16 bit masks for uv transform sizes. static const uint16_t left_64x64_txform_mask_uv[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 0xffff, // TX_2X2 #endif 0xffff, // TX_4X4 @@ -184,7 +184,7 @@ static const uint16_t left_64x64_txform_mask_uv[TX_SIZES] = { }; static const uint16_t above_64x64_txform_mask_uv[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 0xffff, // TX_2X2 #endif 0xffff, // TX_4X4 @@ -1918,7 +1918,7 @@ static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES] = { static const uint32_t av1_transform_masks[NUM_EDGE_DIRS][TX_SIZES_ALL] = { { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 2 - 1, // TX_2X2 #endif 4 - 1, // TX_4X4 @@ -1940,7 +1940,7 @@ static const uint32_t av1_transform_masks[NUM_EDGE_DIRS][TX_SIZES_ALL] = { 32 - 1 // TX_32X8 }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 2 - 1, // TX_2X2 #endif 4 - 1, // TX_4X4 diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 0cffa7946..00229073b 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h @@ -799,7 +799,7 @@ static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter, static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][EXT_TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 1, 1, 1, 1, 1 }, // unused { 0, 1, 1, 0, 0 }, { 0, 0, 0, 1, 0 }, @@ -807,12 +807,12 @@ static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][EXT_TX_SIZES] = { 1, 1, 1, 1 }, // unused { 1, 1, 0, 0 }, { 0, 0, 1, 0 }, -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 }; static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][EXT_TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 1, 1, 1, 1, 1 }, // unused { 0, 1, 1, 0, 0 }, { 0, 0, 0, 1, 0 }, @@ -822,7 +822,7 @@ static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][EXT_TX_SIZES] = { 1, 1, 0, 0 }, { 0, 0, 1, 0 }, { 0, 0, 0, 1 }, -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 }; // Transform types used in each intra set @@ -1055,7 +1055,7 @@ static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type, const MACROBLOCKD *xd, if (is_inter_block(mbmi)) { // UV Inter only -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 if (tx_size < TX_4X4) return DCT_DCT; #endif return (mbmi->tx_type == IDTX && txsize_sqr_map[tx_size] >= TX_32X32) @@ -1066,11 +1066,13 @@ static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type, const MACROBLOCKD *xd, #if CONFIG_CB4X4 (void)block; +#if CONFIG_CHROMA_2X2 if (tx_size < TX_4X4) return DCT_DCT; else +#endif return intra_mode_to_tx_type_context[mbmi->uv_mode]; -#else +#else // CONFIG_CB4X4 // Sub8x8-Inter/Intra OR UV-Intra if (is_inter_block(mbmi)) // Sub8x8-Inter @@ -1114,7 +1116,7 @@ static INLINE TX_SIZE depth_to_tx_size(int depth) { static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi, const struct macroblockd_plane *pd) { TX_SIZE uv_txsize; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 assert(mbmi->tx_size > TX_2X2); #endif @@ -1126,9 +1128,6 @@ static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi, uv_txsize = uv_txsize_lookup[mbmi->sb_type][mbmi->tx_size][pd->subsampling_x] [pd->subsampling_y]; -#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2 - uv_txsize = AOMMAX(uv_txsize, TX_4X4); -#endif assert(uv_txsize != TX_INVALID); return uv_txsize; } diff --git a/av1/common/common_data.h b/av1/common/common_data.h index 3609d701e..7eae71a4f 100644 --- a/av1/common/common_data.h +++ b/av1/common/common_data.h @@ -437,9 +437,11 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] = }; static const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = { -#if CONFIG_CB4X4 // 2X2, 2X4, 4X2, +#if CONFIG_CHROMA_2X2 TX_2X2, TX_2X2, TX_2X2, +#elif CONFIG_CB4X4 + TX_4X4, TX_4X4, TX_4X4, #endif // 4X4 TX_4X4, @@ -470,10 +472,12 @@ static const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = { #if CONFIG_RECT_TX && (CONFIG_EXT_TX || CONFIG_VAR_TX) static const TX_SIZE max_txsize_rect_lookup[BLOCK_SIZES] = { -#if CONFIG_CB4X4 // 2X2, 2X4, 4X2, +#if CONFIG_CHROMA_2X2 TX_2X2, TX_2X2, TX_2X2, -#endif // CONFIG_CB4X4 +#elif CONFIG_CB4X4 + TX_4X4, TX_4X4, TX_4X4, +#endif // 4X4 TX_4X4, // 4X8, 8X4, 8X8 @@ -623,7 +627,7 @@ static const int32_t intra_tx_size_cat_lookup[BLOCK_SIZES] = { /* clang-format on */ static const TX_SIZE sub_tx_size_map[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // TX_2X2 #endif TX_4X4, // TX_4X4 @@ -646,7 +650,7 @@ static const TX_SIZE sub_tx_size_map[TX_SIZES_ALL] = { }; static const TX_SIZE txsize_horz_map[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // TX_2X2 #endif TX_4X4, // TX_4X4 @@ -669,7 +673,7 @@ static const TX_SIZE txsize_horz_map[TX_SIZES_ALL] = { }; static const TX_SIZE txsize_vert_map[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // TX_2X2 #endif TX_4X4, // TX_4X4 @@ -691,7 +695,7 @@ static const TX_SIZE txsize_vert_map[TX_SIZES_ALL] = { TX_8X8, // TX_32X8 }; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #define TX_SIZE_W_MIN 2 #else #define TX_SIZE_W_MIN 4 @@ -699,7 +703,7 @@ static const TX_SIZE txsize_vert_map[TX_SIZES_ALL] = { // Transform block width in pixels static const int tx_size_wide[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 2, #endif 4, 8, 16, 32, @@ -709,7 +713,7 @@ static const int tx_size_wide[TX_SIZES_ALL] = { 4, 8, 8, 16, 16, 32, 4, 16, 8, 32 }; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #define TX_SIZE_H_MIN 2 #else #define TX_SIZE_H_MIN 4 @@ -717,7 +721,7 @@ static const int tx_size_wide[TX_SIZES_ALL] = { // Transform block height in pixels static const int tx_size_high[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 2, #endif 4, 8, 16, 32, @@ -729,41 +733,41 @@ static const int tx_size_high[TX_SIZES_ALL] = { // Transform block width in unit static const int tx_size_wide_unit[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 1, 2, 4, 8, 16, #if CONFIG_TX64X64 32, #endif // CONFIG_TX64X64 2, 4, 4, 8, 8, 16, 2, 8, 4, 16 -#else // CONFIG_CB4X4 +#else // CONFIG_CHROMA_2X2 1, 2, 4, 8, #if CONFIG_TX64X64 16, #endif // CONFIG_TX64X64 1, 2, 2, 4, 4, 8, 1, 4, 2, 8 -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 }; // Transform block height in unit static const int tx_size_high_unit[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 1, 2, 4, 8, 16, #if CONFIG_TX64X64 32, #endif // CONFIG_TX64X64 4, 2, 8, 4, 16, 8, 8, 2, 16, 4 -#else // CONFIG_CB4X4 +#else // CONFIG_CHROMA_2X2 1, 2, 4, 8, #if CONFIG_TX64X64 16, #endif // CONFIG_TX64X64 2, 1, 4, 2, 8, 4, 4, 1, 8, 2 -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 }; // Transform block width in log2 static const int tx_size_wide_log2[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 1, #endif 2, 3, 4, 5, @@ -775,7 +779,7 @@ static const int tx_size_wide_log2[TX_SIZES_ALL] = { // Transform block height in log2 static const int tx_size_high_log2[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 1, #endif 2, 3, 4, 5, @@ -789,7 +793,7 @@ static const int tx_size_high_log2[TX_SIZES_ALL] = { #define TX_UNIT_HIGH_LOG2 (MI_SIZE_LOG2 - tx_size_high_log2[0]) static const int tx_size_2d[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 4, #endif 16, 64, 256, 1024, @@ -800,7 +804,7 @@ static const int tx_size_2d[TX_SIZES_ALL] = { }; static const BLOCK_SIZE txsize_to_bsize[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 BLOCK_2X2, // TX_2X2 #endif BLOCK_4X4, // TX_4X4 @@ -823,7 +827,7 @@ static const BLOCK_SIZE txsize_to_bsize[TX_SIZES_ALL] = { }; static const TX_SIZE txsize_sqr_map[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // TX_2X2 #endif TX_4X4, // TX_4X4 @@ -846,7 +850,7 @@ static const TX_SIZE txsize_sqr_map[TX_SIZES_ALL] = { }; static const TX_SIZE txsize_sqr_up_map[TX_SIZES_ALL] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // TX_2X2 #endif TX_4X4, // TX_4X4 @@ -919,6 +923,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { // ss_x == 0 ss_x == 0 ss_x == 1 ss_x == 1 // ss_y == 0 ss_y == 1 ss_y == 0 ss_y == 1 #if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // BLOCK_2X2 { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, @@ -982,15 +987,77 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, }, +#else // CONFIG_CHROMA_2X2 + { + // BLOCK_2X2 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#if CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#endif // CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + }, + { + // BLOCK_2X4 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#if CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#endif // CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + }, + { + // BLOCK_2X4 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#if CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, +#endif // CONFIG_TX64X64 + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + { { TX_INVALID, TX_INVALID }, { TX_INVALID, TX_INVALID } }, + }, +#endif // CONFIG_CHROMA_2X2 #endif { // BLOCK_4X4 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 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 // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1010,7 +1077,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_4X8 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, { { TX_4X4, TX_2X2 }, { TX_2X2, TX_2X2 } }, #else @@ -1022,7 +1089,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { #if CONFIG_TX64X64 { { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif // CONFIG_TX64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X8, TX_4X4 }, { TX_2X2, TX_2X2 } }, // used #else { { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, // used @@ -1039,7 +1106,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_8X4 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, { { TX_4X4, TX_2X2 }, { TX_2X2, TX_2X2 } }, #else @@ -1052,7 +1119,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif // CONFIG_TX64X64 { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_8X4, TX_2X2 }, { TX_4X4, TX_2X2 } }, // used #else { { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, // used @@ -1068,7 +1135,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_8X8 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_2X2, TX_2X2 }, { TX_2X2, TX_2X2 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1091,7 +1158,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_8X16 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1114,7 +1181,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_16X8 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1137,7 +1204,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_16X16 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1160,7 +1227,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_16X32 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1183,7 +1250,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_32X16 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1206,7 +1273,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_32X32 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1229,7 +1296,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_32X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1252,7 +1319,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_64X32 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1275,7 +1342,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1299,7 +1366,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { #if CONFIG_EXT_PARTITION { // BLOCK_64X128 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1322,7 +1389,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_128X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1345,7 +1412,7 @@ static const TX_SIZE uv_txsize_lookup[BLOCK_SIZES][TX_SIZES_ALL][2][2] = { }, { // BLOCK_128X128 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, @@ -1426,7 +1493,7 @@ static const struct { static const TX_SIZE uvsupertx_size_lookup[TX_SIZES][2][2] = { // ss_x == 0 ss_x == 0 ss_x == 1 ss_x == 1 // ss_y == 0 ss_y == 1 ss_y == 0 ss_y == 1 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, #endif { { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, diff --git a/av1/common/entropy.c b/av1/common/entropy.c index 0f036344b..3ce205e3c 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c @@ -135,7 +135,7 @@ const aom_prob av1_cat6_prob[] = { }; const uint16_t band_count_table[TX_SIZES_ALL][8] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 1, 2, 2, 3, 0, 0, 0 }, #endif { 1, 2, 3, 4, 3, 16 - 13, 0 }, { 1, 2, 3, 4, 11, 64 - 21, 0 }, @@ -151,7 +151,7 @@ const uint16_t band_count_table[TX_SIZES_ALL][8] = { }; const uint16_t band_cum_count_table[TX_SIZES_ALL][8] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0, 1, 3, 6, 10, 13, 16, 0 }, #endif { 0, 1, 3, 6, 10, 13, 16, 0 }, { 0, 1, 3, 6, 10, 21, 64, 0 }, @@ -896,7 +896,7 @@ const aom_cdf_prob av1_pareto8_tail_probs[COEFF_PROB_MODELS][TAIL_NODES] = { const av1_coeff_probs_model default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { { // Q_Index 0 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -1562,7 +1562,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 1 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -2228,7 +2228,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 2 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -2894,7 +2894,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 3 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -4075,7 +4075,7 @@ static const av1_coeff_probs_model default_coef_probs_64x64[PLANE_TYPES] = { #endif // CONFIG_Q_ADAPT_PROBS static const aom_prob av1_default_blockzero_probs[TX_SIZES][PLANE_TYPES] [REF_TYPES][BLOCKZ_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_2x2 { // Y plane { 195, 84, 8, }, // Intra @@ -5448,7 +5448,7 @@ static void av1_default_coef_cdfs(FRAME_CONTEXT *fc) { for (j = 0; j < REF_TYPES; ++j) for (k = 0; k < COEF_BANDS; ++k) for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 av1_copy(fc->coef_head_cdfs[TX_2X2][i][j][k][l], default_coef_head_cdf_4x4[i][j][k][l]); #endif @@ -5500,7 +5500,7 @@ void av1_default_coef_probs(AV1_COMMON *cm) { ROUND_POWER_OF_TWO(cm->base_qindex, 8 - QCTX_BIN_BITS), QCTX_BINS - 1); av1_copy(cm->fc->coef_probs, default_qctx_coef_probs[index]); #else -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 av1_copy(cm->fc->coef_probs[TX_2X2], default_coef_probs_4x4); #endif av1_copy(cm->fc->coef_probs[TX_4X4], default_coef_probs_4x4); diff --git a/av1/common/entropy.h b/av1/common/entropy.h index dac40035d..49d5f6c57 100644 --- a/av1/common/entropy.h +++ b/av1/common/entropy.h @@ -125,7 +125,7 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size, // TODO(debargha): Does TX_64X64 require an additional extrabit? if (tx_size > TX_32X32) tx_size = TX_32X32; #endif -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 int tx_offset = (tx_size < TX_4X4) ? 0 : (int)(tx_size - TX_4X4); #else int tx_offset = (int)(tx_size - TX_4X4); @@ -263,7 +263,7 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a, const ENTROPY_CONTEXT *l) { ENTROPY_CONTEXT above_ec = 0, left_ec = 0; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 switch (tx_size) { case TX_2X2: above_ec = a[0] != 0; @@ -338,7 +338,7 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a, default: assert(0 && "Invalid transform size."); break; } return combine_entropy_contexts(above_ec, left_ec); -#endif +#endif // CONFIG_CHROMA_2X2 switch (tx_size) { case TX_4X4: diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 6aa51e245..e60c65179 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c @@ -18,7 +18,7 @@ #if CONFIG_LV_MAP const aom_prob default_txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, #endif { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, @@ -32,7 +32,7 @@ const aom_prob default_dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS] = { const aom_prob default_coeff_base [TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS][COEFF_BASE_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_2X2 { { 73, 128, 131, 204, 165, 226, 169, 236, 18, 128, 51, @@ -168,7 +168,7 @@ const aom_prob default_coeff_base }; const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 34, 103, 61, 106, 62, 160, 112, 54, 173, 121, 75, 157, 92, 75, 157, 129, 94, 65, 52, 37 }, @@ -203,7 +203,7 @@ const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = { }; const aom_prob default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 229, 236, 231, 222, 239, 236, 214, 201, 236, 226, 195, 134, 228, 210, 150, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, @@ -238,7 +238,7 @@ const aom_prob default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = { }; const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 164, 128, 134, 165, 128, 137, 168, 128, 97, 136, 167, 128, 182, 205, 143, 172, 200, 145, 173, 193, 103, 137, 170, 191, @@ -1852,7 +1852,7 @@ static const aom_prob default_inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1] = { { // ToDo(yaowu): remove unused entry 0. -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { 0 }, @@ -1861,7 +1861,7 @@ static const aom_prob { 0 }, }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { 10, 24, 30, 128, 128, 128, 128, 112, 160, 128, 128, 128, 128, 128, @@ -1874,7 +1874,7 @@ static const aom_prob 128 }, }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 }, @@ -1883,7 +1883,7 @@ static const aom_prob { 10, 30, 128, 112, 160, 128, 128, 128, 128, 128, 128 }, }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { 12 }, @@ -1900,7 +1900,7 @@ static const aom_prob [TX_TYPES - 1] = { { // ToDo(yaowu): remove unused entry 0. -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 0 }, }, @@ -1983,7 +1983,7 @@ static const aom_prob }, }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 0 }, }, @@ -2066,7 +2066,7 @@ static const aom_prob }, }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 0 }, }, @@ -2164,7 +2164,7 @@ int av1_ext_tx_inv[TX_TYPES]; static const aom_prob default_intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 240, 85, 128 }, { 4, 1, 248 }, { 4, 1, 8 }, { 4, 248, 128 } }, #endif { { 240, 85, 128 }, { 4, 1, 248 }, { 4, 1, 8 }, { 4, 248, 128 } }, @@ -2173,7 +2173,7 @@ static const aom_prob }; static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 160, 85, 128 }, #endif { 160, 85, 128 }, @@ -2203,7 +2203,7 @@ static const aom_prob default_filter_intra_probs[2] = { 230, 230 }; #if CONFIG_SUPERTX static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #if CONFIG_TX64X64 { 1, 1, 160, 160, 170, 180 }, { 1, 1, 200, 200, 210, 220 }, #else @@ -2214,8 +2214,8 @@ static const aom_prob { 1, 160, 160, 170, 180 }, { 1, 200, 200, 210, 220 }, #else { 1, 160, 160, 170 }, { 1, 200, 200, 210 }, -#endif // CONFIG_CB4X4 #endif // CONFIG_TX64X64 +#endif // CONFIG_CHROMA_2X2 }; #endif // CONFIG_SUPERTX @@ -2562,7 +2562,7 @@ static const aom_cdf_prob default_intra_ext_tx_cdf [EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][CDF_SIZE(TX_TYPES)] = { { // FIXME: unused zero positions, from uncoded trivial transform set -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 0 }, }, @@ -2917,7 +2917,7 @@ static const aom_cdf_prob default_inter_ext_tx_cdf[EXT_TX_SETS_INTER][EXT_TX_SIZES][CDF_SIZE( TX_TYPES)] = { { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { 0 }, @@ -2925,7 +2925,7 @@ static const aom_cdf_prob { 0 }, { 0 } }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { AOM_ICDF(1280), AOM_ICDF(1453), AOM_ICDF(1626), AOM_ICDF(2277), @@ -2949,7 +2949,7 @@ static const aom_cdf_prob AOM_ICDF(28253), AOM_ICDF(29758), AOM_ICDF(31263), AOM_ICDF(32768), 0 } }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { AOM_ICDF(1280), AOM_ICDF(3125), AOM_ICDF(4970), AOM_ICDF(17132), @@ -2969,7 +2969,7 @@ static const aom_cdf_prob AOM_ICDF(28370), AOM_ICDF(29836), AOM_ICDF(31302), AOM_ICDF(32768), 0 } }, { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0 }, #endif { AOM_ICDF(1536), AOM_ICDF(32768), 0 }, @@ -2980,7 +2980,7 @@ static const aom_cdf_prob #else static const aom_cdf_prob default_intra_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES][CDF_SIZE(TX_TYPES)] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { AOM_ICDF(30720), AOM_ICDF(31400), AOM_ICDF(32084), AOM_ICDF(32768), 0 }, { AOM_ICDF(512), AOM_ICDF(638), AOM_ICDF(31764), AOM_ICDF(32768), 0 }, @@ -3011,7 +3011,7 @@ static const aom_cdf_prob static const aom_cdf_prob default_inter_ext_tx_cdf[EXT_TX_SIZES][CDF_SIZE(TX_TYPES)] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { AOM_ICDF(20480), AOM_ICDF(24560), AOM_ICDF(28664), AOM_ICDF(32768), 0 }, #endif { AOM_ICDF(20480), AOM_ICDF(24560), AOM_ICDF(28664), AOM_ICDF(32768), 0 }, diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h index 97e0f3b69..5a465d1bd 100644 --- a/av1/common/entropymode.h +++ b/av1/common/entropymode.h @@ -106,7 +106,7 @@ typedef struct frame_contexts { [SWITCHABLE_FILTERS - 1]; #if CONFIG_ADAPT_SCAN // TODO(angiebird): try aom_prob -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 uint32_t non_zero_prob_2x2[TX_TYPES][4]; #endif uint32_t non_zero_prob_4X4[TX_TYPES][16]; @@ -121,7 +121,7 @@ typedef struct frame_contexts { uint32_t non_zero_prob_32X16[TX_TYPES][512]; uint32_t non_zero_prob_16X32[TX_TYPES][512]; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 DECLARE_ALIGNED(16, int16_t, scan_2x2[TX_TYPES][4]); #endif DECLARE_ALIGNED(16, int16_t, scan_4X4[TX_TYPES][16]); @@ -136,7 +136,7 @@ typedef struct frame_contexts { DECLARE_ALIGNED(16, int16_t, scan_16X32[TX_TYPES][512]); DECLARE_ALIGNED(16, int16_t, scan_32X16[TX_TYPES][512]); -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 DECLARE_ALIGNED(16, int16_t, iscan_2x2[TX_TYPES][4]); #endif DECLARE_ALIGNED(16, int16_t, iscan_4X4[TX_TYPES][16]); @@ -151,7 +151,7 @@ typedef struct frame_contexts { DECLARE_ALIGNED(16, int16_t, iscan_16X32[TX_TYPES][512]); DECLARE_ALIGNED(16, int16_t, iscan_32X16[TX_TYPES][512]); -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 int16_t nb_2x2[TX_TYPES][(4 + 1) * 2]; #endif int16_t nb_4X4[TX_TYPES][(16 + 1) * 2]; @@ -324,9 +324,9 @@ typedef struct FRAME_COUNTS { unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS] [SWITCHABLE_FILTERS]; #if CONFIG_ADAPT_SCAN -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 unsigned int non_zero_count_2x2[TX_TYPES][4]; -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 unsigned int non_zero_count_4X4[TX_TYPES][16]; unsigned int non_zero_count_8X8[TX_TYPES][64]; unsigned int non_zero_count_16X16[TX_TYPES][256]; diff --git a/av1/common/enums.h b/av1/common/enums.h index 8588f0deb..0cce8f0ee 100644 --- a/av1/common/enums.h +++ b/av1/common/enums.h @@ -149,7 +149,7 @@ typedef char PARTITION_CONTEXT; // block transform size typedef enum ATTRIBUTE_PACKED { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 TX_2X2, // 2x2 transform #endif TX_4X4, // 4x4 transform @@ -249,15 +249,15 @@ typedef enum { } BOUNDARY_TYPE; #if CONFIG_EXT_TX -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #define EXT_TX_SIZES 5 // number of sizes that use extended transforms #else #define EXT_TX_SIZES 4 // number of sizes that use extended transforms -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 #define EXT_TX_SETS_INTER 4 // Sets of transform selections for INTER #define EXT_TX_SETS_INTRA 3 // Sets of transform selections for INTRA #else -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #define EXT_TX_SIZES 4 // number of sizes that use extended transforms #else #define EXT_TX_SIZES 3 // number of sizes that use extended transforms diff --git a/av1/common/idct.c b/av1/common/idct.c index d12c3be98..e94598e34 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c @@ -1295,7 +1295,7 @@ static void idct64x64_add(const tran_low_t *input, uint8_t *dest, int stride, } #endif // CONFIG_TX64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 static void inv_txfm_add_2x2(const tran_low_t *input, uint8_t *dest, int stride, int eob, TX_TYPE tx_type, int lossless) { tran_high_t a1 = input[0] >> UNIT_QUANT_SHIFT; @@ -2465,7 +2465,7 @@ void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, aom_highbd_iwht4x4_1_add(input, dest, stride, bd); } -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 static void highbd_inv_txfm_add_2x2(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd, TX_TYPE tx_type, int lossless) { @@ -2778,7 +2778,7 @@ void av1_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, // case. inv_txfm_add_4x4(input, dest, stride, eob, tx_type, lossless); break; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: inv_txfm_add_2x2(input, dest, stride, eob, tx_type, lossless); break; @@ -2908,7 +2908,7 @@ void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride, av1_highbd_inv_txfm_add_4x4(input, dest, stride, eob, bd, tx_type, lossless); break; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: highbd_inv_txfm_add_2x2(input, dest, stride, eob, bd, tx_type, lossless); break; diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h index e171703c3..ecbe12f7f 100644 --- a/av1/common/pred_common.h +++ b/av1/common/pred_common.h @@ -206,13 +206,7 @@ static INLINE int get_tx_size_context(const MACROBLOCKD *xd) { if (!has_left) left_ctx = above_ctx; if (!has_above) above_ctx = left_ctx; -#if CONFIG_CB4X4 - // TODO(jingning): Temporary setup. Will rework this after the cb4x4 - // framework is up running. - return (above_ctx + left_ctx) > max_tx_size + 1; -#else - return (above_ctx + left_ctx) > max_tx_size; -#endif + return (above_ctx + left_ctx) > max_tx_size + TX_SIZE_LUMA_MIN; } #if CONFIG_VAR_TX diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c index b8cb2ff2b..c4f66fc48 100644 --- a/av1/common/reconintra.c +++ b/av1/common/reconintra.c @@ -580,7 +580,7 @@ static void av1_init_intra_predictors_internal(void) { p[TX_32X32] = aom_##type##_predictor_32x32 #endif // CONFIG_TX64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 #define INIT_ALL_SIZES(p, type) \ p[TX_2X2] = aom_##type##_predictor_2x2; \ p[TX_4X4] = aom_##type##_predictor_4x4; \ @@ -1214,7 +1214,7 @@ static void highbd_dr_predictor(uint16_t *dst, ptrdiff_t stride, int bs, #if CONFIG_FILTER_INTRA #if USE_3TAP_INTRA_FILTER static int filter_intra_taps_3[TX_SIZES][FILTER_INTRA_MODES][3] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 697, 836, -509 }, { 993, 513, -482 }, @@ -1293,7 +1293,7 @@ static int filter_intra_taps_3[TX_SIZES][FILTER_INTRA_MODES][3] = { }; #else static int filter_intra_taps_4[TX_SIZES][FILTER_INTRA_MODES][4] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { { 735, 881, -537, -54 }, { 1005, 519, -488, -11 }, diff --git a/av1/common/scan.c b/av1/common/scan.c index a3c7c0988..a0881a9b7 100644 --- a/av1/common/scan.c +++ b/av1/common/scan.c @@ -14,7 +14,7 @@ #include "av1/common/common_data.h" #include "av1/common/scan.h" -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 DECLARE_ALIGNED(16, static const int16_t, default_scan_2x2[4]) = { 0, 1, 2, 3, }; @@ -1491,7 +1491,7 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_64x64[4096]) = { }; #endif // CONFIG_TX64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 DECLARE_ALIGNED(16, static const int16_t, default_scan_2x2_neighbors[5 * MAX_NEIGHBORS]) = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, @@ -4249,7 +4249,7 @@ DECLARE_ALIGNED(16, static const int16_t, }; #endif // CONFIG_TX64X64 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 DECLARE_ALIGNED(16, static const int16_t, av1_default_iscan_2x2[4]) = { 0, 1, 2, 3 }; #endif @@ -5719,7 +5719,7 @@ DECLARE_ALIGNED(16, static const int16_t, av1_default_iscan_64x64[4096]) = { #endif // CONFIG_TX64X64 const SCAN_ORDER av1_default_scan_orders[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { default_scan_2x2, av1_default_iscan_2x2, default_scan_2x2_neighbors }, #endif { default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors }, @@ -5732,7 +5732,7 @@ const SCAN_ORDER av1_default_scan_orders[TX_SIZES] = { }; const SCAN_ORDER av1_intra_scan_orders[TX_SIZES_ALL][TX_TYPES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_2X2 { default_scan_2x2, av1_default_iscan_2x2, default_scan_2x2_neighbors }, @@ -6043,7 +6043,7 @@ const SCAN_ORDER av1_intra_scan_orders[TX_SIZES_ALL][TX_TYPES] = { }; const SCAN_ORDER av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_2X2 { default_scan_2x2, av1_default_iscan_2x2, default_scan_2x2_neighbors }, @@ -6493,7 +6493,7 @@ const SCAN_ORDER av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES] = { static uint32_t *get_non_zero_prob(FRAME_CONTEXT *fc, TX_SIZE tx_size, TX_TYPE tx_type) { switch (tx_size) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: return fc->non_zero_prob_2x2[tx_type]; #endif case TX_4X4: return fc->non_zero_prob_4X4[tx_type]; @@ -6515,7 +6515,7 @@ static uint32_t *get_non_zero_prob(FRAME_CONTEXT *fc, TX_SIZE tx_size, static int16_t *get_adapt_scan(FRAME_CONTEXT *fc, TX_SIZE tx_size, TX_TYPE tx_type) { switch (tx_size) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: return fc->scan_2x2[tx_type]; #endif case TX_4X4: return fc->scan_4X4[tx_type]; @@ -6537,7 +6537,7 @@ static int16_t *get_adapt_scan(FRAME_CONTEXT *fc, TX_SIZE tx_size, static int16_t *get_adapt_iscan(FRAME_CONTEXT *fc, TX_SIZE tx_size, TX_TYPE tx_type) { switch (tx_size) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: return fc->iscan_2x2[tx_type]; #endif case TX_4X4: return fc->iscan_4X4[tx_type]; @@ -6559,7 +6559,7 @@ static int16_t *get_adapt_iscan(FRAME_CONTEXT *fc, TX_SIZE tx_size, static int16_t *get_adapt_nb(FRAME_CONTEXT *fc, TX_SIZE tx_size, TX_TYPE tx_type) { switch (tx_size) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: return fc->nb_2x2[tx_type]; #endif case TX_4X4: return fc->nb_4X4[tx_type]; @@ -6581,7 +6581,7 @@ static int16_t *get_adapt_nb(FRAME_CONTEXT *fc, TX_SIZE tx_size, static uint32_t *get_non_zero_counts(FRAME_COUNTS *counts, TX_SIZE tx_size, TX_TYPE tx_type) { switch (tx_size) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: return counts->non_zero_count_2x2[tx_type]; #endif case TX_4X4: return counts->non_zero_count_4X4[tx_type]; diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index d0f83d766..71d544a38 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c @@ -2523,9 +2523,6 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile, av1_write_coeffs_mb(cm, x, w, plane); #else TX_SIZE tx = get_tx_size(plane, xd); -#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2 - tx = AOMMAX(TX_4X4, tx); -#endif const int bkw = tx_size_wide_unit[tx]; const int bkh = tx_size_high_unit[tx]; for (row = 0; row < num_4x4_h; row += bkh) { diff --git a/av1/encoder/hybrid_fwd_txfm.c b/av1/encoder/hybrid_fwd_txfm.c index 243293843..c57deed84 100644 --- a/av1/encoder/hybrid_fwd_txfm.c +++ b/av1/encoder/hybrid_fwd_txfm.c @@ -16,7 +16,7 @@ #include "av1/common/idct.h" #include "av1/encoder/hybrid_fwd_txfm.h" -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 static void fwd_txfm_2x2(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type, int lossless) { tran_high_t a1 = src_diff[0]; @@ -163,7 +163,7 @@ static void fwd_txfm_8x32(const int16_t *src_diff, tran_low_t *coeff, #endif // CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_RECT_TX_EXT #if CONFIG_HIGHBITDEPTH -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 static void highbd_fwd_txfm_2x2(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type, int lossless, const int bd) { @@ -455,7 +455,7 @@ void av1_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, case TX_4X4: fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, lossless); break; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: fwd_txfm_2x2(src_diff, coeff, diff_stride, tx_type, lossless); break; @@ -532,7 +532,7 @@ void av1_highbd_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff, case TX_4X4: highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, lossless, bd); break; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 case TX_2X2: highbd_fwd_txfm_2x2(src_diff, coeff, diff_stride, tx_type, lossless, bd); break; diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index 54b845e9e..6320af10b 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c @@ -558,7 +558,7 @@ static void get_entropy_contexts_plane( int i; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 switch (tx_size) { case TX_2X2: memcpy(t_above, above, sizeof(ENTROPY_CONTEXT) * num_4x4_w); @@ -674,7 +674,7 @@ static void get_entropy_contexts_plane( default: assert(0 && "Invalid transform size."); break; } return; -#endif +#endif // CONFIG_CHROMA_2X2 switch (tx_size) { case TX_4X4: diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index 962c4c640..39cd27dda 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c @@ -2671,7 +2671,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode( const int dst_stride = pd->dst.stride; const uint8_t *src_init = &p->src.buf[row * 4 * src_stride + col * 4]; uint8_t *dst_init = &pd->dst.buf[row * 4 * dst_stride + col * 4]; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 // TODO(jingning): This is a temporal change. The whole function should be // out when cb4x4 is enabled. ENTROPY_CONTEXT ta[4], tempa[4]; @@ -2679,7 +2679,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode( #else ENTROPY_CONTEXT ta[2], tempa[2]; ENTROPY_CONTEXT tl[2], templ[2]; -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 const int pred_width_in_4x4_blocks = num_4x4_blocks_wide_lookup[bsize]; const int pred_height_in_4x4_blocks = num_4x4_blocks_high_lookup[bsize]; @@ -4991,7 +4991,6 @@ static void choose_intra_uv_mode(const AV1_COMP *const cpi, MACROBLOCK *const x, rd_pick_intra_sbuv_mode(cpi, x, rate_uv, rate_uv_tokenonly, dist_uv, skip_uv, bsize, max_tx_size); #else - max_tx_size = AOMMAX(max_tx_size, TX_4X4); if (x->skip_chroma_rd) { *rate_uv = 0; *rate_uv_tokenonly = 0; @@ -5351,13 +5350,13 @@ typedef struct { int_mv ref_mv[2]; #endif // CONFIG_EXT_INTER -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 ENTROPY_CONTEXT ta[4]; ENTROPY_CONTEXT tl[4]; #else ENTROPY_CONTEXT ta[2]; ENTROPY_CONTEXT tl[2]; -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 } SEG_RDSTAT; typedef struct { @@ -5828,11 +5827,11 @@ static int64_t rd_pick_inter_best_sub8x8_mode( const BLOCK_SIZE bsize = mbmi->sb_type; const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize]; const int num_4x4_blocks_high = num_4x4_blocks_high_lookup[bsize]; -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 ENTROPY_CONTEXT t_above[4], t_left[4]; #else ENTROPY_CONTEXT t_above[2], t_left[2]; -#endif // CONFIG_CB4X4 +#endif // CONFIG_CHROMA_2X2 int subpelmv = 1, have_ref = 0; const int has_second_rf = has_second_ref(mbmi); const int inter_mode_mask = cpi->sf.inter_mode_mask[bsize]; @@ -9481,9 +9480,6 @@ void av1_rd_pick_intra_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x, [pd[1].subsampling_x][pd[1].subsampling_y]; init_sbuv_mode(&xd->mi[0]->mbmi); #if CONFIG_CB4X4 -#if !CONFIG_CHROMA_2X2 - max_uv_tx_size = AOMMAX(max_uv_tx_size, TX_4X4); -#endif // !CONFIG_CHROMA_2X2 if (!x->skip_chroma_rd) rd_pick_intra_sbuv_mode(cpi, x, &rate_uv, &rate_uv_tokenonly, &dist_uv, &uv_skip, bsize, max_uv_tx_size); diff --git a/examples/inspect.c b/examples/inspect.c index cf004460c..294e478af 100644 --- a/examples/inspect.c +++ b/examples/inspect.c @@ -153,7 +153,7 @@ const map_entry block_size_map[] = { }; const map_entry tx_size_map[] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 ENUM(TX_2X2), #endif ENUM(TX_4X4), ENUM(TX_8X8), ENUM(TX_16X16), ENUM(TX_32X32), diff --git a/test/av1_txfm_test.h b/test/av1_txfm_test.h index 70f971d09..d46f0bba7 100644 --- a/test/av1_txfm_test.h +++ b/test/av1_txfm_test.h @@ -79,7 +79,7 @@ static const int input_base = (1 << bd); #if CONFIG_HIGHBITDEPTH #if CONFIG_AV1_ENCODER static const Fwd_Txfm2d_Func fwd_txfm_func_ls[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif av1_fwd_txfm2d_4x4_c, av1_fwd_txfm2d_8x8_c, av1_fwd_txfm2d_16x16_c, @@ -88,7 +88,7 @@ static const Fwd_Txfm2d_Func fwd_txfm_func_ls[TX_SIZES] = { #endif static const Inv_Txfm2d_Func inv_txfm_func_ls[TX_SIZES] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 NULL, #endif av1_inv_txfm2d_add_4x4_c, av1_inv_txfm2d_add_8x8_c,