IIRInit

Initializes an arbitrary IIR filter state.

Syntax

Case 1: Operation on integer samples

IppStatus ippsIIRInit32s_16s(IppsIIRState32s_16s** ppState, const Ipp32s* pTaps, int order, int tapsFactor, const Ipp32s* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit32s_16s32f(IppsIIRState32s_16s** ppState, const Ipp32f* pTaps, int order, const Ipp32s* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit32f_16s(IppsIIRState32f_16s** ppState, const Ipp32f* pTaps, int order, const Ipp32f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64f_16s(IppsIIRState64f_16s** ppState, const Ipp64f* pTaps, int order, const Ipp64f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64f_32s(IppsIIRState64f_32s** ppState, const Ipp64f* pTaps, int order, const Ipp64f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit32sc_16sc(IppsIIRState32sc_16sc** ppState, const Ipp32sc* pTaps, int order, int tapsFactor, const Ipp32sc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit32sc_16sc32fc(IppsIIRState32sc_16sc** ppState, const Ipp32fc* pTaps, int order, const Ipp32sc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit32fc_16sc(IppsIIRState32fc_16sc** ppState, const Ipp32fc* pTaps, int order, const Ipp32fc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64fc_16sc(IppsIIRState64fc_16sc** ppState, const Ipp64fc* pTaps, int order, const Ipp64fc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64fc_32sc(IppsIIRState64fc_32sc** ppState, const Ipp64fc* pTaps, int order, const Ipp64fc* pDlyLine, Ipp8u* pBuffer);

Case 2: Operation on floating point samples

IppStatus ippsIIRInit_32f(IppsIIRState_32f** ppState, const Ipp32f* pTaps, int order, const Ipp32f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64f_32f(IppsIIRState64f_32f** ppState, const Ipp64f* pTaps, int order, const Ipp64f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit_64f(IppsIIRState_64f** ppState, const Ipp64f* pTaps, int order, const Ipp64f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit_32fc(IppsIIRState_32fc** ppState, const Ipp32fc* pTaps, int order, const Ipp32fc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit64fc_32fc(IppsIIRState64fc_32fc** ppState, const Ipp64fc* pTaps, int order, const Ipp64fc* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsIIRInit_64fc(IppsIIRState_64fc** ppState, const Ipp64fc* pTaps, int order, const Ipp64fc* pDlyLine, Ipp8u* pBuffer);

Parameters

pTaps

Pointer to the array containing the taps. The number of elements in the array is 2*(order+1).

tapsFactor

Scale factor for the taps of integer data type.

order

Order of the IIR filter.

pDlyLine

Pointer to the array containing the delay line values. The number of elements in the array is order.

ppState

Pointer to the pointer to the arbitrary IIR state structure to be created.

pBuffer

Pointer to the external buffer.

Description

The function ippsIIRInit is declared in the ipps.h file. This function initializes an arbitrary IIR filter state in the external buffer. The size of this buffer must be computed previously by calling the function IIRGetStateSize. The initialization functions copy the taps from the array pTaps into the state structure pState. The tapsFactor is used to scale integer tap values. The order-length array pDlyLine specifies the delay line values. If the pointer to the array pDlyLine is not NULL, the array content is copied into the context structure, otherwise the delay values of the state structure are set to 0.

The filter order is defined by the order value which is equal to 0 for zero-order filters. The 2*( order + 1)-length array pTaps specifies the taps arranged in the array as follows:

B0, B1, . . ., Border, A0, A1, . . ., Aorder

A0 ≠ 0

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

The initialization functions with the 32s_32f suffixes called with floating-point taps automatically convert the taps into integer data type.

In all cases the data is converted into integer type with scaling for better precision. Example Using the ippsIIR Function to Filter a Sample shows how to convert floating-point taps into integer data type.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsDivByZeroErr

Indicates an error when A0 is equal to 0.

ippStsIIROrderErr

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

Submit feedback on this help topic

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