Merge "Removing duplicated code for merging two probabilities."
authorDmitry Kovalev <dkovalev@google.com>
Thu, 25 Jul 2013 19:52:26 +0000 (12:52 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 25 Jul 2013 19:52:26 +0000 (12:52 -0700)
1  2 
vp9/common/vp9_entropymode.c
vp9/common/vp9_entropymv.c

index cd864cf07816b0d5841ba2d4f6e4053088db6266,0c7c50e3b0c22dddf652bb7e20b39514480bcd8b..faaa1c2fa374426743743283f44ce584f4b84e0b
@@@ -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,
Simple merge