| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 static vp9_prob adapt_prob(vp9_prob prep, const unsigned int ct[2]) { | 189 static vp9_prob adapt_prob(vp9_prob prep, const unsigned int ct[2]) { |
| 190 return merge_probs(prep, ct, MV_COUNT_SAT, MV_MAX_UPDATE_FACTOR); | 190 return merge_probs(prep, ct, MV_COUNT_SAT, MV_MAX_UPDATE_FACTOR); |
| 191 } | 191 } |
| 192 | 192 |
| 193 static void adapt_probs(const vp9_tree_index *tree, const vp9_prob *pre_probs, | 193 static void adapt_probs(const vp9_tree_index *tree, const vp9_prob *pre_probs, |
| 194 const unsigned int *counts, vp9_prob *probs) { | 194 const unsigned int *counts, vp9_prob *probs) { |
| 195 tree_merge_probs(tree, pre_probs, counts, MV_COUNT_SAT, MV_MAX_UPDATE_FACTOR, | 195 vp9_tree_merge_probs(tree, pre_probs, counts, MV_COUNT_SAT, |
| 196 probs); | 196 MV_MAX_UPDATE_FACTOR, probs); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void vp9_adapt_mv_probs(VP9_COMMON *cm, int allow_hp) { | 199 void vp9_adapt_mv_probs(VP9_COMMON *cm, int allow_hp) { |
| 200 int i, j; | 200 int i, j; |
| 201 | 201 |
| 202 nmv_context *fc = &cm->fc.nmvc; | 202 nmv_context *fc = &cm->fc.nmvc; |
| 203 const nmv_context *pre_fc = &cm->frame_contexts[cm->frame_context_idx].nmvc; | 203 const nmv_context *pre_fc = &cm->frame_contexts[cm->frame_context_idx].nmvc; |
| 204 const nmv_context_counts *counts = &cm->counts.mv; | 204 const nmv_context_counts *counts = &cm->counts.mv; |
| 205 | 205 |
| 206 adapt_probs(vp9_mv_joint_tree, pre_fc->joints, counts->joints, fc->joints); | 206 adapt_probs(vp9_mv_joint_tree, pre_fc->joints, counts->joints, fc->joints); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 227 if (allow_hp) { | 227 if (allow_hp) { |
| 228 comp->class0_hp = adapt_prob(pre_comp->class0_hp, c->class0_hp); | 228 comp->class0_hp = adapt_prob(pre_comp->class0_hp, c->class0_hp); |
| 229 comp->hp = adapt_prob(pre_comp->hp, c->hp); | 229 comp->hp = adapt_prob(pre_comp->hp, c->hp); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 | 233 |
| 234 void vp9_init_mv_probs(VP9_COMMON *cm) { | 234 void vp9_init_mv_probs(VP9_COMMON *cm) { |
| 235 cm->fc.nmvc = default_nmv_context; | 235 cm->fc.nmvc = default_nmv_context; |
| 236 } | 236 } |
| OLD | NEW |