Fix separation between ext-inter group of expts.
Change-Id: I9b6f99768c60e743d2fadfaabc532e7c15dc40f3
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index ec3b975..bbcfe9e 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -203,15 +203,24 @@
}
static INLINE int use_masked_motion_search(COMPOUND_TYPE type) {
+#if CONFIG_WEDGE
return (type == COMPOUND_WEDGE);
+#else
+ (void)type;
+ return 0;
+#endif
}
static INLINE int is_masked_compound_type(COMPOUND_TYPE type) {
-#if CONFIG_COMPOUND_SEGMENT
+#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
return (type == COMPOUND_WEDGE || type == COMPOUND_SEG);
-#else
+#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;
}
#else
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 341b75f..d3568d6 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -772,7 +772,7 @@
{ 25, 29, 50, 192, 64, 192, 128, 180, 180 }, // 6 = two intra neighbours
};
-#if CONFIG_COMPOUND_SEGMENT
+#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4
@@ -785,7 +785,7 @@
{ 255, 200 }, { 255, 200 }, { 255, 200 },
#endif // CONFIG_EXT_PARTITION
};
-#else // !CONFIG_COMPOUND_SEGMENT
+#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4
@@ -797,7 +797,22 @@
{ 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION
};
-#endif // CONFIG_COMPOUND_SEGMENT
+#elif CONFIG_COMPOUND_SEGMENT && !CONFIG_WEDGE
+static const aom_prob
+ default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
+#if CONFIG_CB4X4
+ { 208 }, { 208 }, { 208 },
+#endif
+ { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
+ { 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
+#if CONFIG_EXT_PARTITION
+ { 255 }, { 255 }, { 255 },
+#endif // CONFIG_EXT_PARTITION
+ };
+#else
+static const aom_prob default_compound_type_probs[BLOCK_SIZES]
+ [COMPOUND_TYPES - 1];
+#endif // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
208, 208, 208, 208,
@@ -977,15 +992,21 @@
-INTER_COMPOUND_OFFSET(NEAR_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARMV)
};
-#if CONFIG_COMPOUND_SEGMENT
+#if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, 2, -COMPOUND_WEDGE, -COMPOUND_SEG
};
-#else // !CONFIG_COMPOUND_SEGMENT
+#elif !CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, -COMPOUND_WEDGE
};
-#endif // CONFIG_COMPOUND_SEGMENT
+#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 */
#endif // CONFIG_EXT_INTER
@@ -3485,11 +3506,13 @@
pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]);
}
+#if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES; ++i) {
aom_tree_merge_probs(av1_compound_type_tree, pre_fc->compound_type_prob[i],
counts->compound_interinter[i],
fc->compound_type_prob[i]);
}
+#endif // CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
#endif // CONFIG_EXT_INTER
for (i = 0; i < BLOCK_SIZE_GROUPS; i++)
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 6c5d065..2af5d34 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -362,7 +362,9 @@
typedef enum {
COMPOUND_AVERAGE = 0,
+#if CONFIG_WEDGE
COMPOUND_WEDGE,
+#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
COMPOUND_SEG,
#endif // CONFIG_COMPOUND_SEGMENT
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index af6cb1c..c20bd9b 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -355,10 +355,13 @@
#endif
BLOCK_SIZE sb_type) {
assert(is_masked_compound_type(comp_data->type));
+ (void)sb_type;
switch (comp_data->type) {
+#if CONFIG_WEDGE
case COMPOUND_WEDGE:
return av1_get_contiguous_soft_mask(comp_data->wedge_index,
!comp_data->wedge_sign, sb_type);
+#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG:
return invert_mask(mask_buffer, comp_data->seg_mask, h, w, stride);
@@ -370,10 +373,13 @@
const uint8_t *av1_get_compound_type_mask(
const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type) {
assert(is_masked_compound_type(comp_data->type));
+ (void)sb_type;
switch (comp_data->type) {
+#if CONFIG_WEDGE
case COMPOUND_WEDGE:
return av1_get_contiguous_soft_mask(comp_data->wedge_index,
comp_data->wedge_sign, sb_type);
+#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG: return comp_data->seg_mask;
#endif // CONFIG_COMPOUND_SEGMENT
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 15f5ffa..156ab66 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -205,9 +205,12 @@
static INLINE int is_interinter_compound_used(COMPOUND_TYPE type,
BLOCK_SIZE sb_type) {
+ (void)sb_type;
switch (type) {
- case COMPOUND_AVERAGE: (void)sb_type; return 1;
+ case COMPOUND_AVERAGE: return 1;
+#if CONFIG_WEDGE
case COMPOUND_WEDGE: return wedge_params_lookup[sb_type].bits > 0;
+#endif // CONFIG_WEDGE
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG: return sb_type >= BLOCK_8X8;
#endif // CONFIG_COMPOUND_SEGMENT