| 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 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 x->rd_thresh_mult[best_mode_index] - best_adjustment : | 2504 x->rd_thresh_mult[best_mode_index] - best_adjustment : |
| 2505 MIN_THRESHMULT; | 2505 MIN_THRESHMULT; |
| 2506 x->rd_threshes[best_mode_index] = | 2506 x->rd_threshes[best_mode_index] = |
| 2507 (cpi->rd_baseline_thresh[best_mode_index] >> 7) * | 2507 (cpi->rd_baseline_thresh[best_mode_index] >> 7) * |
| 2508 x->rd_thresh_mult[best_mode_index]; | 2508 x->rd_thresh_mult[best_mode_index]; |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 #if CONFIG_TEMPORAL_DENOISING | 2511 #if CONFIG_TEMPORAL_DENOISING |
| 2512 if (cpi->oxcf.noise_sensitivity) | 2512 if (cpi->oxcf.noise_sensitivity) |
| 2513 { | 2513 { |
| 2514 int uv_denoise = (cpi->oxcf.noise_sensitivity == 2) ? 1 : 0; |
| 2514 int block_index = mb_row * cpi->common.mb_cols + mb_col; | 2515 int block_index = mb_row * cpi->common.mb_cols + mb_col; |
| 2515 if (x->best_sse_inter_mode == DC_PRED) | 2516 if (x->best_sse_inter_mode == DC_PRED) |
| 2516 { | 2517 { |
| 2517 /* No best MV found. */ | 2518 /* No best MV found. */ |
| 2518 x->best_sse_inter_mode = best_mode.mbmode.mode; | 2519 x->best_sse_inter_mode = best_mode.mbmode.mode; |
| 2519 x->best_sse_mv = best_mode.mbmode.mv; | 2520 x->best_sse_mv = best_mode.mbmode.mv; |
| 2520 x->need_to_clamp_best_mvs = best_mode.mbmode.need_to_clamp_mvs; | 2521 x->need_to_clamp_best_mvs = best_mode.mbmode.need_to_clamp_mvs; |
| 2521 x->best_reference_frame = best_mode.mbmode.ref_frame; | 2522 x->best_reference_frame = best_mode.mbmode.ref_frame; |
| 2522 best_sse = best_rd_sse; | 2523 best_sse = best_rd_sse; |
| 2523 } | 2524 } |
| 2524 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse, | 2525 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse, |
| 2525 recon_yoffset, recon_uvoffset, | 2526 recon_yoffset, recon_uvoffset, |
| 2526 &cpi->common.lf_info, mb_row, mb_col, | 2527 &cpi->common.lf_info, mb_row, mb_col, |
| 2527 block_index); | 2528 block_index, uv_denoise); |
| 2528 | 2529 |
| 2529 | 2530 |
| 2530 /* Reevaluate ZEROMV after denoising. */ | 2531 /* Reevaluate ZEROMV after denoising. */ |
| 2531 if (best_mode.mbmode.ref_frame == INTRA_FRAME && | 2532 if (best_mode.mbmode.ref_frame == INTRA_FRAME && |
| 2532 x->best_zeromv_reference_frame != INTRA_FRAME) | 2533 x->best_zeromv_reference_frame != INTRA_FRAME) |
| 2533 { | 2534 { |
| 2534 int this_rd = INT_MAX; | 2535 int this_rd = INT_MAX; |
| 2535 int disable_skip = 0; | 2536 int disable_skip = 0; |
| 2536 int other_cost = 0; | 2537 int other_cost = 0; |
| 2537 int this_ref_frame = x->best_zeromv_reference_frame; | 2538 int this_ref_frame = x->best_zeromv_reference_frame; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2633 x->e_mbd.mode_info_context->mbmi.mode = B_PRED; | 2634 x->e_mbd.mode_info_context->mbmi.mode = B_PRED; |
| 2634 rate += rate4x4; | 2635 rate += rate4x4; |
| 2635 } | 2636 } |
| 2636 else | 2637 else |
| 2637 { | 2638 { |
| 2638 rate += rate16x16; | 2639 rate += rate16x16; |
| 2639 } | 2640 } |
| 2640 | 2641 |
| 2641 *rate_ = rate; | 2642 *rate_ = rate; |
| 2642 } | 2643 } |
| OLD | NEW |