Filters a source vector through an IIR filter.

Syntax

Case 1: Not-in-place operation on integer samples

IppStatus ippsIIR32f_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, IppsIIRState32f_16s* pState, int scaleFactor);

IppStatus ippsIIR64f_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, IppsIIRState64f_16s* pState, int scaleFactor);

IppStatus ippsIIR64f_32s_Sfs(const Ipp32s* pSrc, Ipp32s* pDst, int len, IppsIIRState64f_32s* pState, int scaleFactor);

IppStatus ippsIIR32fc_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, IppsIIRState32fc_16sc* pState, int scaleFactor);

IppStatus ippsIIR64fc_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, IppsIIRState64fc_16sc* pState, int scaleFactor);

IppStatus ippsIIR64fc_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc* pDst, int len, IppsIIRState64fc_32sc* pState, int scaleFactor);

Case 2: Not-in-place operation on floating point samples

IppStatus ippsIIR_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, IppsIIRState_32f* pState);

IppStatus ippsIIR_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, IppsIIRState_64f* pState);

IppStatus ippsIIR64f_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, IppsIIRState64f_32f* pState);

IppStatus ippsIIR_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, IppsIIRState_32fc* pState);

IppStatus ippsIIR_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, IppsIIRState_64fc* pState);

IppStatus ippsIIR64fc_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, IppsIIRState64fc_32fc* pState);

Case 3: In-place operation on integer samples

IppStatus ippsIIR32f_16s_ISfs(Ipp16s* pSrcDst, int len, IppsIIRState32f_16s* pState, int scaleFactor);

IppStatus ippsIIR32fc_16sc_ISfs(Ipp16sc* pSrcDst, int len, IppsIIRState32fc_16sc* pState, int scaleFactor);

IppStatus ippsIIR64f_16s_ISfs(Ipp16s* pSrcDst, int len, IppsIIRState64f_16s* pState, int scaleFactor);

IppStatus ippsIIR64f_32s_ISfs(Ipp32s* pSrcDst, int len, IppsIIRState64f_32s* pState, int scaleFactor);

IppStatus ippsIIR64fc_16sc_ISfs(Ipp16sc* pSrcDst, int len, IppsIIRState64fc_16sc* pState, int scaleFactor);

IppStatus ippsIIR64fc_32sc_ISfs(Ipp32sc* pSrcDst, int len, IppsIIRState64fc_32sc* pState, int scaleFactor);

Case 4: In-place operation on floating point samples

IppStatus ippsIIR_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState_32f* pState);

IppStatus ippsIIR_64f_I(Ipp64f* pSrcDst, int len, IppsIIRState_64f* pState);

IppStatus ippsIIR64f_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState64f_32f* pState);

IppStatus ippsIIR_32fc_I(Ipp32fc* pSrcDst, int len, IppsIIRState_32fc* pState);

IppStatus ippsIIR_64fc_I(Ipp64fc* pSrcDst, int len, IppsIIRState_64fc* pState);

IppStatus ippsIIR64fc_32fc_I(Ipp32fc* pSrcDst, int len, IppsIIRState64fc_32fc* pState);

Case 4: Operation with specified number of vector

IppStatus ippsIIR_32f_P(const Ipp32f** ppSrc, Ipp32f** ppDst, int len, int nChannels, IppsIIRState_32f** ppState);

IppStatus ippsIIR64f_32s_PSfs(const Ipp32s** ppSrc, Ipp32s** ppDst, int len, int nChannels, IppsIIRState64f_32s** ppState, int* pScaleFactor);

IppStatus ippsIIR_32f_IP(Ipp32f** ppSrcDst, int len, int nChannels, IppsIIRState_32f** ppState);

IppStatus ippsIIR64f_32s_IPSfs(Ipp32s** ppSrcDst, int len, int nChannels, IppsIIRState64f_32s** ppState, int* pScaleFactor);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pState

Pointer to the IIR filter state structure.

ppState

Pointer to the array of the pointers to the IIR filter state structures.

pSrc

Pointer to the source vector.

ppSrc

Pointer to the array of pointers to the source vectors.

pDst

Pointer to the destination vector.

ppDst

Pointer to the array of pointers to the destination vector.

pSrcDst

Pointer to the source and destination vector for the in-place operations.

ppSrcDst

Pointer to the array of pointers to the source and destination vectors for the in-place operations.

len

Number of elements of the vector to be filtered.

nChannels

Number of vectors to be filtered.

scaleFactor

Scale factor, refer to Integer Scaling.

pScaleFactor

Pointer to the scale factor.

Description

This function filters len elements of the source vector pSrc or pSrcDst through an IIR filter, and stores the results in pDst or pSrcDst, respectively. The filter parameters are specified in pState.The output of the integer sample is scaled according to scaleFactor and can be saturated.

Do not modify the scaleFactor value unless the state structure is changed.

The filter state must be initialized before calling the function ippsIIR. Specify the number of taps tapsLen, the tap values in pTaps, the delay line values in pDlyLine, and the order or numBq value beforehand.

Function flavors described in the Case 4 filter simultaneously the nChannels source vectors. Each vector must have the len elements and is filtered with its own state structure. These state structures must be initialized beforehand.

Example demonstrates how to use the function ippsIIR to filter a sample. The function ippsConvert_64f32s_Sfs converts floating-point taps into integer data type before calling ippsIIRInitAlloc_32s.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an error when len is less or equal to 0.

ippStsChannelErr

Indicates an error when nChannels is less or equal to 0.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

Example

IIR.c

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.