CMSIS-DSP  
CMSIS DSP Software Library
 
Loading...
Searching...
No Matches
Real FFT Q15 Functions

Functions

arm_status arm_rfft_init_8192_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 8192 pt Q15 real FFT.
 
arm_status arm_rfft_init_4096_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 4096 pt Q15 real FFT.
 
arm_status arm_rfft_init_2048_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 2048 pt Q15 real FFT.
 
arm_status arm_rfft_init_1024_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 1024 pt Q15 real FFT.
 
arm_status arm_rfft_init_512_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 512 pt Q15 real FFT.
 
arm_status arm_rfft_init_256_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 256 pt Q15 real FFT.
 
arm_status arm_rfft_init_128_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 128 pt Q15 real FFT.
 
arm_status arm_rfft_init_64_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 64 pt Q15 real FFT.
 
arm_status arm_rfft_init_32_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Initialization function for the 32 pt Q15 real FFT.
 
arm_status arm_rfft_init_q15 (arm_rfft_instance_q15 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Generic initialization function for the Q15 RFFT/RIFFT.
 
void arm_rfft_q15 (const arm_rfft_instance_q15 *S, q15_t *pSrc, q15_t *pDst)
 Processing function for the Q15 RFFT/RIFFT.
 

Description

Function Documentation

◆ arm_rfft_init_1024_q15()

arm_status arm_rfft_init_1024_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 1024 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_128_q15()

arm_status arm_rfft_init_128_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 128 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_2048_q15()

arm_status arm_rfft_init_2048_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 2048 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_256_q15()

arm_status arm_rfft_init_256_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 256 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_32_q15()

arm_status arm_rfft_init_32_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 32 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_4096_q15()

arm_status arm_rfft_init_4096_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 4096 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_512_q15()

arm_status arm_rfft_init_512_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 512 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_64_q15()

arm_status arm_rfft_init_64_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 64 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_8192_q15()

arm_status arm_rfft_init_8192_q15 ( arm_rfft_instance_q15 S,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Initialization function for the 8192 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ arm_rfft_init_q15()

arm_status arm_rfft_init_q15 ( arm_rfft_instance_q15 S,
uint32_t  fftLenReal,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Generic initialization function for the Q15 RFFT/RIFFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]fftLenReallength of the FFT
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
Details
The parameter fftLenReal specifies length of RFFT/RIFFT Process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192.
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.
This function should be used only if you don't know the FFT sizes that you'll need at build time. The use of this function will prevent the linker from removing the FFT tables that are not needed and the library code size will be bigger than needed.
If you use CMSIS-DSP as a static library, and if you know the FFT sizes that you need at build time, then it is better to use the initialization functions defined for each FFT size.

◆ arm_rfft_q15()

void arm_rfft_q15 ( const arm_rfft_instance_q15 S,
q15_t pSrc,
q15_t pDst 
)

Processing function for the Q15 RFFT/RIFFT.

Parameters
[in]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]pSrcpoints to input buffer (Source buffer is modified by this function.)
[out]pDstpoints to output buffer
Input an output formats
Internally input is downscaled by 2 for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different RFFT sizes. The input and output formats for different RFFT sizes and number of bits to upscale are mentioned in the tables below for RFFT and RIFFT:
Input and Output formats for RFFT Q15
RFFT Size Input Format Output Format Number of bits to upscale
32 1.15 6.10 5
64 1.15 7.9 6
128 1.15 8.8 7
256 1.15 9.7 8
512 1.15 10.6 9
1024 1.15 11.5 10
2048 1.15 12.4 11
4096 1.15 13.3 12
8192 1.15 14.2 13
Input and Output formats for RIFFT Q15
RIFFT Size Input Format Output Format Number of bits to upscale
32 1.15 6.10 0
64 1.15 7.9 0
128 1.15 8.8 0
256 1.15 9.7 0
512 1.15 10.6 0
1024 1.15 11.5 0
2048 1.15 12.4 0
4096 1.15 13.3 0
8192 1.15 14.2 0
If the input buffer is of length N (fftLenReal), the output buffer must have length 2N since it is containing the conjugate part (except for MVE version where N+2 is enough). The input buffer is modified by this function.
For the RIFFT, the source buffer must have length N+2 since the Nyquist frequency value is needed but conjugate part is ignored. It is not using the packing trick of the float version.