Hello everyone,
I've recently joined a project which we need to do some FFT calculations over some data. Pretty common.... but the resolution of Q15 seems not to be enough, so we've decided to change the code of analyze_fft1024.h and analyze_fft1024.cpp to support Q31 numbers. I'm a newbie in this, so I would appreciate some help to understand what I'm doing wrong. I did a fast research in this forum, but didn't find anything about it...
The results are here (The Q31 should be very similar to the Q15):
My question is: What do I need to change in the .h and .cpp files? I've made some changes but the results are not similar to the old ones...
Here is what I've changed, basically replace some int16_t with int32_t:
And...
Probably, I need to change the "copy_to_fft_buffer" function as well...
Thank you.
I've recently joined a project which we need to do some FFT calculations over some data. Pretty common.... but the resolution of Q15 seems not to be enough, so we've decided to change the code of analyze_fft1024.h and analyze_fft1024.cpp to support Q31 numbers. I'm a newbie in this, so I would appreciate some help to understand what I'm doing wrong. I did a fast research in this forum, but didn't find anything about it...
The results are here (The Q31 should be very similar to the Q15):
My question is: What do I need to change in the .h and .cpp files? I've made some changes but the results are not similar to the old ones...
Here is what I've changed, basically replace some int16_t with int32_t:
Code:
//ANALYZE_FFT1024.H NEW VALUES
extern const int32_t AudioWindowHanning1024[];
arm_cfft_radix4_init_q31(&fft_inst, 1024, 0, 1);
void windowFunction(const int32_t *w){//same code}
uint32_t output[512] __attribute__ ((aligned (4)));
const int32_t *window;
int32_t buffer[2048] __attribute__ ((aligned (4)));
arm_cfft_radix4_instance_q31 fft_inst;
And...
Code:
//ANALYZE_FFT1024.CPP NEW VALUES
arm_cfft_radix4_q31(&fft_inst, buffer);
Probably, I need to change the "copy_to_fft_buffer" function as well...
Thank you.
Last edited: