Commit ed057990 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Some cleanups on ext-inter config macros

Also includes a change in the wedge primary functions providing
a slight improvement.

Change-Id: I536d3209f59624e23128708e29fa85c1e6fcd97e
parent 30596fb2
......@@ -789,11 +789,11 @@ static const aom_prob default_inter_singleref_comp_mode_probs
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4
{ 255, 255 }, { 255, 255 }, { 255, 255 },
{ 255, 128 }, { 255, 128 }, { 255, 128 },
#endif
{ 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 },
{ 208, 128 }, { 208, 128 }, { 208, 128 }, { 208, 128 }, { 208, 128 },
{ 208, 128 }, { 216, 128 }, { 216, 128 }, { 216, 128 }, { 224, 128 },
{ 224, 128 }, { 240, 128 }, { 240, 128 },
#if CONFIG_EXT_PARTITION
{ 255, 200 }, { 255, 200 }, { 255, 200 },
#endif // CONFIG_EXT_PARTITION
......@@ -802,7 +802,7 @@ static const aom_prob
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4
{ 208 }, { 208 }, { 208 },
{ 255 }, { 255 }, { 255 },
#endif
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
{ 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
......@@ -814,7 +814,7 @@ static const aom_prob
static const aom_prob
default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
#if CONFIG_CB4X4
{ 208 }, { 208 }, { 208 },
{ 255 }, { 255 }, { 255 },
#endif
{ 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
{ 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
......@@ -3574,6 +3574,7 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
counts->inter_singleref_comp_mode[i],
fc->inter_singleref_comp_mode_probs[i]);
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) {
if (is_interintra_allowed_bsize_group(i))
fc->interintra_prob[i] = av1_mode_mv_merge_probs(
......@@ -3584,11 +3585,14 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
av1_interintra_mode_tree, pre_fc->interintra_mode_prob[i],
counts->interintra_mode[i], fc->interintra_mode_prob[i]);
}
#if CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES; ++i) {
if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i))
fc->wedge_interintra_prob[i] = av1_mode_mv_merge_probs(
pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]);
}
#endif // CONFIG_WEDGE
#endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES; ++i) {
......
......@@ -428,23 +428,23 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
static const uint8_t wedge_master_oblique_odd[NSMOOTHERS][MASK_MASTER_SIZE] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 18,
37, 53, 60, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 7, 19,
37, 52, 60, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
}
};
static const uint8_t wedge_master_oblique_even[NSMOOTHERS][MASK_MASTER_SIZE] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 11, 27,
46, 58, 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 12, 27,
45, 57, 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
}
};
static const uint8_t wedge_master_vertical[NSMOOTHERS][MASK_MASTER_SIZE] = { {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 21,
43, 57, 62, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 8, 22,
42, 56, 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
} };
......@@ -459,7 +459,7 @@ static void shift_copy(const uint8_t *src, uint8_t *dst, int shift, int width) {
}
}
#else
static const double smoother_param[NSMOOTHERS] = { 2.83 };
static const double smoother_param[NSMOOTHERS] = { 3.0 };
#endif // MASK_MASTER_SIZE == 64
static void init_wedge_master_masks() {
......
......@@ -4684,6 +4684,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
#if CONFIG_EXT_INTER
read_inter_compound_mode_probs(fc, &r);
if (cm->reference_mode != COMPOUND_REFERENCE) {
#if CONFIG_INTERINTRA
for (i = 0; i < BLOCK_SIZE_GROUPS; i++) {
if (is_interintra_allowed_bsize_group(i)) {
av1_diff_update_prob(&r, &fc->interintra_prob[i], ACCT_STR);
......@@ -4693,11 +4694,14 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
for (j = 0; j < INTERINTRA_MODES - 1; j++)
av1_diff_update_prob(&r, &fc->interintra_mode_prob[i][j], ACCT_STR);
}
#if CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES; i++) {
if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i)) {
av1_diff_update_prob(&r, &fc->wedge_interintra_prob[i], ACCT_STR);
}
}
#endif // CONFIG_WEDGE
#endif // CONFIG_INTERINTRA
}
#if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
if (cm->reference_mode != SINGLE_REFERENCE) {
......
......@@ -4734,6 +4734,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
update_inter_compound_mode_probs(cm, probwt, header_bc);
if (cm->reference_mode != COMPOUND_REFERENCE) {
#if CONFIG_INTERINTRA
for (i = 0; i < BLOCK_SIZE_GROUPS; i++) {
if (is_interintra_allowed_bsize_group(i)) {
av1_cond_prob_diff_update(header_bc, &fc->interintra_prob[i],
......@@ -4745,11 +4746,14 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
av1_interintra_mode_tree, cm->fc->interintra_mode_prob[i],
counts->interintra_mode[i], INTERINTRA_MODES, probwt, header_bc);
}
#if CONFIG_WEDGE
for (i = 0; i < BLOCK_SIZES; i++) {
if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i))
av1_cond_prob_diff_update(header_bc, &fc->wedge_interintra_prob[i],
cm->counts.wedge_interintra[i], probwt);
}
#endif // CONFIG_WEDGE
#endif // CONFIG_INTERINTRA
}
#if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
if (cm->reference_mode != SINGLE_REFERENCE) {
......
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