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

Unified Diff: webrtc/modules/video_processing/video_denoiser.cc

Issue 1492053003: Add unit test for stand-alone denoiser and fixed some bugs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix asan test failure. Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_processing/video_denoiser.cc
diff --git a/webrtc/modules/video_processing/video_denoiser.cc b/webrtc/modules/video_processing/video_denoiser.cc
index 83bcf7f1cc105584000a7e81aa47230d15b2eb0d..f7c854cb9d1b25578ed70d7356df1a950c78b74f 100644
--- a/webrtc/modules/video_processing/video_denoiser.cc
+++ b/webrtc/modules/video_processing/video_denoiser.cc
@@ -13,10 +13,10 @@
namespace webrtc {
-VideoDenoiser::VideoDenoiser()
+VideoDenoiser::VideoDenoiser(bool runtime_cpu_detection)
: width_(0),
height_(0),
- filter_(DenoiserFilter::Create()) {}
+ filter_(DenoiserFilter::Create(runtime_cpu_detection)) {}
void VideoDenoiser::TrailingReduction(int mb_rows,
int mb_cols,
@@ -79,7 +79,7 @@ void VideoDenoiser::DenoiseFrame(const VideoFrame& frame,
int mb_cols = width_ >> 4;
int mb_rows = height_ >> 4;
if (metrics_.get() == nullptr)
- metrics_.reset(new DenoiseMetrics[mb_cols * mb_rows]);
+ metrics_.reset(new DenoiseMetrics[mb_cols * mb_rows]());
stefan-webrtc 2015/12/10 08:53:25 Why was () added?
jackychen 2015/12/11 19:57:57 To memset the buffer to 0 to pass msan checking, t
// Denoise on Y plane.
uint8_t* y_dst = denoised_frame->buffer(kYPlane);
uint8_t* u_dst = denoised_frame->buffer(kUPlane);

Powered by Google App Engine
This is Rietveld 408576698