Commit 5d149e1d authored by Debargha Mukherjee's avatar Debargha Mukherjee

Remove sub-4x4 block sizes

Removes unused BLOCK_2X2, BLOCK_2X4 and BLOCK_4X2 from the
BLOCK_SIZE enum.

Change-Id: I964d99718026c51a1eaf30d4a1fc83cc52f94083
parent f54656db
......@@ -131,9 +131,6 @@ static const uint64_t above_64x64_txform_mask[TX_SIZES] = {
// 00000000
// 00000000
static const uint64_t left_prediction_mask[BLOCK_SIZES_ALL] = {
0x0000000000000001ULL, // BLOCK_2X2,
0x0000000000000001ULL, // BLOCK_2X4,
0x0000000000000001ULL, // BLOCK_4X2,
0x0000000000000001ULL, // BLOCK_4X4,
0x0000000000000001ULL, // BLOCK_4X8,
0x0000000000000001ULL, // BLOCK_8X4,
......@@ -157,9 +154,6 @@ static const uint64_t left_prediction_mask[BLOCK_SIZES_ALL] = {
// 64 bit mask to shift and set for each prediction size.
static const uint64_t above_prediction_mask[BLOCK_SIZES_ALL] = {
0x0000000000000001ULL, // BLOCK_2X2
0x0000000000000001ULL, // BLOCK_2X4
0x0000000000000001ULL, // BLOCK_4X2
0x0000000000000001ULL, // BLOCK_4X4
0x0000000000000001ULL, // BLOCK_4X8
0x0000000000000001ULL, // BLOCK_8X4
......@@ -184,9 +178,6 @@ static const uint64_t above_prediction_mask[BLOCK_SIZES_ALL] = {
// each 8x8 block that would be in the top left most block of the given block
// size in the 64x64 block.
static const uint64_t size_mask[BLOCK_SIZES_ALL] = {
0x0000000000000001ULL, // BLOCK_2X2
0x0000000000000001ULL, // BLOCK_2X4
0x0000000000000001ULL, // BLOCK_4X2
0x0000000000000001ULL, // BLOCK_4X4
0x0000000000000001ULL, // BLOCK_4X8
0x0000000000000001ULL, // BLOCK_8X4
......@@ -235,9 +226,6 @@ 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_ALL] = {
0x0001, // BLOCK_2X2,
0x0001, // BLOCK_2X4,
0x0001, // BLOCK_4X2,
0x0001, // BLOCK_4X4,
0x0001, // BLOCK_4X8,
0x0001, // BLOCK_8X4,
......@@ -261,9 +249,6 @@ static const uint16_t left_prediction_mask_uv[BLOCK_SIZES_ALL] = {
// 16 bit above mask to shift and set for uv each prediction size.
static const uint16_t above_prediction_mask_uv[BLOCK_SIZES_ALL] = {
0x0001, // BLOCK_2X2
0x0001, // BLOCK_2X4
0x0001, // BLOCK_4X2
0x0001, // BLOCK_4X4
0x0001, // BLOCK_4X8
0x0001, // BLOCK_8X4
......@@ -287,9 +272,6 @@ static const uint16_t above_prediction_mask_uv[BLOCK_SIZES_ALL] = {
// 64 bit mask to shift and set for each uv prediction size
static const uint16_t size_mask_uv[BLOCK_SIZES_ALL] = {
0x0001, // BLOCK_2X2
0x0001, // BLOCK_2X4
0x0001, // BLOCK_4X2
0x0001, // BLOCK_4X4
0x0001, // BLOCK_4X8
0x0001, // BLOCK_8X4
......@@ -1517,8 +1499,7 @@ 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;
const BLOCK_SIZE bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, plane));
const BLOCK_SIZE bsize = get_plane_block_size(mbmi->sb_type, plane);
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]
......@@ -1978,9 +1959,6 @@ 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_ALL] = {
// mask for vertical edges filtering
{
2 - 1, // BLOCK_2X2
2 - 1, // BLOCK_2X4
4 - 1, // BLOCK_4X2
4 - 1, // BLOCK_4X4
4 - 1, // BLOCK_4X8
8 - 1, // BLOCK_8X4
......@@ -2012,9 +1990,6 @@ static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES_ALL] = {
},
// mask for horizontal edges filtering
{
2 - 1, // BLOCK_2X2
4 - 1, // BLOCK_2X4
2 - 1, // BLOCK_4X2
4 - 1, // BLOCK_4X4
8 - 1, // BLOCK_4X8
4 - 1, // BLOCK_8X4
......@@ -2133,8 +2108,7 @@ static TX_SIZE av1_get_transform_size(const MODE_INFO *const mi,
(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;
const BLOCK_SIZE bsize =
AOMMAX(BLOCK_4X4, ss_size_lookup[sb_type][scale_horz][scale_vert]);
const BLOCK_SIZE bsize = ss_size_lookup[sb_type][scale_horz][scale_vert];
const TX_SIZE mb_tx_size = mbmi->inter_tx_size[tx_row_idx][tx_col_idx];
assert(mb_tx_size < TX_SIZES_ALL);
......
......@@ -34,8 +34,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 = av1_get_tx_size(plane, xd);
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
const uint8_t txw_unit = tx_size_wide_unit[tx_size];
const uint8_t txh_unit = tx_size_high_unit[tx_size];
const int step = txw_unit * txh_unit;
......@@ -137,8 +136,7 @@ void av1_reset_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col,
nplanes = 1 + (MAX_MB_PLANE - 1) * chroma_ref;
for (i = 0; i < nplanes; i++) {
struct macroblockd_plane *const pd = &xd->plane[i];
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
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];
memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * txs_wide);
......
......@@ -892,9 +892,6 @@ static INLINE int get_ext_tx_types(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter,
static INLINE int is_rect_tx_allowed_bsize(BLOCK_SIZE bsize) {
static const char LUT[BLOCK_SIZES_ALL] = {
0, // BLOCK_2X2
0, // BLOCK_2X4
0, // BLOCK_4X2
0, // BLOCK_4X4
1, // BLOCK_4X8
1, // BLOCK_8X4
......@@ -1171,8 +1168,7 @@ static INLINE TX_SIZE av1_get_uv_tx_size(const MB_MODE_INFO *mbmi,
const struct macroblockd_plane *pd) {
#if CONFIG_CFL
if (!is_inter_block(mbmi) && mbmi->uv_mode == UV_CFL_PRED) {
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(mbmi->sb_type, pd);
assert(plane_bsize < BLOCK_SIZES_ALL);
return max_txsize_rect_lookup[0][plane_bsize];
}
......
......@@ -483,7 +483,6 @@ void cfl_store_block(MACROBLOCKD *const xd, BLOCK_SIZE bsize, TX_SIZE tx_size) {
struct macroblockd_plane *const pd = &xd->plane[AOM_PLANE_Y];
int row = 0;
int col = 0;
bsize = AOMMAX(BLOCK_4X4, bsize);
assert(is_cfl_allowed(&xd->mi[0]->mbmi));
if (block_size_high[bsize] == 4 || block_size_wide[bsize] == 4) {
......
......@@ -16,9 +16,8 @@
static INLINE int is_cfl_allowed(const MB_MODE_INFO *mbmi) {
const BLOCK_SIZE bsize = mbmi->sb_type;
assert(bsize >= BLOCK_4X4); // Intra luma partitions can't be < 4X4
assert(bsize < BLOCK_SIZES_ALL);
return (bsize >= BLOCK_4X4) && (bsize <= CFL_MAX_BLOCK_SIZE);
return bsize <= CFL_MAX_BLOCK_SIZE;
}
static INLINE int get_scaled_luma_q0(int alpha_q3, int16_t pred_buf_q3) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -139,9 +139,6 @@ typedef enum BITSTREAM_PROFILE {
// type, so that we can save memory when they are used in structs/arrays.
typedef enum ATTRIBUTE_PACKED {
BLOCK_2X2,
BLOCK_2X4,
BLOCK_4X2,
BLOCK_4X4,
BLOCK_4X8,
BLOCK_8X4,
......
......@@ -241,9 +241,6 @@ static const wedge_code_type wedge_codebook_16_heqw[16] = {
};
const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = {
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
......@@ -1462,7 +1459,6 @@ 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 (bsize_plane < BLOCK_4X4) return 1;
switch (bsize_plane) {
#if DISABLE_CHROMA_U8X8_OBMC
case BLOCK_4X4:
......@@ -1838,7 +1834,6 @@ 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_ALL] = {
32, 32, 32,
32, 16, 16, 16, 8, 8, 8, 4,
4, 4, 2, 2, 2, 1, 1, 1,
16, 16, 8, 8, 4, 4, 2, 2
......@@ -1851,7 +1846,6 @@ 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_ALL] = {
16, 16, 16,
16, 8, 8, 8, 4, 4, 4,
2, 2, 2, 1, 1, 1,
8, 8, 4, 4, 2, 2,
......
......@@ -407,8 +407,6 @@ static const uint16_t orders_vert_8x8[256] = {
#if CONFIG_EXT_PARTITION
/* clang-format off */
static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
// 2X2, 2X4, 4X2
NULL, NULL, NULL,
// 4X4
orders_4x4,
// 4X8, 8X4, 8X8
......@@ -441,8 +439,6 @@ static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
#else
/* clang-format off */
static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
// 2X2, 2X4, 4X2
NULL, NULL, NULL,
// 4X4
orders_8x8,
// 4X8, 8X4, 8X8
......@@ -481,8 +477,6 @@ static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
#if CONFIG_EXT_PARTITION
/* clang-format off */
static const uint16_t *const orders_vert[BLOCK_SIZES] = {
// 2X2, 2X4, 4X2
NULL, NULL, NULL,
// 4X4
NULL,
// 4X8, 8X4, 8X8
......@@ -500,8 +494,6 @@ static const uint16_t *const orders_vert[BLOCK_SIZES] = {
#else
/* clang-format off */
static const uint16_t *const orders_vert[BLOCK_SIZES] = {
// 2X2, 2X4, 4X2
NULL, NULL, NULL,
// 4X4
NULL,
// 4X8, 8X4, 8X8
......@@ -2780,8 +2772,7 @@ void av1_predict_intra_block_facade(const AV1_COMMON *cm, MACROBLOCKD *xd,
assert(blk_col == 0);
assert(blk_row == 0);
assert(is_cfl_allowed(mbmi));
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(mbmi->sb_type, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(mbmi->sb_type, pd);
assert(plane_bsize < BLOCK_SIZES_ALL);
assert(block_size_wide[plane_bsize] == tx_size_wide[tx_size]);
assert(block_size_high[plane_bsize] == tx_size_high[tx_size]);
......
......@@ -430,8 +430,7 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
const TX_SIZE tx_size = av1_get_tx_size(plane, xd);
const int stepr = tx_size_high_unit[tx_size];
const int stepc = tx_size_wide_unit[tx_size];
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
int row, col;
const int max_blocks_wide = max_block_wide(xd, plane_bsize, plane);
const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
......@@ -512,8 +511,7 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
continue;
const BLOCK_SIZE bsizec =
scale_chroma_bsize(bsize, pd->subsampling_x, pd->subsampling_y);
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsizec, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsizec, pd);
const int max_blocks_wide = max_block_wide(xd, plane_bsize, plane);
const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
int row, col;
......
......@@ -402,8 +402,7 @@ uint8_t av1_read_coeffs_txb_facade(const AV1_COMMON *const cm,
struct macroblockd_plane *const pd = &xd->plane[plane];
const BLOCK_SIZE bsize = mbmi->sb_type;
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
TXB_CTX txb_ctx;
get_txb_ctx(plane_bsize, tx_size, plane, pd->above_context + col,
......
......@@ -1941,8 +1941,7 @@ static void write_inter_txb_coeff(AV1_COMMON *const cm, MACROBLOCK *const x,
const BLOCK_SIZE bsizec =
scale_chroma_bsize(bsize, pd->subsampling_x, pd->subsampling_y);
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsizec, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsizec, pd);
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
......@@ -2057,8 +2056,7 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
const BLOCK_SIZE bsize = mbmi->sb_type;
const BLOCK_SIZE bsizec =
scale_chroma_bsize(bsize, pd->subsampling_x, pd->subsampling_y);
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsizec, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsizec, pd);
const int num_4x4_w =
block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
......
......@@ -153,54 +153,28 @@ static const uint16_t AV1_HIGH_VAR_OFFS_12[MAX_SB_SIZE] = {
#if CONFIG_FP_MB_STATS
static const uint8_t num_16x16_blocks_wide_lookup[BLOCK_SIZES_ALL] = {
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
4,
4,
IF_EXT_PARTITION(4, 8, 8) 1,
1,
1,
2,
2,
4,
IF_EXT_PARTITION(2, 8)
1, 1,
1, 1,
1, 1,
1, 1,
2, 2,
2, 4,
4, IF_EXT_PARTITION(4, 8, 8) 1,
1, 1,
2, 2,
4, IF_EXT_PARTITION(2, 8)
};
static const uint8_t num_16x16_blocks_high_lookup[BLOCK_SIZES_ALL] = {
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
1,
2,
4,
2,
4,
IF_EXT_PARTITION(8, 4, 8) 1,
1,
2,
1,
4,
2,
IF_EXT_PARTITION(8, 2)
1, 1,
1, 1,
1, 1,
1, 2,
1, 2,
4, 2,
4, IF_EXT_PARTITION(8, 4, 8) 1,
1, 2,
1, 4,
2, IF_EXT_PARTITION(8, 2)
};
#endif // CONFIG_FP_MB_STATS
......@@ -1853,7 +1827,6 @@ static void rd_use_partition(AV1_COMP *cpi, ThreadData *td,
/* clang-format off */
static const BLOCK_SIZE min_partition_size[BLOCK_SIZES_ALL] = {
BLOCK_2X2, BLOCK_2X2, BLOCK_2X2, // 2x2, 2x4, 4x2
BLOCK_4X4, // 4x4
BLOCK_4X4, BLOCK_4X4, BLOCK_4X4, // 4x8, 8x4, 8x8
BLOCK_4X4, BLOCK_4X4, BLOCK_8X8, // 8x16, 16x8, 16x16
......@@ -1870,7 +1843,6 @@ static const BLOCK_SIZE min_partition_size[BLOCK_SIZES_ALL] = {
};
static const BLOCK_SIZE max_partition_size[BLOCK_SIZES_ALL] = {
BLOCK_4X4, BLOCK_4X4, BLOCK_4X4, // 2x2, 2x4, 4x2
BLOCK_8X8, // 4x4
BLOCK_16X16, BLOCK_16X16, BLOCK_16X16, // 4x8, 8x4, 8x8
BLOCK_32X32, BLOCK_32X32, BLOCK_32X32, // 8x16, 16x8, 16x16
......@@ -1888,7 +1860,6 @@ static const BLOCK_SIZE max_partition_size[BLOCK_SIZES_ALL] = {
// Next square block size less or equal than current block size.
static const BLOCK_SIZE next_square_size[BLOCK_SIZES_ALL] = {
BLOCK_2X2, BLOCK_2X2, BLOCK_2X2, // 2x2, 2x4, 4x2
BLOCK_4X4, // 4x4
BLOCK_4X4, BLOCK_4X4, BLOCK_8X8, // 4x8, 8x4, 8x8
BLOCK_8X8, BLOCK_8X8, BLOCK_16X16, // 8x16, 16x8, 16x16
......@@ -2257,7 +2228,7 @@ static int64_t dist_8x8_yuv(const AV1_COMP *const cpi, MACROBLOCK *const x,
const int src_stride_uv = x->plane[plane].src.stride;
const int dst_stride_uv = xd->plane[plane].dst.stride;
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(BLOCK_8X8, &xd->plane[plane]));
get_plane_block_size(BLOCK_8X8, &xd->plane[plane]);
cpi->fn_ptr[plane_bsize].vf(src_plane_8x8[plane], src_stride_uv,
dst_plane_8x8[plane], dst_stride_uv, &sse);
......
......@@ -1569,13 +1569,6 @@ 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)
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,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_8_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(BLOCK_128X128, aom_highbd_sad128x128_bits8,
aom_highbd_sad128x128_avg_bits8,
......@@ -1884,13 +1877,6 @@ 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)
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,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_10_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(
BLOCK_128X128, aom_highbd_sad128x128_bits10,
......@@ -2201,13 +2187,6 @@ 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)
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,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_12_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(
BLOCK_128X128, aom_highbd_sad128x128_bits12,
......@@ -2904,12 +2883,6 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
aom_sad4x4x8, aom_sad4x4x4d, aom_jnt_sad4x4_avg,
aom_jnt_sub_pixel_avg_variance4x4)
BFP(BLOCK_2X2, NULL, NULL, aom_variance2x2, NULL, NULL, NULL, NULL, NULL,
NULL, NULL)
BFP(BLOCK_2X4, NULL, NULL, aom_variance2x4, NULL, NULL, NULL, NULL, NULL,
NULL, NULL)
BFP(BLOCK_4X2, NULL, NULL, aom_variance4x2, NULL, NULL, NULL, NULL, NULL,
NULL, NULL)
#else // CONFIG_JNT_COMP
#if CONFIG_EXT_PARTITION_TYPES
BFP(BLOCK_4X16, aom_sad4x16, aom_sad4x16_avg, aom_variance4x16,
......@@ -3013,9 +2986,6 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
aom_sub_pixel_variance4x4, aom_sub_pixel_avg_variance4x4, aom_sad4x4x3,
aom_sad4x4x8, aom_sad4x4x4d)
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)
#endif // CONFIG_JNT_COMP
#define OBFP(BT, OSDF, OVF, OSVF) \
......
......@@ -54,7 +54,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_ALL] = {
2, 2, 2, 2, 3, 3, 4, 6, 6, 8, 12, 12, 16, 24, 24, 32,
2, 3, 3, 4, 6, 6, 8, 12, 12, 16, 24, 24, 32,
#if CONFIG_EXT_PARTITION
48, 48, 64,
#endif // CONFIG_EXT_PARTITION
......@@ -870,8 +870,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]) {
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
get_entropy_contexts_plane(plane_bsize, tx_size, pd, t_above, t_left);
}
......
......@@ -1515,7 +1515,7 @@ 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];
const BLOCK_SIZE bs = AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE bs = get_plane_block_size(bsize, pd);
unsigned int sse;
int rate;
int64_t dist;
......@@ -1733,8 +1733,7 @@ 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;
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
TXB_CTX txb_ctx;
get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx);
int cost = av1_cost_coeffs_txb(cm, x, plane, blk_row, blk_col, block, tx_size,
......@@ -4683,7 +4682,7 @@ static int find_tx_size_rd_records(MACROBLOCK *x, BLOCK_SIZE bsize, int mi_row,
static const uint32_t skip_pred_threshold[3][BLOCK_SIZES_ALL] = {
{
0, 0, 0, 50, 50, 50, 55, 47, 47, 53, 53, 53, 53, 53, 53, 53,
50, 50, 50, 55, 47, 47, 53, 53, 53, 53, 53, 53, 53,
#if CONFIG_EXT_PARTITION
53, 53, 53,
#endif
......@@ -4693,7 +4692,7 @@ static const uint32_t skip_pred_threshold[3][BLOCK_SIZES_ALL] = {
#endif
},
{
0, 0, 0, 69, 69, 69, 67, 68, 68, 53, 53, 53, 53, 53, 53, 53,
69, 69, 69, 67, 68, 68, 53, 53, 53, 53, 53, 53, 53,
#if CONFIG_EXT_PARTITION
53, 53, 53,
#endif
......@@ -4703,7 +4702,7 @@ static const uint32_t skip_pred_threshold[3][BLOCK_SIZES_ALL] = {
#endif
},
{
0, 0, 0, 70, 73, 73, 70, 73, 73, 58, 58, 58, 58, 58, 58, 58,
70, 73, 73, 70, 73, 73, 58, 58, 58, 58, 58, 58, 58,
#if CONFIG_EXT_PARTITION
58, 58, 58,
#endif
......@@ -5434,8 +5433,8 @@ static int cfl_rd_pick_alpha(MACROBLOCK *const x, const AV1_COMP *const cpi,
const BLOCK_SIZE bsize = mbmi->sb_type;
#if CONFIG_DEBUG
assert(is_cfl_allowed(mbmi));
const BLOCK_SIZE plane_bsize = AOMMAX(
BLOCK_4X4, get_plane_block_size(mbmi->sb_type, &xd->plane[AOM_PLANE_U]));
const BLOCK_SIZE plane_bsize =
get_plane_block_size(mbmi->sb_type, &xd->plane[AOM_PLANE_U]);
assert(plane_bsize < BLOCK_SIZES_ALL);
assert(block_size_wide[plane_bsize] == tx_size_wide[tx_size]);
assert(block_size_high[plane_bsize] == tx_size_high[tx_size]);
......
......@@ -620,8 +620,7 @@ void av1_tokenize_sb_vartx(const AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
const struct macroblockd_plane *const pd = &xd->plane[plane];
const BLOCK_SIZE bsizec =
scale_chroma_bsize(bsize, pd->subsampling_x, pd->subsampling_y);
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsizec, pd));
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsizec, pd);
const int mi_width = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
const int mi_height = block_size_high[plane_bsize] >> tx_size_wide_log2[0];
TX_SIZE max_tx_size = get_vartx_max_txsize(
......
......@@ -148,7 +148,6 @@ const map_entry refs_map[] = {
};
const map_entry block_size_map[] = {
ENUM(BLOCK_2X2), ENUM(BLOCK_2X4), ENUM(BLOCK_4X2),
ENUM(BLOCK_4X4), ENUM(BLOCK_4X8), ENUM(BLOCK_8X4),
ENUM(BLOCK_8X8), ENUM(BLOCK_8X16), ENUM(BLOCK_16X8),
ENUM(BLOCK_16X16), ENUM(BLOCK_16X32), ENUM(BLOCK_32X16),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment