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

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

Issue 181493009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 9 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/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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 bestnewp = newp; 143 bestnewp = newp;
144 } 144 }
145 } 145 }
146 *bestp = bestnewp; 146 *bestp = bestnewp;
147 return bestsavings; 147 return bestsavings;
148 } 148 }
149 149
150 int vp9_prob_diff_update_savings_search_model(const unsigned int *ct, 150 int vp9_prob_diff_update_savings_search_model(const unsigned int *ct,
151 const vp9_prob *oldp, 151 const vp9_prob *oldp,
152 vp9_prob *bestp, 152 vp9_prob *bestp,
153 vp9_prob upd, 153 vp9_prob upd) {
154 int b, int r) {
155 int i, old_b, new_b, update_b, savings, bestsavings, step; 154 int i, old_b, new_b, update_b, savings, bestsavings, step;
156 int newp; 155 int newp;
157 vp9_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES]; 156 vp9_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES];
158 vp9_model_to_full_probs(oldp, oldplist); 157 vp9_model_to_full_probs(oldp, oldplist);
159 vpx_memcpy(newplist, oldp, sizeof(vp9_prob) * UNCONSTRAINED_NODES); 158 vpx_memcpy(newplist, oldp, sizeof(vp9_prob) * UNCONSTRAINED_NODES);
160 for (i = UNCONSTRAINED_NODES, old_b = 0; i < ENTROPY_NODES; ++i) 159 for (i = UNCONSTRAINED_NODES, old_b = 0; i < ENTROPY_NODES; ++i)
161 old_b += cost_branch256(ct + 2 * i, oldplist[i]); 160 old_b += cost_branch256(ct + 2 * i, oldplist[i]);
162 old_b += cost_branch256(ct + 2 * PIVOT_NODE, oldplist[PIVOT_NODE]); 161 old_b += cost_branch256(ct + 2 * PIVOT_NODE, oldplist[PIVOT_NODE]);
163 162
164 bestsavings = 0; 163 bestsavings = 0;
(...skipping 29 matching lines...) Expand all
194 upd); 193 upd);
195 assert(newp >= 1); 194 assert(newp >= 1);
196 if (savings > 0) { 195 if (savings > 0) {
197 vp9_write(w, 1, upd); 196 vp9_write(w, 1, upd);
198 vp9_write_prob_diff_update(w, newp, *oldp); 197 vp9_write_prob_diff_update(w, newp, *oldp);
199 *oldp = newp; 198 *oldp = newp;
200 } else { 199 } else {
201 vp9_write(w, 0, upd); 200 vp9_write(w, 0, upd);
202 } 201 }
203 } 202 }
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