Real FFT Tables
- const q15_t __ALIGNED (4)
- group Real FFT Tables
Functions
- const q15_t __ALIGNED (4)
Weights Table.
Q15 table for reciprocal.
end of DCT4_IDCT4_Table group
Generation fixed-point realCoefAQ15 array in Q15 format:
n = 4096
for (i = 0; i < n; i++) { pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
Convert to fixed point Q15 format round(pATable[i] * pow(2, 15))
Generation of real_CoefB array:
n = 4096
for (i = 0; i < n; i++) { pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
Convert to fixed point Q15 format round(pBTable[i] * pow(2, 15))
Weights tables are generated using the formula :
weights[n] = e^(-j*n*pi/(2*N))
C command to generate the table
for(i = 0; i< N; i++) { weights[(2*i)] = cos(i*c); weights[(2*i)+1] = -sin(i*c); }
where
Nis the Number of weights to be calculated andcispi/(2*N)Converted the output to q15 format by multiplying with 2^31 and saturated if required.
In the tables below the real and imaginary values are placed alternatively, hence the array length is
2*N.cosFactor tables are generated using the formula :
cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))
C command to generate the table
for (i = 0; i< N; i++) { cos_factors[i] = 2 * cos((2*i+1)*c/2); }
where
Nis the number of factors to generate andcispi/(2*N)Then converted to q15 format by multiplying with 2^31 and saturated if required.
Variables
-
const float32_t realCoefA[8192]
Generation of realCoefA array:
n = 4096
for (i = 0; i < n; i++) { pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
-
const float32_t realCoefB[8192]
Generation of realCoefB array:
n = 4096
for (i = 0; i < n; i++) { pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
-
const q31_t realCoefAQ31[8192]
Generation fixed-point realCoefAQ31 array in Q31 format:
n = 4096
for (i = 0; i < n; i++) { pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
Convert to fixed point Q31 format round(pATable[i] * pow(2, 31))
-
const q31_t realCoefBQ31[8192]
Generation of realCoefBQ31 array:
n = 4096
for (i = 0; i < n; i++) { pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); }
Convert to fixed point Q31 format round(pBTable[i] * pow(2, 31))