CSI-DSP  Version 1.0.0
CSI DSP Software Library
Functions
Real FFT Functions

Functions

void csky_fft_lib_int16_ifft (q31_t log2_buf_len, q15_t *in_buf, q15_t *out_buf, const q15_t *twi_table, const twi_table_rfft_q15 *last_stage_twi_table, const uint16_t *bitrev_tbl, q15_t *temp_buf, q7_t *ScaleShift, q31_t br)
 Processing function for the Q15 real inverse FFT. More...
 
void csky_fft_lib_int32_ifft (q31_t log2_buf_len, q31_t *in_buf, q31_t *out_buf, const q31_t *twi_table, const twi_table_rfft_q31 *last_stage_twi_table, const uint16_t *bitrev_tbl, q31_t *temp_buf, q31_t br)
 Processing function for the Q31 real inverse FFT. More...
 
void csky_fft_lib_int16_fft (q31_t log2_buf_len, q15_t *in_buf, q15_t *out_buf, const q15_t *twi_table, const twi_table_rfft_q15 *last_stage_twi_table, const uint16_t *bitrev_tbl, q15_t *temp_buf, q7_t *ScaleShift, q31_t br)
 Processing function for the Q15 real FFT. More...
 
void csky_fft_lib_int32_fft (q31_t log2_buf_len, q31_t *in_buf, q31_t *out_buf, const q31_t *twi_table, const twi_table_rfft_q31 *last_stage_twi_table, const uint16_t *bitrev_tbl, q31_t *temp_buf, q31_t br)
 Processing function for the Q31 real FFT. More...
 

Description

Brief Introduction
This is the real data part of the FFT library. Real FFT algorithms take advantage of the symmetry properties of the FFT and have a speed advantage over complex algorithms of the same length. Unlike the Original Method the forward transform, the inverse transform are seperated, so the ifftFlaga is not needed.More details can be seen in Real FFT Functions .
Algorithm
The algorithm used here is almost the same as the Original Method .
Initialization
Just like the CFFT, these is no need to initialize any instance structure, all the parameters and constants are passed to the related functions straightforwardly.

Function Documentation

void csky_fft_lib_int16_fft ( q31_t  log2_buf_len,
q15_t in_buf,
q15_t out_buf,
const q15_t twi_table,
const twi_table_rfft_q15 last_stage_twi_table,
const uint16_t *  bitrev_tbl,
q15_t temp_buf,
q7_t ScaleShift,
q31_t  br 
)
Parameters
[in]log_buf_lenlog2 value of FFT size, the FFT size N is (1<<log2_buf_len)
[in,out]*in_bufpoint to the input and output memory
[in]*out_bufnot used
[in]*twi_tablepoint to the twi table
[in]*last_stage_twi_tablepoint to the twi table
[in]*bitrev_tblpoint to the bit reversal table
[in]*temp_bufnot used
[in]*ScaleShiftnot used
[in]brbit reversal flag, always set
Returns
none.
Note
The time domin data and the frequency domain data are all in Q15 format, the forward transform is easy to overflow. So care to use it to avoid overflow.
void csky_fft_lib_int16_ifft ( q31_t  log2_buf_len,
q15_t in_buf,
q15_t out_buf,
const q15_t twi_table,
const twi_table_rfft_q15 last_stage_twi_table,
const uint16_t *  bitrev_tbl,
q15_t temp_buf,
q7_t ScaleShift,
q31_t  br 
)
Parameters
[in]log_buf_lenlog2 value of FFT size, the FFT size N is (1<<log2_buf_len)
[in,out]*in_bufpoint to the input and output memory
[in]*out_bufnot used
[in]*twi_tablepoint to the twi table
[in]*last_stage_twi_tablepoint to the twi table
[in]*bitrev_tblpoint to the bit reversal table
[in]*temp_bufnot used
[in]*ScaleShiftnot used
[in]brbit reversal flag, always set
Returns
none.
void csky_fft_lib_int32_fft ( q31_t  log2_buf_len,
q31_t in_buf,
q31_t out_buf,
const q31_t twi_table,
const twi_table_rfft_q31 last_stage_twi_table,
const uint16_t *  bitrev_tbl,
q31_t temp_buf,
q31_t  br 
)
Parameters
[in]log_buf_lenlog2 value of FFT size, the FFT size N is (1<<log2_buf_len)
[in,out]*in_bufpoint to the input and output memory
[in]*out_bufnot used
[in]*twi_tablepoint to the twi table
[in]*last_stage_twi_tablepoint to the twi table
[in]*bitrev_tblpoint to the bit reversal table
[in]*temp_bufnot used
[in]brbit reversal flag, always set
Returns
none.
Note
The time domin data and the frequency domain data are all in Q31 format, the forward transform is easy to overflow. So care to use it to avoid overflow.
void csky_fft_lib_int32_ifft ( q31_t  log2_buf_len,
q31_t in_buf,
q31_t out_buf,
const q31_t twi_table,
const twi_table_rfft_q31 last_stage_twi_table,
const uint16_t *  bitrev_tbl,
q31_t temp_buf,
q31_t  br 
)
Parameters
[in]log_buf_lenlog2 value of FFT size, the FFT size N is (1<<log2_buf_len)
[in,out]*in_bufpoint to the input and output memory
[in]*out_bufnot used
[in]*twi_tablepoint to the twi table
[in]*last_stage_twi_tablepoint to the twi table
[in]*bitrev_tblpoint to the bit reversal table
[in]*temp_bufnot used
[in]brbit reversal flag, always set
Returns
none.