diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c index ca188e4382f8c5533c931202c71e6d3e04ed0dd5..cd864cf07816b0d5841ba2d4f6e4053088db6266 100644 --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@ -393,18 +393,6 @@ static int update_ct2(vp9_prob pre_prob, unsigned int ct[2]) { return update_ct(pre_prob, get_binary_prob(ct[0], ct[1]), ct); } -void vp9_adapt_mode_context(VP9_COMMON *pc) { - int i, j; - FRAME_CONTEXT *const fc = &pc->fc; - FRAME_CONTEXT *const pre_fc = &pc->frame_contexts[pc->frame_context_idx]; - FRAME_COUNTS *const counts = &pc->counts; - - for (j = 0; j < INTER_MODE_CONTEXTS; j++) - for (i = 0; i < VP9_INTER_MODES - 1; i++) - fc->inter_mode_probs[j][i] = update_ct2(pre_fc->inter_mode_probs[j][i], - counts->inter_mode[j][i]); -} - static void update_mode_probs(int n_modes, const vp9_tree_index *tree, unsigned int *cnt, vp9_prob *pre_probs, vp9_prob *dst_probs, @@ -440,6 +428,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { fc->single_ref_prob[i][j] = update_ct2(pre_fc->single_ref_prob[i][j], counts->single_ref[i][j]); + for (j = 0; j < INTER_MODE_CONTEXTS; j++) + for (i = 0; i < VP9_INTER_MODES - 1; i++) + fc->inter_mode_probs[j][i] = update_ct2(pre_fc->inter_mode_probs[j][i], + counts->inter_mode[j][i]); for (i = 0; i < BLOCK_SIZE_GROUPS; i++) update_mode_probs(VP9_INTRA_MODES, vp9_intra_mode_tree, counts->y_mode[i], pre_fc->y_mode_prob[i], diff --git a/vp9/common/vp9_entropymode.h b/vp9/common/vp9_entropymode.h index 8c14e7e171ee78eece886047a2e4efead964d479..a71585a92c2e70fb50a2d7f5c0c57d6e9e18a500 100644 --- a/vp9/common/vp9_entropymode.h +++ b/vp9/common/vp9_entropymode.h @@ -67,8 +67,6 @@ void vp9_setup_past_independence(struct VP9Common *cm, MACROBLOCKD *xd); void vp9_init_mbmode_probs(struct VP9Common *x); -void vp9_adapt_mode_context(struct VP9Common *pc); - void vp9_adapt_mode_probs(struct VP9Common *); void vp9_accum_mv_refs(struct VP9Common *pc, MB_PREDICTION_MODE m, int context); diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index ffec8ea44f5206e22d87847654914fc706e1f19d..f5086d66897f06f11477e0a61c16306f546bf9ac 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -994,7 +994,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) { if (!keyframe && !pc->intra_only) { vp9_adapt_mode_probs(pc); - vp9_adapt_mode_context(pc); vp9_adapt_mv_probs(pc, xd->allow_high_precision_mv); } } diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index e5f1a5c2c0377d3c328c8a88a0d8717c2b0db25f..fc19bd9514849965a77afcf6d682282474b8bf17 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -3173,7 +3173,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, if (!cpi->common.error_resilient_mode && !cpi->common.frame_parallel_decoding_mode) { vp9_adapt_mode_probs(&cpi->common); - vp9_adapt_mode_context(&cpi->common); vp9_adapt_mv_probs(&cpi->common, cpi->mb.e_mbd.allow_high_precision_mv); } }