FIRStreamInit

Initializes a single-rate stream FIR filter state.

Syntax

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

IppStatus ippsFIRStreamInit_32f(IppsFIRState_32f** ppState, const Ipp32f* pTaps, int tapsLen, Ipp8u* pBuffer);

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.

pBuffer

Pointer to the external buffer for FIR state structure.

Description

The function ippsFIRStreamInit is declared in the ipps.h file. This function initializes a single-rate FIR filter state structure in the external buffer . The size of this buffer must be computed by calling the function ippsFIRStreamGetStateSize beforehand. The initialization function copies the taps from the tapsLen-length array pTaps into the state structure ppState of a single-rate filter. To scale integer taps, use the tapsFactor value.

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

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers 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.