| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Assuming max number of probabilities <= 32 | 156 // Assuming max number of probabilities <= 32 |
| 157 assert(n <= 32); | 157 assert(n <= 32); |
| 158 | 158 |
| 159 vp9_tree_probs_from_distribution(tree, branch_ct, counts); | 159 vp9_tree_probs_from_distribution(tree, branch_ct, counts); |
| 160 for (i = 0; i < n - 1; ++i) | 160 for (i = 0; i < n - 1; ++i) |
| 161 update_mv(w, branch_ct[i], &probs[i], MV_UPDATE_PROB); | 161 update_mv(w, branch_ct[i], &probs[i], MV_UPDATE_PROB); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void vp9_write_nmv_probs(VP9_COMMON *cm, int usehp, vp9_writer *w) { | 164 void vp9_write_nmv_probs(VP9_COMMON *cm, int usehp, vp9_writer *w) { |
| 165 int i, j; | 165 int i, j; |
| 166 nmv_context *const mvc = &cm->fc.nmvc; | 166 nmv_context *const mvc = &cm->fc->nmvc; |
| 167 nmv_context_counts *const counts = &cm->counts.mv; | 167 nmv_context_counts *const counts = &cm->counts.mv; |
| 168 | 168 |
| 169 write_mv_update(vp9_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS, w); | 169 write_mv_update(vp9_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS, w); |
| 170 | 170 |
| 171 for (i = 0; i < 2; ++i) { | 171 for (i = 0; i < 2; ++i) { |
| 172 nmv_component *comp = &mvc->comps[i]; | 172 nmv_component *comp = &mvc->comps[i]; |
| 173 nmv_component_counts *comp_counts = &counts->comps[i]; | 173 nmv_component_counts *comp_counts = &counts->comps[i]; |
| 174 | 174 |
| 175 update_mv(w, comp_counts->sign, &comp->sign, MV_UPDATE_PROB); | 175 update_mv(w, comp_counts->sign, &comp->sign, MV_UPDATE_PROB); |
| 176 write_mv_update(vp9_mv_class_tree, comp->classes, comp_counts->classes, | 176 write_mv_update(vp9_mv_class_tree, comp->classes, comp_counts->classes, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (mi->bmi[i].as_mode == NEWMV) | 256 if (mi->bmi[i].as_mode == NEWMV) |
| 257 inc_mvs(mbmi, mi->bmi[i].as_mv, &cm->counts.mv); | 257 inc_mvs(mbmi, mi->bmi[i].as_mv, &cm->counts.mv); |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 } else { | 260 } else { |
| 261 if (mbmi->mode == NEWMV) | 261 if (mbmi->mode == NEWMV) |
| 262 inc_mvs(mbmi, mbmi->mv, &cm->counts.mv); | 262 inc_mvs(mbmi, mbmi->mv, &cm->counts.mv); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| OLD | NEW |