<?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: Problem in ippiEncodeHuffman8x8_JPEG_16s1u_C1 in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864264#M8157</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336498"&gt;Vladimir Dudnik (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Did you take a look at IPP UIC JPEG codec sample? You may want to review this code to see how to call IPP functions in JPEG encoder. Basically we use the following sequence:&lt;BR /&gt;&lt;BR /&gt;// raw table is quantization tables as specified in JPEG standard&lt;BR /&gt;// quality is quantization parameter 1..100, 1 - more compression worse quality, 100 - less compression but better quality&lt;BR /&gt;ippiQuantFwdRawTableInit_JPEG_8u(m_raw8u,quality);&lt;BR /&gt;&lt;BR /&gt;// transform quantization table into internal IPP format (to avoid divide operation)&lt;BR /&gt;ippiQuantFwdTableInit_JPEG_8u16u(m_raw8u,m_qnt16u);&lt;BR /&gt;&lt;BR /&gt;// initialialize internal huffman tables from raw huffman tables (defined in JPEG standard)&lt;BR /&gt;ippiEncodeHuffmanSpecInit_JPEG_8u(m_bits,m_vals,m_table);&lt;BR /&gt;&lt;BR /&gt;// initialize huffman state (you need to allocate memory for state before this&lt;BR /&gt;ippiEncodeHuffmanStateInit_JPEG_8u(m_state);&lt;BR /&gt;&lt;BR /&gt;// perform DCT and quantization&lt;BR /&gt;ippiDCTQuantFwd8x8LS_JPEG_8u16s_C1R(src,srcStep,pMCUBuf,qtbl);&lt;BR /&gt;&lt;BR /&gt;// encode quantized DCT coefficients&lt;BR /&gt;ippiEncodeHuffman8x8_JPEG_16s1u_C1(&lt;BR /&gt; pMCUBuf,dst,dstLen,&amp;amp;currPos,&lt;BR /&gt; &amp;amp;curr_comp-&amp;gt;m_lastDC,pDCTbl,pACTbl,m_state,0);&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Vladmir,&lt;BR /&gt;Thanks for the reply. I did not inititalize the "ippiEncodeHuffmanStateInit_JPEG_8u(m_state)" huffman state before the DCTquantization. Once we initialize it, it is working consistently. One surprise note is that this encoder in user space with out huffman state initialization on every encode call, worked on 100,000 image input tests. But when we move it to the kernel space its failure rate is much higher. &lt;BR /&gt;With proper initalization it is working in kernel space also.&lt;BR /&gt;Once again thanks for the wonderful support.&lt;BR /&gt;</description>
    <pubDate>Fri, 11 Dec 2009 16:06:48 GMT</pubDate>
    <dc:creator>nyryder</dc:creator>
    <dc:date>2009-12-11T16:06:48Z</dc:date>
    <item>
      <title>Problem in ippiEncodeHuffman8x8_JPEG_16s1u_C1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864262#M8155</link>
      <description>I am doing the JPEG encoding in the WIN32 Kernel space (The product is a windows driver). After the DCT function, i do quantization using ippiQuantFwd8x8_JPEG16s_C1I, and i call the ippiEncodeHuffman8x8_JPEG-16s1u_C1, to encode the Quantized DCT coefficients. This ippiEncodeHuffman function does not work 50% of the time. It returns either ippStsJPEGOutofBuffer"Attempt to access out of the buffer" error, or return the pDstCurrPos as zero, or pDstCurrPos as a unrealistic big number. I verified all the input parameters all appears to be valid. My question is there any limitation to run this function in kernel space?. My kernel thread runs at passive level and i tried with output buffers as page pool and nonpage pool of buffers. The input is non paged pool of buffer. &lt;BR /&gt; Is there any way i can get more trace information fromation from the ipp function??. Any help is highly appreciated. The version of IPP is 6.1.1.035. &lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 00:25:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864262#M8155</guid>
      <dc:creator>nyryder</dc:creator>
      <dc:date>2009-12-11T00:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in ippiEncodeHuffman8x8_JPEG_16s1u_C1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864263#M8156</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Did you take a look at IPP UIC JPEG codec sample? You may want to review this code to see how to call IPP functions in JPEG encoder. Basically we use the following sequence:&lt;BR /&gt;&lt;BR /&gt;// raw table is quantization tables as specified in JPEG standard&lt;BR /&gt;// quality is quantization parameter 1..100, 1 - more compression worse quality, 100 - less compression but better quality&lt;BR /&gt;ippiQuantFwdRawTableInit_JPEG_8u(m_raw8u,quality);&lt;BR /&gt;&lt;BR /&gt;// transform quantization table into internal IPP format (to avoid divide operation)&lt;BR /&gt;ippiQuantFwdTableInit_JPEG_8u16u(m_raw8u,m_qnt16u);&lt;BR /&gt;&lt;BR /&gt;// initialialize internal huffman tables from raw huffman tables (defined in JPEG standard)&lt;BR /&gt;ippiEncodeHuffmanSpecInit_JPEG_8u(m_bits,m_vals,m_table);&lt;BR /&gt;&lt;BR /&gt;// initialize huffman state (you need to allocate memory for state before this&lt;BR /&gt;ippiEncodeHuffmanStateInit_JPEG_8u(m_state);&lt;BR /&gt;&lt;BR /&gt;// perform DCT and quantization&lt;BR /&gt;ippiDCTQuantFwd8x8LS_JPEG_8u16s_C1R(src,srcStep,pMCUBuf,qtbl);&lt;BR /&gt;&lt;BR /&gt;// encode quantized DCT coefficients&lt;BR /&gt;ippiEncodeHuffman8x8_JPEG_16s1u_C1(&lt;BR /&gt; pMCUBuf,dst,dstLen,&amp;amp;currPos,&lt;BR /&gt; &amp;amp;curr_comp-&amp;gt;m_lastDC,pDCTbl,pACTbl,m_state,0);&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir</description>
      <pubDate>Fri, 11 Dec 2009 07:35:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864263#M8156</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2009-12-11T07:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in ippiEncodeHuffman8x8_JPEG_16s1u_C1</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864264#M8157</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336498"&gt;Vladimir Dudnik (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Did you take a look at IPP UIC JPEG codec sample? You may want to review this code to see how to call IPP functions in JPEG encoder. Basically we use the following sequence:&lt;BR /&gt;&lt;BR /&gt;// raw table is quantization tables as specified in JPEG standard&lt;BR /&gt;// quality is quantization parameter 1..100, 1 - more compression worse quality, 100 - less compression but better quality&lt;BR /&gt;ippiQuantFwdRawTableInit_JPEG_8u(m_raw8u,quality);&lt;BR /&gt;&lt;BR /&gt;// transform quantization table into internal IPP format (to avoid divide operation)&lt;BR /&gt;ippiQuantFwdTableInit_JPEG_8u16u(m_raw8u,m_qnt16u);&lt;BR /&gt;&lt;BR /&gt;// initialialize internal huffman tables from raw huffman tables (defined in JPEG standard)&lt;BR /&gt;ippiEncodeHuffmanSpecInit_JPEG_8u(m_bits,m_vals,m_table);&lt;BR /&gt;&lt;BR /&gt;// initialize huffman state (you need to allocate memory for state before this&lt;BR /&gt;ippiEncodeHuffmanStateInit_JPEG_8u(m_state);&lt;BR /&gt;&lt;BR /&gt;// perform DCT and quantization&lt;BR /&gt;ippiDCTQuantFwd8x8LS_JPEG_8u16s_C1R(src,srcStep,pMCUBuf,qtbl);&lt;BR /&gt;&lt;BR /&gt;// encode quantized DCT coefficients&lt;BR /&gt;ippiEncodeHuffman8x8_JPEG_16s1u_C1(&lt;BR /&gt; pMCUBuf,dst,dstLen,&amp;amp;currPos,&lt;BR /&gt; &amp;amp;curr_comp-&amp;gt;m_lastDC,pDCTbl,pACTbl,m_state,0);&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Vladmir,&lt;BR /&gt;Thanks for the reply. I did not inititalize the "ippiEncodeHuffmanStateInit_JPEG_8u(m_state)" huffman state before the DCTquantization. Once we initialize it, it is working consistently. One surprise note is that this encoder in user space with out huffman state initialization on every encode call, worked on 100,000 image input tests. But when we move it to the kernel space its failure rate is much higher. &lt;BR /&gt;With proper initalization it is working in kernel space also.&lt;BR /&gt;Once again thanks for the wonderful support.&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 16:06:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-in-ippiEncodeHuffman8x8-JPEG-16s1u-C1/m-p/864264#M8157</guid>
      <dc:creator>nyryder</dc:creator>
      <dc:date>2009-12-11T16:06:48Z</dc:date>
    </item>
  </channel>
</rss>

