Commit 801cc926 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Fix kf y mode costing

Change-Id: I3d6a440b13473b0d1e8b18c6629c7e8e3fb446ae
parent 8e75e8bb
......@@ -3610,9 +3610,8 @@ static const aom_cdf_prob
};
#endif
// CDF version of 'av1_kf_y_mode_prob'.
const aom_cdf_prob
av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][CDF_SIZE(INTRA_MODES)] = {
default_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][CDF_SIZE(INTRA_MODES)] = {
#if CONFIG_SMOOTH_HV
{
{ AOM_ICDF(14208), AOM_ICDF(16238), AOM_ICDF(19079), AOM_ICDF(22512),
......@@ -4714,6 +4713,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->palette_uv_size_cdf, default_palette_uv_size_cdf);
av1_copy(fc->palette_y_color_index_cdf, default_palette_y_color_index_cdf);
av1_copy(fc->palette_uv_color_index_cdf, default_palette_uv_color_index_cdf);
av1_copy(fc->kf_y_cdf, default_kf_y_mode_cdf);
#if CONFIG_MRC_TX
av1_copy(fc->mrc_mask_inter_cdf, default_mrc_mask_inter_cdf);
av1_copy(fc->mrc_mask_intra_cdf, default_mrc_mask_intra_cdf);
......
......@@ -533,8 +533,7 @@ typedef struct FRAME_COUNTS {
#endif // CONFIG_FILTER_INTRA
} FRAME_COUNTS;
// CDF version of 'av1_kf_y_mode_prob'.
extern const aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES]
extern const aom_cdf_prob default_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES]
[CDF_SIZE(INTRA_MODES)];
extern const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
......
......@@ -5130,9 +5130,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
av1_diff_update_prob(&r, &fc->skip_probs[i], ACCT_STR);
#endif
if (frame_is_intra_only(cm)) {
av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
} else {
if (!frame_is_intra_only(cm)) {
#if !CONFIG_NEW_MULTISYMBOL
read_inter_mode_probs(fc, &r);
#endif
......
......@@ -5162,9 +5162,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
update_skip_probs(cm, header_bc, counts);
#endif
if (frame_is_intra_only(cm)) {
av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
} else {
if (!frame_is_intra_only(cm)) {
#if !CONFIG_NEW_MULTISYMBOL
update_inter_mode_probs(cm, header_bc, counts);
#endif
......
......@@ -136,7 +136,7 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, MACROBLOCK *x,
for (i = 0; i < INTRA_MODES; ++i)
for (j = 0; j < INTRA_MODES; ++j)
av1_cost_tokens_from_cdf(x->y_mode_costs[i][j], av1_kf_y_mode_cdf[i][j],
av1_cost_tokens_from_cdf(x->y_mode_costs[i][j], fc->kf_y_cdf[i][j],
av1_intra_mode_inv);
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i)
......
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