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

Access violation in ippiFilterSeparable

Stoica__Dorian
Principiante
1.042 Vistas

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 Respuestas
Ruqiu_C_Intel
Moderador
1.042 Vistas

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
Empleados
1.042 Vistas

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

Responder