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

Go to the source code of this file.

Functions

esp_err_t dsps_mulc_s16_ansi (const int16_t *input, int16_t *output, int len, int16_t C, int step_in, int step_out)

Function Documentation

◆ dsps_mulc_s16_ansi()

esp_err_t dsps_mulc_s16_ansi ( const int16_t * input,
int16_t * output,
int len,
int16_t C,
int step_in,
int step_out )

Definition at line 17 of file dsps_mulc_s16_ansi.c.

18{
19 if (NULL == input) {
21 }
22 if (NULL == output) {
24 }
25
26 for (int i = 0 ; i < len ; i++) {
27 int32_t acc = (int32_t)input[i * step_in] * (int32_t)C;
28 output[i * step_out] = (int16_t)(acc >> 15);
29 }
30 return ESP_OK;
31}
#define ESP_ERR_DSP_PARAM_OUTOFRANGE
#define ESP_OK
Definition esp_err.h:23
float C[4][16]
Definition test_mmult.c:22

References C, ESP_ERR_DSP_PARAM_OUTOFRANGE, and ESP_OK.