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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_subexp.c

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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/encoder/vp9_subexp.h ('k') | source/libvpx/vp9/encoder/vp9_temporal_filter.c » ('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) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (savings > bestsavings) { 214 if (savings > bestsavings) {
215 bestsavings = savings; 215 bestsavings = savings;
216 bestnewp = newp; 216 bestnewp = newp;
217 } 217 }
218 } 218 }
219 *bestp = bestnewp; 219 *bestp = bestnewp;
220 return bestsavings; 220 return bestsavings;
221 } 221 }
222 222
223 void vp9_cond_prob_diff_update(vp9_writer *w, vp9_prob *oldp, 223 void vp9_cond_prob_diff_update(vp9_writer *w, vp9_prob *oldp,
224 vp9_prob upd, unsigned int *ct) { 224 unsigned int *ct) {
225 const vp9_prob upd = DIFF_UPDATE_PROB;
225 vp9_prob newp = get_binary_prob(ct[0], ct[1]); 226 vp9_prob newp = get_binary_prob(ct[0], ct[1]);
226 const int savings = vp9_prob_diff_update_savings_search(ct, *oldp, &newp, 227 const int savings = vp9_prob_diff_update_savings_search(ct, *oldp, &newp,
227 upd); 228 upd);
228 assert(newp >= 1); 229 assert(newp >= 1);
229 if (savings > 0) { 230 if (savings > 0) {
230 vp9_write(w, 1, upd); 231 vp9_write(w, 1, upd);
231 vp9_write_prob_diff_update(w, newp, *oldp); 232 vp9_write_prob_diff_update(w, newp, *oldp);
232 *oldp = newp; 233 *oldp = newp;
233 } else { 234 } else {
234 vp9_write(w, 0, upd); 235 vp9_write(w, 0, upd);
235 } 236 }
236 } 237 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_subexp.h ('k') | source/libvpx/vp9/encoder/vp9_temporal_filter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698