<?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: MulC_8u problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/MulC-8u-problem/m-p/848948#M6356</link>
    <description>&lt;P&gt;Hello Alex,&lt;/P&gt;
&lt;P&gt;please take a look on comments provided by our experts:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;Aswe cansee, our customer tries to call ippiMulC_8u_C1IRSfs function with value (int)(factor * 256.0f + 0.5f) but according to API of the function value has type Ipp8u and when factor = 2.0 we have value = (int)(2.0 * 256.0f + 0.5f) = 512 and after casting to Ipp8u = 0. Certainly, it works correctly for ippiMulC_16u_C1IRSfs function, because result of calculation in the range of Ipp16u.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
    <pubDate>Wed, 01 Aug 2007 14:11:22 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2007-08-01T14:11:22Z</dc:date>
    <item>
      <title>MulC_8u problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/MulC-8u-problem/m-p/848947#M6355</link>
      <description>&lt;P&gt;I am trying to multiply 8 bpp image by float factor. The code is:&lt;/P&gt;
&lt;P&gt;void Multiply8(unsigned char* image, int imageWidth, int imageHeight, float factor) // factor &amp;gt; 1.0&lt;BR /&gt;{&lt;BR /&gt; IppiSize roiSize = {imageWidth, imageHeight};&lt;/P&gt;
&lt;P&gt;ippiMulC_8u_C1IRSfs(&lt;BR /&gt; (int)(factor * 256.0f + 0.5f),&lt;BR /&gt; image,imageWidth*sizeof(unsigned char),roiSize,&lt;BR /&gt; 8);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I get incorrect result. For example, trying to multiply image with pixel values 100 by 2.0, I get result 0. It looks like MulC function clips intermediate result (factor * 256) to 0-255 and then divides to 2^8 - with such behavior function is unusable. Is there any solution for this?&lt;BR /&gt;IPP version is 5.1.&lt;BR /&gt;BTW, ippiMulC_16u_C1IRSfs function gives correct result when intermediate result is out of 0-65535 range. I expect that all calculations are done with 32 bits, with clipping only final result, but ippiMulC_8u_C1IRSfs doesn't behave by this way.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2007 10:59:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/MulC-8u-problem/m-p/848947#M6355</guid>
      <dc:creator>alexfarber</dc:creator>
      <dc:date>2007-06-30T10:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: MulC_8u problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/MulC-8u-problem/m-p/848948#M6356</link>
      <description>&lt;P&gt;Hello Alex,&lt;/P&gt;
&lt;P&gt;please take a look on comments provided by our experts:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"&gt;Aswe cansee, our customer tries to call ippiMulC_8u_C1IRSfs function with value (int)(factor * 256.0f + 0.5f) but according to API of the function value has type Ipp8u and when factor = 2.0 we have value = (int)(2.0 * 256.0f + 0.5f) = 512 and after casting to Ipp8u = 0. Certainly, it works correctly for ippiMulC_16u_C1IRSfs function, because result of calculation in the range of Ipp16u.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2007 14:11:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/MulC-8u-problem/m-p/848948#M6356</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2007-08-01T14:11:22Z</dc:date>
    </item>
  </channel>
</rss>

