- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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, kernel.size()) };
seems to fix the issue.
Is this the correct way of handling these scenarios ?
Thank you in advance!
Dorian
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, thank you for your issue. Could you please send all code because access violation might happen due to improper buffers allocation

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page