1.4.2.84 DSP_VectorMulc16 Function
Multiplication of a series of numbers in one vector to a scalar value.
Description
void DSP_VectorMulc16(int16_t *outdata, int16_t *indata, int16_t c, int N);
Multiples the value of each element of indata1 * c and stores it to outdata. The number of samples to process is given by the parameter N. Data is in a Q15 fractional format.
outdata filled with N elements of indata * c
Preconditions
The pointers outdata and indata must be aligned on 4-byte boundaries. N must be greater than or equal to eight and a multiple of eight.
Parameters
outdata pointer to output array of 16-bit elements (int16_t)
indata pointer to input array of 16-bit elements (int16_t)
c scalar multiplicand (int16_t)
N number of samples (int)
Returns
None.
Remarks
This must be assembled with .set microMIPS.
Example
int16_t *pOutdata; int16_t outVal[8]; int16_t inBufMultA[8]={0x7FFF, 0x8000, 0x7333, 0x6666, 0x1999, 0x4000, 0x0000, 0xB334}; _// 1, -1, 0.9, 0.8, 0.2, 0.5, 0, -0.6_ int16_t constValue = 0x4000; int Num = 8; pOutdata = &outVal; DSP_VectorMulc16(pOutdata, inBufMultA, constValue, Num); _// outVal[i] = inBufTest[i] * constValue =_ _// {0x4000, 0xC000, 0x399A, 0x3333, 0x1999, 0x2000, 0x0000, 0xD99A}_ _// 0.5, -0.5, 0.45, 0.4, 0.1, 0.25, 0, -0.3_
C
void DSP_VectorMulc16 (int16_t * outdata , int16_t * indata , int16_t c , int N );