Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FIRSparseInit

Initializes a sparse FIR filter structure.

Syntax

IppStatus ippsFIRSparseInit_32f(IppsFIRSparseState_32f** ppState, const Ipp32f* pNZTaps, const Ipp32s* pNZTapPos, int nzTapsLen, const Ipp32f* pDlyLine, Ipp8u* pBuffer);

IppStatus ippsFIRSparseInit_32fc(IppsFIRSparseState_32fc** ppState, const Ipp32fc* pNZTaps, const Ipp32s* pNZTapPos, int nzTapsLen, const Ipp32fc* pDlyLine, Ipp8u* pBuffer);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pNZTaps

Pointer to the array containing the non-zero tap values. The number of elements in the array is nzTapsLen.

pNZTapPos

Pointer to the array containing positions of the non-zero tap values. The number of elements in the array is nzTapsLen.

nzTapsLen

Number of elements in the array with non-zero tap values.

pDlyLine

Pointer to the array containing the delay line values.

ppState

Double pointer to the sparse FIR state structure.

pBuffer

Pointer to the external buffer for the sparse FIR state structure.

Description

This function initializes a sparse FIR filter state structure ppState in the external buffer pBuffer. The size of this buffer must be computed previously by calling the function FIRSparseGetStateSize. The initialization function copies the values of filter coefficients from the array pNZTaps containing nzTapsLen non-zero taps and their positions from the array pNZTapPos into the state structure ppState. The array pDlyLine specifies the delay line values. The number of elements in this array is pNZTapPos[nzTapsLen -1]. If the pointer to the array pDlyLine is not NULL, the array contents are copied into the state structure ppState, otherwise the delay line values in the state structure are initialized to 0.

NOTE:

The values of nzTapsLen and pNZTapPos[nzTapsLen -1] must be equal to those specified in the function FIRSparseGetStateSize.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers ppState, pNZTaps, pNZTapPos, or pBuffer is NULL.

ippStsFIRLenErr

Indicates an error if nxTapsLen is less than or equal to 0.

ippStsSparseErr

Indicates an error if positions of the non-zero taps are not in ascending order, or are negative or repetitive.