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

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

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_ssim.c ('k') | source/libvpx/vp9/encoder/vp9_svc_layercontext.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 int vp9_prob_diff_update_savings_search_model(const unsigned int *ct, 140 int vp9_prob_diff_update_savings_search_model(const unsigned int *ct,
141 const vp9_prob *oldp, 141 const vp9_prob *oldp,
142 vp9_prob *bestp, 142 vp9_prob *bestp,
143 vp9_prob upd, 143 vp9_prob upd,
144 int stepsize) { 144 int stepsize) {
145 int i, old_b, new_b, update_b, savings, bestsavings, step; 145 int i, old_b, new_b, update_b, savings, bestsavings, step;
146 int newp; 146 int newp;
147 vp9_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES]; 147 vp9_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES];
148 vp9_model_to_full_probs(oldp, oldplist); 148 vp9_model_to_full_probs(oldp, oldplist);
149 vpx_memcpy(newplist, oldp, sizeof(vp9_prob) * UNCONSTRAINED_NODES); 149 memcpy(newplist, oldp, sizeof(vp9_prob) * UNCONSTRAINED_NODES);
150 for (i = UNCONSTRAINED_NODES, old_b = 0; i < ENTROPY_NODES; ++i) 150 for (i = UNCONSTRAINED_NODES, old_b = 0; i < ENTROPY_NODES; ++i)
151 old_b += cost_branch256(ct + 2 * i, oldplist[i]); 151 old_b += cost_branch256(ct + 2 * i, oldplist[i]);
152 old_b += cost_branch256(ct + 2 * PIVOT_NODE, oldplist[PIVOT_NODE]); 152 old_b += cost_branch256(ct + 2 * PIVOT_NODE, oldplist[PIVOT_NODE]);
153 153
154 bestsavings = 0; 154 bestsavings = 0;
155 bestnewp = oldp[PIVOT_NODE]; 155 bestnewp = oldp[PIVOT_NODE];
156 156
157 if (*bestp > oldp[PIVOT_NODE]) { 157 if (*bestp > oldp[PIVOT_NODE]) {
158 step = -stepsize; 158 step = -stepsize;
159 for (newp = *bestp; newp > oldp[PIVOT_NODE]; newp += step) { 159 for (newp = *bestp; newp > oldp[PIVOT_NODE]; newp += step) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 upd); 204 upd);
205 assert(newp >= 1); 205 assert(newp >= 1);
206 if (savings > 0) { 206 if (savings > 0) {
207 vp9_write(w, 1, upd); 207 vp9_write(w, 1, upd);
208 vp9_write_prob_diff_update(w, newp, *oldp); 208 vp9_write_prob_diff_update(w, newp, *oldp);
209 *oldp = newp; 209 *oldp = newp;
210 } else { 210 } else {
211 vp9_write(w, 0, upd); 211 vp9_write(w, 0, upd);
212 } 212 }
213 } 213 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_ssim.c ('k') | source/libvpx/vp9/encoder/vp9_svc_layercontext.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698