Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Problems with the FIRMR Ffnction

gregorio_chindamo
217 Views
Hi all,

I am trying to perform a Mutirate Filtering using the IPP funtions in order to speed up clculation time.

Unfortunately I am not obtaining the expected output result.

Following I have attached the piece of code of interest. I would be gratefull if somebody could give me a hint.

-----------------------------------------------------
IppStatus status;
status = ippInit();
IppsFIRState_32f *pStateI;
Ipp32f *pDlyLine = new Ipp32f[(tapsLen+upFactor-1)/upFactor]; //Ipp32f *pDlyLine = NULL not
working; tapsLen=63;upFactor=625;
memset(pDlyLine, 0, sizeof(Ipp32f)*((tapsLen+upFactor-1)/upFactor));
int numIters = uSampleLength/downFactor;
//uSampleLenght is the lenght of input array = 4608; downFactor=192;
status = ippsFIRMRInitAlloc_32f(&pStateI, pTaps, tapsLen, upFactor, upPhase, downFactor, downPhase, pDlyLine); //down and up phases are equal to 0;
status = ippsFIRMR_Direct_32f(pInISample, fIBufferRes, numIters, pTaps, tapsLen, upFactor, upPhase, downFactor, downPhase, pDlyLine);//fIBufferRes is the output buffer of lenght 15000;
status = ippsFIRFree_32f(pStateI);

Thanks you in advance.

Gregorio

0 Kudos
1 Reply
igorastakhov
New Contributor II
217 Views
Hi Gregorio,

you mixed up 2 functionalities:
FIR and FIR_Direct
Use the first one as the second is just a wrapper for the first.
So first of all call
ippsFIRMRInitAlloc and initialize MultiRate FIR state structure
then call
ippsFIR (it has 2 path - for single rate and for multi-rate - depends on context (state structure))
then call
ippsFIRFree

and delay line pointer may be NULL if you use right function flow

Regards,
Igor
0 Kudos
Reply