From: Dmitry Kovalev Date: Thu, 25 Jul 2013 19:52:26 +0000 (-0700) Subject: Merge "Removing duplicated code for merging two probabilities." X-Git-Tag: v1.3.0~740 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be00d3970dbe4efc3d537e374774269ff2bb0621;p=libvpx Merge "Removing duplicated code for merging two probabilities." --- be00d3970dbe4efc3d537e374774269ff2bb0621 diff --cc vp9/common/vp9_entropymode.c index cd864cf07,0c7c50e3b..faaa1c2fa --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@@ -390,9 -392,21 +387,9 @@@ static int update_ct(vp9_prob pre_prob } 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); + return merge_probs2(pre_prob, ct, COUNT_SAT, MAX_UPDATE_FACTOR); } -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,