FIROne

Filters a single sample through a FIR filter.

Syntax

Case 1: Integer sample

IppStatus ippsFIROne_16s_Sfs(Ipp16s src, Ipp16s* pDstVal, IppsFIRStates_16s* pState, int scaleFactor);

IppStatus ippsFIROne_32s_Sfs(Ipp32s src, Ipp32s* pDstVal, IppsFIRStates_32s* pState, int scaleFactor);

IppStatus ippsFIROne32s_16s_Sfs(Ipp16s src, Ipp16s* pDstVal, IppsFIRState32s_16s* pState, int scaleFactor);

IppStatus ippsFIROne32f_16s_Sfs(Ipp16s src, Ipp16s* pDstVal, IppsFIRState32f_16s* pState, int scaleFactor);

IppStatus ippsFIROne64f_16s_Sfs(Ipp16s src, Ipp16s* pDstVal, IppsFIRState64f_16s* pState, int scaleFactor);

IppStatus ippsFIROne64f_32s_Sfs(Ipp32s src, Ipp32s* pDstVal, IppsFIRState64f_32s* pState, int scaleFactor);

IppStatus ippsFIROne32sc_16sc_Sfs(Ipp16sc src, Ipp16sc* pDstVal, IppsFIRState32sc_16sc* pState, int scaleFactor);

IppStatus ippsFIROne32fc_16sc_Sfs(Ipp16sc src, Ipp16sc* pDstVal, IppsFIRState32fc_16sc* pState, int scaleFactor);

IppStatus ippsFIROne64fc_16sc_Sfs(Ipp16sc src, Ipp16sc* pDstVal, IppsFIRState64fc_16sc* pState, int scaleFactor);

IppStatus ippsFIROne64fc_32sc_Sfs(Ipp32sc src, Ipp32sc* pDstVal, IppsFIRState64fc_32sc* pState, int scaleFactor);

Case 2: Floating point sample

IppStatus ippsFIROne_32f(Ipp32f src, Ipp32f* pDstVal, IppsFIRState_32f* pState);

IppStatus ippsFIROne_64f(Ipp64f src, Ipp64f* pDstVal, IppsFIRState_64f* pState);

IppStatus ippsFIROne64f_32f(Ipp32f src, Ipp32f* pDstVal, IppsFIRState64f_32f* pState);

IppStatus ippsFIROne_32fc(Ipp32fc src, Ipp32fc* pDstVal, IppsFIRState_32fc* pState);

IppStatus ippsFIROne_64fc(Ipp64fc src, Ipp64fc* pDstVal, IppsFIRState_64fc* pState);

IppStatus ippsFIROne64fc_32fc(Ipp32fc src, Ipp32fc* pDstVal, IppsFIRState64fc_32fc* pState);

Parameters

pState

Pointer to the FIR filter state structure.

src

Input sample.

pDstVal

Pointer to the output sample.

scaleFactor

Scale factor, refer to Integer Scaling.

Description

The function ippsFIROne is declared in the ipps.h file. This function filters a single sample src through a single-rate filter and stores the result in pDstVal. The filter parameters are specified in pState. The output of the integer sample is scaled according to scaleFactor and can be saturated. In the following definition of the FIR filter, the sample to be filtered is denoted x(n) and the taps are denoted h(i).

The return value y(n) is defined by the formula for a single-rate filter:



Before calling ippsFIROne, initialize the corresponding filter state by calling ippsFIRInitAlloc. Specify the number of taps tapsLen, the tap values in pTaps, and the delay line values in pDlyLine beforehand.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

Submit feedback on this help topic

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