1.4.2.35 DSP_TransformWindow_Black16 Function

Perform a Blackman window on a vector.

Description

void DSP_TransformWindow_Black16(int16_t *OutVector, int16_t *InVector, int N);

Compute a Blackman Window on the first N samples of the input vector, InVector. The output is stored in OutVector. Operations are performed at higher resolution and rounded for the most accuracy possible. Input and output values are in Q15 fractional format. The Blackman Window follows the equation:

Window(n) = 0.42659 - 0.49656 * COS(2Pin/(N-1)) + 0.076849 * COS(4Pin/(N-1)) where n is the window sample number, N is the total number of samples

The functional output computes WinVector(n) = Window(n) * InVector(n)

Preconditions

N must be a positive number. OutWindow must be declared with N elements or larger.

Parameters

OutWindow pointer to output array of elements (int16_t)

N number of samples (int)

Returns

None.

Remarks

This function is performed in C. The function may be optimized for the library. It is dependent on the floating point math library.

Example

int16_t OutVector16[8]={0};

int WindowN = 8;

for (i=0;i<WindowN;i++)

{

InVector16[i]= 0x4000; _// constant 0.5 for functional testing_

}

DSP_TransformWindow_Black16(OutVector16, InVector16, WindowN);

_// OutWindow = 0x0071, 0x0665, 0x1DF1, 0x3B00, 0x3B00, 0x1DF1, 0x0665, 0x0071_

C

void  DSP_TransformWindow_Black16 (int16_t * OutVector , int16_t * InVector , int  N );