OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #include "denoising.h" | 11 #include "denoising.h" |
12 | 12 |
13 #include "vp8/common/reconinter.h" | 13 #include "vp8/common/reconinter.h" |
14 #include "vpx/vpx_integer.h" | 14 #include "vpx/vpx_integer.h" |
15 #include "vpx_mem/vpx_mem.h" | 15 #include "vpx_mem/vpx_mem.h" |
16 #include "vpx_rtcd.h" | 16 #include "vp8_rtcd.h" |
17 | 17 |
18 static const unsigned int NOISE_MOTION_THRESHOLD = 25 * 25; | 18 static const unsigned int NOISE_MOTION_THRESHOLD = 25 * 25; |
19 /* SSE_DIFF_THRESHOLD is selected as ~95% confidence assuming | 19 /* SSE_DIFF_THRESHOLD is selected as ~95% confidence assuming |
20 * var(noise) ~= 100. | 20 * var(noise) ~= 100. |
21 */ | 21 */ |
22 static const unsigned int SSE_DIFF_THRESHOLD = 16 * 16 * 20; | 22 static const unsigned int SSE_DIFF_THRESHOLD = 16 * 16 * 20; |
23 static const unsigned int SSE_THRESHOLD = 16 * 16 * 40; | 23 static const unsigned int SSE_THRESHOLD = 16 * 16 * 40; |
24 | 24 |
25 /* | 25 /* |
26 * The filter function was modified to reduce the computational complexity. | 26 * The filter function was modified to reduce the computational complexity. |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 { | 300 { |
301 /* No filtering of this block; it differs too much from the predictor, | 301 /* No filtering of this block; it differs too much from the predictor, |
302 * or the motion vector magnitude is considered too big. | 302 * or the motion vector magnitude is considered too big. |
303 */ | 303 */ |
304 vp8_copy_mem16x16( | 304 vp8_copy_mem16x16( |
305 x->thismb, 16, | 305 x->thismb, 16, |
306 denoiser->yv12_running_avg[LAST_FRAME].y_buffer + recon_yoffset, | 306 denoiser->yv12_running_avg[LAST_FRAME].y_buffer + recon_yoffset, |
307 denoiser->yv12_running_avg[LAST_FRAME].y_stride); | 307 denoiser->yv12_running_avg[LAST_FRAME].y_stride); |
308 } | 308 } |
309 } | 309 } |
OLD | NEW |