LIBDSP Version 4.1.9
LIBDSP Software Library
Loading...
Searching...
No Matches
Complex FFT Functions
Collaboration diagram for Complex FFT Functions:

Topics

 Complex FFT Tables

Enumerations

enum  tpt_math_target_arch { TPT_MATH_SCALAR_ARCH = 1 , TPT_MATH_DSP_EXTENSIONS_ARCH }
 Target architecture identification. More...
enum  tpt_math_datatype {
  TPT_MATH_F16 = 16 , TPT_MATH_F32 = 32 , TPT_MATH_F64 = 64 , TPT_MATH_Q7 = 7 ,
  TPT_MATH_Q15 = 15 , TPT_MATH_Q31 = 31
}
 Data type identification. More...

Functions

tpt_status tpt_cfft_forward_f16 (f16_t *aInPlace, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f16 (f16_t *aInPlace, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f16 (f16_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_f32 (f32_t *aInPlace, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f32 (f32_t *aInPlace, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f32 (f32_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_f64 (f64_t *aInPlace, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f64 (f64_t *aInPlace, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f64 (f64_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_q15 (q15_t *aInPlace, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 complex FFT.
tpt_status tpt_cfft_inverse_q15 (q15_t *aInPlace, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 complex FFT.
static tpt_status tpt_cfft_q15 (q15_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_q31 (q31_t *aInPlace, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 complex FFT.
tpt_status tpt_cfft_inverse_q31 (q31_t *aInPlace, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 complex FFT.
static tpt_status tpt_cfft_q31 (q31_t *aInPlace, size_t aLogN, bool aIfftFlag)

Detailed Description

Function: Combined Radix4 Decimation in Frequency CFFT function

The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.
The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.
The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.
The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.

Function: Combined Radix4 Decimation in Frequency CFFT function

Function: Combined Radix4 Decimation in Frequency CFFT function

The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.
The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.
The Fast Fourier Transform (FFT) is an efficient algorithm for computing the Discrete Fourier Transform (DFT). The FFT can be orders of magnitude faster than the DFT, especially for long lengths. The algorithms described in this section operate on complex data. A separate set of functions is devoted to handling of real sequences.
The algorithms only support lengths of power of 2. Therefore, the actual fftLen is 2^aLogN.
The FFT functions operate in-place. That is, the array holding the input data will also be used to hold the corresponding result. The input data is complex and contains 2 * fftLen interleaved values as shown below.
{ real[0], imag[0], real[1], imag[1], ... } 
The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
Algorithm
1] forward transform
           N-1
    X[k] = sum { x[n] * W(N, kn) } for k = 0, 1, ..., N - 1
           n=0
  
2] inverse transform
                     N-1
    x[k] = (1 / N) * sum { X[n] * W(N, -kn) } for k = 0, 1, ..., N - 1
                     n=0
  
The complex FFT uses a mixed-radix algorithm. Multiple radix-4 stages are performed along with a single radix-2 stage, as needed. The algorithm supports lengths of [16, 32, 64, ..., 4096] and the corresponding aLogN value is [4, 5, 6, ..., 12].
The function uses the standard FFT definition and output values may grow by a factor of fftLen when computing the forward transform. The inverse transform includes a scale of 1 / fftLen as part of the calculation and this matches the textbook definition of the inverse FFT.

Function: Combined Radix4 Decimation in Frequency CFFT function

Function: Combined Radix4 Decimation in Frequency CFFT function

Enumeration Type Documentation

◆ tpt_math_datatype

Data type identification.

Enumerator
TPT_MATH_F16 
TPT_MATH_F32 
TPT_MATH_F64 
TPT_MATH_Q7 
TPT_MATH_Q15 
TPT_MATH_Q31 

◆ tpt_math_target_arch

Target architecture identification.

Enumerator
TPT_MATH_SCALAR_ARCH 
TPT_MATH_DSP_EXTENSIONS_ARCH 

Function Documentation

◆ tpt_cfft_f16()

tpt_status tpt_cfft_f16 ( f16_t * aInPlace,
size_t aLogN,
bool aIfftFlag )
inlinestatic

◆ tpt_cfft_f32()

tpt_status tpt_cfft_f32 ( f32_t * aInPlace,
size_t aLogN,
bool aIfftFlag )
inlinestatic

◆ tpt_cfft_f64()

tpt_status tpt_cfft_f64 ( f64_t * aInPlace,
size_t aLogN,
bool aIfftFlag )
inlinestatic

◆ tpt_cfft_forward_f16()

tpt_status tpt_cfft_forward_f16 ( f16_t * aInPlace,
f16_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs in-place.
[in]aLogNThe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_forward_f32()

tpt_status tpt_cfft_forward_f32 ( f32_t * aInPlace,
f32_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs in-place.
[in]aLogNThe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_forward_f64()

tpt_status tpt_cfft_forward_f64 ( f64_t * aInPlace,
f64_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs in-place.
[in]aLogNThe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_forward_q15()

tpt_status tpt_cfft_forward_q15 ( q15_t * aInPlace,
q15_t * aScratch,
size_t aLogN )

Processing function for the Q15 complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs in-place.
[in]aLogNThe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q15 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 4
5 32 1.15 6.10 5
6 64 1.15 7.9 6
7 128 1.15 8.8 7
8 256 1.15 9.7 8
9 512 1.15 10.6 9
10 1024 1.15 11.5 10
......
Input and Output Formats for Q15 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 0
5 32 1.15 6.10 0
6 64 1.15 7.9 0
7 128 1.15 8.8 0
8 256 1.15 9.7 0
9 512 1.15 10.6 0
10 1024 1.15 11.5 0
......
Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q15 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 4
5 32 1.15 6.10 5
6 64 1.15 7.9 6
7 128 1.15 8.8 7
8 256 1.15 9.7 8
9 512 1.15 10.6 9
10 1024 1.15 11.5 10
......
Input and Output Formats for Q15 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 0
5 32 1.15 6.10 0
6 64 1.15 7.9 0
7 128 1.15 8.8 0
8 256 1.15 9.7 0
9 512 1.15 10.6 0
10 1024 1.15 11.5 0
......

◆ tpt_cfft_forward_q31()

tpt_status tpt_cfft_forward_q31 ( q31_t * aInPlace,
q31_t * aScratch,
size_t aLogN )

Processing function for the Q31 complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs in-place.
[in]aLogNThe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q31 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 4
5 32 1.31 6.26 5
6 64 1.31 7.25 6
7 128 1.31 8.24 7
8 256 1.31 9.23 8
9 512 1.31 10.22 9
10 1024 1.31 11.21 10
......
Input and Output Formats for Q31 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 0
5 32 1.31 6.26 0
6 64 1.31 7.25 0
7 128 1.31 8.24 0
8 256 1.31 9.23 0
9 512 1.31 10.22 0
10 1024 1.31 11.21 0
......
Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q31 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 4
5 32 1.31 6.26 5
6 64 1.31 7.25 6
7 128 1.31 8.24 7
8 256 1.31 9.23 8
9 512 1.31 10.22 9
10 1024 1.31 11.21 10
......
Input and Output Formats for Q31 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 0
5 32 1.31 6.26 0
6 64 1.31 7.25 0
7 128 1.31 8.24 0
8 256 1.31 9.23 0
9 512 1.31 10.22 0
10 1024 1.31 11.21 0
......

◆ tpt_cfft_inverse_f16()

tpt_status tpt_cfft_inverse_f16 ( f16_t * aInPlace,
f16_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[scratch]aScratch scratch buffer of size 2 * fftLen.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_inverse_f32()

tpt_status tpt_cfft_inverse_f32 ( f32_t * aInPlace,
f32_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[scratch]aScratch scratch buffer of size 2 * fftLen.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_inverse_f64()

tpt_status tpt_cfft_inverse_f64 ( f64_t * aInPlace,
f64_t * aScratch,
size_t aLogN )

Processing function for the floating-point complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs in-place.
[scratch]aScratch scratch buffer of size 2 * fftLen.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status

◆ tpt_cfft_inverse_q15()

tpt_status tpt_cfft_inverse_q15 ( q15_t * aInPlace,
q15_t * aScratch,
size_t aLogN )

Processing function for the Q15 complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size 2 * fftLen. Processing occurs
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction.
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q15 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 4
5 32 1.15 6.10 5
6 64 1.15 7.9 6
7 128 1.15 8.8 7
8 256 1.15 9.7 8
9 512 1.15 10.6 9
10 1024 1.15 11.5 10
......
Input and Output Formats for Q15 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.15 5.11 0
5 32 1.15 6.10 0
6 64 1.15 7.9 0
7 128 1.15 8.8 0
8 256 1.15 9.7 0
9 512 1.15 10.6 0
10 1024 1.15 11.5 0
......

◆ tpt_cfft_inverse_q31()

tpt_status tpt_cfft_inverse_q31 ( q31_t * aInPlace,
q31_t * aScratch,
size_t aLogN )

Processing function for the Q31 complex FFT.

Parameters
[in,out]aInPlacepoints to the complex data buffer of size. 2 * fftLen. Processing occurs
[scratch]aScratch scratch buffer of size 2 * fftLen.
[in]aLogNthe fftLen is 2^aLogN.
[in]aIfftFlagflag that selects transform direction
  • value = false: forward transform
  • value = true : inverse transform
Returns
execution status
Input and output formats:
Internally input is downscaled for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT:
Input and Output Formats for Q31 CFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 4
5 32 1.31 6.26 5
6 64 1.31 7.25 6
7 128 1.31 8.24 7
8 256 1.31 9.23 8
9 512 1.31 10.22 9
10 1024 1.31 11.21 10
......
Input and Output Formats for Q31 CIFFT
aLogNCFFT SizeInput formatOutput formatNumber of bits to upscale
4 16 1.31 5.27 0
5 32 1.31 6.26 0
6 64 1.31 7.25 0
7 128 1.31 8.24 0
8 256 1.31 9.23 0
9 512 1.31 10.22 0
10 1024 1.31 11.21 0
......

◆ tpt_cfft_q15()

tpt_status tpt_cfft_q15 ( q15_t * aInPlace,
size_t aLogN,
bool aIfftFlag )
inlinestatic

◆ tpt_cfft_q31()

tpt_status tpt_cfft_q31 ( q31_t * aInPlace,
size_t aLogN,
bool aIfftFlag )
inlinestatic