Community
cancel
Showing results for 
Search instead for 
Did you mean: 
poozir
Beginner
66 Views

"ippsFIR_32f_I" returns negative values, although neither taps nor the input are negative

Hello,

I recognize negative values after filtering with "ippsFIR_32f_I", although neither my taps (feed forward coefficients) nor the input vector are negative.
How is this possible?

Here is my code snippet, which reproduces this strange behaviour.
Note: If changing "iNumIters" to a smaller value, this behaviour does not occur anymore.

[cpp]		// initializations and declarations
		IppStatus			IppStatus; 
		IppsFIRState_32f*	pState;
		int					NFilt	= 4096;
		
		std::vector	b(NFilt, 1.0f/NFilt);			// Feed forward coefficients (taps)
		std::vector	bCheck(NFilt, 0.0f);			// vector to check coefficients
		std::vector	delayLine(NFilt,0.0f);			// initial condition
		std::vector	delayLineCheck(NFilt,0.0f);		// vector to check final condition
		std::vector	x(NFilt+1024, 0.0f);			// input signal
		for (int k=2; k = k / (float)x.size();

		int	iNumIters = NFilt + 512;

		// process filtering
		IppStatus = ippsFIRInitAlloc_32f(&pState, &b[0], NFilt, &delayLine[0]);
		IppStatus = ippsFIRGetDlyLine_32f(pState, &delayLineCheck[0]);
		IppStatus = ippsFIRGetTaps_32f(pState, &bCheck[0]);
		IppStatus = ippsFIR_32f_I(&x[0], iNumIters, pState);					// second element becomes negative. Why?
		IppStatus = ippsFIRGetDlyLine_32f(pState, &delayLineCheck[0]);
		IppStatus = ippsFIRGetTaps_32f(pState, &bCheck[0]);
		IppStatus = ippsFIRFree_32f(pState);
[/cpp]

IPP Version: 6.0.0.61
I would be very thankful for any help.
Sincerely yours
0 Kudos
1 Reply
poozir
Beginner
66 Views

Noone any idea, what could be wrong?
Reply