commit | 3e3c4d8451a680e23d9fe96886917fc783e94bbd | [log] [tgz] |
---|---|---|
author | Per Åhgren <peah@webrtc.org> | Tue Jun 02 10:22:57 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jun 02 11:38:20 2020 |
tree | 60b317ef945e2461c9abf7f01b75476c662dad31 | |
parent | 6958d2c6f0ce5267bdc4120d88680a4be9ed5e59 [diff] |
Updating the Ooura FFT to take SSE2 usage specification in the ctor Bug: b/155316201 Change-Id: I79a5857da1eed49150509684c0f8b3d94e4e40c2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176373 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31406}
diff --git a/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc b/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc index 2918374..6b6d6f1 100644 --- a/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc
@@ -313,6 +313,14 @@ } // namespace +OouraFft::OouraFft(bool sse2_available) { +#if defined(WEBRTC_ARCH_X86_FAMILY) + use_sse2_ = sse2_available; +#else + use_sse2_ = false; +#endif +} + OouraFft::OouraFft() { #if defined(WEBRTC_ARCH_X86_FAMILY) use_sse2_ = (WebRtc_GetCPUInfo(kSSE2) != 0);
diff --git a/common_audio/third_party/ooura/fft_size_128/ooura_fft.h b/common_audio/third_party/ooura/fft_size_128/ooura_fft.h index 0cdd6aa..8273dfe 100644 --- a/common_audio/third_party/ooura/fft_size_128/ooura_fft.h +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft.h
@@ -38,6 +38,10 @@ class OouraFft { public: + // Ctor allowing the availability of SSE2 support to be specified. + explicit OouraFft(bool sse2_available); + + // Deprecated: This Ctor will soon be removed. OouraFft(); ~OouraFft(); void Fft(float* a) const;