Commit 788ed89f authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Remove the intra probs when EC_ADAPT enabled.

When EC_ADAPT is enabled, this patch removes all probability tables
 associated with coding intra tokens.
This commit has no change to metrics.

Change-Id: Ie74dd330984fd97b283ef8f8f2c053379f037d9f
parent 7e55571e
......@@ -293,6 +293,7 @@ const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS] = {
};
#endif // CONFIG_LV_MAP
#if !CONFIG_EC_ADAPT
#if CONFIG_ALT_INTRA
#if CONFIG_SMOOTH_HV
const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
......@@ -889,6 +890,7 @@ static const aom_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
};
#endif // CONFIG_ALT_INTRA
#endif // !CONFIG_EC_ADAPT
#if CONFIG_EXT_PARTITION_TYPES
static const aom_prob
......@@ -4676,8 +4678,10 @@ const aom_cdf_prob
};
static void init_mode_probs(FRAME_CONTEXT *fc) {
#if !CONFIG_EC_ADAPT
av1_copy(fc->uv_mode_prob, default_uv_probs);
av1_copy(fc->y_mode_prob, default_if_y_probs);
#endif
av1_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
av1_copy(fc->partition_prob, default_partition_probs);
av1_copy(fc->intra_inter_prob, default_intra_inter_p);
......@@ -4815,9 +4819,11 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
cm->fc->seg.tree_cdf);
}
#if !CONFIG_EC_ADAPT
for (i = 0; i < INTRA_MODES; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i],
fc->uv_mode_cdf[i]);
#endif
#if CONFIG_EXT_PARTITION_TYPES
for (i = 0; i < PARTITION_PLOFFSET; ++i)
av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i],
......@@ -4850,17 +4856,21 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
fc->partition_cdf[i]);
#endif
#if !CONFIG_EC_ADAPT
for (i = 0; i < INTRA_MODES; ++i)
for (j = 0; j < INTRA_MODES; ++j)
av1_tree_to_cdf(av1_intra_mode_tree, cm->kf_y_prob[i][j],
cm->fc->kf_y_cdf[i][j]);
#endif
for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j)
av1_tree_to_cdf(av1_switchable_interp_tree, fc->switchable_interp_prob[j],
fc->switchable_interp_cdf[j]);
#if !CONFIG_EC_ADAPT
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->y_mode_prob[i], fc->y_mode_cdf[i]);
#endif
#if CONFIG_EXT_TX
int s;
......
......@@ -473,11 +473,13 @@ typedef struct FRAME_COUNTS {
#endif // CONFIG_FILTER_INTRA
} FRAME_COUNTS;
#if !CONFIG_EC_ADAPT
// Default probabilities for signaling Intra mode for Y plane -- used only for
// intra-only frames. ('default_if_y_probs' is used for inter frames).
// Contexts used: Intra mode (Y plane) of 'above' and 'left' blocks.
extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
[INTRA_MODES - 1];
#endif
// CDF version of 'av1_kf_y_mode_prob'.
extern const aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES]
[CDF_SIZE(INTRA_MODES)];
......
......@@ -5090,7 +5090,9 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
#endif // !CONFIG_EC_ADAPT
if (frame_is_intra_only(cm)) {
#if !CONFIG_EC_ADAPT
av1_copy(cm->kf_y_prob, av1_kf_y_mode_prob);
#endif
av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
#if !CONFIG_EC_ADAPT
int k;
......
......@@ -5062,7 +5062,9 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#endif // !CONFIG_EC_ADAPT
if (frame_is_intra_only(cm)) {
#if !CONFIG_EC_ADAPT
av1_copy(cm->kf_y_prob, av1_kf_y_mode_prob);
#endif
av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
#if !CONFIG_EC_ADAPT
......
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