| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#ifndef MODULES_AUDIO_PROCESSING_NS_NS_FFT_H_ |
| 12 |
#define MODULES_AUDIO_PROCESSING_NS_NS_FFT_H_ |
| 13 |
|
| 14 |
#include <vector> |
| 15 |
|
| 16 |
#include "api/array_view.h" |
| 17 |
#include "modules/audio_processing/ns/ns_common.h" |
| 18 |
|
| 19 |
namespace webrtc { |
| 20 |
|
| 21 |
|
| 22 |
class NrFft { |
| 23 |
public: |
| 24 |
NrFft(); |
| 25 |
NrFft(const NrFft&) = delete; |
| 26 |
NrFft& operator=(const NrFft&) = delete; |
| 27 |
|
| 28 |
|
| 29 |
void Fft(rtc::ArrayView<float, kFftSize> time_data, |
| 30 |
rtc::ArrayView<float, kFftSize> real, |
| 31 |
rtc::ArrayView<float, kFftSize> imag); |
| 32 |
|
| 33 |
|
| 34 |
void Ifft(rtc::ArrayView<const float> real, |
| 35 |
rtc::ArrayView<const float> imag, |
| 36 |
rtc::ArrayView<float> time_data); |
| 37 |
|
| 38 |
private: |
| 39 |
std::vector<size_t> bit_reversal_state_; |
| 40 |
std::vector<float> tables_; |
| 41 |
}; |
| 42 |
|
| 43 |
} |
| 44 |
|
| 45 |
#endif |