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

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

Issue 1784323005: Add more conditions for CPU detection in denoiser filter. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 120f8f89fa8fc30df1ca44442a3e90e71bea67d9..a9c6f005d96cfd1059a69bf01572b47ed0b3b13e 100644
--- a/webrtc/modules/video_processing/util/denoiser_filter.cc
+++ b/webrtc/modules/video_processing/util/denoiser_filter.cc
@@ -28,12 +28,18 @@ std::unique_ptr<DenoiserFilter> DenoiserFilter::Create(
if (runtime_cpu_detection) {
// If we know the minimum architecture at compile time, avoid CPU detection.
#if defined(WEBRTC_ARCH_X86_FAMILY)
+#if defined(__SSE2__)
+ filter.reset(new DenoiserFilterSSE2());
+#else
// x86 CPU detection required.
if (WebRtc_GetCPUInfo(kSSE2)) {
filter.reset(new DenoiserFilterSSE2());
} else {
filter.reset(new DenoiserFilterC());
}
+#endif
+#elif defined(WEBRTC_HAS_NEON)
+ filter.reset(new DenoiserFilterNEON());
#elif defined(WEBRTC_DETECT_NEON)
if (WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) {
filter.reset(new DenoiserFilterNEON());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698