|
ESP-IDF Firmware
Firmware architecture and call graph
|
#include "dsp_err.h"#include "sdkconfig.h"#include "dsps_fft_tables.h"#include "dsps_fft4r_platform.h"Go to the source code of this file.
Macros | |
| #define | dsps_fft4r_fc32_ansi(data, N) |
| #define | dsps_fft4r_fc32_ae32(data, N) |
| #define | dsps_fft4r_fc32_aes3(data, N) |
| #define | dsps_fft4r_fc32_arp4(data, N) |
| #define | dsps_cplx2real_fc32_ansi(data, N) |
| #define | dsps_cplx2real_fc32_ae32(data, N) |
| #define | dsps_fft4r_fc32 dsps_fft4r_fc32_ansi |
| #define | dsps_fft4r_sc16 dsps_fft4r_sc16_ansi |
| #define | dsps_bit_rev4r_fc32 dsps_bit_rev4r_fc32 |
| #define | dsps_cplx2real_fc32 dsps_cplx2real_fc32_ansi |
Functions | |
| esp_err_t | dsps_gen_bitrev4r_table (int N, int step, char *name_ext) |
| esp_err_t | dsps_fft4r_init_fc32 (float *fft_table_buff, int max_fft_size) |
| init fft tables | |
| void | dsps_fft4r_deinit_fc32 (void) |
| deinit fft tables | |
| esp_err_t | dsps_fft4r_fc32_ansi_ (float *data, int N, float *table, int table_size) |
| complex FFT of radix 4 | |
| esp_err_t | dsps_fft4r_fc32_ae32_ (float *data, int N, float *table, int table_size) |
| esp_err_t | dsps_fft4r_fc32_aes3_ (float *data, int N, float *table, int table_size) |
| esp_err_t | dsps_fft4r_fc32_arp4_ (float *data, int N, float *table, int table_size) |
| esp_err_t | dsps_bit_rev4r_fc32 (float *data, int N) |
| bit reverse operation for the complex input array radix-4 | |
| esp_err_t | dsps_bit_rev4r_fc32_ae32 (float *data, int N) |
| esp_err_t | dsps_bit_rev4r_direct_fc32_ansi (float *data, int N) |
| esp_err_t | dsps_bit_rev4r_sc16_ansi (int16_t *data, int N) |
| esp_err_t | dsps_cplx2real_fc32_ansi_ (float *data, int N, float *table, int table_size) |
| Convert FFT result to complex array for real input data. | |
| esp_err_t | dsps_cplx2real_fc32_ae32_ (float *data, int N, float *table, int table_size) |
Variables | |
| float * | dsps_fft4r_w_table_fc32 |
| int | dsps_fft4r_w_table_size |
| uint8_t | dsps_fft4r_initialized |
| int16_t * | dsps_fft4r_w_table_sc16 |
| int | dsps_fft4r_w_table_sc16_size |
| uint8_t | dsps_fft4r_sc16_initialized |
| #define dsps_bit_rev4r_fc32 dsps_bit_rev4r_fc32 |
Definition at line 184 of file dsps_fft4r.h.
Referenced by perform_fft().
| #define dsps_cplx2real_fc32 dsps_cplx2real_fc32_ansi |
Definition at line 185 of file dsps_fft4r.h.
Referenced by perform_fft().
Definition at line 150 of file dsps_fft4r.h.
Definition at line 149 of file dsps_fft4r.h.
| #define dsps_fft4r_fc32 dsps_fft4r_fc32_ansi |
Definition at line 182 of file dsps_fft4r.h.
Referenced by perform_fft().
Definition at line 98 of file dsps_fft4r.h.
Definition at line 99 of file dsps_fft4r.h.
Definition at line 97 of file dsps_fft4r.h.
Definition at line 100 of file dsps_fft4r.h.
| #define dsps_fft4r_sc16 dsps_fft4r_sc16_ansi |
Definition at line 183 of file dsps_fft4r.h.
| esp_err_t dsps_bit_rev4r_direct_fc32_ansi | ( | float * | data, |
| int | N ) |
Definition at line 101 of file dsps_fft4r_fc32_ansi.c.
References data, dsp_is_power_of_two(), dsp_power_of_two(), dsps_fft4r_initialized, ESP_ERR_DSP_INVALID_LENGTH, ESP_ERR_DSP_UNINITIALIZED, ESP_OK, and N.
Referenced by dsps_bit_rev4r_fc32().
| esp_err_t dsps_bit_rev4r_fc32 | ( | float * | data, |
| int | N ) |
bit reverse operation for the complex input array radix-4
Bit reverse operation for the complex input array The implementation use ANSI C and could be compiled and run on any platform
| [in,out] | data | input/ complex array. An elements located: Re[0], Im[0], ... Re[N-1], Im[N-1] result of FFT will be stored to this array. |
| [in] | N | Number of complex elements in input array |
Definition at line 299 of file dsps_fft4r_fc32_ansi.c.
References data, dsps_bit_rev4r_direct_fc32_ansi(), dsps_bit_rev_lookup_fc32, dsps_fft4r_rev_tables_fc32, dsps_fft4r_rev_tables_fc32_size, and N.
| esp_err_t dsps_cplx2real_fc32_ae32_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
| esp_err_t dsps_cplx2real_fc32_ansi_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
Convert FFT result to complex array for real input data.
Convert FFT result of complex FFT for real input to complex output. This function have to be used if FFT used to process real data. This function use tabels inside and can be used only it dsps_fft4r_init_fc32(...) was called and FFT4 was initialized. The implementation use ANSI C and could be compiled and run on any platform
| [in,out] | data | Input complex array and result of FFT2R/FFT4R. input has size of 2*N, because contains real and imaginary part. result will be stored to the same array. Input1: input[0..N-1] if the result is complex Re[0], Im[0]....Re[N-1], Im[N-1], and input[0...2*n-1] if result is real re[0], re[1],...,re[2*N-1]. |
| [in] | N | Number of complex elements in input array |
| [in] | table | pointer to sin/cos table |
| [in] | table_size | size of the sin/cos table |
Definition at line 218 of file dsps_fft4r_fc32_ansi.c.
References data, dsps_fft4r_initialized, ESP_ERR_DSP_UNINITIALIZED, ESP_OK, fc32_u::im, k, N, and fc32_u::re.
| void dsps_fft4r_deinit_fc32 | ( | void | ) |
deinit fft tables
Free resources of Complex FFT Radix-4. This function delete coefficients table if it was allocated by dsps_fft4r_init_fc32. The implementation use ANSI C and could be compiled and run on any platform
Definition at line 85 of file dsps_fft4r_fc32_ansi.c.
References dsps_fft4r_initialized, dsps_fft4r_mem_allocated, dsps_fft4r_ram_rev_table, dsps_fft4r_rev_tables_init_fc32(), and dsps_fft4r_w_table_fc32.
| esp_err_t dsps_fft4r_fc32_ae32_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
| esp_err_t dsps_fft4r_fc32_aes3_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
| esp_err_t dsps_fft4r_fc32_ansi_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
complex FFT of radix 4
Complex FFT of radix 4 The extension (_ansi) use ANSI C and could be compiled and run on any platform. The extension (_ae32) is optimized for ESP32 chip.
| [in,out] | data | input/output complex array. An elements located: Re[0], Im[0], ... Re[N-1], Im[N-1] result of FFT will be stored to this array. |
| [in] | N | Number of complex elements in input array |
| [in] | table | pointer to sin/cos table |
| [in] | table_size | size of the sin/cos table |
radix 4
Definition at line 141 of file dsps_fft4r_fc32_ansi.c.
References data, dsp_power_of_two(), dsps_fft4r_initialized, ESP_ERR_DSP_INVALID_LENGTH, ESP_ERR_DSP_UNINITIALIZED, ESP_OK, fc32_u::im, k, m, and fc32_u::re.
| esp_err_t dsps_fft4r_fc32_arp4_ | ( | float * | data, |
| int | N, | ||
| float * | table, | ||
| int | table_size ) |
| esp_err_t dsps_fft4r_init_fc32 | ( | float * | fft_table_buff, |
| int | max_fft_size ) |
init fft tables
Initialization of Complex FFT Radix-4. This function initialize coefficients table. The implementation use ANSI C and could be compiled and run on any platform
| [in,out] | fft_table_buff | pointer to floating point buffer where sin/cos table will be stored if this parameter set to NULL, and table_size value is more then 0, then dsps_fft4r_init_fc32 will allocate buffer internally |
| [in] | max_fft_size | maximum fft size. The buffer for sin/cos table that will be used for radix-4 it's four times maximum length of FFT. if fft_table_buff is NULL and table_size is not 0, buffer will be allocated internally. If table_size is 0, buffer will not be allocated. |
Definition at line 34 of file dsps_fft4r_fc32_ansi.c.
References CONFIG_DSP_MAX_FFT_SIZE, dsp_power_of_two(), dsps_fft4r_initialized, dsps_fft4r_mem_allocated, dsps_fft4r_ram_rev_table, dsps_fft4r_rev_tables_fc32, dsps_fft4r_rev_tables_fc32_size, dsps_fft4r_w_table_fc32, dsps_fft4r_w_table_size, ESP_ERR_DSP_PARAM_OUTOFRANGE, ESP_ERR_DSP_REINITIALIZED, ESP_OK, and M_PI.
Referenced by app_main().
| esp_err_t dsps_gen_bitrev4r_table | ( | int | N, |
| int | step, | ||
| char * | name_ext ) |
Definition at line 258 of file dsps_fft4r_fc32_ansi.c.
References dsp_is_power_of_two(), dsp_power_of_two(), ESP_ERR_DSP_INVALID_LENGTH, ESP_LOGD, ESP_OK, N, and TAG.
|
extern |
Definition at line 29 of file dsps_fft4r_fc32_ansi.c.
Referenced by dsps_bit_rev4r_direct_fc32_ansi(), dsps_cplx2real_fc32_ansi_(), dsps_fft4r_deinit_fc32(), dsps_fft4r_fc32_ansi_(), and dsps_fft4r_init_fc32().
|
extern |
|
extern |
Definition at line 27 of file dsps_fft4r_fc32_ansi.c.
Referenced by dsps_fft4r_deinit_fc32(), and dsps_fft4r_init_fc32().
|
extern |
|
extern |
|
extern |
Definition at line 28 of file dsps_fft4r_fc32_ansi.c.
Referenced by dsps_fft4r_init_fc32().