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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 { | 1161 { |
1162 this_rdbin = 1023; | 1162 this_rdbin = 1023; |
1163 } | 1163 } |
1164 | 1164 |
1165 x->error_bins[this_rdbin] ++; | 1165 x->error_bins[this_rdbin] ++; |
1166 } | 1166 } |
1167 | 1167 |
1168 #if CONFIG_TEMPORAL_DENOISING | 1168 #if CONFIG_TEMPORAL_DENOISING |
1169 if (cpi->oxcf.noise_sensitivity) | 1169 if (cpi->oxcf.noise_sensitivity) |
1170 { | 1170 { |
| 1171 int uv_denoise = (cpi->oxcf.noise_sensitivity == 2) ? 1 : 0; |
1171 int block_index = mb_row * cpi->common.mb_cols + mb_col; | 1172 int block_index = mb_row * cpi->common.mb_cols + mb_col; |
1172 if (x->best_sse_inter_mode == DC_PRED) | 1173 if (x->best_sse_inter_mode == DC_PRED) |
1173 { | 1174 { |
1174 /* No best MV found. */ | 1175 /* No best MV found. */ |
1175 x->best_sse_inter_mode = best_mbmode.mode; | 1176 x->best_sse_inter_mode = best_mbmode.mode; |
1176 x->best_sse_mv = best_mbmode.mv; | 1177 x->best_sse_mv = best_mbmode.mv; |
1177 x->need_to_clamp_best_mvs = best_mbmode.need_to_clamp_mvs; | 1178 x->need_to_clamp_best_mvs = best_mbmode.need_to_clamp_mvs; |
1178 x->best_reference_frame = best_mbmode.ref_frame; | 1179 x->best_reference_frame = best_mbmode.ref_frame; |
1179 best_sse = best_rd_sse; | 1180 best_sse = best_rd_sse; |
1180 } | 1181 } |
1181 x->increase_denoising = 0; | 1182 x->increase_denoising = 0; |
1182 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse, | 1183 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse, |
1183 recon_yoffset, recon_uvoffset, | 1184 recon_yoffset, recon_uvoffset, |
1184 &cpi->common.lf_info, mb_row, mb_col, | 1185 &cpi->common.lf_info, mb_row, mb_col, |
1185 block_index); | 1186 block_index, uv_denoise); |
1186 | 1187 |
1187 | 1188 |
1188 /* Reevaluate ZEROMV after denoising. */ | 1189 /* Reevaluate ZEROMV after denoising. */ |
1189 if (best_mbmode.ref_frame == INTRA_FRAME && | 1190 if (best_mbmode.ref_frame == INTRA_FRAME && |
1190 x->best_zeromv_reference_frame != INTRA_FRAME) | 1191 x->best_zeromv_reference_frame != INTRA_FRAME) |
1191 { | 1192 { |
1192 int this_rd = 0; | 1193 int this_rd = 0; |
1193 int this_ref_frame = x->best_zeromv_reference_frame; | 1194 int this_ref_frame = x->best_zeromv_reference_frame; |
1194 rate2 = x->ref_frame_cost[this_ref_frame] + | 1195 rate2 = x->ref_frame_cost[this_ref_frame] + |
1195 vp8_cost_mv_ref(ZEROMV, mdcounts); | 1196 vp8_cost_mv_ref(ZEROMV, mdcounts); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 error4x4 = pick_intra4x4mby_modes(x, &rate, | 1293 error4x4 = pick_intra4x4mby_modes(x, &rate, |
1293 &best_sse); | 1294 &best_sse); |
1294 if (error4x4 < error16x16) | 1295 if (error4x4 < error16x16) |
1295 { | 1296 { |
1296 xd->mode_info_context->mbmi.mode = B_PRED; | 1297 xd->mode_info_context->mbmi.mode = B_PRED; |
1297 best_rate = rate; | 1298 best_rate = rate; |
1298 } | 1299 } |
1299 | 1300 |
1300 *rate_ = best_rate; | 1301 *rate_ = best_rate; |
1301 } | 1302 } |
OLD | NEW |