cb4x4: Move sub-4X4 block sizes behind chroma flags.
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_sub8x8 and chroma_2x2 (which is not) in separate steps. Encoder and decoder output should remain unchanged. Change-Id: Iff2a5494cab3b7d96f881e8bd9cd4bf18c817cfa
This commit is contained in:
Родитель
5c844690be
Коммит
81ec2619f8
|
@ -100,7 +100,7 @@ static const uint64_t above_64x64_txform_mask[TX_SIZES] = {
|
|||
// 00000000
|
||||
// 00000000
|
||||
static const uint64_t left_prediction_mask[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0000000000000001ULL, // BLOCK_2X2,
|
||||
0x0000000000000001ULL, // BLOCK_2X4,
|
||||
0x0000000000000001ULL, // BLOCK_4X2,
|
||||
|
@ -122,7 +122,7 @@ static const uint64_t left_prediction_mask[BLOCK_SIZES] = {
|
|||
|
||||
// 64 bit mask to shift and set for each prediction size.
|
||||
static const uint64_t above_prediction_mask[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0000000000000001ULL, // BLOCK_2X2
|
||||
0x0000000000000001ULL, // BLOCK_2X4
|
||||
0x0000000000000001ULL, // BLOCK_4X2
|
||||
|
@ -145,7 +145,7 @@ static const uint64_t above_prediction_mask[BLOCK_SIZES] = {
|
|||
// each 8x8 block that would be in the left most block of the given block
|
||||
// size in the 64x64 block.
|
||||
static const uint64_t size_mask[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0000000000000001ULL, // BLOCK_2X2
|
||||
0x0000000000000001ULL, // BLOCK_2X4
|
||||
0x0000000000000001ULL, // BLOCK_4X2
|
||||
|
@ -198,7 +198,7 @@ static const uint16_t above_64x64_txform_mask_uv[TX_SIZES] = {
|
|||
|
||||
// 16 bit left mask to shift and set for each uv prediction size.
|
||||
static const uint16_t left_prediction_mask_uv[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0001, // BLOCK_2X2,
|
||||
0x0001, // BLOCK_2X4,
|
||||
0x0001, // BLOCK_4X2,
|
||||
|
@ -219,7 +219,7 @@ static const uint16_t left_prediction_mask_uv[BLOCK_SIZES] = {
|
|||
};
|
||||
// 16 bit above mask to shift and set for uv each prediction size.
|
||||
static const uint16_t above_prediction_mask_uv[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0001, // BLOCK_2X2
|
||||
0x0001, // BLOCK_2X4
|
||||
0x0001, // BLOCK_4X2
|
||||
|
@ -241,7 +241,7 @@ static const uint16_t above_prediction_mask_uv[BLOCK_SIZES] = {
|
|||
|
||||
// 64 bit mask to shift and set for each uv prediction size
|
||||
static const uint16_t size_mask_uv[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0x0001, // BLOCK_2X2
|
||||
0x0001, // BLOCK_2X4
|
||||
0x0001, // BLOCK_4X2
|
||||
|
@ -1425,8 +1425,12 @@ static void get_filter_level_and_masks_non420(
|
|||
(blk_row * mi_size_high[BLOCK_8X8] << TX_UNIT_HIGH_LOG2) >> 1;
|
||||
const int tx_col_idx =
|
||||
(blk_col * mi_size_wide[BLOCK_8X8] << TX_UNIT_WIDE_LOG2) >> 1;
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, plane));
|
||||
#else
|
||||
const BLOCK_SIZE bsize = get_plane_block_size(mbmi->sb_type, plane);
|
||||
#endif
|
||||
const TX_SIZE mb_tx_size = mbmi->inter_tx_size[tx_row_idx][tx_col_idx];
|
||||
tx_size = (plane->plane_type == PLANE_TYPE_UV)
|
||||
? uv_txsize_lookup[bsize][mb_tx_size][0][0]
|
||||
|
@ -1898,11 +1902,11 @@ typedef enum EDGE_DIR { VERT_EDGE = 0, HORZ_EDGE = 1, NUM_EDGE_DIRS } EDGE_DIR;
|
|||
static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES] = {
|
||||
// mask for vertical edges filtering
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2 - 1, // BLOCK_2X2
|
||||
2 - 1, // BLOCK_2X4
|
||||
4 - 1, // BLOCK_4X2
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
4 - 1, // BLOCK_4X4
|
||||
4 - 1, // BLOCK_4X8
|
||||
8 - 1, // BLOCK_8X4
|
||||
|
@ -1924,11 +1928,11 @@ static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES] = {
|
|||
},
|
||||
// mask for horizontal edges filtering
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2 - 1, // BLOCK_2X2
|
||||
4 - 1, // BLOCK_2X4
|
||||
2 - 1, // BLOCK_4X2
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
4 - 1, // BLOCK_4X4
|
||||
8 - 1, // BLOCK_4X8
|
||||
4 - 1, // BLOCK_8X4
|
||||
|
@ -2043,8 +2047,12 @@ static TX_SIZE av1_get_transform_size(const MODE_INFO *const pCurr,
|
|||
const int tx_col_idx =
|
||||
(blk_col * mi_size_wide[BLOCK_8X8] << TX_UNIT_WIDE_LOG2) >> 1;
|
||||
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE bsize =
|
||||
AOMMAX(BLOCK_4X4, ss_size_lookup[sb_type][scaleHorz][scaleVert]);
|
||||
#else
|
||||
const BLOCK_SIZE bsize = ss_size_lookup[sb_type][scaleHorz][scaleVert];
|
||||
#endif
|
||||
const TX_SIZE mb_tx_size = mbmi->inter_tx_size[tx_row_idx][tx_col_idx];
|
||||
|
||||
assert(mb_tx_size < TX_SIZES_ALL);
|
||||
|
|
|
@ -128,7 +128,7 @@ void av1_foreach_transformed_block_in_plane(
|
|||
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
|
||||
// transform size varies per plane, look it up in a common way.
|
||||
const TX_SIZE tx_size = get_tx_size(plane, xd);
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
|
@ -239,11 +239,11 @@ void av1_reset_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col,
|
|||
#endif
|
||||
for (i = 0; i < nplanes; i++) {
|
||||
struct macroblockd_plane *const pd = &xd->plane[i];
|
||||
#if CONFIG_CHROMA_2X2 || !CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#endif
|
||||
const int txs_wide = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
|
||||
const int txs_high = block_size_high[plane_bsize] >> tx_size_high_log2[0];
|
||||
|
|
|
@ -916,7 +916,7 @@ static INLINE int get_ext_tx_types(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter,
|
|||
#if CONFIG_RECT_TX
|
||||
static INLINE int is_rect_tx_allowed_bsize(BLOCK_SIZE bsize) {
|
||||
static const char LUT[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, // BLOCK_2X2
|
||||
0, // BLOCK_2X4
|
||||
0, // BLOCK_4X2
|
||||
|
@ -953,7 +953,7 @@ static INLINE int is_rect_tx_allowed(const MACROBLOCKD *xd,
|
|||
#if CONFIG_RECT_TX_EXT
|
||||
static INLINE int is_quarter_tx_allowed_bsize(BLOCK_SIZE bsize) {
|
||||
static const char LUT_QTTX[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, // BLOCK_2X2
|
||||
0, // BLOCK_2X4
|
||||
0, // BLOCK_4X2
|
||||
|
|
|
@ -28,13 +28,13 @@ extern "C" {
|
|||
|
||||
// Log 2 conversion lookup tables for block width and height
|
||||
static const uint8_t b_width_log2_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, 0, 0,
|
||||
#endif
|
||||
0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, IF_EXT_PARTITION(4, 5, 5) 0, 2, 1, 3
|
||||
};
|
||||
static const uint8_t b_height_log2_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, 0, 0,
|
||||
#endif
|
||||
0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, IF_EXT_PARTITION(5, 4, 5) 2, 0, 3, 1
|
||||
|
@ -42,17 +42,21 @@ static const uint8_t b_height_log2_lookup[BLOCK_SIZES_ALL] = {
|
|||
// Log 2 conversion lookup tables for modeinfo width and height
|
||||
static const uint8_t mi_width_log2_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, IF_EXT_PARTITION(4, 5, 5) 0,
|
||||
2, 1, 3
|
||||
#else
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, 0, 0,
|
||||
#endif
|
||||
0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, IF_EXT_PARTITION(4, 5, 5) 0, 2, 1, 3
|
||||
#else // CONFIG_CB4X4
|
||||
0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, IF_EXT_PARTITION(3, 4, 4) 0, 1, 0, 2
|
||||
#endif
|
||||
};
|
||||
static const uint8_t mi_height_log2_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
0, 0, 0, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, IF_EXT_PARTITION(5, 4, 5) 2,
|
||||
0, 3, 1
|
||||
#else
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, 0, 0,
|
||||
#endif
|
||||
0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, IF_EXT_PARTITION(5, 4, 5) 2, 0, 3, 1
|
||||
#else // CONFIG_CB4X4
|
||||
0, 0, 0, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, IF_EXT_PARTITION(4, 3, 4) 1, 0, 2, 0
|
||||
#endif
|
||||
};
|
||||
|
@ -60,17 +64,23 @@ static const uint8_t mi_height_log2_lookup[BLOCK_SIZES_ALL] = {
|
|||
/* clang-format off */
|
||||
static const uint8_t mi_size_wide[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16,
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16,
|
||||
IF_EXT_PARTITION(16, 32, 32) 1, 4, 2, 8
|
||||
#else
|
||||
#else // CONFIG_CB4X4
|
||||
1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8, IF_EXT_PARTITION(8, 16, 16) 1, 2, 1, 4
|
||||
#endif
|
||||
};
|
||||
static const uint8_t mi_size_high[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16,
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16,
|
||||
IF_EXT_PARTITION(32, 16, 32) 4, 1, 8, 2
|
||||
#else
|
||||
#else // CONFIG_CB4X4
|
||||
1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8, IF_EXT_PARTITION(16, 8, 16) 2, 1, 4, 1
|
||||
#endif
|
||||
};
|
||||
|
@ -78,7 +88,7 @@ static const uint8_t mi_size_high[BLOCK_SIZES_ALL] = {
|
|||
|
||||
// Width/height lookup tables in units of various block sizes
|
||||
static const uint8_t block_size_wide[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2, 2, 4,
|
||||
#endif
|
||||
4, 4, 8, 8, 8, 16, 16,
|
||||
|
@ -87,7 +97,7 @@ static const uint8_t block_size_wide[BLOCK_SIZES_ALL] = {
|
|||
};
|
||||
|
||||
static const uint8_t block_size_high[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2, 4, 2,
|
||||
#endif
|
||||
4, 8, 4, 8, 16, 8, 16,
|
||||
|
@ -96,39 +106,39 @@ static const uint8_t block_size_high[BLOCK_SIZES_ALL] = {
|
|||
};
|
||||
|
||||
static const uint8_t num_4x4_blocks_wide_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16, IF_EXT_PARTITION(16, 32, 32) 1,
|
||||
4, 2, 8
|
||||
};
|
||||
static const uint8_t num_4x4_blocks_high_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16, IF_EXT_PARTITION(32, 16, 32) 4,
|
||||
1, 8, 2
|
||||
};
|
||||
static const uint8_t num_8x8_blocks_wide_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8, IF_EXT_PARTITION(8, 16, 16) 1, 2, 1, 4
|
||||
};
|
||||
static const uint8_t num_8x8_blocks_high_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8, IF_EXT_PARTITION(16, 8, 16) 2, 1, 4, 1
|
||||
};
|
||||
static const uint8_t num_16x16_blocks_wide_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, IF_EXT_PARTITION(4, 8, 8) 1, 1, 1, 2
|
||||
};
|
||||
static const uint8_t num_16x16_blocks_high_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
1, 1, 1,
|
||||
#endif
|
||||
1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 4, IF_EXT_PARTITION(8, 4, 8) 1, 1, 2, 1
|
||||
|
@ -136,14 +146,14 @@ static const uint8_t num_16x16_blocks_high_lookup[BLOCK_SIZES_ALL] = {
|
|||
|
||||
// AOMMIN(3, AOMMIN(b_width_log2(bsize), b_height_log2(bsize)))
|
||||
static const uint8_t size_group_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
0, 0, 0,
|
||||
#endif
|
||||
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, IF_EXT_PARTITION(3, 3, 3)
|
||||
};
|
||||
|
||||
static const uint8_t num_pels_log2_lookup[BLOCK_SIZES_ALL] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2, 3, 3,
|
||||
#endif
|
||||
4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, IF_EXT_PARTITION(13, 13, 14) 6,
|
||||
|
@ -154,7 +164,7 @@ static const uint8_t num_pels_log2_lookup[BLOCK_SIZES_ALL] = {
|
|||
static const PARTITION_TYPE
|
||||
partition_lookup[MAX_SB_SIZE_LOG2 - 1][BLOCK_SIZES] = {
|
||||
{ // 4X4 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -172,7 +182,7 @@ static const PARTITION_TYPE
|
|||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // 8X8 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -191,7 +201,7 @@ static const PARTITION_TYPE
|
|||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // 16X16 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -210,7 +220,7 @@ static const PARTITION_TYPE
|
|||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // 32X32 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -229,7 +239,7 @@ static const PARTITION_TYPE
|
|||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // 64X64 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -247,7 +257,7 @@ static const PARTITION_TYPE
|
|||
// 64x128, 128x64, 128x128
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
}, { // 128x128 ->
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
|
||||
#endif
|
||||
|
@ -274,7 +284,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
#endif // CONFIG_EXT_PARTITION_TYPES
|
||||
{
|
||||
{ // PARTITION_NONE
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_2X2, BLOCK_2X4, BLOCK_4X2,
|
||||
#endif
|
||||
|
@ -293,7 +303,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_64X128, BLOCK_128X64, BLOCK_128X128,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_HORZ
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
// 4X4
|
||||
|
@ -315,7 +325,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_VERT
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
// 4X4
|
||||
|
@ -337,7 +347,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_SPLIT
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
#endif
|
||||
|
@ -357,7 +367,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
#endif // CONFIG_EXT_PARTITION
|
||||
#if CONFIG_EXT_PARTITION_TYPES
|
||||
}, { // PARTITION_HORZ_A
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
#endif
|
||||
|
@ -376,7 +386,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_HORZ_B
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
#endif
|
||||
|
@ -395,7 +405,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_VERT_A
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
#endif
|
||||
|
@ -414,7 +424,7 @@ static const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] =
|
|||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
}, { // PARTITION_VERT_B
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
|
||||
#endif
|
||||
|
@ -440,7 +450,7 @@ static const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
|
|||
// 2X2, 2X4, 4X2,
|
||||
#if CONFIG_CHROMA_2X2
|
||||
TX_2X2, TX_2X2, TX_2X2,
|
||||
#elif CONFIG_CB4X4
|
||||
#elif CONFIG_CHROMA_SUB8X8
|
||||
TX_4X4, TX_4X4, TX_4X4,
|
||||
#endif
|
||||
// 4X4
|
||||
|
@ -475,9 +485,9 @@ static const TX_SIZE max_txsize_rect_lookup[BLOCK_SIZES] = {
|
|||
// 2X2, 2X4, 4X2,
|
||||
#if CONFIG_CHROMA_2X2
|
||||
TX_2X2, TX_2X2, TX_2X2,
|
||||
#elif CONFIG_CB4X4
|
||||
#elif CONFIG_CHROMA_SUB8X8
|
||||
TX_4X4, TX_4X4, TX_4X4,
|
||||
#endif
|
||||
#endif // CONFIG_CHROMA_SUB8X8
|
||||
// 4X4
|
||||
TX_4X4,
|
||||
// 4X8, 8X4, 8X8
|
||||
|
@ -507,7 +517,7 @@ static const TX_SIZE max_txsize_rect_lookup[BLOCK_SIZES] = {
|
|||
|
||||
#if CONFIG_EXT_TX && CONFIG_RECT_TX_EXT
|
||||
static const TX_SIZE quarter_txsize_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
TX_INVALID, TX_INVALID, TX_INVALID,
|
||||
#endif
|
||||
|
@ -553,13 +563,15 @@ static const TX_TYPE_1D htx_tab[TX_TYPES] = {
|
|||
// "(max_txsize_lookup[bsize] + 1) - TX_8X8", invalid for bsize < 8X8
|
||||
static const int32_t intra_tx_size_cat_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
INT32_MIN, INT32_MIN, INT32_MIN,
|
||||
#endif
|
||||
// 4X4,
|
||||
INT32_MIN,
|
||||
// 4X8, 8X4, 8X8,
|
||||
TX_8X8 - TX_8X8, TX_8X8 - TX_8X8, TX_8X8 - TX_8X8,
|
||||
#else
|
||||
#else // CONFIG_CB4X4
|
||||
// 4X4
|
||||
INT32_MIN,
|
||||
// 4X8, 8X4, 8X8
|
||||
|
@ -590,7 +602,7 @@ static const int32_t intra_tx_size_cat_lookup[BLOCK_SIZES] = {
|
|||
#else
|
||||
// Same as "max_txsize_lookup[bsize] - TX_8X8", invalid for bsize < 8X8
|
||||
static const int32_t intra_tx_size_cat_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2,
|
||||
INT32_MIN, INT32_MIN, INT32_MIN,
|
||||
#endif
|
||||
|
@ -890,13 +902,17 @@ static const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = {
|
|||
static const BLOCK_SIZE ss_size_lookup[BLOCK_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 || CONFIG_CHROMA_SUB8X8
|
||||
{ { BLOCK_2X2, BLOCK_INVALID }, { BLOCK_INVALID, BLOCK_INVALID } },
|
||||
{ { BLOCK_2X4, BLOCK_INVALID }, { BLOCK_INVALID, BLOCK_INVALID } },
|
||||
{ { BLOCK_4X2, BLOCK_INVALID }, { BLOCK_INVALID, BLOCK_INVALID } },
|
||||
{ { BLOCK_4X4, BLOCK_4X2 }, { BLOCK_2X4, BLOCK_2X2 } },
|
||||
{ { BLOCK_4X8, BLOCK_4X4 }, { BLOCK_INVALID, BLOCK_2X4 } },
|
||||
{ { BLOCK_8X4, BLOCK_INVALID }, { BLOCK_4X4, BLOCK_4X2 } },
|
||||
#elif CONFIG_CB4X4
|
||||
{ { BLOCK_4X4, BLOCK_4X4 }, { BLOCK_4X4, BLOCK_4X4 } },
|
||||
{ { BLOCK_4X8, BLOCK_4X4 }, { BLOCK_INVALID, BLOCK_4X4 } },
|
||||
{ { BLOCK_8X4, BLOCK_INVALID }, { BLOCK_4X4, BLOCK_4X4 } },
|
||||
#else
|
||||
{ { BLOCK_4X4, BLOCK_INVALID }, { BLOCK_INVALID, BLOCK_INVALID } },
|
||||
{ { BLOCK_4X8, BLOCK_4X4 }, { BLOCK_INVALID, BLOCK_INVALID } },
|
||||
|
@ -922,7 +938,6 @@ static const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2] = {
|
|||
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
|
||||
|
@ -987,7 +1002,7 @@ 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
|
||||
#elif CONFIG_CHROMA_SUB8X8
|
||||
{
|
||||
// BLOCK_2X2
|
||||
{ { TX_4X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
|
||||
|
@ -1048,7 +1063,6 @@ 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 } },
|
||||
},
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#endif
|
||||
{
|
||||
// BLOCK_4X4
|
||||
|
@ -1445,7 +1459,7 @@ static const struct {
|
|||
PARTITION_CONTEXT left;
|
||||
} partition_context_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_EXT_PARTITION
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 31, 31 }, // 2X2 - {0b11111, 0b11111}
|
||||
{ 31, 31 }, // 2X4 - {0b11111, 0b11111}
|
||||
{ 31, 31 }, // 4X2 - {0b11111, 0b11111}
|
||||
|
@ -1467,7 +1481,7 @@ static const struct {
|
|||
{ 0, 16 }, // 128X64- {0b00000, 0b10000}
|
||||
{ 0, 0 }, // 128X128-{0b00000, 0b00000}
|
||||
#else
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 15, 15 }, // 2X2 - {0b1111, 0b1111}
|
||||
{ 15, 15 }, // 2X4 - {0b1111, 0b1111}
|
||||
{ 15, 15 }, // 4X2 - {0b1111, 0b1111}
|
||||
|
|
|
@ -1072,7 +1072,7 @@ static const aom_prob default_inter_singleref_comp_mode_probs
|
|||
#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
|
||||
static const aom_prob
|
||||
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255, 128 }, { 255, 128 }, { 255, 128 },
|
||||
#endif
|
||||
{ 208, 128 }, { 208, 128 }, { 208, 128 }, { 208, 128 }, { 208, 128 },
|
||||
|
@ -1085,7 +1085,7 @@ static const aom_prob
|
|||
#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
|
||||
static const aom_prob
|
||||
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
|
||||
|
@ -1097,7 +1097,7 @@ static const aom_prob
|
|||
#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
|
||||
static const aom_prob
|
||||
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
|
||||
|
@ -1125,7 +1125,7 @@ static const aom_prob
|
|||
};
|
||||
|
||||
static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
208, 208, 208,
|
||||
#endif
|
||||
208, 208, 208, 208, 208, 208, 216, 216, 216, 224, 224, 224, 240,
|
||||
|
@ -1143,7 +1143,7 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
|
|||
};
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
|
||||
|
@ -1161,7 +1161,7 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
|
|||
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255 }, { 255 }, { 255 },
|
||||
#endif
|
||||
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
|
||||
|
@ -1178,7 +1178,7 @@ const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
|
|||
};
|
||||
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
||||
{
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 255, 200 }, { 255, 200 }, { 255, 200 },
|
||||
#endif
|
||||
{ 255, 200 }, { 255, 200 }, { 255, 200 }, { 151, 200 }, { 153, 200 },
|
||||
|
@ -1191,7 +1191,7 @@ static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
|
|||
|
||||
// Probability for the case that only 1 additional motion mode is allowed
|
||||
static const aom_prob default_obmc_prob[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
255, 255, 255,
|
||||
#endif
|
||||
255, 255, 255, 151, 153, 144, 178, 165, 160, 207, 195, 168, 244,
|
||||
|
|
|
@ -87,7 +87,7 @@ typedef enum BITSTREAM_PROFILE {
|
|||
// type, so that we can save memory when they are used in structs/arrays.
|
||||
|
||||
typedef enum ATTRIBUTE_PACKED {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
BLOCK_2X2,
|
||||
BLOCK_2X4,
|
||||
BLOCK_4X2,
|
||||
|
|
|
@ -160,11 +160,11 @@ static const wedge_code_type wedge_codebook_16_heqw[16] = {
|
|||
};
|
||||
|
||||
const wedge_params_type wedge_params_lookup[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
{ 0, NULL, NULL, 0, NULL },
|
||||
|
@ -1829,7 +1829,7 @@ int skip_u4x4_pred_in_obmc(BLOCK_SIZE bsize, const struct macroblockd_plane *pd,
|
|||
|
||||
BLOCK_SIZE bsize_plane =
|
||||
ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y];
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
if (bsize_plane < BLOCK_4X4) return 1;
|
||||
#endif
|
||||
switch (bsize_plane) {
|
||||
|
@ -2641,7 +2641,7 @@ static const int ii_weights1d[MAX_SB_SIZE] = {
|
|||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
};
|
||||
static int ii_size_scales[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
32, 32, 32,
|
||||
#endif
|
||||
32, 16, 16, 16, 8, 8, 8, 4,
|
||||
|
@ -2655,7 +2655,7 @@ static const int ii_weights1d[MAX_SB_SIZE] = {
|
|||
2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
};
|
||||
static int ii_size_scales[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
16, 16, 16,
|
||||
#endif
|
||||
16, 8, 8, 8, 4, 4, 4,
|
||||
|
|
|
@ -204,11 +204,11 @@ static INLINE int is_interinter_compound_used(COMPOUND_TYPE type,
|
|||
BLOCK_SIZE sb_type) {
|
||||
(void)sb_type;
|
||||
switch (type) {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
case COMPOUND_AVERAGE: return sb_type >= BLOCK_4X4;
|
||||
#else // CONFIG_CB4X4
|
||||
#else // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
case COMPOUND_AVERAGE: return 1;
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
#if CONFIG_WEDGE
|
||||
case COMPOUND_WEDGE: return wedge_params_lookup[sb_type].bits > 0;
|
||||
#endif // CONFIG_WEDGE
|
||||
|
@ -221,9 +221,9 @@ static INLINE int is_interinter_compound_used(COMPOUND_TYPE type,
|
|||
|
||||
static INLINE int is_any_masked_compound_used(BLOCK_SIZE sb_type) {
|
||||
COMPOUND_TYPE comp_type;
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
if (sb_type < BLOCK_4X4) return 0;
|
||||
#endif // CONFIG_CB4X4
|
||||
#endif // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
for (comp_type = 0; comp_type < COMPOUND_TYPES; comp_type++) {
|
||||
if (is_masked_compound_type(comp_type) &&
|
||||
is_interinter_compound_used(comp_type, sb_type))
|
||||
|
|
|
@ -301,13 +301,15 @@ static const uint16_t orders_4x4[1024] = {
|
|||
/* clang-format off */
|
||||
static const uint16_t *const orders[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2
|
||||
orders_4x4, orders_4x4, orders_4x4,
|
||||
#endif
|
||||
// 4X4
|
||||
orders_4x4,
|
||||
// 4X8, 8X4, 8X8
|
||||
orders_4x8, orders_8x4, orders_8x8,
|
||||
#else
|
||||
#else // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 4X4
|
||||
orders_8x8,
|
||||
// 4X8, 8X4, 8X8
|
||||
|
@ -327,13 +329,15 @@ static const uint16_t *const orders[BLOCK_SIZES] = {
|
|||
/* clang-format off */
|
||||
static const uint16_t *const orders[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2
|
||||
orders_8x8, orders_8x8, orders_8x8,
|
||||
#endif
|
||||
// 4X4
|
||||
orders_8x8,
|
||||
// 4X8, 8X4, 8X8
|
||||
orders_8x16, orders_16x8, orders_16x16,
|
||||
#else
|
||||
#else // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 4X4
|
||||
orders_16x16,
|
||||
// 4X8, 8X4, 8X8
|
||||
|
@ -388,7 +392,7 @@ static const uint16_t orders_verta_8x8[256] = {
|
|||
#if CONFIG_EXT_PARTITION
|
||||
/* clang-format off */
|
||||
static const uint16_t *const orders_verta[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2
|
||||
orders_4x4, orders_4x4, orders_4x4,
|
||||
#endif
|
||||
|
@ -410,13 +414,15 @@ static const uint16_t *const orders_verta[BLOCK_SIZES] = {
|
|||
/* clang-format off */
|
||||
static const uint16_t *const orders_verta[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 2X2, 2X4, 4X2
|
||||
orders_verta_8x8, orders_verta_8x8, orders_verta_8x8,
|
||||
#endif
|
||||
// 4X4
|
||||
orders_verta_8x8,
|
||||
// 4X8, 8X4, 8X8
|
||||
orders_verta_8x8, orders_verta_8x8, orders_verta_16x16,
|
||||
#else
|
||||
#else // CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
// 4X4
|
||||
orders_verta_16x16,
|
||||
// 4X8, 8X4, 8X8
|
||||
|
@ -2716,7 +2722,7 @@ void av1_predict_intra_block_facade(MACROBLOCKD *xd, int plane, int block_idx,
|
|||
CFL_CTX *const cfl = xd->cfl;
|
||||
if (plane != AOM_PLANE_Y && mbmi->uv_mode == DC_PRED) {
|
||||
if (plane == AOM_PLANE_U && blk_col == 0 && blk_row == 0) {
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, pd));
|
||||
#else
|
||||
|
|
|
@ -533,13 +533,11 @@ static int av1_pvq_decode_helper2(AV1_COMMON *cm, MACROBLOCKD *const xd,
|
|||
static int get_block_idx(const MACROBLOCKD *xd, int plane, int row, int col) {
|
||||
const int bsize = xd->mi[0]->mbmi.sb_type;
|
||||
const struct macroblockd_plane *pd = &xd->plane[plane];
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
|
@ -2024,13 +2022,11 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
|
|||
const TX_SIZE tx_size = get_tx_size(plane, xd);
|
||||
const int stepr = tx_size_high_unit[tx_size];
|
||||
const int stepc = tx_size_wide_unit[tx_size];
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
|
@ -2104,16 +2100,14 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
|
|||
|
||||
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
|
||||
const struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
#endif
|
||||
const int max_blocks_wide = max_block_wide(xd, plane_bsize, plane);
|
||||
const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
|
||||
|
|
|
@ -218,13 +218,11 @@ uint8_t av1_read_coeffs_txb_facade(AV1_COMMON *cm, MACROBLOCKD *xd,
|
|||
struct macroblockd_plane *pd = &xd->plane[plane];
|
||||
|
||||
const BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else // CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
|
|
|
@ -2754,13 +2754,11 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
|
|||
#if CONFIG_VAR_TX
|
||||
const struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(bsize, BLOCK_8X8), pd);
|
||||
|
|
|
@ -2695,7 +2695,7 @@ static void rd_use_partition(AV1_COMP *cpi, ThreadData *td,
|
|||
|
||||
/* clang-format off */
|
||||
static const BLOCK_SIZE min_partition_size[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
BLOCK_2X2, BLOCK_2X2, BLOCK_2X2, // 2x2, 2x4, 4x2
|
||||
#endif
|
||||
BLOCK_4X4, // 4x4
|
||||
|
@ -2709,7 +2709,7 @@ static const BLOCK_SIZE min_partition_size[BLOCK_SIZES] = {
|
|||
};
|
||||
|
||||
static const BLOCK_SIZE max_partition_size[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
BLOCK_4X4, BLOCK_4X4, BLOCK_4X4, // 2x2, 2x4, 4x2
|
||||
#endif
|
||||
BLOCK_8X8, // 4x4
|
||||
|
@ -2724,7 +2724,7 @@ static const BLOCK_SIZE max_partition_size[BLOCK_SIZES] = {
|
|||
|
||||
// Next square block size less or equal than current block size.
|
||||
static const BLOCK_SIZE next_square_size[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
BLOCK_2X2, BLOCK_2X2, BLOCK_2X2, // 2x2, 2x4, 4x2
|
||||
#endif
|
||||
BLOCK_4X4, // 4x4
|
||||
|
|
|
@ -1606,13 +1606,13 @@ void av1_predict_intra_block_encoder_facade(MACROBLOCK *x,
|
|||
#if CONFIG_DEBUG
|
||||
// av1_predict_intra_block_facade does not pass plane_bsize, we need to validate
|
||||
// that we will get the same value of plane_bsize on the other side.
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize_val =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, &xd->plane[plane]));
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize_val =
|
||||
get_plane_block_size(mbmi->sb_type, &xd->plane[plane]);
|
||||
#endif // CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#endif // CONFIG_CHROMA_SUB8X8
|
||||
assert(plane_bsize == plane_bsize_val);
|
||||
#endif // CONFIG_DEBUG
|
||||
av1_predict_intra_block_facade(xd, plane, block_idx, blk_col, blk_row,
|
||||
|
|
|
@ -1408,7 +1408,7 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
|
|||
aom_highbd_8_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits8,
|
||||
aom_highbd_sad4x4x8_bits8, aom_highbd_sad4x4x4d_bits8)
|
||||
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_8_variance2x2, NULL, NULL,
|
||||
NULL, NULL, NULL)
|
||||
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_8_variance4x2, NULL, NULL,
|
||||
|
@ -1613,7 +1613,7 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
|
|||
aom_highbd_10_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits10,
|
||||
aom_highbd_sad4x4x8_bits10, aom_highbd_sad4x4x4d_bits10)
|
||||
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_10_variance2x2, NULL, NULL,
|
||||
NULL, NULL, NULL)
|
||||
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_10_variance4x2, NULL, NULL,
|
||||
|
@ -1820,7 +1820,7 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
|
|||
aom_highbd_12_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits12,
|
||||
aom_highbd_sad4x4x8_bits12, aom_highbd_sad4x4x4d_bits12)
|
||||
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_12_variance2x2, NULL, NULL,
|
||||
NULL, NULL, NULL)
|
||||
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_12_variance4x2, NULL, NULL,
|
||||
|
@ -2402,7 +2402,7 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
|
|||
aom_sub_pixel_variance4x4, aom_sub_pixel_avg_variance4x4, aom_sad4x4x3,
|
||||
aom_sad4x4x8, aom_sad4x4x4d)
|
||||
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
BFP(BLOCK_2X2, NULL, NULL, aom_variance2x2, NULL, NULL, NULL, NULL, NULL)
|
||||
BFP(BLOCK_2X4, NULL, NULL, aom_variance2x4, NULL, NULL, NULL, NULL, NULL)
|
||||
BFP(BLOCK_4X2, NULL, NULL, aom_variance4x2, NULL, NULL, NULL, NULL, NULL)
|
||||
|
|
|
@ -184,13 +184,11 @@ void av1_write_coeffs_mb(const AV1_COMMON *const cm, MACROBLOCK *x,
|
|||
BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
struct macroblockd_plane *pd = &xd->plane[plane];
|
||||
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(bsize, BLOCK_8X8), pd);
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
// This table is used to correct for block size.
|
||||
// The factors here are << 2 (2 = x0.5, 32 = x8 etc).
|
||||
static const uint8_t rd_thresh_block_size_factor[BLOCK_SIZES] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
2, 2, 2,
|
||||
#endif
|
||||
2, 3, 3, 4, 6, 6, 8, 12, 12, 16, 24, 24, 32,
|
||||
|
@ -797,7 +797,7 @@ void av1_get_entropy_contexts(BLOCK_SIZE bsize, TX_SIZE tx_size,
|
|||
const struct macroblockd_plane *pd,
|
||||
ENTROPY_CONTEXT t_above[2 * MAX_MIB_SIZE],
|
||||
ENTROPY_CONTEXT t_left[2 * MAX_MIB_SIZE]) {
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
|
|
|
@ -1006,11 +1006,11 @@ static void model_rd_for_sb(const AV1_COMP *const cpi, BLOCK_SIZE bsize,
|
|||
for (plane = plane_from; plane <= plane_to; ++plane) {
|
||||
struct macroblock_plane *const p = &x->plane[plane];
|
||||
struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE bs = AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
const BLOCK_SIZE bs = get_plane_block_size(bsize, pd);
|
||||
#endif // CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#endif // CONFIG_CHROMA_SUB8X8
|
||||
|
||||
unsigned int sse;
|
||||
int rate;
|
||||
|
@ -1272,13 +1272,11 @@ int av1_cost_coeffs(const AV1_COMP *const cpi, MACROBLOCK *x, int plane,
|
|||
const MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
|
||||
const struct macroblockd_plane *pd = &xd->plane[plane];
|
||||
const BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#endif // CONFIG_CHROMA_2X2
|
||||
#elif CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
#else // CONFIG_CB4X4
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
|
||||
|
|
|
@ -666,7 +666,7 @@ void av1_tokenize_sb_vartx(const AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
|
|||
}
|
||||
#endif
|
||||
const struct macroblockd_plane *const pd = &xd->plane[plane];
|
||||
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
|
||||
#if CONFIG_CHROMA_SUB8X8
|
||||
const BLOCK_SIZE plane_bsize =
|
||||
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
|
||||
#else
|
||||
|
|
|
@ -138,7 +138,7 @@ const map_entry refs_map[] = { ENUM(INTRA_FRAME), ENUM(LAST_FRAME),
|
|||
LAST_ENUM };
|
||||
|
||||
const map_entry block_size_map[] = {
|
||||
#if CONFIG_CB4X4
|
||||
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
|
||||
ENUM(BLOCK_2X2), ENUM(BLOCK_2X4), ENUM(BLOCK_4X2),
|
||||
#endif
|
||||
ENUM(BLOCK_4X4), ENUM(BLOCK_4X8), ENUM(BLOCK_8X4),
|
||||
|
|
Загрузка…
Ссылка в новой задаче