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

Unified Diff: webrtc/modules/video_processing/util/denoiser_filter.cc

Issue 1822333003: External denoiser based on noise estimation and moving object detection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/util/denoiser_filter.cc
diff --git a/webrtc/modules/video_processing/util/denoiser_filter.cc b/webrtc/modules/video_processing/util/denoiser_filter.cc
index a9c6f005d96cfd1059a69bf01572b47ed0b3b13e..b111a0e4123e6518ff60d4438536d937dfbbc91a 100644
--- a/webrtc/modules/video_processing/util/denoiser_filter.cc
+++ b/webrtc/modules/video_processing/util/denoiser_filter.cc
@@ -18,13 +18,16 @@
namespace webrtc {
const int kMotionMagnitudeThreshold = 8 * 3;
-const int kSumDiffThreshold = 16 * 16 * 2;
-const int kSumDiffThresholdHigh = 600;
+const int kSumDiffThreshold = 96;
+const int kSumDiffThresholdHigh = 448;
std::unique_ptr<DenoiserFilter> DenoiserFilter::Create(
- bool runtime_cpu_detection) {
+ bool runtime_cpu_detection,
+ CpuType* cpu_type) {
std::unique_ptr<DenoiserFilter> filter;
+ if (cpu_type != nullptr)
+ *cpu_type = CPU_NOT_NEON;
if (runtime_cpu_detection) {
// If we know the minimum architecture at compile time, avoid CPU detection.
#if defined(WEBRTC_ARCH_X86_FAMILY)
@@ -40,9 +43,13 @@ std::unique_ptr<DenoiserFilter> DenoiserFilter::Create(
#endif
#elif defined(WEBRTC_HAS_NEON)
filter.reset(new DenoiserFilterNEON());
+ if (cpu_type != nullptr)
+ *cpu_type = CPU_NEON;
#elif defined(WEBRTC_DETECT_NEON)
if (WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) {
filter.reset(new DenoiserFilterNEON());
+ if (cpu_type != nullptr)
+ *cpu_type = CPU_NEON;
} else {
filter.reset(new DenoiserFilterC());
}
« no previous file with comments | « webrtc/modules/video_processing/util/denoiser_filter.h ('k') | webrtc/modules/video_processing/util/denoiser_filter_c.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698