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

Side by Side Diff: source/libvpx/vp8/encoder/encodeframe.c

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 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/vp8/decoder/threading.c ('k') | source/libvpx/vp8/encoder/firstpass.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) 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 { 75 {
76 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 76 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
77 }; 77 };
78 78
79 79
80 /* Original activity measure from Tim T's code. */ 80 /* Original activity measure from Tim T's code. */
81 static unsigned int tt_activity_measure( VP8_COMP *cpi, MACROBLOCK *x ) 81 static unsigned int tt_activity_measure( VP8_COMP *cpi, MACROBLOCK *x )
82 { 82 {
83 unsigned int act; 83 unsigned int act;
84 unsigned int sse; 84 unsigned int sse;
85 (void)cpi;
85 /* TODO: This could also be done over smaller areas (8x8), but that would 86 /* TODO: This could also be done over smaller areas (8x8), but that would
86 * require extensive changes elsewhere, as lambda is assumed to be fixed 87 * require extensive changes elsewhere, as lambda is assumed to be fixed
87 * over an entire MB in most of the code. 88 * over an entire MB in most of the code.
88 * Another option is to compute four 8x8 variances, and pick a single 89 * Another option is to compute four 8x8 variances, and pick a single
89 * lambda using a non-linear combination (e.g., the smallest, or second 90 * lambda using a non-linear combination (e.g., the smallest, or second
90 * smallest, etc.). 91 * smallest, etc.).
91 */ 92 */
92 act = vp8_variance16x16(x->src.y_buffer, 93 act = vp8_variance16x16(x->src.y_buffer,
93 x->src.y_stride, VP8_VAR_OFFS, 0, &sse); 94 x->src.y_stride, VP8_VAR_OFFS, 0, &sse);
94 act = act<<4; 95 act = act<<4;
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 1143
1143 int b = 0; 1144 int b = 0;
1144 1145
1145 do 1146 do
1146 { 1147 {
1147 ++ bct[xd->block[b].bmi.mode]; 1148 ++ bct[xd->block[b].bmi.mode];
1148 } 1149 }
1149 while (++b < 16); 1150 while (++b < 16);
1150 } 1151 }
1151 1152
1153 #else
1154 (void)cpi;
1152 #endif 1155 #endif
1153 1156
1154 ++x->ymode_count[m]; 1157 ++x->ymode_count[m];
1155 ++x->uv_mode_count[uvm]; 1158 ++x->uv_mode_count[uvm];
1156 1159
1157 } 1160 }
1158 1161
1159 /* Experimental stub function to create a per MB zbin adjustment based on 1162 /* Experimental stub function to create a per MB zbin adjustment based on
1160 * some previously calculated measure of MB activity. 1163 * some previously calculated measure of MB activity.
1161 */ 1164 */
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 vp8_fix_contexts(xd); 1415 vp8_fix_contexts(xd);
1413 } 1416 }
1414 else 1417 else
1415 { 1418 {
1416 vp8_stuff_mb(cpi, x, t); 1419 vp8_stuff_mb(cpi, x, t);
1417 } 1420 }
1418 } 1421 }
1419 1422
1420 return rate; 1423 return rate;
1421 } 1424 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/decoder/threading.c ('k') | source/libvpx/vp8/encoder/firstpass.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698