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

Does IPP support partitioned convolution for real time FIR processing

Keith_W_
Beginner
393 Views

I've looked through the documentation and it's not clear if IPP can process a FIR using partitioned FFT convolution for use in real time applications. All the example seem to be for offline use. The streaming FIR example seems to be very slow for a FIR with 32K taps compared to partitioned FFT convolution when the sample buffer is around 128 on each call.

0 Kudos
2 Replies
Andrey_B_Intel
Employee
393 Views

Hi Keith.

What IPP FIR function do you use? If it is ippsFIRSR_32f then you should pass algType=ippAlgFFT to ippsFIRSRInit_32f function to check FFT based performance.

Also could  you please provide a reproducer, i.e. small example how you call IPP functions?

0 Kudos
Keith_W_
Beginner
393 Views

Hi, here's the code I'm using. Note that IppBuffer8u and IppBuffer64f are smart pointers that I wrote to wrap the allocation of Ipp8u* and Ipp64f* buffers. The size of my FIR was 32,768 taps. I'm calling Filter passing around 100 samples at a time.

class IppFir64f final
{
private:
	using Specification = IppsFIRSpec_64f;

	IppBuffer8u _specification;
	IppBuffer64f _fir, _sourceDelay, _targetDelay;
	IppBuffer8u _workspace;
	int _size;

public:
	IppFir64f(double* fir, int size) :
		_size{ size },
		_sourceDelay{ size },
		_targetDelay{ size }
	{
		int specificationSize;
		int workspaceSize;

		_fir = IppBuffer64f(fir, size);

		ippsFIRSRGetSize(size, IppDataType::ipp64f, &specificationSize, &workspaceSize);

		_specification = IppBuffer8u(specificationSize);
		_workspace = IppBuffer8u(workspaceSize);

		ippsFIRSRInit_64f(_fir, size, IppAlgType::ippAlgFFT, _specification.Cast<Specification>());

		_sourceDelay.Fill(0);
	}

	void Filter(double *input, double* output, int size)
	{
		using std::swap;

		ippsFIRSR_64f(input, output, size, _specification.Cast<Specification>(), _sourceDelay, _targetDelay, _workspace);

		swap(_sourceDelay, _targetDelay);
	}
};

 

0 Kudos
Reply