Commit 371968cd authored by Debargha Mukherjee's avatar Debargha Mukherjee Committed by Sebastien Alaiwan
Browse files

Remove compound-segment/wedge config flags

Change-Id: I39cfbb135add0553cadf64481b13786831fbdddd
parent 78c229b4
...@@ -33,7 +33,6 @@ extern "C" { ...@@ -33,7 +33,6 @@ extern "C" {
#define MAX_MB_PLANE 3 #define MAX_MB_PLANE 3
#if CONFIG_COMPOUND_SEGMENT
// Set COMPOUND_SEGMENT_TYPE to one of the three // Set COMPOUND_SEGMENT_TYPE to one of the three
// 0: Uniform // 0: Uniform
// 1: Difference weighted // 1: Difference weighted
...@@ -52,8 +51,6 @@ typedef enum { ...@@ -52,8 +51,6 @@ typedef enum {
SEG_MASK_TYPES, SEG_MASK_TYPES,
} SEG_MASK_TYPE; } SEG_MASK_TYPE;
#endif // CONFIG_COMPOUND_SEGMENT
typedef enum { typedef enum {
KEY_FRAME = 0, KEY_FRAME = 0,
INTER_FRAME = 1, INTER_FRAME = 1,
...@@ -214,24 +211,11 @@ static INLINE int have_newmv_in_inter_mode(PREDICTION_MODE mode) { ...@@ -214,24 +211,11 @@ static INLINE int have_newmv_in_inter_mode(PREDICTION_MODE mode) {
} }
static INLINE int use_masked_motion_search(COMPOUND_TYPE type) { static INLINE int use_masked_motion_search(COMPOUND_TYPE type) {
#if CONFIG_WEDGE
return (type == COMPOUND_WEDGE); return (type == COMPOUND_WEDGE);
#else
(void)type;
return 0;
#endif
} }
static INLINE int is_masked_compound_type(COMPOUND_TYPE type) { static INLINE int is_masked_compound_type(COMPOUND_TYPE type) {
#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
return (type == COMPOUND_WEDGE || type == COMPOUND_SEG); return (type == COMPOUND_WEDGE || type == COMPOUND_SEG);
#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
return (type == COMPOUND_WEDGE);
#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
return (type == COMPOUND_SEG);
#endif // CONFIG_COMPOUND_SEGMENT
(void)type;
return 0;
} }
/* For keyframes, intra block modes are predicted by the (already decoded) /* For keyframes, intra block modes are predicted by the (already decoded)
...@@ -295,14 +279,10 @@ typedef struct RD_STATS { ...@@ -295,14 +279,10 @@ typedef struct RD_STATS {
// This struct is used to group function args that are commonly // This struct is used to group function args that are commonly
// sent together in functions related to interinter compound modes // sent together in functions related to interinter compound modes
typedef struct { typedef struct {
#if CONFIG_WEDGE
int wedge_index; int wedge_index;
int wedge_sign; int wedge_sign;
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
SEG_MASK_TYPE mask_type; SEG_MASK_TYPE mask_type;
uint8_t *seg_mask; uint8_t *seg_mask;
#endif // CONFIG_COMPOUND_SEGMENT
COMPOUND_TYPE interinter_compound_type; COMPOUND_TYPE interinter_compound_type;
} INTERINTER_COMPOUND_DATA; } INTERINTER_COMPOUND_DATA;
...@@ -361,13 +341,9 @@ typedef struct MB_MODE_INFO { ...@@ -361,13 +341,9 @@ typedef struct MB_MODE_INFO {
int interintra_wedge_sign; int interintra_wedge_sign;
// interinter members // interinter members
COMPOUND_TYPE interinter_compound_type; COMPOUND_TYPE interinter_compound_type;
#if CONFIG_WEDGE
int wedge_index; int wedge_index;
int wedge_sign; int wedge_sign;
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
SEG_MASK_TYPE mask_type; SEG_MASK_TYPE mask_type;
#endif // CONFIG_COMPOUND_SEGMENT
MOTION_MODE motion_mode; MOTION_MODE motion_mode;
#if CONFIG_MOTION_VAR #if CONFIG_MOTION_VAR
int overlappable_neighbors[2]; int overlappable_neighbors[2];
...@@ -766,9 +742,7 @@ typedef struct macroblockd { ...@@ -766,9 +742,7 @@ typedef struct macroblockd {
const EobThresholdMD *eob_threshold_md; const EobThresholdMD *eob_threshold_md;
#endif #endif
#if CONFIG_COMPOUND_SEGMENT
DECLARE_ALIGNED(16, uint8_t, seg_mask[2 * MAX_SB_SQUARE]); DECLARE_ALIGNED(16, uint8_t, seg_mask[2 * MAX_SB_SQUARE]);
#endif // CONFIG_COMPOUND_SEGMENT
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
uint8_t *mrc_mask; uint8_t *mrc_mask;
......
...@@ -2360,9 +2360,7 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -2360,9 +2360,7 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
AVERAGE_TILE_CDFS(inter_compound_mode_cdf) AVERAGE_TILE_CDFS(inter_compound_mode_cdf)
#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
AVERAGE_TILE_CDFS(compound_type_cdf) AVERAGE_TILE_CDFS(compound_type_cdf)
#endif // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
#if CONFIG_COMPOUND_SINGLEREF #if CONFIG_COMPOUND_SINGLEREF
AVERAGE_TILE_CDFS(inter_singleref_comp_mode_cdf) AVERAGE_TILE_CDFS(inter_singleref_comp_mode_cdf)
#endif #endif
......
...@@ -744,7 +744,6 @@ static const aom_cdf_prob ...@@ -744,7 +744,6 @@ static const aom_cdf_prob
}; };
#endif // CONFIG_COMPOUND_SINGLEREF #endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_prob static const aom_prob
default_compound_type_probs[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1] = { default_compound_type_probs[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1] = {
{ 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 },
...@@ -760,38 +759,7 @@ static const aom_prob ...@@ -760,38 +759,7 @@ static const aom_prob
{ 208, 1 }, { 208, 1 } { 208, 1 }, { 208, 1 }
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_prob
default_compound_type_probs[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1] = {
{ 255 }, { 255 }, { 255 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 },
{ 208 }, { 216 }, { 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
#if CONFIG_EXT_PARTITION
{ 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION
{ 208 }, { 208 }, { 208 }, { 208 }, { 255 }, { 255 },
#if CONFIG_EXT_PARTITION
{ 255 }, { 255 }
#endif // CONFIG_EXT_PARTITION
};
#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
static const aom_prob
default_compound_type_probs[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1] = {
{ 255 }, { 255 }, { 255 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 },
{ 208 }, { 216 }, { 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
#if CONFIG_EXT_PARTITION
{ 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 },
#if CONFIG_EXT_PARTITION
{ 208 }, { 208 }
#endif // CONFIG_EXT_PARTITION
};
#else
static const aom_prob default_compound_type_probs[BLOCK_SIZES_ALL]
[COMPOUND_TYPES - 1];
#endif // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_cdf_prob static const aom_cdf_prob
default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = { default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = {
{ AOM_ICDF(16384), AOM_ICDF(24576), AOM_ICDF(32768), 0 }, { AOM_ICDF(16384), AOM_ICDF(24576), AOM_ICDF(32768), 0 },
...@@ -826,77 +794,6 @@ static const aom_cdf_prob ...@@ -826,77 +794,6 @@ static const aom_cdf_prob
{ AOM_ICDF(26624), AOM_ICDF(26648), AOM_ICDF(32768), 0 }, { AOM_ICDF(26624), AOM_ICDF(26648), AOM_ICDF(32768), 0 },
#endif #endif
}; };
#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_cdf_prob
default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = {
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 }, // 255
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 }, // 208
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 }, // 216
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 },
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 },
{ AOM_ICDF(28672), AOM_ICDF(32768), 0 }, // 224
{ AOM_ICDF(28672), AOM_ICDF(32768), 0 },
{ AOM_ICDF(30720), AOM_ICDF(32768), 0 }, // 240
{ AOM_ICDF(30720), AOM_ICDF(32768), 0 },
#if CONFIG_EXT_PARTITION
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 }, // 255
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
#endif // CONFIG_EXT_PARTITION
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
#if CONFIG_EXT_PARTITION
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
#endif // CONFIG_EXT_PARTITION
};
#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
static const aom_cdf_prob
default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = {
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 }, // 255
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 }, // 208
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 }, // 216
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 },
{ AOM_ICDF(27648), AOM_ICDF(32768), 0 },
{ AOM_ICDF(28672), AOM_ICDF(32768), 0 }, // 224
{ AOM_ICDF(28672), AOM_ICDF(32768), 0 },
{ AOM_ICDF(30720), AOM_ICDF(32768), 0 }, // 240
{ AOM_ICDF(30720), AOM_ICDF(32768), 0 },
#if CONFIG_EXT_PARTITION
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 }, // 255
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
{ AOM_ICDF(32640), AOM_ICDF(32768), 0 },
#endif // CONFIG_EXT_PARTITION
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 }, // 208
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
#if CONFIG_EXT_PARTITION
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
{ AOM_ICDF(26624), AOM_ICDF(32768), 0 },
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
#if CONFIG_INTERINTRA #if CONFIG_INTERINTRA
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = { static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
...@@ -1482,21 +1379,9 @@ const aom_tree_index av1_inter_singleref_comp_mode_tree ...@@ -1482,21 +1379,9 @@ const aom_tree_index av1_inter_singleref_comp_mode_tree
}; };
#endif // CONFIG_COMPOUND_SINGLEREF #endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = { const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, 2, -COMPOUND_WEDGE, -COMPOUND_SEG -COMPOUND_AVERAGE, 2, -COMPOUND_WEDGE, -COMPOUND_SEG
}; };
#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, -COMPOUND_WEDGE
};
#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, -COMPOUND_SEG
};
#else
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {};
#endif // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
/* clang-format on */ /* clang-format on */
const aom_tree_index av1_partition_tree[TREE_SIZE(PARTITION_TYPES)] = { const aom_tree_index av1_partition_tree[TREE_SIZE(PARTITION_TYPES)] = {
...@@ -6301,9 +6186,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -6301,9 +6186,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
default_inter_singleref_comp_mode_cdf); default_inter_singleref_comp_mode_cdf);
#endif // CONFIG_COMPOUND_SINGLEREF #endif // CONFIG_COMPOUND_SINGLEREF
av1_copy(fc->compound_type_prob, default_compound_type_probs); av1_copy(fc->compound_type_prob, default_compound_type_probs);
#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
av1_copy(fc->compound_type_cdf, default_compound_type_cdf); av1_copy(fc->compound_type_cdf, default_compound_type_cdf);
#endif // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
#if CONFIG_INTERINTRA #if CONFIG_INTERINTRA
av1_copy(fc->interintra_prob, default_interintra_prob); av1_copy(fc->interintra_prob, default_interintra_prob);
av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob); av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob);
...@@ -6476,17 +6359,14 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { ...@@ -6476,17 +6359,14 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
av1_interintra_mode_tree, pre_fc->interintra_mode_prob[i], av1_interintra_mode_tree, pre_fc->interintra_mode_prob[i],
counts->interintra_mode[i], fc->interintra_mode_prob[i]); counts->interintra_mode[i], fc->interintra_mode_prob[i]);
} }
#if CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES_ALL; ++i) { for (i = 0; i < BLOCK_SIZES_ALL; ++i) {
if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i)) if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i))
fc->wedge_interintra_prob[i] = av1_mode_mv_merge_probs( fc->wedge_interintra_prob[i] = av1_mode_mv_merge_probs(
pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]); pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]);
} }
#endif // CONFIG_WEDGE
} }
#endif // CONFIG_INTERINTRA #endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
if (cm->allow_masked_compound) { if (cm->allow_masked_compound) {
for (i = 0; i < BLOCK_SIZES_ALL; ++i) { for (i = 0; i < BLOCK_SIZES_ALL; ++i) {
aom_tree_merge_probs( aom_tree_merge_probs(
...@@ -6494,7 +6374,6 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { ...@@ -6494,7 +6374,6 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
counts->compound_interinter[i], fc->compound_type_prob[i]); counts->compound_interinter[i], fc->compound_type_prob[i]);
} }
} }
#endif // CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
#if CONFIG_JNT_COMP #if CONFIG_JNT_COMP
for (i = 0; i < COMP_INDEX_CONTEXTS; ++i) for (i = 0; i < COMP_INDEX_CONTEXTS; ++i)
......
...@@ -206,9 +206,7 @@ typedef struct frame_contexts { ...@@ -206,9 +206,7 @@ typedef struct frame_contexts {
INTER_SINGLEREF_COMP_MODES)]; INTER_SINGLEREF_COMP_MODES)];
#endif // CONFIG_COMPOUND_SINGLEREF #endif // CONFIG_COMPOUND_SINGLEREF
aom_prob compound_type_prob[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1]; aom_prob compound_type_prob[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1];
#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
aom_cdf_prob compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)]; aom_cdf_prob compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)];
#endif // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
#if CONFIG_INTERINTRA #if CONFIG_INTERINTRA
aom_prob interintra_prob[BLOCK_SIZE_GROUPS]; aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL]; aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL];
......
...@@ -601,12 +601,8 @@ typedef enum ATTRIBUTE_PACKED { ...@@ -601,12 +601,8 @@ typedef enum ATTRIBUTE_PACKED {
typedef enum { typedef enum {
COMPOUND_AVERAGE, COMPOUND_AVERAGE,
#if CONFIG_WEDGE
COMPOUND_WEDGE, COMPOUND_WEDGE,
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
COMPOUND_SEG, COMPOUND_SEG,
#endif // CONFIG_COMPOUND_SEGMENT
COMPOUND_TYPES, COMPOUND_TYPES,
} COMPOUND_TYPE; } COMPOUND_TYPE;
......
...@@ -270,9 +270,7 @@ typedef struct AV1Common { ...@@ -270,9 +270,7 @@ typedef struct AV1Common {
#if CONFIG_INTERINTRA #if CONFIG_INTERINTRA
int allow_interintra_compound; int allow_interintra_compound;
#endif // CONFIG_INTERINTRA #endif // CONFIG_INTERINTRA
#if CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
int allow_masked_compound; int allow_masked_compound;
#endif // CONFIG_WEDGE || CONFIG_COMPOUND_SEGMENT
#if !CONFIG_NO_FRAME_CONTEXT_SIGNALING #if !CONFIG_NO_FRAME_CONTEXT_SIGNALING
// Flag signaling which frame contexts should be reset to default values. // Flag signaling which frame contexts should be reset to default values.
......
...@@ -317,7 +317,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = { ...@@ -317,7 +317,6 @@ 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 },
#if CONFIG_WEDGE
{ 4, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_8X8], 0, { 4, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_8X8], 0,
wedge_masks[BLOCK_8X8] }, wedge_masks[BLOCK_8X8] },
{ 4, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_8X16], 0, { 4, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_8X16], 0,
...@@ -332,22 +331,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = { ...@@ -332,22 +331,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = {
wedge_masks[BLOCK_32X16] }, wedge_masks[BLOCK_32X16] },
{ 4, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_32X32], 0, { 4, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_32X32], 0,
wedge_masks[BLOCK_32X32] }, wedge_masks[BLOCK_32X32] },
#else
{ 0, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_8X8], 0,
wedge_masks[BLOCK_8X8] },
{ 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_8X16], 0,
wedge_masks[BLOCK_8X16] },
{ 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_16X8], 0,
wedge_masks[BLOCK_16X8] },
{ 0, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_16X16], 0,
wedge_masks[BLOCK_16X16] },
{ 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_16X32], 0,
wedge_masks[BLOCK_16X32] },
{ 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_32X16], 0,
wedge_masks[BLOCK_32X16] },
{ 0, wedge_codebook_16_heqw, wedge_signflip_lookup[BLOCK_32X32], 0,
wedge_masks[BLOCK_32X32] },
#endif // CONFIG_WEDGE
{ 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 },
...@@ -356,7 +339,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = { ...@@ -356,7 +339,6 @@ 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 },
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
#if CONFIG_WEDGE
{ 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_4X16], 0, { 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_4X16], 0,
wedge_masks[BLOCK_4X16] }, wedge_masks[BLOCK_4X16] },
{ 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_16X4], 0, { 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_16X4], 0,
...@@ -365,16 +347,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = { ...@@ -365,16 +347,6 @@ const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL] = {
wedge_masks[BLOCK_8X32] }, wedge_masks[BLOCK_8X32] },
{ 4, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_32X8], 0, { 4, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_32X8], 0,
wedge_masks[BLOCK_32X8] }, wedge_masks[BLOCK_32X8] },
#else
{ 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_4X16], 0,
wedge_masks[BLOCK_4X16] },
{ 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_16X4], 0,
wedge_masks[BLOCK_16X4] },
{ 0, wedge_codebook_16_hgtw, wedge_signflip_lookup[BLOCK_8X32], 0,
wedge_masks[BLOCK_8X32] },
{ 0, wedge_codebook_16_hltw, wedge_signflip_lookup[BLOCK_32X8], 0,
wedge_masks[BLOCK_32X8] },
#endif // CONFIG_WEDGE
{ 0, NULL, NULL, 0, NULL }, { 0, NULL, NULL, 0, NULL },
{ 0, NULL, NULL, 0, NULL }, { 0, NULL, NULL, 0, NULL },
#if CONFIG_EXT_PARTITION #if CONFIG_EXT_PARTITION
...@@ -413,7 +385,6 @@ const uint8_t *av1_get_soft_mask(int wedge_index, int wedge_sign, ...@@ -413,7 +385,6 @@ const uint8_t *av1_get_soft_mask(int wedge_index, int wedge_sign,
return mask; return mask;
} }
#if CONFIG_COMPOUND_SEGMENT
static uint8_t *invert_mask(uint8_t *mask_inv_buffer, const uint8_t *const mask, static uint8_t *invert_mask(uint8_t *mask_inv_buffer, const uint8_t *const mask,
int h, int w, int stride) { int h, int w, int stride) {
int i, j; int i, j;
...@@ -425,26 +396,18 @@ static uint8_t *invert_mask(uint8_t *mask_inv_buffer, const uint8_t *const mask, ...@@ -425,26 +396,18 @@ static uint8_t *invert_mask(uint8_t *mask_inv_buffer, const uint8_t *const mask,
} }
return mask_inv_buffer; return mask_inv_buffer;
} }
#endif // CONFIG_COMPOUND_SEGMENT
const uint8_t *av1_get_compound_type_mask_inverse( const uint8_t *av1_get_compound_type_mask_inverse(
const INTERINTER_COMPOUND_DATA *const comp_data, const INTERINTER_COMPOUND_DATA *const comp_data, uint8_t *mask_buffer,
#if CONFIG_COMPOUND_SEGMENT int h, int w, int stride, BLOCK_SIZE sb_type) {
uint8_t *mask_buffer, int h, int w, int stride,
#endif
BLOCK_SIZE sb_type) {
assert(is_masked_compound_type(comp_data->interinter_compound_type)); assert(is_masked_compound_type(comp_data->interinter_compound_type));
(void)sb_type; (void)sb_type;
switch (comp_data->interinter_compound_type) { switch (comp_data->interinter_compound_type) {
#if CONFIG_WEDGE
case COMPOUND_WEDGE: case COMPOUND_WEDGE:
return av1_get_contiguous_soft_mask(comp_data->wedge_index, return av1_get_contiguous_soft_mask(comp_data->wedge_index,
!comp_data->wedge_sign, sb_type); !comp_data->wedge_sign, sb_type);
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG: case COMPOUND_SEG:
return invert_mask(mask_buffer, comp_data->seg_mask, h, w, stride); return invert_mask(mask_buffer, comp_data->seg_mask, h, w, stride);
#endif // CONFIG_COMPOUND_SEGMENT
default: assert(0); return NULL; default: assert(0); return NULL;
} }
} }
...@@ -454,19 +417,14 @@ const uint8_t *av1_get_compound_type_mask( ...@@ -454,19 +417,14 @@ const uint8_t *av1_get_compound_type_mask(
assert(is_masked_compound_type(comp_data->interinter_compound_type)); assert(is_masked_compound_type(comp_data->interinter_compound_type));
(void)sb_type; (void)sb_type;
switch (comp_data->interinter_compound_type) { switch (comp_data->interinter_compound_type) {
#if CONFIG_WEDGE
case COMPOUND_WEDGE: case COMPOUND_WEDGE:
return av1_get_contiguous_soft_mask(comp_data->wedge_index, return av1_get_contiguous_soft_mask(comp_data->wedge_index,
comp_data->wedge_sign, sb_type); comp_data->wedge_sign, sb_type);
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG: return comp_data->seg_mask; case COMPOUND_SEG: return comp_data->seg_mask;
#endif // CONFIG_COMPOUND_SEGMENT
default: assert(0); return NULL; default: assert(0); return NULL;
} }
} }
#if CONFIG_COMPOUND_SEGMENT
#if COMPOUND_SEGMENT_TYPE == 0 #if COMPOUND_SEGMENT_TYPE == 0
static void uniform_mask(uint8_t *mask, int which_inverse, BLOCK_SIZE sb_type, static void uniform_mask(uint8_t *mask, int which_inverse, BLOCK_SIZE sb_type,
int h, int w, int mask_val) { int h, int w, int mask_val) {
...@@ -553,7 +511,7 @@ static void build_compound_seg_mask_d32(uint8_t *mask, SEG_MASK_TYPE mask_type, ...@@ -553,7 +511,7 @@ static void build_compound_seg_mask_d32(uint8_t *mask, SEG_MASK_TYPE mask_type,
default: assert(0); default: assert(0);
} }
} }
#endif #endif // CONFIG_CONVOLVE_ROUND
static void diffwtd_mask(uint8_t *mask, int which_inverse, int mask_base, static void diffwtd_mask(uint8_t *mask, int which_inverse, int mask_base,
const uint8_t *src0, int src0_stride, const uint8_t *src0, int src0_stride,
...@@ -628,7 +586,6 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type, ...@@ -628,7 +586,6 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
} }
#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_HIGHBITDEPTH
#endif // COMPOUND_SEGMENT_TYPE #endif // COMPOUND_SEGMENT_TYPE
#endif // CONFIG_COMPOUND_SEGMENT
#if MASK_MASTER_SIZE == 64 #if MASK_MASTER_SIZE == 64
static const uint8_t wedge_master_oblique_odd[NSMOOTHERS][MASK_MASTER_SIZE] = { static const uint8_t wedge_master_oblique_odd[NSMOOTHERS][MASK_MASTER_SIZE] = {
...@@ -861,14 +818,7 @@ void av1_make_masked_inter_predictor( ...@@ -861,14 +818,7 @@ void av1_make_masked_inter_predictor(
const MODE_INFO *mi = xd->mi[0]; const MODE_INFO *mi = xd->mi[0];
const INTERINTER_COMPOUND_DATA comp_data = { const INTERINTER_COMPOUND_DATA comp_data = {
#if CONFIG_WEDGE mi->mbmi.wedge_index, mi->mbmi.wedge_sign, mi->mbmi.mask_type, xd->seg_mask,
mi->mbmi.wedge_index,
mi->mbmi.wedge_sign,
#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
mi->mbmi.mask_type,
xd->seg_mask,
#endif // CONFIG_COMPOUND_SEGMENT
mi->mbmi.interinter_compound_type mi->mbmi.interinter_compound_type
}; };