3 #include "ProgramVector.h"
4 #include "ServiceCall.h"
17 ASSERT(len==32 || len ==64 || len==128 || len==256 || len==512 || len==1024 || len==2048 || len==4096,
"Unsupported FFT size");
24 arm_rfft_init_q15(&instance, len, 0, 1);
25 arm_rfft_q15(&instance, (int16_t*)in.
getData(), (int16_t*)out.
getData());
31 arm_rfft_init_q15(&instance, len, 1, 1);
32 arm_rfft_q15(&instance, (int16_t*)in.
getData(), (int16_t*)out.
getData());
53 ASSERT(aSize==32 || aSize ==64 || aSize==128 || aSize==256 || aSize==512 || aSize==1024 || aSize==2048 || aSize==4096,
"Unsupported FFT size");
54 cfgfft = kiss_fft_alloc(aSize, 0 , 0, 0);
55 cfgifft = kiss_fft_alloc(aSize, 1,0, 0);
62 for(
size_t n=0; n<
getSize(); n++){
66 kiss_fft(cfgfft, (kiss_fft_cpx*)(int16_t*)temp.
getData(), (kiss_fft_cpx*)(int16_t*)output.
getData());
72 kiss_fft(cfgifft, (kiss_fft_cpx*)(int16_t*)input.
getData(), (kiss_fft_cpx*)(int16_t*)temp.
getData());
74 for(
size_t n=0; n<
getSize(); n++){
75 output[n]=temp[n].
re*scale;
int16_t im(const int i)
The imaginary part of an element of the array.
static ComplexShortArray create(unsigned int size)
Creates a new ComplexShortArray.
static void destroy(ComplexShortArray)
Destroys a ComplexShortArray created with the create() method.
int16_t re(const int i)
The real part of an element of the array.
This class contains useful methods for manipulating arrays of int16_ts.
T * getData()
Get the data stored in the Array.
#define ASSERT(cond, msg)