DSPF_sp_cfftr2_dit
Algorithm
4-14
routine can be used to implement inverse FFT by any one of the following
methods:
1) Inputs (x) are replaced by their complex-conjugate values.
Output values are divided by N.
2) FFT coefficients (w) are replaced by their complex conjugates.
Output values are divided by N.
3) Swap real and imaginary values of input.
4) Swap real and imaginary values of output.
This is the C equivalent of the assembly code. Note that the assembly code
is hand optimized and restrictions may apply.
void DSPF_sp_cfftr2_dit(float* x, float* w, short n)
{
short n2, ie, ia, i, j, k, m;
float rtemp, itemp, c, s;
n2 = n;
ie = 1;
for(k=n; k > 1; k >>= 1)
{
n2 >>= 1;
ia = 0;
for(j=0; j < ie; j++)
{
c = w[2*j];
s = w[2*j+1];
for(i=0; i < n2; i++)
{
m = ia + n2;
rtemp
itemp
x[2*m]
x[2*m+1]
x[2*ia]
x[2*ia+1] = x[2*ia+1] + itemp;
ia++;
= c * x[2*m]
+ s * x[2*m+1];
= c * x[2*m+1] - s * x[2*m];
= x[2*ia]
- rtemp;
= x[2*ia+1] - itemp;
= x[2*ia]
+ rtemp;
Need help?
Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?
Questions and answers