Quantcast
Channel: Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1294

Access violation in ippiWarpBilinear

$
0
0

Hi,

I am getting access violations in ippiWarpBilinear_8u_C1R when run on certain inputs. I am currently testing this with IPP 2018 - Initial Release.

I have boiled it down to this minimal example:

const auto srcSize = IppiSize{ 8439, 54 };
const auto srcRoi = IppiRect{ 2577, 0, 1393, 54 };
const auto srcStep = srcSize.width;
const auto pSrc = ippsMalloc_8u(srcSize.width * srcSize.height);
if (!pSrc)
		throw std::runtime_error("Allocating src failed");

const auto dstSize = IppiSize{ 42, 1386 };
const auto dstRoi = IppiRect{ 0, 0, dstSize.width, dstSize.height };
const auto dstStep = dstSize.width;
const auto pDst = ippsMalloc_8u(dstSize.width * dstSize.height);
if (!pDst)
	throw std::runtime_error("Allocating dst failed");

const double coeffs[2][4] =
{
	{2.06479e-05, -0.00055722, -0.827145, 42.5322},
	{5.86368e-11, 0.995243, -2.34897e-06, -2563.82},
};

int bufferSize = -1;
const auto resultBufferSize = ippiWarpBilinearGetBufferSize(srcSize, srcRoi, dstRoi, ippWarpForward, coeffs, IPPI_INTER_LINEAR, &bufferSize);
if (resultBufferSize != ippStsNoErr)
	throw std::runtime_error("Getting buffer size failed");

const auto pBuffer = ippsMalloc_8u(bufferSize);
if (!pBuffer)
	throw std::runtime_error("Allocating buffer failed");

const auto resultWarp = ippiWarpBilinear_8u_C1R(pSrc, srcSize, srcStep, srcRoi, pDst, dstStep, dstRoi, coeffs, IPPI_INTER_LINEAR, pBuffer);
if (resultWarp != ippStsNoErr)
	throw std::runtime_error("Warp failed");

Am I doing something wrong here?

Best regards,

Troels


Viewing all articles
Browse latest Browse all 1294


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>