|
ESP-IDF Firmware
Firmware architecture and call graph
|
#include "dsps_fft2r.h"#include "dsp_common.h"#include "dsp_types.h"#include <math.h>#include "esp_attr.h"#include <malloc.h>#include "dsp_tests.h"Go to the source code of this file.
Functions | |
| unsigned short | reverse (unsigned short x, unsigned short N, int order) |
| static int16_t | xtfixed_bf_1 (int16_t a0, int16_t a1, int16_t a2, int16_t a3, int16_t a4, int result_shift) |
| static int16_t | xtfixed_bf_2 (int16_t a0, int16_t a1, int16_t a2, int16_t a3, int16_t a4, int result_shift) |
| static int16_t | xtfixed_bf_3 (int16_t a0, int16_t a1, int16_t a2, int16_t a3, int16_t a4, int result_shift) |
| static int16_t | xtfixed_bf_4 (int16_t a0, int16_t a1, int16_t a2, int16_t a3, int16_t a4, int result_shift) |
| esp_err_t | dsps_fft2r_init_sc16 (int16_t *fft_table_buff, int table_size) |
| void | dsps_fft2r_deinit_sc16 () |
| esp_err_t | dsps_fft2r_sc16_ansi_ (int16_t *data, int N, int16_t *sc_table) |
| static unsigned short | reverse_sc16 (unsigned short x, unsigned short N, int order) |
| esp_err_t | dsps_bit_rev_sc16_ansi (int16_t *data, int N) |
| esp_err_t | dsps_gen_w_r2_sc16 (int16_t *w, int N) |
| esp_err_t | dsps_cplx2reC_sc16 (int16_t *data, int N) |
| esp_err_t | dsps_cplx2real_sc16_ansi (int16_t *data, int N) |
| Convert complex FFT result to real array. | |
Variables | |
| int16_t * | dsps_fft_w_table_sc16 |
| int | dsps_fft_w_table_sc16_size |
| uint8_t | dsps_fft2r_sc16_initialized = 0 |
| uint8_t | dsps_fft2r_sc16_mem_allocated = 0 |
| static const int | add_rount_mult = 0x7fff |
| static const int | mult_shift_const = 0x7fff |
| esp_err_t dsps_bit_rev_sc16_ansi | ( | int16_t * | data, |
| int | N ) |
Definition at line 181 of file dsps_fft2r_sc16_ansi.c.
References data, dsp_is_power_of_two(), ESP_ERR_DSP_INVALID_LENGTH, ESP_OK, k, and N.
Referenced by dsps_fft2r_init_sc16(), microphone_read_task(), and microphone_read_task().
| esp_err_t dsps_cplx2real_sc16_ansi | ( | int16_t * | data, |
| int | N ) |
Convert complex FFT result to real array.
Convert FFT result of complex FFT for resl input to real array. This function have to be used if FFT used to process real data. The implementation use ANSI C and could be compiled and run on any platform
| [in,out] | data | Input complex array and result of FFT2R. 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], Input2: input[N..2*N-1] |
| [in] | N | Number of complex elements in input array |
Definition at line 268 of file dsps_fft2r_sc16_ansi.c.
References data, dsp_power_of_two(), dsps_fft_w_table_sc16, ESP_OK, sc16_u::im, k, N, sc16_u::re, and reverse().
| esp_err_t dsps_cplx2reC_sc16 | ( | int16_t * | data, |
| int | N ) |
Definition at line 227 of file dsps_fft2r_sc16_ansi.c.
References data, sc16_u::data, dsp_is_power_of_two(), ESP_ERR_DSP_INVALID_LENGTH, ESP_OK, sc16_u::im, N, and sc16_u::re.
Referenced by microphone_read_task(), and microphone_read_task().
| void dsps_fft2r_deinit_sc16 | ( | void | ) |
Definition at line 108 of file dsps_fft2r_sc16_ansi.c.
References dsps_fft2r_sc16_initialized, dsps_fft2r_sc16_mem_allocated, and dsps_fft_w_table_sc16.
| esp_err_t dsps_fft2r_init_sc16 | ( | int16_t * | fft_table_buff, |
| int | table_size ) |
Definition at line 70 of file dsps_fft2r_sc16_ansi.c.
References CONFIG_DSP_MAX_FFT_SIZE, dsps_bit_rev_sc16_ansi(), dsps_fft2r_sc16_initialized, dsps_fft2r_sc16_mem_allocated, dsps_fft_w_table_sc16, dsps_fft_w_table_sc16_size, dsps_gen_w_r2_sc16(), ESP_ERR_DSP_PARAM_OUTOFRANGE, ESP_ERR_DSP_REINITIALIZED, ESP_OK, and memalign.
Referenced by microphone_read_task(), and microphone_read_task().
| esp_err_t dsps_fft2r_sc16_ansi_ | ( | int16_t * | data, |
| int | N, | ||
| int16_t * | sc_table ) |
Definition at line 117 of file dsps_fft2r_sc16_ansi.c.
References data, sc16_u::data, dsp_is_power_of_two(), dsps_fft2r_sc16_initialized, ESP_ERR_DSP_INVALID_LENGTH, ESP_ERR_DSP_UNINITIALIZED, ESP_OK, sc16_u::im, m, N, sc16_u::re, xtfixed_bf_1(), xtfixed_bf_2(), xtfixed_bf_3(), and xtfixed_bf_4().
| esp_err_t dsps_gen_w_r2_sc16 | ( | int16_t * | w, |
| int | N ) |
Definition at line 208 of file dsps_fft2r_sc16_ansi.c.
References dsp_is_power_of_two(), ESP_ERR_DSP_INVALID_LENGTH, ESP_OK, M_PI, and N.
Referenced by dsps_fft2r_init_sc16().
| unsigned short reverse | ( | unsigned short | x, |
| unsigned short | N, | ||
| int | order ) |
Definition at line 161 of file dsps_fft2r_fc32_ansi.c.
Referenced by dsps_cplx2real_sc16_ansi().
|
inlinestatic |
Definition at line 170 of file dsps_fft2r_sc16_ansi.c.
|
inlinestatic |
Definition at line 34 of file dsps_fft2r_sc16_ansi.c.
References add_rount_mult, and mult_shift_const.
Referenced by dsps_fft2r_sc16_ansi_().
|
inlinestatic |
Definition at line 43 of file dsps_fft2r_sc16_ansi.c.
References add_rount_mult, and mult_shift_const.
Referenced by dsps_fft2r_sc16_ansi_().
|
inlinestatic |
Definition at line 52 of file dsps_fft2r_sc16_ansi.c.
References add_rount_mult, and mult_shift_const.
Referenced by dsps_fft2r_sc16_ansi_().
|
inlinestatic |
Definition at line 61 of file dsps_fft2r_sc16_ansi.c.
References add_rount_mult, and mult_shift_const.
Referenced by dsps_fft2r_sc16_ansi_().
|
static |
Definition at line 31 of file dsps_fft2r_sc16_ansi.c.
Referenced by xtfixed_bf_1(), xtfixed_bf_2(), xtfixed_bf_3(), and xtfixed_bf_4().
| uint8_t dsps_fft2r_sc16_initialized = 0 |
Definition at line 26 of file dsps_fft2r_sc16_ansi.c.
Referenced by dsps_fft2r_deinit_sc16(), dsps_fft2r_init_sc16(), and dsps_fft2r_sc16_ansi_().
| uint8_t dsps_fft2r_sc16_mem_allocated = 0 |
Definition at line 27 of file dsps_fft2r_sc16_ansi.c.
Referenced by dsps_fft2r_deinit_sc16(), and dsps_fft2r_init_sc16().
| int16_t* dsps_fft_w_table_sc16 |
Definition at line 24 of file dsps_fft2r_sc16_ansi.c.
Referenced by dsps_cplx2real_sc16_ansi(), dsps_fft2r_deinit_sc16(), and dsps_fft2r_init_sc16().
| int dsps_fft_w_table_sc16_size |
Definition at line 25 of file dsps_fft2r_sc16_ansi.c.
Referenced by dsps_fft2r_init_sc16().
|
static |
Definition at line 32 of file dsps_fft2r_sc16_ansi.c.
Referenced by xtfixed_bf_1(), xtfixed_bf_2(), xtfixed_bf_3(), and xtfixed_bf_4().