Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

need help with FIR filter


I tried a simple example and ran valgrind on it.  It reveals memory corruption.  So, I don't understand how to use FIR filter functions.  The complete main program is attached, but the problem occurs just constructing the filter.

I'm using:


boost::shared_ptr<Ipp8u> buf;
IppsFIRState_64f* pState;

if (ippsFIRGetStateSize_64f (coef.getShape()[0], &bufsize) != 0)
  throw std::runtime_error ("fir_double");

buf = boost::shared_ptr<Ipp8u> (new Ipp8u (bufsize*sizeof(double)));
if (ippsFIRInit_64f (&pState, &coef[0], coef.getShape()[0], 0, (Ipp8u*)(buf.get())) != 0)

throw std::runtime_error ("fir_double");

I suspect problem is, who allocated memory for pState?  I didn't.  But nothing in the docs explains this or shows an example.

0 Kudos
0 Replies