Commit 2f6ce75e authored by Sarah Parker's avatar Sarah Parker

Add compound segment experiment flag

Change-Id: Id80f76ea2598daa93e693c5efe29b782abe33957
parent eda3d764
......@@ -476,6 +476,17 @@ static const aom_prob default_inter_compound_mode_probs
{ 25, 29, 50, 192, 64, 192, 128, 180, 180 }, // 6 = two intra neighbours
};
#if CONFIG_COMPOUND_SEGMENT
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
{ 208, 200 }, { 208, 200 }, { 208, 200 }, { 208, 200 }, { 208, 200 },
{ 208, 200 }, { 216, 200 }, { 216, 200 }, { 216, 200 }, { 224, 200 },
{ 224, 200 }, { 240, 200 }, { 240, 200 },
#if CONFIG_EXT_PARTITION
{ 255, 200 }, { 255, 200 }, { 255, 200 },
#endif // CONFIG_EXT_PARTITION
};
#else // !CONFIG_COMPOUND_SEGMENT
static const aom_prob default_compound_type_probs[BLOCK_SIZES]
[COMPOUND_TYPES - 1] = {
{ 208 }, { 208 }, { 208 },
......@@ -487,6 +498,7 @@ static const aom_prob default_compound_type_probs[BLOCK_SIZES]
{ 255 }, { 255 }, { 255 },
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_COMPOUND_SEGMENT
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
208, 208, 208, 208,
......@@ -643,9 +655,15 @@ const aom_tree_index av1_inter_compound_mode_tree
-INTER_COMPOUND_OFFSET(NEAR_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARMV)
};
#if CONFIG_COMPOUND_SEGMENT
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, 2, -COMPOUND_WEDGE, -COMPOUND_SEG
};
#else // !CONFIG_COMPOUND_SEGMENT
const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = {
-COMPOUND_AVERAGE, -COMPOUND_WEDGE
};
#endif // CONFIG_COMPOUND_SEGMENT
/* clang-format on */
#endif // CONFIG_EXT_INTER
......
......@@ -354,6 +354,9 @@ typedef enum {
typedef enum {
COMPOUND_AVERAGE = 0,
COMPOUND_WEDGE,
#if CONFIG_COMPOUND_SEGMENT
COMPOUND_SEG,
#endif // CONFIG_COMPOUND_SEGMENT
COMPOUND_TYPES,
} COMPOUND_TYPE;
#endif // CONFIG_EXT_INTER
......
......@@ -4382,6 +4382,11 @@ static int get_interinter_compound_type_bits(BLOCK_SIZE bsize,
switch (comp_type) {
case COMPOUND_AVERAGE: return 0;
case COMPOUND_WEDGE: return get_interinter_wedge_bits(bsize);
#if CONFIG_COMPOUND_SEGMENT
// TODO(sarahparker) this 0 is just a placeholder, it is possible this will
// need to change once this mode is fully implemented
case COMPOUND_SEG: return 0;
#endif // CONFIG_COMPOUND_SEGMENT
default: assert(0); return 0;
}
}
......@@ -7605,6 +7610,9 @@ static int64_t handle_inter_mode(
}
}
break;
#if CONFIG_COMPOUND_SEGMENT
case COMPOUND_SEG: break;
#endif // CONFIG_COMPOUND_SEGMENT
default: assert(0); return 0;
}
}
......
......@@ -266,6 +266,7 @@ EXPERIMENT_LIST="
intra_interp
filter_intra
ext_inter
compound_segment
ext_interp
ext_refs
global_motion
......
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