Commit 2fa6e1ce authored by Rupert Swarbrick's avatar Rupert Swarbrick

Add 32x128/128x32 block sizes

Change-Id: Ieb28f40d85e4db4af33648c32c406dd2931ceb89
parent c01cc430
......@@ -47,6 +47,10 @@ if (aom_config("CONFIG_EXT_PARTITION_TYPES") eq "yes") {
push @block_sizes, [32, 8];
push @block_sizes, [16, 64];
push @block_sizes, [64, 16];
if (aom_config("CONFIG_EXT_PARTITION") eq "yes") {
push @block_sizes, [32, 128];
push @block_sizes, [128, 32];
}
}
@tx_dims = (2, 4, 8, 16, 32);
......@@ -820,14 +824,18 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
foreach (@block_sizes) {
($w, $h) = @$_;
add_proto qw/unsigned int/, "aom_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask";
specialize "aom_obmc_sad${w}x${h}", qw/sse4_1/;
if (! (($w == 128 && $h == 32) || ($w == 32 && $h == 128))) {
specialize "aom_obmc_sad${w}x${h}", qw/sse4_1/;
}
}
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
foreach (@block_sizes) {
($w, $h) = @$_;
add_proto qw/unsigned int/, "aom_highbd_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask";
specialize "aom_highbd_obmc_sad${w}x${h}", qw/sse4_1/;
if (! (($w == 128 && $h == 32) || ($w == 32 && $h == 128))) {
specialize "aom_highbd_obmc_sad${w}x${h}", qw/sse4_1/;
}
}
}
}
......
......@@ -167,11 +167,15 @@ sadMxN(16, 64)
sadMxNx4D(16, 64)
sadMxN(64, 16)
sadMxNx4D(64, 16)
sadMxN(32, 128)
sadMxNx4D(32, 128)
sadMxN(128, 32)
sadMxNx4D(128, 32)
#endif
/* clang-format on */
#if CONFIG_HIGHBITDEPTH
static INLINE
static INLINE
unsigned int highbd_sad(const uint8_t *a8, int a_stride, const uint8_t *b8,
int b_stride, int width, int height) {
int y, x;
......@@ -336,12 +340,16 @@ highbd_sadMxN(16, 64)
highbd_sadMxNx4D(16, 64)
highbd_sadMxN(64, 16)
highbd_sadMxNx4D(64, 16)
highbd_sadMxN(32, 128)
highbd_sadMxNx4D(32, 128)
highbd_sadMxN(128, 32)
highbd_sadMxNx4D(128, 32)
#endif
/* clang-format on */
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_AV1 && CONFIG_EXT_INTER
static INLINE
static INLINE
unsigned int masked_sad(const uint8_t *src, int src_stride,
const uint8_t *a, int a_stride, const uint8_t *b,
int b_stride, const uint8_t *m, int m_stride,
......@@ -405,11 +413,13 @@ MASKSADMxN(8, 32)
MASKSADMxN(32, 8)
MASKSADMxN(16, 64)
MASKSADMxN(64, 16)
MASKSADMxN(32, 128)
MASKSADMxN(128, 32)
#endif
/* clang-format on */
#if CONFIG_HIGHBITDEPTH
static INLINE
static INLINE
unsigned int highbd_masked_sad(const uint8_t *src8, int src_stride,
const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride,
......@@ -476,6 +486,8 @@ HIGHBD_MASKSADMXN(8, 32)
HIGHBD_MASKSADMXN(32, 8)
HIGHBD_MASKSADMXN(16, 64)
HIGHBD_MASKSADMXN(64, 16)
HIGHBD_MASKSADMXN(32, 128)
HIGHBD_MASKSADMXN(128, 32)
#endif
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_EXT_INTER
......@@ -536,11 +548,13 @@ OBMCSADMxN(8, 32)
OBMCSADMxN(32, 8)
OBMCSADMxN(16, 64)
OBMCSADMxN(64, 16)
OBMCSADMxN(32, 128)
OBMCSADMxN(128, 32)
#endif
/* clang-format on */
#if CONFIG_HIGHBITDEPTH
static INLINE
static INLINE
unsigned int highbd_obmc_sad(const uint8_t *pre8, int pre_stride,
const int32_t *wsrc, const int32_t *mask,
int width, int height) {
......@@ -594,6 +608,8 @@ HIGHBD_OBMCSADMXN(8, 32)
HIGHBD_OBMCSADMXN(32, 8)
HIGHBD_OBMCSADMXN(16, 64)
HIGHBD_OBMCSADMXN(64, 16)
HIGHBD_OBMCSADMXN(32, 128)
HIGHBD_OBMCSADMXN(128, 32)
#endif
/* clang-format on */
#endif // CONFIG_HIGHBITDEPTH
......
......@@ -258,7 +258,11 @@ VARIANCES(8, 32)
VARIANCES(32, 8)
VARIANCES(16, 64)
VARIANCES(64, 16)
#endif
#if CONFIG_EXT_PARTITION
VARIANCES(32, 128)
VARIANCES(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_AV1 && CONFIG_EXT_PARTITION_TYPES
GET_VAR(16, 16)
GET_VAR(8, 8)
......@@ -665,7 +669,11 @@ HIGHBD_VARIANCES(8, 32)
HIGHBD_VARIANCES(32, 8)
HIGHBD_VARIANCES(16, 64)
HIGHBD_VARIANCES(64, 16)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_VARIANCES(32, 128)
HIGHBD_VARIANCES(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_AV1 && CONFIG_EXT_PARTITION_TYPES
HIGHBD_GET_VAR(8)
HIGHBD_GET_VAR(16)
......@@ -854,7 +862,11 @@ MASK_SUBPIX_VAR(8, 32)
MASK_SUBPIX_VAR(32, 8)
MASK_SUBPIX_VAR(16, 64)
MASK_SUBPIX_VAR(64, 16)
#endif
#if CONFIG_EXT_PARTITION
MASK_SUBPIX_VAR(32, 128)
MASK_SUBPIX_VAR(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_HIGHBITDEPTH
void aom_highbd_comp_mask_pred_c(uint16_t *comp_pred, const uint8_t *pred8,
......@@ -993,7 +1005,11 @@ HIGHBD_MASK_SUBPIX_VAR(8, 32)
HIGHBD_MASK_SUBPIX_VAR(32, 8)
HIGHBD_MASK_SUBPIX_VAR(16, 64)
HIGHBD_MASK_SUBPIX_VAR(64, 16)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_MASK_SUBPIX_VAR(32, 128)
HIGHBD_MASK_SUBPIX_VAR(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_EXT_INTER
......@@ -1106,7 +1122,13 @@ OBMC_VAR(16, 64)
OBMC_SUBPIX_VAR(16, 64)
OBMC_VAR(64, 16)
OBMC_SUBPIX_VAR(64, 16)
#endif
#if CONFIG_EXT_PARTITION
OBMC_VAR(32, 128)
OBMC_SUBPIX_VAR(32, 128)
OBMC_VAR(128, 32)
OBMC_SUBPIX_VAR(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_obmc_variance64(const uint8_t *pre8, int pre_stride,
......@@ -1303,6 +1325,12 @@ HIGHBD_OBMC_VAR(16, 64)
HIGHBD_OBMC_SUBPIX_VAR(16, 64)
HIGHBD_OBMC_VAR(64, 16)
HIGHBD_OBMC_SUBPIX_VAR(64, 16)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_OBMC_VAR(32, 128)
HIGHBD_OBMC_SUBPIX_VAR(32, 128)
HIGHBD_OBMC_VAR(128, 32)
HIGHBD_OBMC_SUBPIX_VAR(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_MOTION_VAR
......@@ -215,6 +215,10 @@ SUBTRACT_FUN(8x32) { STACK_V(16, subtract_8x16); }
SUBTRACT_FUN(32x8) { STACK_H(16, subtract_16x8); }
SUBTRACT_FUN(16x64) { STACK_V(32, subtract_16x32); }
SUBTRACT_FUN(64x16) { STACK_H(32, subtract_32x16); }
#if CONFIG_EXT_PARTITION
SUBTRACT_FUN(32x128) { STACK_V(64, subtract_32x64); }
SUBTRACT_FUN(128x32) { STACK_H(64, subtract_64x32); }
#endif
static SubtractWxHFuncType getSubtractFunc(int rows, int cols) {
if (rows == 4) {
......@@ -240,6 +244,9 @@ static SubtractWxHFuncType getSubtractFunc(int rows, int cols) {
if (cols == 16) return subtract_16x32;
if (cols == 32) return subtract_32x32;
if (cols == 64) return subtract_64x32;
#if CONFIG_EXT_PARTITION
if (cols == 128) return subtract_128x32;
#endif // CONFIG_EXT_PARTITION
}
if (rows == 64) {
if (cols == 16) return subtract_16x64;
......@@ -251,6 +258,7 @@ static SubtractWxHFuncType getSubtractFunc(int rows, int cols) {
}
#if CONFIG_EXT_PARTITION
if (rows == 128) {
if (cols == 32) return subtract_32x128;
if (cols == 64) return subtract_64x128;
if (cols == 128) return subtract_128x128;
}
......
......@@ -100,7 +100,11 @@ MASKSAD8XN_SSSE3(32)
MASKSADMXN_SSSE3(32, 8)
MASKSADMXN_SSSE3(16, 64)
MASKSADMXN_SSSE3(64, 16)
#endif
#if CONFIG_EXT_PARTITION
MASKSADMXN_SSSE3(32, 128)
MASKSADMXN_SSSE3(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
static INLINE unsigned int masked_sad_ssse3(const uint8_t *src_ptr,
int src_stride,
......@@ -298,7 +302,11 @@ HIGHBD_MASKSADMXN_SSSE3(8, 32)
HIGHBD_MASKSADMXN_SSSE3(32, 8)
HIGHBD_MASKSADMXN_SSSE3(16, 64)
HIGHBD_MASKSADMXN_SSSE3(64, 16)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_MASKSADMXN_SSSE3(32, 128)
HIGHBD_MASKSADMXN_SSSE3(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
static INLINE unsigned int highbd_masked_sad_ssse3(
const uint8_t *src8, int src_stride, const uint8_t *a8, int a_stride,
......
......@@ -133,7 +133,11 @@ MASK_SUBPIX_VAR8XH_SSSE3(32)
MASK_SUBPIX_VAR_SSSE3(32, 8)
MASK_SUBPIX_VAR_SSSE3(64, 16)
MASK_SUBPIX_VAR_SSSE3(16, 64)
#endif
#if CONFIG_EXT_PARTITION
MASK_SUBPIX_VAR_SSSE3(128, 32)
MASK_SUBPIX_VAR_SSSE3(32, 128)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
static INLINE __m128i filter_block(const __m128i a, const __m128i b,
const __m128i filter) {
......@@ -716,6 +720,10 @@ HIGHBD_MASK_SUBPIX_VAR_SSSE3(8, 32)
HIGHBD_MASK_SUBPIX_VAR_SSSE3(32, 8)
HIGHBD_MASK_SUBPIX_VAR_SSSE3(16, 64)
HIGHBD_MASK_SUBPIX_VAR_SSSE3(64, 16)
#if CONFIG_EXT_PARTITION
HIGHBD_MASK_SUBPIX_VAR_SSSE3(32, 128)
HIGHBD_MASK_SUBPIX_VAR_SSSE3(128, 32)
#endif
#endif
static INLINE __m128i highbd_filter_block(const __m128i a, const __m128i b,
......
......@@ -153,7 +153,11 @@ OBMCVARWXH(8, 32)
OBMCVARWXH(32, 8)
OBMCVARWXH(16, 64)
OBMCVARWXH(64, 16)
#endif
#if CONFIG_EXT_PARTITION
OBMCVARWXH(32, 128)
OBMCVARWXH(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
////////////////////////////////////////////////////////////////////////////////
// High bit-depth
......@@ -368,5 +372,9 @@ HBD_OBMCVARWXH(8, 32)
HBD_OBMCVARWXH(32, 8)
HBD_OBMCVARWXH(16, 64)
HBD_OBMCVARWXH(64, 16)
#endif
#if CONFIG_EXT_PARTITION
HBD_OBMCVARWXH(32, 128)
HBD_OBMCVARWXH(128, 32)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#endif // CONFIG_HIGHBITDEPTH
......@@ -2751,7 +2751,11 @@ static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES_ALL] = {
8 - 1, // BLOCK_8X32,
32 - 1, // BLOCK_32X8,
16 - 1, // BLOCK_16X64,
64 - 1 // BLOCK_64X16
64 - 1, // BLOCK_64X16
#if CONFIG_EXT_PARTITION
32 - 1, // BLOCK_32X128
128 - 1, // BLOCK_128X32
#endif // CONFIG_EXT_PARTITION
},
// mask for horizontal edges filtering
{
......@@ -2783,7 +2787,11 @@ static const uint32_t av1_prediction_masks[NUM_EDGE_DIRS][BLOCK_SIZES_ALL] = {
32 - 1, // BLOCK_8X32,
8 - 1, // BLOCK_32X8,
64 - 1, // BLOCK_16X64,
16 - 1 // BLOCK_64X16
16 - 1, // BLOCK_64X16
#if CONFIG_EXT_PARTITION
128 - 1, // BLOCK_32X128
32 - 1, // BLOCK_128X32
#endif // CONFIG_EXT_PARTITION
},
};
......
......@@ -1087,6 +1087,10 @@ static INLINE int is_rect_tx_allowed_bsize(BLOCK_SIZE bsize) {
0, // BLOCK_32X8
0, // BLOCK_16X64
0, // BLOCK_64X16
#if CONFIG_EXT_PARTITION
0, // BLOCK_32X128
0, // BLOCK_128X32
#endif // CONFIG_EXT_PARTITION
};
return LUT[bsize];
......@@ -1132,6 +1136,10 @@ static INLINE int is_quarter_tx_allowed_bsize(BLOCK_SIZE bsize) {
0, // BLOCK_32X8
0, // BLOCK_16X64
0, // BLOCK_64X16
#if CONFIG_EXT_PARTITION
0, // BLOCK_32X128
0, // BLOCK_128X32
#endif // CONFIG_EXT_PARTITION
};
return LUT_QTTX[bsize];
......
This diff is collapsed.
This diff is collapsed.
......@@ -606,10 +606,6 @@ extern const aom_tree_index
av1_switchable_restore_tree[TREE_SIZE(RESTORE_SWITCHABLE_TYPES)];
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_EXT_PARTITION_TYPES
extern int av1_num_partition_types[PARTITION_BLOCK_SIZES];
#endif
void av1_setup_past_independence(struct AV1Common *cm);
void av1_adapt_intra_frame_probs(struct AV1Common *cm);
......
......@@ -140,6 +140,10 @@ typedef enum ATTRIBUTE_PACKED {
BLOCK_32X8,
BLOCK_16X64,
BLOCK_64X16,
#if CONFIG_EXT_PARTITION
BLOCK_32X128,
BLOCK_128X32,
#endif // CONFIG_EXT_PARTITION
BLOCK_SIZES_ALL,
BLOCK_SIZES = BLOCK_4X16,
BLOCK_INVALID = 255,
......
......@@ -414,6 +414,10 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = {
#endif // CONFIG_WEDGE
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
#if CONFIG_EXT_PARTITION
{ 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL },
#endif // CONFIG_EXT_PARTITION
};
static const uint8_t *get_wedge_mask_inplace(int wedge_index, int neg,
......@@ -2948,7 +2952,7 @@ static int ii_size_scales[BLOCK_SIZES_ALL] = {
#endif
32, 16, 16, 16, 8, 8, 8, 4,
4, 4, 2, 2, 2, 1, 1, 1,
16, 16, 8, 8, 4, 4,
16, 16, 8, 8, 4, 4, 2, 2
};
#else
static const int ii_weights1d[MAX_SB_SIZE] = {
......
......@@ -157,14 +157,14 @@ static const uint16_t orders_4x16[256] = {
232, 233, 234, 235, 236, 237, 238, 239, 248, 249, 250, 251, 252, 253, 254,
255,
};
#else
#endif
static const uint16_t orders_32x128[4] = {
0, 1, 2, 3,
};
static const uint16_t orders_128x32[4] = {
0, 1, 2, 3,
};
#endif
#if CONFIG_CB4X4 || CONFIG_EXT_PARTITION
static const uint16_t orders_16x8[128] = {
......@@ -398,7 +398,9 @@ static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
// 4x16, 16x4, 8x32
orders_4x16, orders_16x4, orders_8x32,
// 32x8, 16x64, 64x16
orders_32x8, orders_16x64, orders_64x16
orders_32x8, orders_16x64, orders_64x16,
// 32x128, 128x32
orders_32x128, orders_128x32
};
/* clang-format on */
#else
......
......@@ -2247,14 +2247,15 @@ static PARTITION_TYPE read_partition(AV1_COMMON *cm, MACROBLOCKD *xd,
if (has_rows && has_cols) {
#if CONFIG_EXT_PARTITION_TYPES
const int bsl =
mi_width_log2_lookup[bsize] - mi_width_log2_lookup[BLOCK_8X8];
p = (PARTITION_TYPE)aom_read_symbol(r, partition_cdf,
av1_num_partition_types[bsl], ACCT_STR);
const int num_partition_types =
(mi_width_log2_lookup[bsize] > mi_width_log2_lookup[BLOCK_8X8])
? EXT_PARTITION_TYPES
: PARTITION_TYPES;
#else
p = (PARTITION_TYPE)aom_read_symbol(r, partition_cdf, PARTITION_TYPES,
ACCT_STR);
const int num_partition_types = PARTITION_TYPES;
#endif // CONFIG_EXT_PARTITION_TYPES
p = (PARTITION_TYPE)aom_read_symbol(r, partition_cdf, num_partition_types,
ACCT_STR);
} else if (!has_rows && has_cols) {
assert(bsize > BLOCK_8X8);
aom_cdf_prob cdf[2];
......
......@@ -2853,13 +2853,14 @@ static void write_partition(const AV1_COMMON *const cm,
if (has_rows && has_cols) {
#if CONFIG_EXT_PARTITION_TYPES
const int bsl =
mi_width_log2_lookup[bsize] - mi_width_log2_lookup[BLOCK_8X8];
aom_write_symbol(w, p, ec_ctx->partition_cdf[ctx],
av1_num_partition_types[bsl]);
const int num_partition_types =
(mi_width_log2_lookup[bsize] > mi_width_log2_lookup[BLOCK_8X8])
? EXT_PARTITION_TYPES
: PARTITION_TYPES;
#else
aom_write_symbol(w, p, ec_ctx->partition_cdf[ctx], PARTITION_TYPES);
#endif // CONFIG_EXT_PARTITION_TYPES
const int num_partition_types = PARTITION_TYPES;
#endif
aom_write_symbol(w, p, ec_ctx->partition_cdf[ctx], num_partition_types);
} else if (!has_rows && has_cols) {
assert(p == PARTITION_SPLIT || p == PARTITION_HORZ);
assert(bsize > BLOCK_8X8);
......
......@@ -2933,7 +2933,10 @@ static const BLOCK_SIZE min_partition_size[BLOCK_SIZES_ALL] = {
BLOCK_16X16, BLOCK_16X16, BLOCK_16X16, // 64x128, 128x64, 128x128
#endif // CONFIG_EXT_PARTITION
BLOCK_4X4, BLOCK_4X4, BLOCK_8X8, // 4x16, 16x4, 8x32
BLOCK_8X8, BLOCK_16X16, BLOCK_16X16 // 32x8, 16x64, 64x16
BLOCK_8X8, BLOCK_16X16, BLOCK_16X16, // 32x8, 16x64, 64x16
#if CONFIG_EXT_PARTITION
BLOCK_16X16, BLOCK_16X16 // 32x128, 128x32
#endif // CONFIG_EXT_PARTITION
};
static const BLOCK_SIZE max_partition_size[BLOCK_SIZES_ALL] = {
......@@ -2949,7 +2952,10 @@ static const BLOCK_SIZE max_partition_size[BLOCK_SIZES_ALL] = {
BLOCK_LARGEST, BLOCK_LARGEST, BLOCK_LARGEST, // 64x128, 128x64, 128x128
#endif // CONFIG_EXT_PARTITION
BLOCK_16X16, BLOCK_16X16, BLOCK_32X32, // 4x16, 16x4, 8x32
BLOCK_32X32, BLOCK_LARGEST, BLOCK_LARGEST // 32x8, 16x64, 64x16
BLOCK_32X32, BLOCK_LARGEST, BLOCK_LARGEST, // 32x8, 16x64, 64x16
#if CONFIG_EXT_PARTITION
BLOCK_LARGEST, BLOCK_LARGEST // 32x128, 128x32
#endif // CONFIG_EXT_PARTITION
};
// Next square block size less or equal than current block size.
......@@ -2966,7 +2972,10 @@ static const BLOCK_SIZE next_square_size[BLOCK_SIZES_ALL] = {
BLOCK_64X64, BLOCK_64X64, BLOCK_128X128, // 64x128, 128x64, 128x128
#endif // CONFIG_EXT_PARTITION
BLOCK_4X4, BLOCK_4X4, BLOCK_8X8, // 4x16, 16x4, 8x32
BLOCK_8X8, BLOCK_16X16, BLOCK_16X16 // 32x8, 16x64, 64x16
BLOCK_8X8, BLOCK_16X16, BLOCK_16X16, // 32x8, 16x64, 64x16
#if CONFIG_EXT_PARTITION
BLOCK_32X32, BLOCK_32X32 // 32x128, 128x32
#endif // CONFIG_EXT_PARTITION
};
/* clang-format on */
......@@ -4347,13 +4356,20 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
restore_context(x, &x_ctx, mi_row, mi_col, bsize);
}
#if CONFIG_EXT_PARTITION
const int can_partition_4 = (bsize == BLOCK_128X128 || bsize == BLOCK_64X64 ||
bsize == BLOCK_32X32 || bsize == BLOCK_16X16);
#else
const int can_partition_4 =
(bsize == BLOCK_64X64 || bsize == BLOCK_32X32 || bsize == BLOCK_16X16);
#endif // CONFIG_EXT_PARTITION
// PARTITION_HORZ_4
// TODO(david.barker): For this and PARTITION_VERT_4,
// * Add support for BLOCK_16X16 once we support 2x8 and 8x2 blocks for the
// chroma plane
// * Add support for supertx
if ((bsize == BLOCK_64X64 || bsize == BLOCK_32X32 || bsize == BLOCK_16X16) &&
partition_horz_allowed && !force_horz_split &&
if (can_partition_4 && partition_horz_allowed && !force_horz_split &&
(do_rectangular_split || av1_active_h_edge(cpi, mi_row, mi_step))) {
const int quarter_step = mi_size_high[bsize] / 4;
PICK_MODE_CONTEXT *ctx_prev = ctx_none;
......@@ -4390,8 +4406,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#endif
}
// PARTITION_VERT_4
if ((bsize == BLOCK_64X64 || bsize == BLOCK_32X32 || bsize == BLOCK_16X16) &&
partition_vert_allowed && !force_vert_split &&
if (can_partition_4 && partition_vert_allowed && !force_vert_split &&
(do_rectangular_split || av1_active_v_edge(cpi, mi_row, mi_step))) {
const int quarter_step = mi_size_wide[bsize] / 4;
PICK_MODE_CONTEXT *ctx_prev = ctx_none;
......
This diff is collapsed.
......@@ -57,11 +57,14 @@ static const uint8_t rd_thresh_block_size_factor[BLOCK_SIZES_ALL] = {
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
2, 2, 2,
#endif
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
4, 4, 8, 8, 16, 16
4, 4, 8, 8, 16, 16,
#if CONFIG_EXT_PARTITION
32, 32
#endif // CONFIG_EXT_PARTITION
};
#if CONFIG_EXT_TX
......
......@@ -151,6 +151,9 @@ const map_entry block_size_map[] = {
#endif
ENUM(BLOCK_4X16), ENUM(BLOCK_16X4), ENUM(BLOCK_8X32),
ENUM(BLOCK_32X8), ENUM(BLOCK_16X64), ENUM(BLOCK_64X16),
#if CONFIG_EXT_PARTITION
ENUM(BLOCK_32X128), ENUM(BLOCK_128X32),
#endif
LAST_ENUM
};
......
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