<?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 Decoder and External MemoryAllocator in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833267#M5733</link>
    <description>Good morning, I found a problem when you try to use an External 
MemoryAllocator with a IPP decoder: for example MPEG4VideoDecoder.&lt;BR /&gt;

I'm using latest IPP 6.1.5.054 library and IPP sample 6.1.5.060&lt;BR /&gt;

The problem is that if you create the external Memory Allocator and pass
 it to the Init of the decoder, when you decoder make the line:&lt;BR /&gt;

&lt;BR /&gt;

status = BaseCodec::Init(lpInit);&lt;BR /&gt;

&lt;BR /&gt;

decoder check if you pass an allocator or have to create new one, but this condition:&lt;BR /&gt;

&lt;BR /&gt;

if (init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 if (m_bOwnAllocator || m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 vm_debug_trace(VM_DEBUG_ERROR, VM_STRING("can't replace external allocator\\n"));&lt;BR /&gt;

 return UMC_ERR_INIT;&lt;BR /&gt;

 }&lt;BR /&gt;

&lt;BR /&gt;

you get always UMC_ERR_INIT because the m_pMemoryAllocator is NULL. I have changed the line in this mode &lt;BR /&gt;

&lt;BR /&gt;

if (init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 if (m_bOwnAllocator || (m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator)&amp;amp;&amp;amp;(m_pMemoryAllocator!=NULL)) {&lt;BR /&gt;

 vm_debug_trace(VM_DEBUG_ERROR, VM_STRING("can't replace external allocator\\n"));&lt;BR /&gt;

 return UMC_ERR_INIT;&lt;BR /&gt;

 }&lt;BR /&gt;

&lt;BR /&gt;

I get it works.&lt;BR /&gt;

It's useful to take the MemoryAllocator extern from the decoder, so if 
you have to destroy and recreate the decoder you do not need to free all
 the memory allocated.&lt;BR /&gt;

regards&lt;BR /&gt;</description>
    <pubDate>Fri, 27 Aug 2010 08:25:18 GMT</pubDate>
    <dc:creator>selea</dc:creator>
    <dc:date>2010-08-27T08:25:18Z</dc:date>
    <item>
      <title>Decoder and External MemoryAllocator</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833267#M5733</link>
      <description>Good morning, I found a problem when you try to use an External 
MemoryAllocator with a IPP decoder: for example MPEG4VideoDecoder.&lt;BR /&gt;

I'm using latest IPP 6.1.5.054 library and IPP sample 6.1.5.060&lt;BR /&gt;

The problem is that if you create the external Memory Allocator and pass
 it to the Init of the decoder, when you decoder make the line:&lt;BR /&gt;

&lt;BR /&gt;

status = BaseCodec::Init(lpInit);&lt;BR /&gt;

&lt;BR /&gt;

decoder check if you pass an allocator or have to create new one, but this condition:&lt;BR /&gt;

&lt;BR /&gt;

if (init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 if (m_bOwnAllocator || m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 vm_debug_trace(VM_DEBUG_ERROR, VM_STRING("can't replace external allocator\\n"));&lt;BR /&gt;

 return UMC_ERR_INIT;&lt;BR /&gt;

 }&lt;BR /&gt;

&lt;BR /&gt;

you get always UMC_ERR_INIT because the m_pMemoryAllocator is NULL. I have changed the line in this mode &lt;BR /&gt;

&lt;BR /&gt;

if (init-&amp;gt;lpMemoryAllocator) {&lt;BR /&gt;

 if (m_bOwnAllocator || (m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator)&amp;amp;&amp;amp;(m_pMemoryAllocator!=NULL)) {&lt;BR /&gt;

 vm_debug_trace(VM_DEBUG_ERROR, VM_STRING("can't replace external allocator\\n"));&lt;BR /&gt;

 return UMC_ERR_INIT;&lt;BR /&gt;

 }&lt;BR /&gt;

&lt;BR /&gt;

I get it works.&lt;BR /&gt;

It's useful to take the MemoryAllocator extern from the decoder, so if 
you have to destroy and recreate the decoder you do not need to free all
 the memory allocated.&lt;BR /&gt;

regards&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Aug 2010 08:25:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833267#M5733</guid>
      <dc:creator>selea</dc:creator>
      <dc:date>2010-08-27T08:25:18Z</dc:date>
    </item>
    <item>
      <title>Decoder and External MemoryAllocator</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833268#M5734</link>
      <description>Thank you for providing that useful bit of information regarding the UMC sample code!</description>
      <pubDate>Fri, 27 Aug 2010 19:28:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833268#M5734</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2010-08-27T19:28:39Z</dc:date>
    </item>
    <item>
      <title>Decoder and External MemoryAllocator</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833269#M5735</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;The engineer suggested that:&lt;BR /&gt;&lt;BR /&gt;Thesamples has the wrong condition:&lt;BR /&gt;(m_bOwnAllocator || m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator) &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;this shouldbe replaced with:&lt;/P&gt;&lt;P&gt;(m_bOwnAllocator &amp;amp;&amp;amp; m_pMemoryAllocator != init-&amp;gt;lpMemoryAllocator) &lt;BR /&gt;&lt;BR /&gt;The fix will be included in the future version. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2010 14:41:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Decoder-and-External-MemoryAllocator/m-p/833269#M5735</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-09-15T14:41:16Z</dc:date>
    </item>
  </channel>
</rss>

