<?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 Hi Ying, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109197#M25379</link>
    <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thank you for the prompt response. As mentioned in my updates, the problem no longer reside on&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;ippiCopy_8u_C1R but actually on&amp;nbsp;ippiMalloc_&amp;lt;mod&amp;gt;, although there are some other functions that still causes pixel variances, but one problem at a time.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Here's a small example:&lt;BR /&gt;
	&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;int src_tempPitch = 0;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;Ipp8u* src_temp = ippiMalloc_8u_C1(1089, 1089, &amp;amp;src_tempPitch);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;When IPP7 ran the code above, the&amp;nbsp;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px;"&gt;src_tempPitch&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I'll be getting will be 1120, where as IPP9 returned me 1152 instead. Was it intended?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2016 09:00:17 GMT</pubDate>
    <dc:creator>Wan__John</dc:creator>
    <dc:date>2016-12-13T09:00:17Z</dc:date>
    <item>
      <title>Pixel variance between IPP7 vs IPP9 using ippiCopy</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109195#M25377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;As titled, I'm currently having trouble obtaining the equivalent pixels value between IPP7 and IPP9 when I'm trying to copy a 8-bit image using ippiCopy. To confirm the variance, I've print all of the pixel values of both images into CSV format individually and compare both of them using winMerge, the variance were off by somewhat a large amount (between 1 to 60). Due to that, the generated result after different types of image processing method were affected as well. Were this suppose to be a bug or intentional?&lt;/P&gt;

&lt;P&gt;Code Snippet:&lt;BR /&gt;
	&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;IppStatus status = ippiCopy_8u_C1R(src, srcPitch, dst, dstPitch, srcRoiSize);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Update 2.5:&amp;nbsp;&lt;BR /&gt;
	Found the culprit, it was caused by ippiMalloc_&amp;lt;mod&amp;gt;, apparently the returned&amp;nbsp;&lt;SPAN style="color: rgb(51, 51, 51); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13.3333px; font-style: italic;"&gt;pStepBytes&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;was not as same compared to Ipp7's even-though both heights and widths are the same. A bug perhaps?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 01:48:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109195#M25377</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-09T01:48:47Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109196#M25378</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;It is unknown problem.&amp;nbsp; You mentioned, &amp;nbsp;ippiMalloc_&amp;lt;mod&amp;gt;,&amp;nbsp; and ippiCopy_8u_C1R, how do you call them together.&amp;nbsp;&amp;nbsp;Could you please show more parameters about your call? or one small test case should be help.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
	Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:46:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109196#M25378</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-12-13T08:46:15Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109197#M25379</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thank you for the prompt response. As mentioned in my updates, the problem no longer reside on&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;ippiCopy_8u_C1R but actually on&amp;nbsp;ippiMalloc_&amp;lt;mod&amp;gt;, although there are some other functions that still causes pixel variances, but one problem at a time.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Here's a small example:&lt;BR /&gt;
	&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;int src_tempPitch = 0;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;Ipp8u* src_temp = ippiMalloc_8u_C1(1089, 1089, &amp;amp;src_tempPitch);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;When IPP7 ran the code above, the&amp;nbsp;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px;"&gt;src_tempPitch&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I'll be getting will be 1120, where as IPP9 returned me 1152 instead. Was it intended?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:00:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109197#M25379</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-13T09:00:17Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109198#M25380</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;Default alignment has changed to 64 bytes as IPP supports AVX-512 now. This approach guarantees aligned data&amp;nbsp;load&amp;nbsp;for any image row.&lt;/P&gt;

&lt;P&gt;regards, Igor&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 15:25:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109198#M25380</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2016-12-13T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Hi Igor,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109199#M25381</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;

&lt;P&gt;That do explains why I'm getting different stepBytes. But unfortunately some of the results generated from IPP9 program are not equivalent with IPP7's due to&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;ippiMalloc_&amp;lt;mod&amp;gt;. Is there any way to change the default alignment &amp;nbsp;as same as the one that the IPP7 is using?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 00:26:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109199#M25381</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-14T00:26:29Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109200#M25382</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;the ippiMalloc&amp;nbsp;can help&amp;nbsp;aligned&amp;nbsp;memory with 32 bytes(8.0) or 64bytes&amp;nbsp; (9.0),&amp;nbsp; but it is not required, so if you'd make sure the src_tempPitch&amp;nbsp; be 1120&amp;nbsp;,&amp;nbsp; you may try Malloc(1089*1120) or ippsMalloc_8u(1089*1120) and set them manually.&lt;/P&gt;

&lt;P&gt;On the other hand, when you get such Pitch, there are padding at the end of row. you may take care of them and keep the result correct.&lt;/P&gt;

&lt;P&gt;For example,&lt;/P&gt;

&lt;P&gt;int src_tempPitch = 0;&lt;BR /&gt;
	Ipp8u* src_temp = ippiMalloc_8u_C1(1089, 1089, &amp;amp;src_tempPitch);&lt;BR /&gt;
	Ipp8u* dst = Malloc(1089*1120);&lt;BR /&gt;
	int distPitch = 1120;&lt;BR /&gt;
	IppStatus status = ippiCopy_8u_C1R(src, src_tempPitch, dst, dstPitch, srcRoiSize);&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
	Ying&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 01:13:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109200#M25382</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-12-14T01:13:35Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109201#M25383</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;First and foremost, thank you for the prompt response. Could you further elaborate on the examples you have given? Unfortunately the srcPitch will not be affix on 1120, as my program support wide variety size of images. In addition, what needs to be done if I want to apply the same method on 8-bit to 32-bit conversion?&lt;/P&gt;

&lt;P&gt;Here's some examples:&lt;BR /&gt;
	&lt;STRONG&gt;CASE&lt;/STRONG&gt; &lt;STRONG&gt;A&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;//srcPitch = 1120
int srcWidth = 1089;
int srcHeight = 1089;

int src_tempPitch = 0;
Ipp8u* src_temp = ippiMalloc_8u_C1(srcWidth, srcHeight, &amp;amp;src_tempPitch);  // Returned 1152 instead of 1120
IppStatus status =  status = ippiCopy_8u_C1R(src, srcPitch, src_temp, src_tempPitch, srcRoiSize); &lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;CASE B:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;//srcPitch = 1120
int srcWidth = 1089;
int srcHeight = 1089;
int src32Pitch = 0;

Ipp32f* src32f = ::ippiMalloc_32f_C1(srcWidth, srcHeight, &amp;amp;src32fPitch); // Returned 4412 instead of 4384
IppiSize const srcRoiSize = {srcWidth, srcHeight};
IppStatus status = ippiConvert_8u32f_C1R(src, srcPitch, src32f, src32fPitch, srcRoiSize);&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 02:41:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109201#M25383</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-14T02:41:00Z</dc:date>
    </item>
    <item>
      <title>Hi John, </title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109202#M25384</link>
      <description>&lt;P&gt;Hi John,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I attach one sample, which show the &amp;nbsp;result like below.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;ippIP AVX2 (l9) &lt;STRONG&gt;7.1&lt;/STRONG&gt;.1 (r37466) 7.1.1.37466&lt;BR /&gt;
	src_tempPitch : 64&lt;BR /&gt;
	original src :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R status ippStsNoErr: No errors.:&lt;BR /&gt;
	1 ; 2 ; 127 ; 75 ; 0 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R correct result should be :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	Press any key to continue . . .&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;ippIP AVX2 (l9) &lt;STRONG&gt;2017&lt;/STRONG&gt;.0.1 (r53196) 2017.0.1.53196&lt;BR /&gt;
	src_tempPitch : 64&lt;BR /&gt;
	original src :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R status ippStsNoErr: No errors.:&lt;BR /&gt;
	1 ; 2 ; 127 ; 0 ; 0 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R correct result should be :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	Press any key to continue . . .&lt;/P&gt;

&lt;P&gt;Actually, whatever of&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13.008px;"&gt;src_tempPitch is or ippiMalloc aligned with 32 or 64, you may take care of the result image based on it. for example, when your read image, you should drop the padding pixel, like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;" style="font-size: 13.008px;"&gt;printf("\n ippiCopy_8u_C1R correct result should be :\n");
	for(int i = 0; i &amp;lt; 2; i++) 
		for(int j = 0; j &amp;lt; 3; j++) 
		printf("%hd ; ", src_temp[i*src_tempPitch + j]);&lt;/PRE&gt;

&lt;P&gt;Same as 32f type.&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include "stdafx.h"
#include "ipp.h"

//#define IPP_90

int _tmain(int argc, _TCHAR* argv[])
{
	const IppLibraryVersion* lib = ippiGetLibVersion();
	printf("%s %s %d.%d.%d.%d\n",lib-&amp;gt;Name, lib-&amp;gt;Version,lib-&amp;gt;major,
	lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);

	Ipp8u src[2*3] = {1,2,127,4,5,0};
	
#ifdef IPP_70	
	
	int srcWidth = 3;
    int srcHeight = 2;

int src_tempPitch = 0;
Ipp8u* src_temp = ippiMalloc_8u_C1(srcWidth, srcHeight, &amp;amp;src_tempPitch);  // Returned 1152 instead of 1120
IppStatus status =   ippiCopy_8u_C1R(src, srcPitch, src_temp, src_tempPitch, srcRoiSize); 


#else
	int srcWidth = 3;
    int srcHeight = 2;
	IppiSize srcRoiSize={srcWidth,srcHeight};
	int srcPitch = 3; 
int src_tempPitch = 0;
Ipp8u* src_temp = ippiMalloc_8u_C1(srcWidth, srcHeight, &amp;amp;src_tempPitch);  // Returned 1152 instead of 1120
printf("src_tempPitch : %d\n", src_tempPitch ); 
IppStatus  status = ippiCopy_8u_C1R(src, srcPitch, src_temp, src_tempPitch, srcRoiSize); 

#endif
    printf("original src :\n"); 
	for(int i = 0; i &amp;lt; 6; i++) printf("%hd ; ", src&lt;I&gt;);

	printf("\n ippiCopy_8u_C1R status %s:\n", ippGetStatusString(status));
	for(int i = 0; i &amp;lt; 6; i++) printf("%hd ; ", src_temp&lt;I&gt;);

	
		printf("\n ippiCopy_8u_C1R correct result should be :\n");
	for(int i = 0; i &amp;lt; 2; i++) 
		for(int j = 0; j &amp;lt; 3; j++) 
		printf("%hd ; ", src_temp[i*src_tempPitch + j]);

	printf("\n");

}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 08:55:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109202#M25384</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-12-14T08:55:45Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109203#M25385</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thank you, that really helps a lot.&amp;nbsp;&lt;BR /&gt;
	Just another question, does the ippiColorToGray function respecting the pitch of the image? Because somehow pixels variance occurs after that function between IPP7 and IPP9. Previously I tried&amp;nbsp;&lt;SPAN style="color: rgb(102, 102, 102); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px;"&gt;ippiRGBToGray_&amp;lt;mod&amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;instead but variance was even worse.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Here's a snippet:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;int srcWidth = 1089;
int srcHeight = 1089;
int dstWidth = 1089;
int dstHeight = 1089;

int dst8uPitch = 0;
Ipp8u* dst8uC3 = ::ippiMalloc_8u_C3(srcWidth , srcHeight , &amp;amp;dst8uPitch);
::IppiSize const srcRoiSize = { srcWidth , srcHeight };
::IppiSize const dstRoiSize = { dstWidth , dstHeight };
::IppiRect srcRect = { 0, 0, srcWidth , srcHeight };
Ipp32f coeffs[3] = { 0.2126f, 0.7152f, 0.0722f };  //Luminance

status = ::ippiCFAToRGB_8u_C1C3R(src, srcRect, srcRoiSize, srcPitch, dst8uC3, dst8uPitch, ippiBayerRGGB, 0);
status = ::ippiColorToGray_8u_C3C1R(dst8uC3, dst8uPitch, dst, dstPitch, srcRoiSize, coeffs); // Variance happens here&lt;/PRE&gt;

&lt;P&gt;Again, you're help is greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 00:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109203#M25385</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-15T00:33:00Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109204#M25386</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;Yes, whatever aligned, all of IPP functions will respect to the stepBytes, (that is why the parameter was designed here.)&amp;nbsp; You mentioned that "somehow pixels variance occurs ",&amp;nbsp;&amp;nbsp; if&amp;nbsp; default assume that&amp;nbsp;ippiCFAToRBG and ippiColorToGray haven't bug,&amp;nbsp; then it should be get same result in IPP 7.0 and 2017. .&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;and&amp;nbsp;read the dst&amp;nbsp;data&amp;nbsp;based on dstPitchs. &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;printf("\n Dst[2*3] result should be :\n");&lt;BR /&gt;
	&amp;nbsp;for(int i = 0; i &amp;lt; dstHeight ; i++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;for(int j = 0; j &amp;lt; dstWidth; j++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;printf("%hd ; ", src_temp[i*dstPitch + j]);&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;I test&amp;nbsp;the piece of the&amp;nbsp;code&amp;nbsp; you attached with 2017 update 1, &lt;/FONT&gt;Please tell if any change in 7.1.&lt;/P&gt;

&lt;P&gt;best Regards,&lt;BR /&gt;
	Ying&lt;/P&gt;

&lt;P&gt;ippIP AVX2 (l9) 2017.0.1 (r53196) 2017.0.1.53196&lt;BR /&gt;
	src_tempPitch : 64&lt;BR /&gt;
	original src :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R status ippStsNoErr: No errors.:&lt;BR /&gt;
	1 ; 2 ; 127 ; 0 ; 0 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;ippiCopy_8u_C1R correct result should be :&lt;BR /&gt;
	1 ; 2 ; 127 ; 4 ; 5 ; 0 ;&lt;BR /&gt;
	&amp;nbsp;Dst[2*3] result should be :&lt;BR /&gt;
	1 ; 2 ; 127 ; 0 ; 0 ; 0 ;&lt;BR /&gt;
	Press any key to continue . . .&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include "stdafx.h"
#include "ipp.h"

//#define IPP_90

int _tmain(int argc, _TCHAR* argv[])
{
&amp;nbsp;const IppLibraryVersion* lib = ippiGetLibVersion();
&amp;nbsp;printf("%s %s %d.%d.%d.%d\n",lib-&amp;gt;Name, lib-&amp;gt;Version,lib-&amp;gt;major,
&amp;nbsp;lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);

&amp;nbsp;Ipp8u src[2*3] = {1,2,127,4,5,0};
&amp;nbsp;
#ifdef IPP_70&amp;nbsp;
&amp;nbsp;
&amp;nbsp;int srcWidth = 3;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int srcHeight = 2;

int src_tempPitch = 0;
Ipp8u* src_temp = ippiMalloc_8u_C1(srcWidth, srcHeight, &amp;amp;src_tempPitch);&amp;nbsp; // Returned 1152 instead of 1120
IppStatus status =&amp;nbsp;&amp;nbsp; ippiCopy_8u_C1R(src, srcPitch, src_temp, src_tempPitch, srcRoiSize); 


#else
&amp;nbsp;int srcWidth = 3;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int srcHeight = 2;
&amp;nbsp;IppiSize srcRoiSize={srcWidth,srcHeight};
&amp;nbsp;int srcPitch = 3; 
int src_tempPitch = 0;
Ipp8u* src_temp = ippiMalloc_8u_C1(srcWidth, srcHeight, &amp;amp;src_tempPitch);&amp;nbsp; // Returned 1152 instead of 1120
printf("src_tempPitch : %d\n", src_tempPitch ); 
IppStatus&amp;nbsp; status1 = ippiCopy_8u_C1R(src, srcPitch, src_temp, src_tempPitch, srcRoiSize); 

int dstWidth = 3;
int dstHeight = 2;
int dstPitch = dstWidth *sizeof(Ipp8u);
Ipp8u dst[2*3];
int dst8uPitch = 0;
Ipp8u* dst8uC3 = ::ippiMalloc_8u_C3(srcWidth , srcHeight , &amp;amp;dst8uPitch);
//IppiSize const srcRoiSize = { srcWidth , srcHeight };
IppiSize const dstRoiSize = { dstWidth , dstHeight };
IppiRect srcRect = { 0, 0, srcWidth , srcHeight };
Ipp32f coeffs[3] = { 0.2126f, 0.7152f, 0.0722f };&amp;nbsp; //Luminance

IppStatus&amp;nbsp; status2 = ippiCFAToRGB_8u_C1C3R(src, srcRect, srcRoiSize, srcPitch, dst8uC3, dst8uPitch, ippiBayerRGGB, 0);
IppStatus&amp;nbsp; status3 = ippiColorToGray_8u_C3C1R(dst8uC3, dst8uPitch, dst, dstPitch, srcRoiSize, coeffs);


#endif
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("original src :\n"); 
&amp;nbsp;for(int i = 0; i &amp;lt; 6; i++) printf("%hd ; ", src&lt;I&gt;);

&amp;nbsp;printf("\n ippiCopy_8u_C1R status %s:\n", ippGetStatusString(status1));
&amp;nbsp;for(int i = 0; i &amp;lt; 6; i++) printf("%hd ; ", src_temp&lt;I&gt;);

&amp;nbsp;
&amp;nbsp;&amp;nbsp;printf("\n ippiCopy_8u_C1R correct result should be :\n");
&amp;nbsp;for(int i = 0; i &amp;lt; 2; i++) 
&amp;nbsp;&amp;nbsp;for(int j = 0; j &amp;lt; 3; j++) 
&amp;nbsp;&amp;nbsp;printf("%hd ; ", src_temp[i*src_tempPitch + j]);

&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\n Dst[2*3] result should be :\n");
&amp;nbsp;for(int i = 0; i &amp;lt; dstHeight ; i++) 
&amp;nbsp;&amp;nbsp;for(int j = 0; j &amp;lt; dstWidth; j++) 
&amp;nbsp;&amp;nbsp;printf("%hd ; ", src_temp[i*dstPitch + j]);

&amp;nbsp;printf("\n");

}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 02:56:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109204#M25386</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-12-15T02:56:49Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109205#M25387</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;I can confirmed the variance doesn't occurs with the sample array you've given. But it does happens on the 1089 x 1089 images I'm currently processing.&lt;/P&gt;

&lt;P&gt;The function below were used to generate CSV files containing the images pixels for comparison:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;static void debugCSV(unsigned char const* const src, IppiSize srcRoiSize, const char* savePath, int srcPitch)
{
	std::ofstream file(savePath, std::ios_base::out | std::ios_base::app);
	for (int i = 0; i&amp;lt; srcRoiSize.height; ++i)
		for (int j = 0; j&amp;lt; srcRoiSize.width; ++j)
		{
			file &amp;lt;&amp;lt; j &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; static_cast&amp;lt;int&amp;gt;(src[i*srcPitch + j]) &amp;lt;&amp;lt; std::endl;
		}
}&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 01:32:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109205#M25387</guid>
      <dc:creator>Wan__John</dc:creator>
      <dc:date>2016-12-16T01:32:05Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109206#M25388</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;Could you send the CSV or the jpg image to us to test?&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 05:12:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Pixel-variance-between-IPP7-vs-IPP9-using-ippiCopy/m-p/1109206#M25388</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-12-23T05:12:34Z</dc:date>
    </item>
  </channel>
</rss>

