Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: webrtc/modules/video_processing/video_denoiser.cc

Issue 1935353002: Change the threshold for external VNR. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_processing/util/noise_estimation.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 const uint8_t* v_src = frame.buffer(kVPlane); 241 const uint8_t* v_src = frame.buffer(kVPlane);
242 uint8_t* y_dst = denoised_frame->buffer(kYPlane); 242 uint8_t* y_dst = denoised_frame->buffer(kYPlane);
243 uint8_t* u_dst = denoised_frame->buffer(kUPlane); 243 uint8_t* u_dst = denoised_frame->buffer(kUPlane);
244 uint8_t* v_dst = denoised_frame->buffer(kVPlane); 244 uint8_t* v_dst = denoised_frame->buffer(kVPlane);
245 uint8_t* y_dst_prev = denoised_frame_prev->buffer(kYPlane); 245 uint8_t* y_dst_prev = denoised_frame_prev->buffer(kYPlane);
246 memset(x_density_.get(), 0, mb_cols_); 246 memset(x_density_.get(), 0, mb_cols_);
247 memset(y_density_.get(), 0, mb_rows_); 247 memset(y_density_.get(), 0, mb_rows_);
248 memset(moving_object_.get(), 1, mb_cols_ * mb_rows_); 248 memset(moving_object_.get(), 1, mb_cols_ * mb_rows_);
249 249
250 uint8_t noise_level = noise_estimation_enabled ? ne_->GetNoiseLevel() : 0; 250 uint8_t noise_level = noise_estimation_enabled ? ne_->GetNoiseLevel() : 0;
251 int thr_var_base = 16 * 16 * 5; 251 int thr_var_base = 16 * 16 * 2;
252 // Loop over blocks to accumulate/extract noise level and update x/y_density 252 // Loop over blocks to accumulate/extract noise level and update x/y_density
253 // factors for moving object detection. 253 // factors for moving object detection.
254 for (int mb_row = 0; mb_row < mb_rows_; ++mb_row) { 254 for (int mb_row = 0; mb_row < mb_rows_; ++mb_row) {
255 const int mb_index_base = mb_row * mb_cols_; 255 const int mb_index_base = mb_row * mb_cols_;
256 const int offset_base = (mb_row << 4) * stride_y_; 256 const int offset_base = (mb_row << 4) * stride_y_;
257 const uint8_t* mb_src_base = y_src + offset_base; 257 const uint8_t* mb_src_base = y_src + offset_base;
258 uint8_t* mb_dst_base = y_dst + offset_base; 258 uint8_t* mb_dst_base = y_dst + offset_base;
259 uint8_t* mb_dst_prev_base = y_dst_prev + offset_base; 259 uint8_t* mb_dst_prev_base = y_dst_prev + offset_base;
260 for (int mb_col = 0; mb_col < mb_cols_; ++mb_col) { 260 for (int mb_col = 0; mb_col < mb_cols_; ++mb_col) {
261 const int mb_index = mb_index_base + mb_col; 261 const int mb_index = mb_index_base + mb_col;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 denoised_frame->set_render_time_ms(frame.render_time_ms()); 341 denoised_frame->set_render_time_ms(frame.render_time_ms());
342 342
343 #if DISPLAY || DISPLAYNEON 343 #if DISPLAY || DISPLAYNEON
344 // Show rectangular region 344 // Show rectangular region
345 ShowRect(filter_, moving_edge_, moving_object_, x_density_, y_density_, u_src, 345 ShowRect(filter_, moving_edge_, moving_object_, x_density_, y_density_, u_src,
346 v_src, u_dst, v_dst, mb_rows_, mb_cols_, stride_u_, stride_v_); 346 v_src, u_dst, v_dst, mb_rows_, mb_cols_, stride_u_, stride_v_);
347 #endif 347 #endif
348 } 348 }
349 349
350 } // namespace webrtc 350 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_processing/util/noise_estimation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698