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

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: remove gtest_disabled.h Created 4 years, 11 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 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 0ebbf7bc4441cbbe8e0f96d34ef4c5cda8ba739c..4902a8949135161521a6df571a541c57100abae8 100644
--- a/webrtc/modules/video_processing/video_denoiser.cc
+++ b/webrtc/modules/video_processing/video_denoiser.cc
@@ -13,8 +13,10 @@
namespace webrtc {
-VideoDenoiser::VideoDenoiser()
- : width_(0), height_(0), filter_(DenoiserFilter::Create()) {}
+VideoDenoiser::VideoDenoiser(bool runtime_cpu_detection)
+ : width_(0),
+ height_(0),
+ filter_(DenoiserFilter::Create(runtime_cpu_detection)) {}
void VideoDenoiser::TrailingReduction(int mb_rows,
int mb_cols,
@@ -78,7 +80,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]());
tommi (sloooow) - chröme 2016/01/12 12:01:21 I'm curious about what this change does?
jackychen_ 2016/01/13 03:07:50 This is to initialize the array, since the msan te
// 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