CMSIS-DSP
Version 1.4.7
CMSIS DSP Software Library
|
arm_rfft_fast_f32()
and arm_rfft_fast_init_f32()
. The older functions arm_rfft_f32()
and arm_rfft_init_f32()
have been deprecated but are still documented. *X[0] - real data *X[1] - complex data *X[2] - complex data ... *X[fftLen/2-1] - complex data *X[fftLen/2] - real data *X[fftLen/2+1] - conjugate of X[fftLen/2-1] *X[fftLen/2+2] - conjugate of X[fftLen/2-2] ... *X[fftLen-1] - conjugate of X[1]Looking at the data, we see that we can uniquely represent the FFT using only
*N/2+1 samples: *X[0] - real data *X[1] - complex data *X[2] - complex data ... *X[fftLen/2-1] - complex data *X[fftLen/2] - real dataLooking more closely we see that the first and last samples are real valued. They can be packed together and we can thus represent the FFT of an N-point real sequence by N/2 complex values:
*X[0],X[N/2] - packed real data: X[0] + jX[N/2] *X[1] - complex data *X[2] - complex data ... *X[fftLen/2-1] - complex dataThe real FFT functions pack the frequency domain data in this fashion. The forward transform outputs the data in this form and the inverse transform expects input data in this form. The function always performs the needed bitreversal so that the input and output data is always in normal order. The functions support lengths of [32, 64, 128, ..., 4096] samples.
*arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft}; *arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};where
fftLenReal
is the length of the real transform; fftLenBy2
length of the internal complex transform. ifftFlagR
Selects forward (=0) or inverse (=1) transform. bitReverseFlagR
Selects bit reversed output (=0) or normal order output (=1). twidCoefRModifier
stride modifier for the twiddle factor table. The value is based on the FFT length; pTwiddleAReal
points to the A array of twiddle coefficients; pTwiddleBReal
points to the B array of twiddle coefficients; pCfft
points to the CFFT Instance structure. The CFFT structure must also be initialized. Refer to arm_cfft_radix4_f32() for details regarding static initialization of the complex FFT instance structure.