<?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 Re: problems with ippiFilterGauss_8u_AC4R in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/problems-with-ippiFilterGauss-8u-AC4R/m-p/937487#M17360</link>
    <description>&lt;DIV&gt;Hi, below is answer from our expert, I hope it willhelp&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;
&lt;P&gt;ROI can't be equal image size. User has to provide data outside ROI. Correct usage can be seen from the example below:&lt;/P&gt;
&lt;P&gt;#include "stdio.h"&lt;BR /&gt;#include &lt;IPP.H&gt;&lt;/IPP.H&gt;&lt;/P&gt;
&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; IppStatus s;&lt;BR /&gt; int nWidth = 720;&lt;BR /&gt; int nHeight = 576;&lt;BR /&gt; IppiSize roi;&lt;BR /&gt; Ipp8u *pImage, *pTemp, *pTemp1;&lt;/P&gt;
&lt;P&gt; pImage = ippsMalloc_8u((nWidth+2) * (nHeight+2) * 4);&lt;BR /&gt; pTemp = ippsMalloc_8u((nWidth+2) * (nHeight+2) * 4);&lt;BR /&gt; pTemp1 = ippsMalloc_8u(nWidth * nHeight * 4);&lt;/P&gt;
&lt;P&gt; memset(pImage, 0, nWidth * nHeight * 4);&lt;BR /&gt; memset(pTemp, 0, nWidth * nHeight * 4);&lt;BR /&gt; memset(pTemp1, 0, nWidth * nHeight * 4);&lt;/P&gt;
&lt;P&gt; printf("memset - OK
");&lt;/P&gt;
&lt;P&gt; //really normal data is copied to pImage by memcpy&lt;BR /&gt; //but as example, i think, memset to 0 is OK&lt;BR /&gt; //Using Ipp8u &amp;amp; ippiMalloc_8u_AC4() &lt;BR /&gt; //gives the same result.&lt;/P&gt;
&lt;P&gt; roi.height = nHeight;&lt;BR /&gt; roi.width = nWidth;&lt;/P&gt;
&lt;P&gt; printf("pImage = %x, size = %x
", (int)pImage, nWidth * nHeight * 4 );&lt;BR /&gt; printf("pTemp = %x, size = %x
", (int)pTemp, nWidth * nHeight * 4 );&lt;BR /&gt; printf("pTemp1 = %x, size = %x
", (int)pTemp1, nWidth * nHeight * 4 );&lt;/P&gt;
&lt;P&gt; s = ippiFilterGauss_8u_AC4R(pImage+nWidth*4+1, nWidth * 4, pTemp, nWidth * 4, roi, ippMskSize3x3);&lt;/P&gt;
&lt;P&gt; printf("1-st Gauss - OK
");&lt;/P&gt;
&lt;P&gt;s = ippiFilterGauss_8u_AC4R(pTemp+nWidth*4+1, nWidth * 4, pTemp1, nWidth * 4, roi, ippMskSize3x3);&lt;/P&gt;
&lt;P&gt; printf("2-nd Gauss - OK
");&lt;/P&gt;
&lt;P&gt; ippsFree(pImage);&lt;BR /&gt; ippsFree(pTemp);&lt;BR /&gt; ippsFree(pTemp1);&lt;/P&gt;
&lt;P&gt; return 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 Oct 2004 17:04:05 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2004-10-04T17:04:05Z</dc:date>
    <item>
      <title>problems with ippiFilterGauss_8u_AC4R</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/problems-with-ippiFilterGauss-8u-AC4R/m-p/937486#M17359</link>
      <description>&lt;DIV&gt;Hello.&lt;/DIV&gt;
&lt;DIV&gt;I have such code:&lt;/DIV&gt;
&lt;DIV&gt;IppStatus s;&lt;/DIV&gt;
&lt;DIV&gt;LONG nWidth = 720;&lt;BR /&gt;LONG nHeight = 576;&lt;/DIV&gt;
&lt;DIV&gt;BYTE* pImage = new BYTE[nWidth * nHeight * 4];&lt;BR /&gt;memset(pImage, 0, nWidth * nHeight * 4);&lt;BR /&gt;//really normal data is copied to pImage by memcpy&lt;BR /&gt;//but as example, i think, memset to 0 is OK&lt;BR /&gt;//Using Ipp8u &amp;amp; ippiMalloc_8u_AC4() gives the same result.&lt;BR /&gt;&lt;BR /&gt;BYTE* pTemp = new BYTE[nWidth * nHeight * 4];&lt;/DIV&gt;
&lt;DIV&gt;BYTE* pTemp1 = new BYTE[nWidth * nHeight * 4];&lt;/DIV&gt;
&lt;DIV&gt;IppiSize roi;&lt;BR /&gt;roi.height = nHeight;&lt;BR /&gt;roi.width = nWidth;&lt;/DIV&gt;
&lt;DIV&gt;s = ippiFilterGauss_8u_AC4R(pImage, nWidth * 4, pTemp, nWidth * 4, roi, ippMskSize3x3);&lt;/DIV&gt;
&lt;DIV&gt;s = ippiFilterGauss_8u_AC4R(pTemp, nWidth * 4, pTemp1, nWidth * 4, roi, ippMskSize3x3);&lt;/DIV&gt;
&lt;DIV&gt;after first ippiFilterGauss_8u_AC4R operation everything is OK, but on second ippiFilterGauss_8u_AC4R address access violation happens.&lt;/DIV&gt;
&lt;DIV&gt;If i change nWidth &amp;amp; nHeight to 100 &amp;amp; 100 (value more less then 720) second operation works fine.&lt;/DIV&gt;
&lt;DIV&gt;What's the problem?&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Sep 2004 19:27:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/problems-with-ippiFilterGauss-8u-AC4R/m-p/937486#M17359</guid>
      <dc:creator>kolich</dc:creator>
      <dc:date>2004-09-24T19:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: problems with ippiFilterGauss_8u_AC4R</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/problems-with-ippiFilterGauss-8u-AC4R/m-p/937487#M17360</link>
      <description>&lt;DIV&gt;Hi, below is answer from our expert, I hope it willhelp&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;
&lt;P&gt;ROI can't be equal image size. User has to provide data outside ROI. Correct usage can be seen from the example below:&lt;/P&gt;
&lt;P&gt;#include "stdio.h"&lt;BR /&gt;#include &lt;IPP.H&gt;&lt;/IPP.H&gt;&lt;/P&gt;
&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; IppStatus s;&lt;BR /&gt; int nWidth = 720;&lt;BR /&gt; int nHeight = 576;&lt;BR /&gt; IppiSize roi;&lt;BR /&gt; Ipp8u *pImage, *pTemp, *pTemp1;&lt;/P&gt;
&lt;P&gt; pImage = ippsMalloc_8u((nWidth+2) * (nHeight+2) * 4);&lt;BR /&gt; pTemp = ippsMalloc_8u((nWidth+2) * (nHeight+2) * 4);&lt;BR /&gt; pTemp1 = ippsMalloc_8u(nWidth * nHeight * 4);&lt;/P&gt;
&lt;P&gt; memset(pImage, 0, nWidth * nHeight * 4);&lt;BR /&gt; memset(pTemp, 0, nWidth * nHeight * 4);&lt;BR /&gt; memset(pTemp1, 0, nWidth * nHeight * 4);&lt;/P&gt;
&lt;P&gt; printf("memset - OK
");&lt;/P&gt;
&lt;P&gt; //really normal data is copied to pImage by memcpy&lt;BR /&gt; //but as example, i think, memset to 0 is OK&lt;BR /&gt; //Using Ipp8u &amp;amp; ippiMalloc_8u_AC4() &lt;BR /&gt; //gives the same result.&lt;/P&gt;
&lt;P&gt; roi.height = nHeight;&lt;BR /&gt; roi.width = nWidth;&lt;/P&gt;
&lt;P&gt; printf("pImage = %x, size = %x
", (int)pImage, nWidth * nHeight * 4 );&lt;BR /&gt; printf("pTemp = %x, size = %x
", (int)pTemp, nWidth * nHeight * 4 );&lt;BR /&gt; printf("pTemp1 = %x, size = %x
", (int)pTemp1, nWidth * nHeight * 4 );&lt;/P&gt;
&lt;P&gt; s = ippiFilterGauss_8u_AC4R(pImage+nWidth*4+1, nWidth * 4, pTemp, nWidth * 4, roi, ippMskSize3x3);&lt;/P&gt;
&lt;P&gt; printf("1-st Gauss - OK
");&lt;/P&gt;
&lt;P&gt;s = ippiFilterGauss_8u_AC4R(pTemp+nWidth*4+1, nWidth * 4, pTemp1, nWidth * 4, roi, ippMskSize3x3);&lt;/P&gt;
&lt;P&gt; printf("2-nd Gauss - OK
");&lt;/P&gt;
&lt;P&gt; ippsFree(pImage);&lt;BR /&gt; ippsFree(pTemp);&lt;BR /&gt; ippsFree(pTemp1);&lt;/P&gt;
&lt;P&gt; return 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Oct 2004 17:04:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/problems-with-ippiFilterGauss-8u-AC4R/m-p/937487#M17360</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2004-10-04T17:04:05Z</dc:date>
    </item>
  </channel>
</rss>

