<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thanks a lot for the in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167173#M26790</link>
    <description>Thanks a lot for the reproducer. I'll check this and will back to you.

Best regards,
Tatyana</description>
    <pubDate>Fri, 30 Nov 2018 11:13:22 GMT</pubDate>
    <dc:creator>Tatyana_B_Intel</dc:creator>
    <dc:date>2018-11-30T11:13:22Z</dc:date>
    <item>
      <title>Heap corruption in ippiWarpPerspectiveLinear_8u_C1R</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167167#M26784</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;It seems the ipp 2018.3.210 contains a bug in the&amp;nbsp;ippiWarpPerspectiveLinear_8u_C1R function.&lt;/P&gt;&lt;P&gt;The following sequence of code generates exception (Unhandled exception at 0x776DE9A3 (ntdll.dll) in blabla.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77714270).) after last function call (all params are correct and the resulting image is also ok):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:cpp;"&gt;	int specSize, buffSize;
	ippCheck(ippiWarpQuadGetSize(
		IppiSize(src.size()), srcQuad,
		IppiSize(dst.size()), dstQuad,
		ippWarpPerspective, ipp8u, ippLinear, ippBorderTransp,
		&amp;amp;specSize, &amp;amp;buffSize));

	IppBuff&amp;lt;IppiWarpSpec&amp;gt; spec(specSize);
	ippCheck(ippiWarpQuadLinearInit(
		IppiSize(src.size()), srcQuad,
		IppiSize(dst.size()), dstQuad,
		ippWarpPerspective, ipp8u, 1, ippBorderTransp, 0, 0,
		spec.ptr()));
	
	IppBuff&amp;lt;Ipp8u&amp;gt; buffer(buffSize);
	ippCheck(ippiWarpPerspectiveLinear_8u_C1R(
		src.ptr(), (int)src.step,
		dst.ptr(), (int)dst.step, IppiPoint(), IppiSize(dst.size()),
		spec.ptr(), buffer.ptr()));
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 10:24:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167167#M26784</guid>
      <dc:creator>Aleksandr_B_</dc:creator>
      <dc:date>2018-11-29T10:24:07Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167168#M26785</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thank for the report, will investigate and report about results.&lt;/P&gt;&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 10:57:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167168#M26785</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2018-11-29T10:57:25Z</dc:date>
    </item>
    <item>
      <title>update:</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167169#M26786</link>
      <description>&lt;P&gt;update:&lt;/P&gt;&lt;P&gt;I use 32 bit&amp;nbsp;static libraries.&lt;/P&gt;&lt;P&gt;I've checked versions 2017.1.143 and 2017.4.210 - all the same.&lt;/P&gt;&lt;P&gt;ippiWarpAffineLinear_8u_C1R works fine.&lt;/P&gt;&lt;P&gt;OS Windows 7 (x64), Visual Studio&amp;nbsp;2015.&lt;/P&gt;&lt;P&gt;P.S. IppBuff&amp;lt;&amp;gt; is my wrapper around ippMalloc / ippFree; ippCheck() just checks the function return values.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 14:06:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167169#M26786</guid>
      <dc:creator>Aleksandr_B_</dc:creator>
      <dc:date>2018-11-29T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Hi Alexander,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167170#M26787</link>
      <description>&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;Could you please provide the simple reproducer with actual parameters values? Or at least image sizes.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tatyana&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 14:16:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167170#M26787</guid>
      <dc:creator>Tatyana_B_Intel</dc:creator>
      <dc:date>2018-11-29T14:16:12Z</dc:date>
    </item>
    <item>
      <title>source image size: 438 x 270</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167171#M26788</link>
      <description>&lt;P&gt;source image size: 438 x 270&lt;/P&gt;&lt;P&gt;destination image size: 768 x 160&lt;/P&gt;&lt;P&gt;source quadrangle is convex and about&amp;nbsp; 270 x 100 inside source image&lt;/P&gt;&lt;P&gt;destination quadrangle is the whole destination image.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 16:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167171#M26788</guid>
      <dc:creator>Aleksandr_B_</dc:creator>
      <dc:date>2018-11-29T16:06:00Z</dc:date>
    </item>
    <item>
      <title>ok,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167172#M26789</link>
      <description>&lt;P&gt;ok,&lt;/P&gt;&lt;P&gt;I've added a couple of lines and made up VS2015 solution reproducing the bug (see attachment)&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 09:00:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167172#M26789</guid>
      <dc:creator>Aleksandr_B_</dc:creator>
      <dc:date>2018-11-30T09:00:25Z</dc:date>
    </item>
    <item>
      <title>Thanks a lot for the</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167173#M26790</link>
      <description>Thanks a lot for the reproducer. I'll check this and will back to you.

Best regards,
Tatyana</description>
      <pubDate>Fri, 30 Nov 2018 11:13:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167173#M26790</guid>
      <dc:creator>Tatyana_B_Intel</dc:creator>
      <dc:date>2018-11-30T11:13:22Z</dc:date>
    </item>
    <item>
      <title>Alexander,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167174#M26791</link>
      <description>&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;I've checked your reproducer and found that you missed&amp;nbsp;ippiWarpGetBufferSize usage for defining the size of buffer for&amp;nbsp;ippiWarpPerspectiveLinear_8u_C1R.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see an example here:&amp;nbsp;https://software.intel.com/en-us/ipp-dev-reference-warpquadnearestinit-sample&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the documentation for ippiWarpPerspectiveLinear&amp;nbsp;https://software.intel.com/en-us/ipp-dev-reference-warpperspectivelinear&lt;/P&gt;&lt;P&gt;Also please find the fixed version of your example:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;ipp.h&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;Windows.h&amp;gt;


class HeapChecker
{
private:
	void check() const {_heapchk();}

public:
	explicit HeapChecker() {check();}
	~HeapChecker() {check();}
};


int main()
{
	const int srcW = 438, srcH = 270, dstW = 768, dstH = 160;
	std::vector&amp;lt;Ipp8u&amp;gt; src(srcW * srcH);
	std::vector&amp;lt;Ipp8u&amp;gt; dst(dstW * dstH);

	double srcQuad[4][2] = {{82., 140.}, {355., 134.}, {352., 221.}, {82., 218.}};
	double dstQuad[4][2] = {{0., 0.}, {767., 0.}, {767., 159.}, {0., 159.}};
	IppStatus sts = ippStsNoErr;

	int specSize, buffSize;
	sts = ippiWarpQuadGetSize(
		IppiSize{srcW, srcH}, srcQuad,
		IppiSize{dstW, dstH}, dstQuad,
		ippWarpPerspective, ipp8u, ippLinear, ippBorderTransp,
		&amp;amp;specSize, &amp;amp;buffSize);

	IppiWarpSpec *spec = (IppiWarpSpec*)ippsMalloc_8u(specSize);
	sts = ippiWarpQuadLinearInit(
		IppiSize{srcW, srcH}, srcQuad,
		IppiSize{dstW, dstH}, dstQuad,
		ippWarpPerspective, ipp8u, 1, ippBorderTransp, 0, 0,
		spec);

	sts = ippiWarpGetBufferSize(spec, IppiSize{ dstW, dstH }, &amp;amp;buffSize);

	Ipp8u *buffer = ippsMalloc_8u(buffSize);
	{
		HeapChecker heap_checker;

		sts = ippiWarpPerspectiveLinear_8u_C1R(
			src.data(), srcW,
			dst.data(), dstW, IppiPoint(), IppiSize{dstW, dstH},
			spec, buffer);
	}

	std::cout &amp;lt;&amp;lt; "I'm happy if you see this";

	ippFree(spec);
	ippFree(buffer);
}&lt;/PRE&gt;

&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Tatyana&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 13:17:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167174#M26791</guid>
      <dc:creator>Tatyana_B_Intel</dc:creator>
      <dc:date>2018-11-30T13:17:11Z</dc:date>
    </item>
    <item>
      <title>Thank very much you for your</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167175#M26792</link>
      <description>&lt;P&gt;Thank very much you for your assistance.&lt;/P&gt;&lt;P&gt;Yes, it was my fault.&lt;/P&gt;&lt;P&gt;P.S. In my defence I'd like to say that the functions call logic seems to me rather weird: why do we need to submit &amp;amp;buffSize at the ippiWarpQuadGetSize function call if the real buffer size is calculated by another function - ippiWarpGetBufferSize ?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:37:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167175#M26792</guid>
      <dc:creator>Aleksandr_B_</dc:creator>
      <dc:date>2018-11-30T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Alexander,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167176#M26793</link>
      <description>&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;ippiWarpQuadGetSize calculates buffer size for Init functions. In case of Linear interpolation additional buffer is not required. But in case of Cubic one you can see the last parameter - Init Buffer (https://software.intel.com/en-us/ipp-dev-reference-warpperspectivecubicinit).&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it was introduced 1 API to cover&amp;nbsp;all possible cases of interpolations.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tatyana&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 08:31:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Heap-corruption-in-ippiWarpPerspectiveLinear-8u-C1R/m-p/1167176#M26793</guid>
      <dc:creator>Tatyana_B_Intel</dc:creator>
      <dc:date>2018-12-03T08:31:04Z</dc:date>
    </item>
  </channel>
</rss>

