| 3593 | } |
| 3594 | |
| 3595 | void sp_fft_init(sp_fft * fft, int M) |
| 3596 | { |
| 3597 | SPFLOAT * utbl; |
| 3598 | int16_t * BRLow; |
| 3599 | int16_t * BRLowCpx; |
| 3600 | |
| 3601 | /* init cos table */ |
| 3602 | utbl = (SPFLOAT *) malloc((POW2(M) / 4 + 1) * sizeof(SPFLOAT)); |
| 3603 | fftCosInit(M, utbl); |
| 3604 | |
| 3605 | BRLowCpx = (int16_t *) malloc(POW2(M / 2 - 1) * sizeof(int16_t)); |
| 3606 | fftBRInit(M, BRLowCpx); |
| 3607 | |
| 3608 | /* init bit reversed table for real FFT */ |
| 3609 | BRLow = (int16_t *) malloc(POW2((M - 1) / 2 - 1) * sizeof(int16_t)); |
| 3610 | fftBRInit(M - 1, BRLow); |
| 3611 | |
| 3612 | fft->BRLow = BRLow; |
| 3613 | fft->BRLowCpx = BRLowCpx; |
| 3614 | fft->utbl = utbl; |
| 3615 | } |
| 3616 | |
| 3617 | void sp_fftr(sp_fft * fft, SPFLOAT * buf, int FFTsize) |
| 3618 | { |
no test coverage detected