1 /* 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_ 12 #define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_ 13 14 #include "rtc_base/system/arch.h" 15 16 namespace webrtc { 17 18 #if defined(WEBRTC_ARCH_X86_FAMILY) 19 void cft1st_128_SSE2(float* a); 20 void cftmdl_128_SSE2(float* a); 21 void rftfsub_128_SSE2(float* a); 22 void rftbsub_128_SSE2(float* a); 23 #endif 24 25 #if defined(MIPS_FPU_LE) 26 void cft1st_128_mips(float* a); 27 void cftmdl_128_mips(float* a); 28 void rftfsub_128_mips(float* a); 29 void rftbsub_128_mips(float* a); 30 #endif 31 32 #if defined(WEBRTC_HAS_NEON) 33 void cft1st_128_neon(float* a); 34 void cftmdl_128_neon(float* a); 35 void rftfsub_128_neon(float* a); 36 void rftbsub_128_neon(float* a); 37 #endif 38 39 class OouraFft { 40 public: 41 // Ctor allowing the availability of SSE2 support to be specified. 42 explicit OouraFft(bool sse2_available); 43 44 // Deprecated: This Ctor will soon be removed. 45 OouraFft(); 46 ~OouraFft(); 47 void Fft(float* a) const; 48 void InverseFft(float* a) const; 49 50 private: 51 void cft1st_128(float* a) const; 52 void cftmdl_128(float* a) const; 53 void rftfsub_128(float* a) const; 54 void rftbsub_128(float* a) const; 55 56 void cftfsub_128(float* a) const; 57 void cftbsub_128(float* a) const; 58 void bitrv2_128(float* a) const; 59 bool use_sse2_; 60 }; 61 62 } // namespace webrtc 63 64 #endif // MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_H_ 65