Commit fe67ed6a authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by Jingning Han

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
parent 6e4955d4
......@@ -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,
......
......@@ -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,
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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 } },
......
......@@ -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] = {