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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 unsigned int motion_magnitude2; | 404 unsigned int motion_magnitude2; |
405 unsigned int sse_thresh; | 405 unsigned int sse_thresh; |
406 int sse_diff_thresh = 0; | 406 int sse_diff_thresh = 0; |
407 // Spatial loop filter: only applied selectively based on | 407 // Spatial loop filter: only applied selectively based on |
408 // temporal filter state of block relative to top/left neighbors. | 408 // temporal filter state of block relative to top/left neighbors. |
409 int apply_spatial_loop_filter = 1; | 409 int apply_spatial_loop_filter = 1; |
410 MV_REFERENCE_FRAME frame = x->best_reference_frame; | 410 MV_REFERENCE_FRAME frame = x->best_reference_frame; |
411 MV_REFERENCE_FRAME zero_frame = x->best_zeromv_reference_frame; | 411 MV_REFERENCE_FRAME zero_frame = x->best_zeromv_reference_frame; |
412 | 412 |
413 enum vp8_denoiser_decision decision = FILTER_BLOCK; | 413 enum vp8_denoiser_decision decision = FILTER_BLOCK; |
414 enum vp8_denoiser_decision decision_u = FILTER_BLOCK; | 414 enum vp8_denoiser_decision decision_u = COPY_BLOCK; |
415 enum vp8_denoiser_decision decision_v = FILTER_BLOCK; | 415 enum vp8_denoiser_decision decision_v = COPY_BLOCK; |
416 | 416 |
417 if (zero_frame) | 417 if (zero_frame) |
418 { | 418 { |
419 YV12_BUFFER_CONFIG *src = &denoiser->yv12_running_avg[frame]; | 419 YV12_BUFFER_CONFIG *src = &denoiser->yv12_running_avg[frame]; |
420 YV12_BUFFER_CONFIG *dst = &denoiser->yv12_mc_running_avg; | 420 YV12_BUFFER_CONFIG *dst = &denoiser->yv12_mc_running_avg; |
421 YV12_BUFFER_CONFIG saved_pre,saved_dst; | 421 YV12_BUFFER_CONFIG saved_pre,saved_dst; |
422 MB_MODE_INFO saved_mbmi; | 422 MB_MODE_INFO saved_mbmi; |
423 MACROBLOCKD *filter_xd = &x->e_mbd; | 423 MACROBLOCKD *filter_xd = &x->e_mbd; |
424 MB_MODE_INFO *mbmi = &filter_xd->mode_info_context->mbmi; | 424 MB_MODE_INFO *mbmi = &filter_xd->mode_info_context->mbmi; |
425 int sse_diff = 0; | 425 int sse_diff = 0; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 } | 626 } |
627 if (apply_filter) { | 627 if (apply_filter) { |
628 // Update the signal block |x|. Pixel changes are only to top and/or | 628 // Update the signal block |x|. Pixel changes are only to top and/or |
629 // left boundary pixels: can we avoid full block copy here. | 629 // left boundary pixels: can we avoid full block copy here. |
630 vp8_copy_mem16x16( | 630 vp8_copy_mem16x16( |
631 denoiser->yv12_running_avg[INTRA_FRAME].y_buffer + recon_yoffset, | 631 denoiser->yv12_running_avg[INTRA_FRAME].y_buffer + recon_yoffset, |
632 y_stride, x->thismb, 16); | 632 y_stride, x->thismb, 16); |
633 } | 633 } |
634 } | 634 } |
635 } | 635 } |
OLD | NEW |