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

Side by Side Diff: source/libvpx/vp8/common/postproc.c

Issue 375983002: 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/tools_common.h ('k') | source/libvpx/vp8/common/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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 #endif 386 #endif
387 387
388 #if !(CONFIG_TEMPORAL_DENOISING) 388 #if !(CONFIG_TEMPORAL_DENOISING)
389 void vp8_de_noise(VP8_COMMON *cm, 389 void vp8_de_noise(VP8_COMMON *cm,
390 YV12_BUFFER_CONFIG *source, 390 YV12_BUFFER_CONFIG *source,
391 YV12_BUFFER_CONFIG *post, 391 YV12_BUFFER_CONFIG *post,
392 int q, 392 int q,
393 int low_var_thresh, 393 int low_var_thresh,
394 int flag) 394 int flag)
395 { 395 {
396 int mbr;
396 double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065; 397 double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
397 int ppl = (int)(level + .5); 398 int ppl = (int)(level + .5);
398 int mb_rows = source->y_width >> 4; 399 int mb_rows = cm->mb_rows;
399 int mb_cols = source->y_height >> 4; 400 int mb_cols = cm->mb_cols;
400 unsigned char *limits = cm->pp_limits_buffer;; 401 unsigned char *limits = cm->pp_limits_buffer;;
401 int mbr, mbc;
402 (void) post; 402 (void) post;
403 (void) low_var_thresh; 403 (void) low_var_thresh;
404 (void) flag; 404 (void) flag;
405 405
406 vpx_memset(limits, (unsigned char)ppl, 16 * mb_cols); 406 vpx_memset(limits, (unsigned char)ppl, 16 * mb_cols);
407 407
408 /* TODO: The original code don't filter the 2 outer rows and columns. */ 408 /* TODO: The original code don't filter the 2 outer rows and columns. */
409 for (mbr = 0; mbr < mb_rows; mbr++) 409 for (mbr = 0; mbr < mb_rows; mbr++)
410 { 410 {
411 vp8_post_proc_down_and_across_mb_row( 411 vp8_post_proc_down_and_across_mb_row(
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 1194
1195 *dest = oci->post_proc_buffer; 1195 *dest = oci->post_proc_buffer;
1196 1196
1197 /* handle problem with extending borders */ 1197 /* handle problem with extending borders */
1198 dest->y_width = oci->Width; 1198 dest->y_width = oci->Width;
1199 dest->y_height = oci->Height; 1199 dest->y_height = oci->Height;
1200 dest->uv_height = dest->y_height / 2; 1200 dest->uv_height = dest->y_height / 2;
1201 return 0; 1201 return 0;
1202 } 1202 }
1203 #endif 1203 #endif
OLDNEW
« no previous file with comments | « source/libvpx/tools_common.h ('k') | source/libvpx/vp8/common/rtcd_defs.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698