Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(985)

Side by Side Diff: source/libvpx/vp9/common/vp9_entropymv.c

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropymode.c ('k') | source/libvpx/vp9/common/vp9_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropymode.c ('k') | source/libvpx/vp9/common/vp9_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698