ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dsps_add_s16_ansi.c File Reference
#include "dsps_add.h"
Include dependency graph for dsps_add_s16_ansi.c:

Go to the source code of this file.

Functions

esp_err_t dsps_add_s16_ansi (const int16_t *input1, const int16_t *input2, int16_t *output, int len, int step1, int step2, int step_out, int shift)

Function Documentation

◆ dsps_add_s16_ansi()

esp_err_t dsps_add_s16_ansi ( const int16_t * input1,
const int16_t * input2,
int16_t * output,
int len,
int step1,
int step2,
int step_out,
int shift )

Definition at line 10 of file dsps_add_s16_ansi.c.

11{
12 if (NULL == input1) {
14 }
15 if (NULL == input2) {
17 }
18 if (NULL == output) {
20 }
21
22 for (int i = 0 ; i < len ; i++) {
23 int32_t acc = (int32_t)input1[i * step1] + (int32_t)input2[i * step2];
24 output[i * step_out] = acc >> shift;
25 }
26 return ESP_OK;
27}
#define ESP_ERR_DSP_PARAM_OUTOFRANGE
#define ESP_OK
Definition esp_err.h:23

References ESP_ERR_DSP_PARAM_OUTOFRANGE, and ESP_OK.