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

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

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 *tp = t; 282 *tp = t;
283 283
284 vp9_set_contexts(xd, pd, plane_bsize, tx_size, c > 0, aoff, loff); 284 vp9_set_contexts(xd, pd, plane_bsize, tx_size, c > 0, aoff, loff);
285 } 285 }
286 286
287 struct is_skippable_args { 287 struct is_skippable_args {
288 MACROBLOCK *x; 288 MACROBLOCK *x;
289 int *skippable; 289 int *skippable;
290 }; 290 };
291
292 static void is_skippable(int plane, int block, 291 static void is_skippable(int plane, int block,
293 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, 292 BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
294 void *argv) { 293 void *argv) {
295 struct is_skippable_args *args = argv; 294 struct is_skippable_args *args = argv;
296 (void)plane_bsize; 295 (void)plane_bsize;
297 (void)tx_size; 296 (void)tx_size;
298 args->skippable[0] &= (!args->x->plane[plane].eobs[block]); 297 args->skippable[0] &= (!args->x->plane[plane].eobs[block]);
299 } 298 }
300 299
300 // TODO(yaowu): rewrite and optimize this function to remove the usage of
301 // vp9_foreach_transform_block() and simplify is_skippable().
301 int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { 302 int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
302 int result = 1; 303 int result = 1;
303 struct is_skippable_args args = {x, &result}; 304 struct is_skippable_args args = {x, &result};
304 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable, 305 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable,
305 &args); 306 &args);
306 return result; 307 return result;
307 } 308 }
308 309
309 void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run, 310 void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
310 BLOCK_SIZE bsize) { 311 BLOCK_SIZE bsize) {
(...skipping 15 matching lines...) Expand all
326 } 327 }
327 328
328 if (!dry_run) { 329 if (!dry_run) {
329 cm->counts.skip[ctx][0] += skip_inc; 330 cm->counts.skip[ctx][0] += skip_inc;
330 vp9_foreach_transformed_block(xd, bsize, tokenize_b, &arg); 331 vp9_foreach_transformed_block(xd, bsize, tokenize_b, &arg);
331 } else { 332 } else {
332 vp9_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg); 333 vp9_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
333 *t = t_backup; 334 *t = t_backup;
334 } 335 }
335 } 336 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_temporal_filter.c ('k') | source/libvpx/vp9/encoder/vp9_variance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698