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

Go to the source code of this file.

Functions

esp_err_t dsps_sub_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_sub_s16_ansi()

esp_err_t dsps_sub_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 9 of file dsps_sub_s16_ansi.c.

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

References ESP_ERR_DSP_PARAM_OUTOFRANGE, and ESP_OK.