31.5.5 mips_vec_addc16

Description

Adds the Q15 constant c to all elements of indata. The number of samples to be processed is given by the parameter N.

Mathematically,

outdata[n] = indata[n]+c

Include

dsplib_dsp.h

Prototype

void
mips_vec_addc16
(
       int16 *outdata,
       int16 *indata,
       int16 c,
       int N
);

Argument

outdata: Output array of 16-bit fixed-point elements in Q15 format.

indata: Input array with 16-bit fixed-point elements in Q15 format.

c: Constant added to all elements of the vector.

N: Number of samples.

Return Value

None.

Remarks

  • The pointers outdata and indata must be aligned on 4-byte boundaries.
  • N must be larger than or equal to 4 and a multiple of 4.