OpenWareLaboratory
ShortFastFourierTransform.h
Go to the documentation of this file.
1 #ifndef __ShortFastFourierTransform_h__
2 #define __ShortFastFourierTransform_h__
3 
4 #include "basicmaths.h"
5 #include "ShortArray.h"
6 #include "ComplexShortArray.h"
7 
8 #ifndef ARM_CORTEX
9 #define FIXED_POINT 16
10 #include "kiss_fft.h"
11 #endif /* ARM_CORTEX */
12 
18 private:
19 #ifdef ARM_CORTEX
20  unsigned int len;
21  arm_rfft_instance_q15 instance;
22 #else /* ARM_CORTEX */
23  kiss_fft_cfg cfgfft;
24  kiss_fft_cfg cfgifft;
25  ComplexShortArray temp;
26 #endif /* ARM_CORTEX */
27 
28 public:
35 
42  ShortFastFourierTransform(int aSize);
43 
45 
51  void init(int aSize);
52 
60  void fft(ShortArray input, ComplexShortArray output);
61 
71  void ifft(ComplexShortArray input, ShortArray output);
72 
77  size_t getSize();
78 };
79 
80 #endif // __ShortFastFourierTransform_h__
This class contains useful methods for manipulating arrays of int16_ts.
Definition: ShortArray.h:12
This class performs direct and inverse ShortFast Fourier Transform.
size_t getSize()
Get the size of the FFT.
void ifft(ComplexShortArray input, ShortArray output)
Perform the inverse FFT.
ShortFastFourierTransform()
Default constructor.
void init(int aSize)
Initialize the instance.
void fft(ShortArray input, ComplexShortArray output)
Perform the direct FFT.