<?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 Problem of Huffman algorithm in IPP6.1 in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821265#M4762</link>
    <description>&lt;P&gt;Hi Ricky,&lt;/P&gt;&lt;P&gt;The EncodeHuffman() function actually doesnt write any stop symbol in the end of encoded stream and, as the result, this stream contains a garbage in the end. The decode function couldnt detect the end of input stream and decodes this garbage. Actually, such could be used with another approach  an user should store the encoded elements number and set such number as destination size. You can see it at ipp_compress sample where such approach is used.&lt;/P&gt;&lt;P&gt;Also our function owner had a bit change on huffman.c file(from ipp_compress sample) for your approach, and you can find full functional example in the attached file.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2011 07:55:20 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2011-05-20T07:55:20Z</dc:date>
    <item>
      <title>Problem of Huffman algorithm in IPP6.1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821262#M4759</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;We are using IPP6.1 in our product, when I was evaluating the algorithms in IPP6.1, I ran into a problem.&lt;/DIV&gt;&lt;DIV&gt;See the below code, whereEncodeHuffman andDecodeHuffman are from IPP6.1 samples(ipp-samples\\data-compression\\ipp_compress):&lt;SPAN style="color: #008800; font-family: Arial, sans-serif; font-size: 14px; white-space: nowrap;"&gt;&lt;A href="http://registrationcenter.intel.com/irc_nas/1910/w_ipp-samples_p_6.1.6.065.zip" target="_blank"&gt;http://registrationcenter.intel.com/irc_nas/1910/w_ipp-samples_p_6.1.6.065.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;&lt;BR style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" /&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;I have narrowed down the problem down to the below simple code, and I carefully debugged the code to prevent misusage and silly mistakens.&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;would you please take a look?&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;Thanks a lot.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Ricky&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;code segament below.&lt;/DIV&gt;&lt;DIV&gt;_______________________________________________________________________&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;//the following code encodes 11-byte long buffer using Huffman,&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;//then decode the encoded-buffer,&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;//but the result is 12-byte long&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;//I am using Visual Studio 2008 with SP1&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;int stateSize;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;ippsHuffGetSize_8u(&amp;amp;stateSize);&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;IppHuffState_8u* pHuffState = (IppHuffState_8u*)ippsMalloc_8u(stateSize);&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;&lt;SPAN style="font-style: normal;"&gt;&lt;DIV id="_mcePaste" style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;&lt;I style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;"&gt;// the 11-byte long source buffer&lt;/I&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;BYTE src[] = {0xff, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfb};&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;BYTE dst[256];&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;BYTE decode[256];&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;int dstlen = sizeof(dst);&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;int dstlen2;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;int ret = EncodeHuffman( src, sizeof(src), dst, &amp;amp;dstlen, pHuffState ) ;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;dstlen2 = sizeof(decode);&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;ret = DecodeHuffman( dst, dstlen, decode, &amp;amp;dstlen2, pHuffState ) ;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;if( dstlen2 != sizeof(src) || memcmp(decode, src, sizeof(src)))&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;{&lt;B&gt;// the result decoded-buffer is 12-byte long: &lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;&lt;B&gt;//{0xff, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfb, 0xFF}, one extra 0xFF added.&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;	printf("failed\\n");&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;}&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;I&gt;//Clean up code below&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 May 2011 03:56:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821262#M4759</guid>
      <dc:creator>Ricky_Wang</dc:creator>
      <dc:date>2011-05-17T03:56:52Z</dc:date>
    </item>
    <item>
      <title>Problem of Huffman algorithm in IPP6.1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821263#M4760</link>
      <description>&lt;BR /&gt;Ricky, &lt;BR /&gt;&lt;BR /&gt;Have you checked the latest 7.04 release? Several issues were fixed for data compression functions in 7.0 release. The new package also can be downloaded in registraction center: &lt;A href="http://registrationcenter.intel.com" target="_blank"&gt;http://registrationcenter.intel.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;</description>
      <pubDate>Thu, 19 May 2011 04:26:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821263#M4760</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-05-19T04:26:23Z</dc:date>
    </item>
    <item>
      <title>Problem of Huffman algorithm in IPP6.1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821264#M4761</link>
      <description>Hi Chao,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your response.&lt;/DIV&gt;&lt;DIV&gt;I didn't test this problem with IPP7 yet.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;We knew from Intel that IPP7 does NOT support some legacy CPU models, so we'd like to use IPP6.1 in our product to make customers happy.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Would you please to investigate further? If it's a bug of IPP6.1, it will be a good reason for our management team to make the decision to adopt IPP7.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Ricky&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 May 2011 06:03:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821264#M4761</guid>
      <dc:creator>Ricky_Wang</dc:creator>
      <dc:date>2011-05-19T06:03:54Z</dc:date>
    </item>
    <item>
      <title>Problem of Huffman algorithm in IPP6.1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821265#M4762</link>
      <description>&lt;P&gt;Hi Ricky,&lt;/P&gt;&lt;P&gt;The EncodeHuffman() function actually doesnt write any stop symbol in the end of encoded stream and, as the result, this stream contains a garbage in the end. The decode function couldnt detect the end of input stream and decodes this garbage. Actually, such could be used with another approach  an user should store the encoded elements number and set such number as destination size. You can see it at ipp_compress sample where such approach is used.&lt;/P&gt;&lt;P&gt;Also our function owner had a bit change on huffman.c file(from ipp_compress sample) for your approach, and you can find full functional example in the attached file.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2011 07:55:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821265#M4762</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-05-20T07:55:20Z</dc:date>
    </item>
    <item>
      <title>Problem of Huffman algorithm in IPP6.1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821266#M4763</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;This workaround works. The samples need upgrade.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;</description>
      <pubDate>Sun, 22 May 2011 15:15:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-of-Huffman-algorithm-in-IPP6-1/m-p/821266#M4763</guid>
      <dc:creator>Ricky_Wang</dc:creator>
      <dc:date>2011-05-22T15:15:39Z</dc:date>
    </item>
  </channel>
</rss>

