Commit 028b57f5 authored by Thomas Davies's avatar Thomas Davies
Browse files

EC_ADAPT: Perform backwards updates directly on CDFs.

The initial CDF for each frame is stored in
the frame context. CDFs for actual coding are
stored in the tile structures, and these are
what get adapted. The initial CDF is replaced
by an average CDF derived from these tile CDFs.
This is carried forward to future frames when
backward adaptation is on.

CDFs are no longer set from the 8 bit probabilities
in backwards adaptation.

For now, 8 bit probabilities are maintained for
use in the encoder and for symbols which do not
have a CDF.

Change-Id: I106b30510bfad1fa57d077f7702acc1864378a09
parent d080f415
...@@ -171,7 +171,7 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) { ...@@ -171,7 +171,7 @@ static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) {
cdf[i] += diff; cdf[i] += diff;
} }
#endif #endif
cdf[nsymbs]++; cdf[nsymbs] += (cdf[nsymbs] < 32);
} }
#endif #endif
......
...@@ -5610,3 +5610,151 @@ void av1_partial_adapt_probs(AV1_COMMON *cm, int mi_row, int mi_col) { ...@@ -5610,3 +5610,151 @@ void av1_partial_adapt_probs(AV1_COMMON *cm, int mi_row, int mi_col) {
} }
} }
#endif // CONFIG_SUBFRAME_PROB_UPDATE #endif // CONFIG_SUBFRAME_PROB_UPDATE
#if CONFIG_EC_ADAPT
static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr,
int cdf_size, const int num_tiles) {
int i, j;
aom_cdf_prob last_val = 0;
for (i = 0; i < cdf_size; ++i) {
// Zero symbol counts for the next frame
if (last_val == CDF_PROB_TOP) {
fc_cdf_ptr[i] = 0;
} else {
int sum = 0;
for (j = 0; j < num_tiles; ++j) sum += cdf_ptr[j][i];
fc_cdf_ptr[i] = sum / num_tiles;
}
last_val = fc_cdf_ptr[i];
}
}
#define AVERAGE_TILE_CDFS(cname) \
for (i = 0; i < num_tiles; ++i) \
cdf_ptr[i] = (aom_cdf_prob *)&ec_ctxs[i]->cname; \
fc_cdf_ptr = (aom_cdf_prob *)&fc->cname; \
cdf_size = (int)sizeof(fc->cname) / sizeof(aom_cdf_prob); \
av1_average_cdf(cdf_ptr, fc_cdf_ptr, cdf_size, num_tiles);
void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
const int num_tiles) {
int i, cdf_size;
aom_cdf_prob *cdf_ptr[MAX_TILE_ROWS * MAX_TILE_COLS];
aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_NEW_TOKENSET
AVERAGE_TILE_CDFS(coef_head_cdfs)
AVERAGE_TILE_CDFS(coef_tail_cdfs)
#else
AVERAGE_TILE_CDFS(coef_cdfs)
#endif
}
void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
const int num_tiles) {
int i, k, cdf_size;
aom_cdf_prob *cdf_ptr[MAX_TILE_ROWS * MAX_TILE_COLS];
aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_REF_MV
int j;
for (j = 0; j < NMV_CONTEXTS; ++j) {
AVERAGE_TILE_CDFS(nmvc[j].joint_cdf)
for (k = 0; k < 2; ++k) {
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class_cdf);
AVERAGE_TILE_CDFS(nmvc[j].comps[k].class0_fp_cdf);
AVERAGE_TILE_CDFS(nmvc[j].comps[k].fp_cdf);
}
}
#else
AVERAGE_TILE_CDFS(nmvc.joint_cdf)
for (k = 0; k < 2; ++k) {
AVERAGE_TILE_CDFS(nmvc.comps[k].class_cdf)
AVERAGE_TILE_CDFS(nmvc.comps[k].class0_fp_cdf)
AVERAGE_TILE_CDFS(nmvc.comps[k].fp_cdf)
}
#endif
}
void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
const int num_tiles) {
int i, cdf_size;
aom_cdf_prob *cdf_ptr[MAX_TILE_ROWS * MAX_TILE_COLS];
aom_cdf_prob *fc_cdf_ptr;
AVERAGE_TILE_CDFS(tx_size_cdf);
#if CONFIG_VAR_TX
// FIXME: txfm_partition probs
#endif
// FIXME: skip probs
#if CONFIG_EXT_TX
// FIXME: ext_tx CDFs
#else
AVERAGE_TILE_CDFS(intra_ext_tx_cdf)
AVERAGE_TILE_CDFS(inter_ext_tx_cdf);
#endif // CONFIG_EXT_TX
AVERAGE_TILE_CDFS(seg.tree_cdf)
AVERAGE_TILE_CDFS(uv_mode_cdf)
#if CONFIG_EXT_PARTITION_TYPES
// FIXME
#else
AVERAGE_TILE_CDFS(partition_cdf)
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_DELTA_Q
AVERAGE_TILE_CDFS(delta_q_cdf)
#endif
#if CONFIG_EXT_INTRA
#if CONFIG_INTRA_INTERP
// FIXME: intra_filter probs
#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
// FIXME: intra_filter probs
#endif // CONFIG_FILTER_INTRA
}
void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
FRAME_CONTEXT *ec_ctxs[],
const int num_tiles) {
int i, cdf_size;
aom_cdf_prob *cdf_ptr[MAX_TILE_ROWS * MAX_TILE_COLS];
aom_cdf_prob *fc_cdf_ptr;
// FIXME: comp_inter_cdf not defined
// FIXME: comp_ref_cdf and comp_bwd_ref not defined
// FIXME: single_ref_cdf not defined
#if CONFIG_REF_MV
// FIXME: cdfs not defined for newmv_mode, zeromv_mode, drl_mode, new2mv_mode
#else
AVERAGE_TILE_CDFS(inter_mode_cdf)
#endif
// FIXME: cdfs not defined for motion_mode_prob, obmc_prob
// FIXME: cdfs not defined for super_tx
// FIXME: CONFIG_EXT_INTER cdfs not defined for inter_compound_mode,
// interintra_mode etc
AVERAGE_TILE_CDFS(y_mode_cdf)
if (cm->interp_filter == SWITCHABLE) {
AVERAGE_TILE_CDFS(switchable_interp_cdf)
}
}
#endif
...@@ -173,8 +173,12 @@ typedef unsigned int av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] ...@@ -173,8 +173,12 @@ typedef unsigned int av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
#define MODULUS_PARAM 13 /* Modulus parameter */ #define MODULUS_PARAM 13 /* Modulus parameter */
struct AV1Common; struct AV1Common;
struct frame_contexts;
void av1_default_coef_probs(struct AV1Common *cm); void av1_default_coef_probs(struct AV1Common *cm);
void av1_adapt_coef_probs(struct AV1Common *cm); void av1_adapt_coef_probs(struct AV1Common *cm);
#if CONFIG_EC_ADAPT
void av1_adapt_coef_cdfs(struct AV1Common *cm, struct frame_contexts *pre_fc);
#endif
#if CONFIG_SUBFRAME_PROB_UPDATE #if CONFIG_SUBFRAME_PROB_UPDATE
void av1_partial_adapt_probs(struct AV1Common *cm, int mi_row, int mi_col); void av1_partial_adapt_probs(struct AV1Common *cm, int mi_row, int mi_col);
#endif // CONFIG_SUBFRAME_PROB_UPDATE #endif // CONFIG_SUBFRAME_PROB_UPDATE
...@@ -377,6 +381,21 @@ static INLINE aom_prob av1_mode_mv_merge_probs(aom_prob pre_prob, ...@@ -377,6 +381,21 @@ static INLINE aom_prob av1_mode_mv_merge_probs(aom_prob pre_prob,
return mode_mv_merge_probs(pre_prob, ct); return mode_mv_merge_probs(pre_prob, ct);
} }
#if CONFIG_EC_ADAPT
void av1_average_tile_coef_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
const int num_tiles);
void av1_average_tile_mv_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
const int num_tiles);
void av1_average_tile_intra_cdfs(struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
const int num_tiles);
void av1_average_tile_inter_cdfs(struct AV1Common *cm,
struct frame_contexts *fc,
struct frame_contexts *ec_ctxs[],
const int num_tiles);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
......
...@@ -2267,6 +2267,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -2267,6 +2267,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
int av1_switchable_interp_ind[SWITCHABLE_FILTERS]; int av1_switchable_interp_ind[SWITCHABLE_FILTERS];
int av1_switchable_interp_inv[SWITCHABLE_FILTERS]; int av1_switchable_interp_inv[SWITCHABLE_FILTERS];
#if !CONFIG_EC_ADAPT
void av1_set_mode_cdfs(struct AV1Common *cm) { void av1_set_mode_cdfs(struct AV1Common *cm) {
FRAME_CONTEXT *fc = cm->fc; FRAME_CONTEXT *fc = cm->fc;
int i, j; int i, j;
...@@ -2278,10 +2279,13 @@ void av1_set_mode_cdfs(struct AV1Common *cm) { ...@@ -2278,10 +2279,13 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
for (i = 0; i < INTRA_MODES; ++i) for (i = 0; i < INTRA_MODES; ++i)
av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i], av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i],
fc->uv_mode_cdf[i]); fc->uv_mode_cdf[i]);
#if CONFIG_EXT_PARTITION_TYPES
// FIXME
#else
for (i = 0; i < PARTITION_CONTEXTS; ++i) for (i = 0; i < PARTITION_CONTEXTS; ++i)
av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i], av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i],
fc->partition_cdf[i]); fc->partition_cdf[i]);
#endif
for (i = 0; i < INTRA_MODES; ++i) for (i = 0; i < INTRA_MODES; ++i)
for (j = 0; j < INTRA_MODES; ++j) for (j = 0; j < INTRA_MODES; ++j)
...@@ -2316,6 +2320,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) { ...@@ -2316,6 +2320,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
} }
} }
} }
#endif // !CONFIG_EC_ADAPT
#endif #endif
#if CONFIG_DUAL_FILTER #if CONFIG_DUAL_FILTER
......
...@@ -222,15 +222,15 @@ void av1_inc_mv(const MV *mv, nmv_context_counts *counts, const int usehp) { ...@@ -222,15 +222,15 @@ void av1_inc_mv(const MV *mv, nmv_context_counts *counts, const int usehp) {
} }
void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) { void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
int i, j; int i;
#if CONFIG_REF_MV #if CONFIG_REF_MV
int idx; int idx;
int j;
for (idx = 0; idx < NMV_CONTEXTS; ++idx) { for (idx = 0; idx < NMV_CONTEXTS; ++idx) {
nmv_context *fc = &cm->fc->nmvc[idx]; nmv_context *fc = &cm->fc->nmvc[idx];
const nmv_context *pre_fc = const nmv_context *pre_fc =
&cm->frame_contexts[cm->frame_context_idx].nmvc[idx]; &cm->frame_contexts[cm->frame_context_idx].nmvc[idx];
const nmv_context_counts *counts = &cm->counts.mv[idx]; const nmv_context_counts *counts = &cm->counts.mv[idx];
aom_tree_merge_probs(av1_mv_joint_tree, pre_fc->joints, counts->joints, aom_tree_merge_probs(av1_mv_joint_tree, pre_fc->joints, counts->joints,
fc->joints); fc->joints);
for (i = 0; i < 2; ++i) { for (i = 0; i < 2; ++i) {
...@@ -278,7 +278,6 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) { ...@@ -278,7 +278,6 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
comp->classes); comp->classes);
aom_tree_merge_probs(av1_mv_class0_tree, pre_comp->class0, c->class0, aom_tree_merge_probs(av1_mv_class0_tree, pre_comp->class0, c->class0,
comp->class0); comp->class0);
for (j = 0; j < MV_OFFSET_BITS; ++j) for (j = 0; j < MV_OFFSET_BITS; ++j)
comp->bits[j] = av1_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]); comp->bits[j] = av1_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]);
...@@ -297,7 +296,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) { ...@@ -297,7 +296,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
#endif #endif
} }
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL && !CONFIG_EC_ADAPT
void av1_set_mv_cdfs(nmv_context *ctx) { void av1_set_mv_cdfs(nmv_context *ctx) {
int i; int i;
int j; int j;
......
...@@ -4721,7 +4721,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data, ...@@ -4721,7 +4721,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
read_global_motion(cm, &r); read_global_motion(cm, &r);
#endif // EC_ADAPT, DAALA_EC #endif // EC_ADAPT, DAALA_EC
} }
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL && !CONFIG_EC_ADAPT
#if CONFIG_NEW_TOKENSET #if CONFIG_NEW_TOKENSET
av1_coef_head_cdfs(fc); av1_coef_head_cdfs(fc);
#endif #endif
...@@ -4733,7 +4733,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data, ...@@ -4733,7 +4733,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
av1_set_mv_cdfs(&fc->nmvc); av1_set_mv_cdfs(&fc->nmvc);
#endif #endif
av1_set_mode_cdfs(cm); av1_set_mode_cdfs(cm);
#endif #endif // CONFIG_EC_MULTISYMBOL && !CONFIG_EC_ADAPT
return aom_reader_has_error(&r); return aom_reader_has_error(&r);
} }
...@@ -4850,6 +4850,16 @@ BITSTREAM_PROFILE av1_read_profile(struct aom_read_bit_buffer *rb) { ...@@ -4850,6 +4850,16 @@ BITSTREAM_PROFILE av1_read_profile(struct aom_read_bit_buffer *rb) {
return (BITSTREAM_PROFILE)profile; return (BITSTREAM_PROFILE)profile;
} }
#if CONFIG_EC_ADAPT
static void make_update_tile_list_dec(AV1Decoder *pbi, const int tile_rows,
const int tile_cols,
FRAME_CONTEXT *ec_ctxs[]) {
int i;
for (i = 0; i < tile_rows * tile_cols; ++i)
ec_ctxs[i] = &pbi->tile_data[i].tctx;
}
#endif
void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data,
const uint8_t *data_end, const uint8_t **p_data_end) { const uint8_t *data_end, const uint8_t **p_data_end) {
AV1_COMMON *const cm = &pbi->common; AV1_COMMON *const cm = &pbi->common;
...@@ -5025,11 +5035,22 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, ...@@ -5025,11 +5035,22 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data,
if (!xd->corrupted) { if (!xd->corrupted) {
if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) { if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
#if CONFIG_EC_ADAPT
FRAME_CONTEXT *tile_ctxs[MAX_TILE_ROWS * MAX_TILE_COLS];
make_update_tile_list_dec(pbi, cm->tile_rows, cm->tile_cols, tile_ctxs);
#endif
#if CONFIG_SUBFRAME_PROB_UPDATE #if CONFIG_SUBFRAME_PROB_UPDATE
cm->partial_prob_update = 0; cm->partial_prob_update = 0;
#endif // CONFIG_SUBFRAME_PROB_UPDATE #endif // CONFIG_SUBFRAME_PROB_UPDATE
av1_adapt_coef_probs(cm); av1_adapt_coef_probs(cm);
av1_adapt_intra_frame_probs(cm); av1_adapt_intra_frame_probs(cm);
#if CONFIG_EC_ADAPT
av1_average_tile_coef_cdfs(pbi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
av1_average_tile_intra_cdfs(pbi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
#endif
#if CONFIG_ADAPT_SCAN #if CONFIG_ADAPT_SCAN
av1_adapt_scan_order(cm); av1_adapt_scan_order(cm);
#endif // CONFIG_ADAPT_SCAN #endif // CONFIG_ADAPT_SCAN
...@@ -5037,6 +5058,12 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, ...@@ -5037,6 +5058,12 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data,
if (!frame_is_intra_only(cm)) { if (!frame_is_intra_only(cm)) {
av1_adapt_inter_frame_probs(cm); av1_adapt_inter_frame_probs(cm);
av1_adapt_mv_probs(cm, cm->allow_high_precision_mv); av1_adapt_mv_probs(cm, cm->allow_high_precision_mv);
#if CONFIG_EC_ADAPT
av1_average_tile_inter_cdfs(&pbi->common, pbi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
av1_average_tile_mv_cdfs(pbi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
#endif
} }
} else { } else {
debug_check_frame_counts(cm); debug_check_frame_counts(cm);
......
...@@ -4832,6 +4832,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) { ...@@ -4832,6 +4832,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#endif // CONFIG_GLOBAL_MOTION #endif // CONFIG_GLOBAL_MOTION
} }
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL
#if !CONFIG_EC_ADAPT
#if CONFIG_NEW_TOKENSET #if CONFIG_NEW_TOKENSET
av1_coef_head_cdfs(fc); av1_coef_head_cdfs(fc);
#endif #endif
...@@ -4844,6 +4845,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) { ...@@ -4844,6 +4845,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL
av1_set_mode_cdfs(cm); av1_set_mode_cdfs(cm);
#endif #endif
#endif // !CONFIG_EC_ADAPT
#endif #endif
#if CONFIG_ANS #if CONFIG_ANS
aom_buf_ans_flush(header_bc); aom_buf_ans_flush(header_bc);
......
...@@ -4680,6 +4680,17 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) { ...@@ -4680,6 +4680,17 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) {
} }
#endif // DUMP_RECON_FRAMES #endif // DUMP_RECON_FRAMES
#if CONFIG_EC_ADAPT
static void make_update_tile_list_enc(AV1_COMP *cpi, const int tile_rows,
const int tile_cols,
FRAME_CONTEXT *ec_ctxs[]) {
int i;
for (i = 0; i < tile_rows * tile_cols; ++i)
ec_ctxs[i] = &cpi->tile_data[i].tctx;
}
#endif
static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
uint8_t *dest, uint8_t *dest,
unsigned int *frame_flags) { unsigned int *frame_flags) {
...@@ -4687,6 +4698,9 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, ...@@ -4687,6 +4698,9 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
const AV1EncoderConfig *const oxcf = &cpi->oxcf; const AV1EncoderConfig *const oxcf = &cpi->oxcf;
struct segmentation *const seg = &cm->seg; struct segmentation *const seg = &cm->seg;
TX_SIZE t; TX_SIZE t;
#if CONFIG_EC_ADAPT
FRAME_CONTEXT *tile_ctxs[MAX_TILE_ROWS * MAX_TILE_COLS];
#endif
#if CONFIG_XIPHRC #if CONFIG_XIPHRC
int frame_type; int frame_type;
int drop_this_frame = 0; int drop_this_frame = 0;
...@@ -4966,6 +4980,13 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, ...@@ -4966,6 +4980,13 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
#endif // CONFIG_SUBFRAME_PROB_UPDATE #endif // CONFIG_SUBFRAME_PROB_UPDATE
av1_adapt_coef_probs(cm); av1_adapt_coef_probs(cm);
av1_adapt_intra_frame_probs(cm); av1_adapt_intra_frame_probs(cm);
#if CONFIG_EC_ADAPT
make_update_tile_list_enc(cpi, cm->tile_rows, cm->tile_cols, tile_ctxs);
av1_average_tile_coef_cdfs(cpi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
av1_average_tile_intra_cdfs(cpi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
#endif
#if CONFIG_ADAPT_SCAN #if CONFIG_ADAPT_SCAN
av1_adapt_scan_order(cm); av1_adapt_scan_order(cm);
#endif // CONFIG_ADAPT_SCAN #endif // CONFIG_ADAPT_SCAN
...@@ -4975,6 +4996,12 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, ...@@ -4975,6 +4996,12 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) { if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
av1_adapt_inter_frame_probs(cm); av1_adapt_inter_frame_probs(cm);
av1_adapt_mv_probs(cm, cm->allow_high_precision_mv); av1_adapt_mv_probs(cm, cm->allow_high_precision_mv);
#if CONFIG_EC_ADAPT
av1_average_tile_inter_cdfs(&cpi->common, cpi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
av1_average_tile_mv_cdfs(cpi->common.fc, tile_ctxs,
cm->tile_rows * cm->tile_cols);
#endif
} }
} }
......
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