OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |