21 fir->
d_pos = start_pos;
38#if CONFIG_DSP_OPTIMIZED
42 int32_t *aexx_rounding_buff = (int32_t *)
memalign(16, 2 *
sizeof(int32_t));
46 if (fir->
shift >= 0) {
47 rounding = (rounding >> fir->
shift);
49 rounding = (rounding << (-fir->
shift));
51#if dsps_fird_s16_arp4_enabled
54 int16_t *new_delay_buff = (int16_t *)
memalign(16, (coeffs_len + 8 * 2) *
sizeof(int16_t));
55 for (
int i = 0 ; i < (coeffs_len + 8 * 2) ; i++) {
56 new_delay_buff[i] = 0;
58 fir->
delay = &new_delay_buff[8];
64 aexx_rounding_buff[0] = (int32_t)(rounding);
65 aexx_rounding_buff[1] = (int32_t)((rounding >> 32) & 0xFF);
69#if dsps_fird_s16_aes3_enabled
71 if (fir->
delay == NULL) {
72 int16_t *new_delay_buff = (int16_t *)
memalign(16, coeffs_len *
sizeof(int16_t));
73 fir->
delay = new_delay_buff;
76 if ((
int)fir->
delay & 0xf) {
81 if ((
int)fir->
coeffs & 0xf) {
90 int16_t zero_coeffs = (8 - (fir->
coeffs_len % 8));
91 int16_t new_coeffs_len = fir->
coeffs_len + zero_coeffs;
92 int16_t *aes3_delay_buff = (int16_t *)
memalign(16, new_coeffs_len *
sizeof(int16_t));
93 int16_t *aes3_coeffs_buff = (int16_t *)
memalign(16, new_coeffs_len *
sizeof(int16_t));
96 aes3_coeffs_buff[i] = fir->
coeffs[i];
99 for (
int i = fir->
coeffs_len; i < new_coeffs_len; i++) {
100 aes3_coeffs_buff[i] = 0;
103 fir->
delay = aes3_delay_buff;
104 fir->
coeffs = aes3_coeffs_buff;
esp_err_t dsps_fird_init_s16(fir_s16_t *fir, int16_t *coeffs, int16_t *delay, int16_t coeffs_len, int16_t decim, int16_t start_pos, int16_t shift)
initialize structure for 16 bit Decimation FIR filter Function initialize structure for 16 bit signed...