FIRStreamInitAlloc

Allocates memory and initializes a state structure for the single-rate stream FIR filter.

Syntax

IppStatus ippsFIRStreamInitAlloc_16s(IppsFIRState_16s** ppState, const Ipp16s* pTaps, int tapsLen, int tapsFactor, IppRoundMode rndMode);

IppStatus ippsFIRStreamInitAlloc_32f(IppsFIRState_32f** ppState, const Ipp32f* pTaps, int tapsLen);

Parameters

pTaps

Pointer to the array containing the tap values.

tapsLen

Number of elements in the array pTaps.

tapsFactor

Scale factor for the integer taps.

rndMode

Rounding mode, the following values are possible:

ippRndZero - specifies that floating-point values are truncated toward zero,

ippRndNear - specifies that floating-point values are rounded to the nearest even integer when the fractional part equals 0.5; otherwise they are rounded to the nearest integer,

ippRndFinancial - specifies that floating-point values are rounded down to the nearest integer when the fractional part is less than 0.5, or rounded up to the nearest integer if the fractional part is equal or greater than 0.5.

ppState

Double pointer to the FIR state structure to be created.

Description

The function ippsFIRStreamInitAlloc is declared in the ipps.h file. This function allocates memory and initializes a state structure for a single-rate stream FIR filter. The initialization function copies the tap values from the tapsLen-length array pTaps into the state structure ppState. To scale integer taps use the tapsFactor value.

The parameter rndMode sets the rounding mode that is used by the functions ippsFIR and ippsFIROne.

If the state is not created, the initialization function returns an error status.

Return Values

ippStsNoErr

Indicates no error.

ippStsMemAllocErr

Indicates an error when no memory is allocated.

ippStsNullPtrErr

Indicates an error when pTaps or ppState is NULL.

ippStsFIRLenErr

Indicates an error when tapsLen is less than or equal to 0.

ippStsRoundModeNotSupportedErr

Indicates an error when the rndMode has an illegal value.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.