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

Side by Side Diff: source/libvpx/vp9/common/vp9_postproc.c

Issue 394353005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 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/common/vp9_enums.h ('k') | source/libvpx/vp9/common/vp9_rtcd_defs.pl » ('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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 if (!cm->frame_to_show) 404 if (!cm->frame_to_show)
405 return -1; 405 return -1;
406 406
407 if (!flags) { 407 if (!flags) {
408 *dest = *cm->frame_to_show; 408 *dest = *cm->frame_to_show;
409 return 0; 409 return 0;
410 } 410 }
411 411
412 vp9_clear_system_state(); 412 vp9_clear_system_state();
413 413
414 #if CONFIG_VP9_POSTPROC || CONFIG_INTERNAL_STATS
415 if (vp9_realloc_frame_buffer(&cm->post_proc_buffer, cm->width, cm->height,
416 cm->subsampling_x, cm->subsampling_y,
417 VP9_DEC_BORDER_IN_PIXELS, NULL, NULL, NULL) < 0)
418 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
419 "Failed to allocate post-processing buffer");
420 #endif
421
414 if (flags & VP9D_DEMACROBLOCK) { 422 if (flags & VP9D_DEMACROBLOCK) {
415 deblock_and_de_macro_block(cm->frame_to_show, ppbuf, 423 deblock_and_de_macro_block(cm->frame_to_show, ppbuf,
416 q + (ppflags->deblocking_level - 5) * 10, 1, 0); 424 q + (ppflags->deblocking_level - 5) * 10, 1, 0);
417 } else if (flags & VP9D_DEBLOCK) { 425 } else if (flags & VP9D_DEBLOCK) {
418 vp9_deblock(cm->frame_to_show, ppbuf, q); 426 vp9_deblock(cm->frame_to_show, ppbuf, q);
419 } else { 427 } else {
420 vp8_yv12_copy_frame(cm->frame_to_show, ppbuf); 428 vp8_yv12_copy_frame(cm->frame_to_show, ppbuf);
421 } 429 }
422 430
423 if (flags & VP9D_ADDNOISE) { 431 if (flags & VP9D_ADDNOISE) {
(...skipping 12 matching lines...) Expand all
436 444
437 /* handle problem with extending borders */ 445 /* handle problem with extending borders */
438 dest->y_width = cm->width; 446 dest->y_width = cm->width;
439 dest->y_height = cm->height; 447 dest->y_height = cm->height;
440 dest->uv_width = dest->y_width >> cm->subsampling_x; 448 dest->uv_width = dest->y_width >> cm->subsampling_x;
441 dest->uv_height = dest->y_height >> cm->subsampling_y; 449 dest->uv_height = dest->y_height >> cm->subsampling_y;
442 450
443 return 0; 451 return 0;
444 } 452 }
445 #endif 453 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_enums.h ('k') | source/libvpx/vp9/common/vp9_rtcd_defs.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698