1.4.2.85 DSP_VectorMulc32 Function

Multiplication of a series of numbers in one vector to a scalar value.

Description

void DSP_VectorMulc32(int32_t *outdata, int32_t *indata, int32_t c, int N);

Multiples the value of each element of indata * c and stores it to outdata. The number of samples to process is given by the parameter N. Data is in a Q31 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 four and a multiple of four.

Parameters

outdata pointer to output array of 16-bit elements (int32_t)

indata pointer to input array of 16-bit elements (int32_t)

c scalar multiplicand (int32_t)

N number of samples (int)

Returns

None.

Remarks

This must be assembled with .set microMIPS.

Example

int16_t *pOutdata;

int32_t outVal[8];

int32_t inBufMultA[8]={0x7FFFFFFF, 0x80000000, 0x73333333, 0x66666666,

0x19999999, 0x40000000, 0x00000000, 0xB3333334};

_// 1, -1, 0.9, 0.8, 0.2, 0.5, 1, -0.6_

int32_t constValue = 0x4000;

int Num = 8;

pOutdata = &outVal;

DSP_VectorMulc32(pOutdata, inBufMultA, constValue, Num);

_// outVal[i] = inBufTest[i] * constValue =_

_// {0x40000000, 0xC0000000, 0x3999999A, 0x33333333, 0x19999999,_

_// 0x20000000, 0x00000000, 0xD999999A}_

_// 0.5, -0.5, 0.45, 0.4, 0.1, 0.25, 0, -0.3_

C

void  DSP_VectorMulc32 (int32_t * outdata , int32_t * indata , int32_t c , int  N );