Closed herculanodavi closed 11 months ago
git describe --tags
xtensa-esp32-elf-gcc --version
The dsps_fird_s16_aes3 function does not show the same results as the dsps_fird_s16_ansi given the same parameters.
dsps_fird_s16_aes3
dsps_fird_s16_ansi
This code
fir_s16_t handle; alignas(16) int16_t coeffs[1] = {1}; alignas(16) int16_t delay[1] = {0}; int16_t coeffs_len = 1; int16_t decimation = 2; dsps_fird_init_s16(&handle, coeffs, delay, coeffs_len, decimation, 0, 15); alignas(16) int16_t input[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; alignas(16) int16_t output[5] = {0, 0, 0, 0, 0}; dsps_fird_s16(&fir_handle.handle, input, output, 5);
should have the result {1, 3, 5, 7, 9} independently of the flag CONFIG_DSP_OPTIMIZED.
{1, 3, 5, 7, 9}
CONFIG_DSP_OPTIMIZED
When CONFIG_DSP_OPTIMIZED is enabled, the function chosen when calling dsps_fird_s16 is dsps_fird_s16_aes3, and the resulting output is `
dsps_fird_s16
Run the code below.
int16_t coeffs_len = 1; int16_t decimation = 2; fir_s16_t handle_ansi; alignas(16) int16_t delay_ansi[1] = {0}; fir_s16_t handle_s3; alignas(16) int16_t delay_s3[1] = {0}; alignas(16) int16_t coeffs[1] = {1}; dsps_fird_init_s16(&handle_ansi, coeffs, delay, coeffs_len, decimation, 0, 15); dsps_fird_init_s16(&handle_s3, coeffs, delay, coeffs_len, decimation, 0, 15); alignas(16) int16_t input[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; alignas(16) int16_t output_ansi[5] = {0, 0, 0, 0, 0}; alignas(16) int16_t output_s3[5] = {0, 0, 0, 0, 0}; dsps_fird_s16_ansi(&fir_handle.handle, input, output_ansi, 5); dsps_fird_s16_aes3(&fir_handle.handle, input, output_s3, 5); for(int i = 0; i < 5; i++) { assert(output_ansi[i] == output_s3[i]); }
@herculanodavi thank you for the issue, we will look.
Hi @herculanodavi,
We have fix the issue in the last releases. Please take a look.
Thank you, Dmitry
Environment
git describe --tags
to find it): v4.4.3xtensa-esp32-elf-gcc --version
to find it): 8.4.0Problem Description
The
dsps_fird_s16_aes3
function does not show the same results as thedsps_fird_s16_ansi
given the same parameters.Expected Behavior
This code
should have the result
{1, 3, 5, 7, 9}
independently of the flagCONFIG_DSP_OPTIMIZED
.Actual Behavior
When
CONFIG_DSP_OPTIMIZED
is enabled, the function chosen when callingdsps_fird_s16
isdsps_fird_s16_aes3
, and the resulting output is `Steps to repropduce
Run the code below.
Code to reproduce this issue