Initializes a multi-rate stream FIR filter state.
IppStatus ippsFIRMRStreamInit_16s(IppsFIRState_16s** ppState, const Ipp16s* pTaps, int tapsLen, int tapsFactor, int upFactor, int upPhase, int downFactor, int downPhase, IppRoundMode rndMode, Ipp8u* pBuffer);
IppStatus ippsFIRMRStreamInit_32f(IppsFIRState_32f** ppState, const Ipp32f* pTaps, int tapsLen, int upFactor, int upPhase, int downFactor, int downPhase, Ipp8u* pBuffer);
pTaps |
Pointer to the array containing the tap values. |
tapsLen |
Number of elements in the array pTaps. |
tapsFactor |
Scale factor for the integer taps. |
downFactor |
Downsampling factor. |
downPhase |
Phase for downsampled signal. |
upFactor |
Upsampling factor. |
upPhase |
Phase for upsampled signal. |
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 stream FIR filter state structure. |
pBuffer |
Pointer to the external buffer for the stream FIR filter state structure. |
The function ippsFIRMRStreamInit is declared in the ipps.h file. This function initializes a state structure for a multi-rate stream FIR filter in the external buffer. The size of this buffer must be computed by calling the function ippsFIRMRStreamGetStateSize beforehand. The initialization function copies the tap values from the tapsLen-length array pTaps into the state structure ppState. To scale integer taps use the tapsFactor value.
The function initializes the state structure ppState of a multi-rate filter; that is, a filter that internally upsamples and/or downsamples using a polyphase filter structure. It initializes the state structure in the same way as described for single-rate filters, but includes additional information about the required upsampling and downsampling parameters.
The parameter upFactor is the factor by which the filtered signal is internally upsampled (see description of the ip psSampleUp function for more details). That is, upFactor-1 zeros are inserted between each sample of input signal.
The parameter upPhase is the parameter which determines where a non-zero sample lies within the upFactor-length block of upsampled input signal.
The parameter downFactor is the factor by which the FIR response obtained by filtering an upsampled input signal is internally downsampled (see description of the function ippsSampleDown for more details). That is, downFactor-1 output samples are discarded from each downFactor-length output block of upsampled filter response.
The parameter downPhase is the parameter which determines where non-discarded sample lies within a block of upsampled filter response.
The parameter rndMode sets the rounding mode that is used by the functions ippsFIR and ippsFIROne.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when pTaps or ppState is NULL. |
ippStsFIRLenErr |
Indicates an error when tapsLen is less than or equal to 0. |
ippStsFIRMRFactorErr |
Indicates an error when upFactor (downFactor) is less than or equal to 0. |
ippStsFIRMRPhaseErr |
Indicates an error when upPhase (downPhase) is negative, or greater than or equal to upFactor (downFactor). |
ippStsRoundModeNotSupportedErr |
Indicates an error when the rndMode has an illegal value. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.