<?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: RGBtoGray must the input be 32bit aligned? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896708#M12254</link>
    <description>&lt;P&gt;Thanks, you are right! I was loading the bitmap from GDI+, and it seems it is automatically padded. I have fixed the problem. What suprises me is that the normal C++ code runs fine...&lt;/P&gt;
&lt;P&gt;Thanks, and i'll be more careful next time! :)&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2006 15:55:12 GMT</pubDate>
    <dc:creator>uus831</dc:creator>
    <dc:date>2006-12-01T15:55:12Z</dc:date>
    <item>
      <title>RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896704#M12250</link>
      <description>&lt;FONT size="2"&gt;
&lt;P&gt;I'm trying to convert a 24-bit image to Gray using &lt;FONT face="Courier New"&gt;ippiRGBToGray_8u_C3C1R &lt;/FONT&gt;&lt;FONT face="Times New Roman"&gt;function, but the output is corrupted when the image width cannot be divided with 8. For example, if the image width is 560, it works, but if it is 563 the output is corrupted. The image is allocated using the normal "new" keyword of C++ such as this&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;byte *src = new byte[width*height*3];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;IppiSize roiSize = {width, height};&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Courier New"&gt;IppStatus s = ippiRGBToGray_8u_C3C1R (src,stride24,des,stride8,roiSize);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;I am not using specific intel's new function. Must each row of the image start on a 32bit boundary? Why such corruption occur? I'm using IPPI 5.1&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2006 16:48:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896704#M12250</guid>
      <dc:creator>uus831</dc:creator>
      <dc:date>2006-11-27T16:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896705#M12251</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;there is no requirement to align image rows but if you do that you can expect better performance (because of efficient memory access).&lt;/P&gt;
&lt;P&gt;In you piece of code, how do you calculate stride24 and stride8 parameters? Remember, image step, according IPP documentation is number of bytes (including any padding bytes) which required to keep one line of image. In your case stride24 should be width*3 and strude8 should be equal to width (if you do not use padding for your destination image).&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2006 17:14:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896705#M12251</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-11-27T17:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896706#M12252</link>
      <description>&lt;P&gt;I define stride8 as image width*bytes per pixel so, in the case of 8-bit destination, stride8 = width*1; and stride24= width*3. However, i'm still experiencing problems when the image width not divisible with 8. I'm using IPPI 5.1 on a Core Duo laptop.&lt;/P&gt;
&lt;P&gt;Since the image is declared using new contiguously , i dont think there is any padding done at each rows.&lt;/P&gt;
&lt;P&gt;A simple C++ grayscale code however has no problems with any width size of the image.&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;P&gt;int&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; r,g,b;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;int&lt;/FONT&gt;&lt;FONT size="2"&gt; pos;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;do&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pos = end*3;&lt;/P&gt;&lt;P&gt;r = *(pSrc+pos)*3735;&lt;/P&gt;&lt;P&gt;g = *(pSrc+pos+1)*19234;&lt;/P&gt;&lt;P&gt;b = *(pSrc+pos+2)*9797;&lt;/P&gt;&lt;P&gt;*(pDest+end) = ( r+ g +b )&amp;gt;&amp;gt;15;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;end--;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;while&lt;/FONT&gt;&lt;FONT size="2"&gt; (end &amp;gt;=0);&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Times New Roman" size="3"&gt;Is there anything else i should know? What is the cause of my problems? I wish i can post &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Times New Roman" size="3"&gt;the output picture for viewing.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2006 12:55:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896706#M12252</guid>
      <dc:creator>uus831</dc:creator>
      <dc:date>2006-11-28T12:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896707#M12253</link>
      <description>&lt;P&gt;If you have issues when image width is not divisable to 8 ti means that there is some padding in your image, and you need to pay attention to it&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2006 23:43:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896707#M12253</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-11-30T23:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896708#M12254</link>
      <description>&lt;P&gt;Thanks, you are right! I was loading the bitmap from GDI+, and it seems it is automatically padded. I have fixed the problem. What suprises me is that the normal C++ code runs fine...&lt;/P&gt;
&lt;P&gt;Thanks, and i'll be more careful next time! :)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2006 15:55:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896708#M12254</guid>
      <dc:creator>uus831</dc:creator>
      <dc:date>2006-12-01T15:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: RGBtoGray must the input be 32bit aligned?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896709#M12255</link>
      <description>&lt;P&gt;Great. By the way, "normal" C++ code should corrupt memory n that case, it can not be detected in simple program, by might lead to errors which quite difficult to locate in complex program.&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2006 05:34:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBtoGray-must-the-input-be-32bit-aligned/m-p/896709#M12255</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-12-04T05:34:10Z</dc:date>
    </item>
  </channel>
</rss>

