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 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 void vp8_denoiser_free(VP8_DENOISER *denoiser) | 234 void vp8_denoiser_free(VP8_DENOISER *denoiser) |
235 { | 235 { |
236 int i; | 236 int i; |
237 assert(denoiser); | 237 assert(denoiser); |
238 | 238 |
239 for (i = 0; i < MAX_REF_FRAMES ; i++) | 239 for (i = 0; i < MAX_REF_FRAMES ; i++) |
240 { | 240 { |
241 vp8_yv12_de_alloc_frame_buffer(&denoiser->yv12_running_avg[i]); | 241 vp8_yv12_de_alloc_frame_buffer(&denoiser->yv12_running_avg[i]); |
242 } | 242 } |
243 vp8_yv12_de_alloc_frame_buffer(&denoiser->yv12_mc_running_avg); | 243 vp8_yv12_de_alloc_frame_buffer(&denoiser->yv12_mc_running_avg); |
| 244 vpx_free(denoiser->denoise_state); |
244 } | 245 } |
245 | 246 |
246 | 247 |
247 void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser, | 248 void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser, |
248 MACROBLOCK *x, | 249 MACROBLOCK *x, |
249 unsigned int best_sse, | 250 unsigned int best_sse, |
250 unsigned int zero_mv_sse, | 251 unsigned int zero_mv_sse, |
251 int recon_yoffset, | 252 int recon_yoffset, |
252 int recon_uvoffset, | 253 int recon_uvoffset, |
253 loop_filter_info_n *lfi_n, | 254 loop_filter_info_n *lfi_n, |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 441 } |
441 if (apply_filter) { | 442 if (apply_filter) { |
442 // Update the signal block |x|. Pixel changes are only to top and/or | 443 // Update the signal block |x|. Pixel changes are only to top and/or |
443 // left boundary pixels: can we avoid full block copy here. | 444 // left boundary pixels: can we avoid full block copy here. |
444 vp8_copy_mem16x16( | 445 vp8_copy_mem16x16( |
445 denoiser->yv12_running_avg[INTRA_FRAME].y_buffer + recon_yoffset, | 446 denoiser->yv12_running_avg[INTRA_FRAME].y_buffer + recon_yoffset, |
446 y_stride, x->thismb, 16); | 447 y_stride, x->thismb, 16); |
447 } | 448 } |
448 } | 449 } |
449 } | 450 } |
OLD | NEW |