6.4.10 FFTReal
Description
FFTReal performs Fast Fourier Transform (FFT) on a real-valued source vector and stores the result in a complex destination vector. It utilizes an efficient algorithm that computes the FFT of a 2N-point real vector by leveraging an N-point complex FFT, supplemented with additional operations known as split functions.
Prototype
fractcomplex* FFTReal (int log2N, fractional* srcV, fractcomplex* dstCV, fractcomplex* twidFactors);
Arguments
Parameters |
Description |
---|---|
log2N |
Base 2 logarithm of N (number of complex elements in source vector) |
srcV |
Pointer to the real source vector |
dstCV |
Pointer to the destination complex vector |
twidFactors |
Pointer to complex twiddle factors |
Return
Pointer to the base address of the complex destination sample.
Remarks
N must be an integer power of 2.
srcV must be a non-complex vector with N elements.
dstCV must be a complex vector of size N/2 + 1.
The elements in the source complex vector are expected in a natural order, and the resultant vector, likewise, returned in a natural order. The resulting transform is a complex vector of size N/2 + 1. Since the second half of the resulting transform is a conjugate of the first half, only N/2 complex elements are returned.
The srcV vector must be allocated at a modulo alignment of N in y-memory space.
To avoid saturation (overflow) during computation, the values of the source vector should be in the range [-0.5, 0.5].
Only the first N/2 twiddle factors are needed.
This function internally utilizes the VectorCopy and FFTRealIP functions.
The twiddle factors must be initialized with the conjFlag set to zero.
Output is scaled by the factor of N.
Source File
- rfft_aa.s
Function Profile
PIC32A |
Program Words |
Cycle count |
10 + program word counts of FFTRealIP and VectorCopy functions. |
Cycle counts of VectorCopy + FFTRealIP + 16 |
System resource usage
- W0…W3 - used, not restored
- Plus resources used by VectorCopy and FFTRealIP functions