Removing vp9_adapt_mode_context function.
Moving code from vp9_adapt_mode_context to vp9_adapt_mode_probs.
Change-Id: I60829c30b28968cd813551ef3a206dfb98d323c9
diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c
index ca188e4..cd864cf 100644
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -393,18 +393,6 @@
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 @@
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 8c14e7e..a71585a 100644
--- a/vp9/common/vp9_entropymode.h
+++ b/vp9/common/vp9_entropymode.h
@@ -67,8 +67,6 @@
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 ffec8ea..f5086d6 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -994,7 +994,6 @@
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 e5f1a5c..fc19bd9 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3173,7 +3173,6 @@
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);
}
}