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}
This commit is contained in:
Per Åhgren 2020-06-02 12:22:57 +02:00 committed by Commit Bot
parent 6958d2c6f0
commit 3e3c4d8451
2 changed files with 12 additions and 0 deletions

View File

@ -313,6 +313,14 @@ static void rftbsub_128_C(float* a) {
} // 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);

View File

@ -38,6 +38,10 @@ void rftbsub_128_neon(float* a);
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;