Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Access violation in ippiFilterSeparable

Stoica__Dorian
Beginner
112 Views

Hi,

I'm getting an access violation in ippiFilterSeparable in the following scenario: imageSize = (5,2), kernelSize = (9,9). Below is the code section :

	IppiSize kernelSize{ 9,9 };
	IppDataType dataType = IppDataType::ipp16s;
	IppDataType kernelDataType = IppDataType::ipp16s;
	IppiSizeL roiSize = {srcSize.width,srcSize.height};

	int srcStep = srcSize.width * sizeof(uint8_t); //  width = 5
	int dstStep = dstSize.width * sizeof(uint8_t); //width=5

	int specSize = 0;
	IppSizeL bufferSize = 0;
	ippiFilterSeparableGetBufferSize_L(roiSize, kernelSize, dataType, kernelDataType, 1 /*channels*/, &bufferSize);
	ippiFilterSeparableGetSpecSize_L(kernelSize, dataType, 1 /*channels*/, &specSize);

   //allocate pBuffer and pSpec buffers using bufferSize and specSize
   //....

    //kernel is a vector with 9 elements
	ippiFilterSeparableInit_16s_L(kernel.data(), kernel.data(), kernelSize, 1, 0, dataType, 1 /*channels*/, pSpec.getBuffer());
	result = ippiFilterSeparable_8u_C1R_L(pSrc, srcStep, pDst, dstStep, roiSize, IppiBorderType::ippBorderRepl, 0, pSpec.getBuffer(), pBuffer.getBuffer());

 

Actually the same thing is hapenning for kernels of size bigger than (3,3). This doesn't happen if the image has size (2,5) (instead of (5,2)).

Also, setting the roiSize in the following way :

	IppiSizeL roiSize = { srcSize.width , std::max<int>(srcSize.height, static_cast<int>(kernel.size())) };

seems to fix the issue. 

Is this the correct way of handling these scenarios ?

Thank you in advance!

Dorian

 

 

0 Kudos
2 Replies
Ruqiu_C_Intel
Employee
112 Views

Hello Dorian,

Thanks for raising the issue! Would you mind provide your whole sample code? Then we can reproduce it and send the feedback to you.

Best Regards,

Ruqiu

Pavel_B_Intel1
Employee
112 Views

Hello Dorian,

we found a bug in the algorithm implementation. We will fix it in one of the future IPP releases. Thank you for the bug reporting. I'm sorry for the issue.

Pavel

Reply