<?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: H.264 Encoder getting Access violation error during GetFram in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875041#M9385</link>
    <description>Hi Ying,&lt;BR /&gt;&lt;BR /&gt;I have solved my problem referring with intel-ipp-unified-media-classes-sample which you are provided.&lt;BR /&gt;&lt;BR /&gt;Previously I createdDataOut Object like below:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: x-small;"&gt;&lt;FONT size="2"&gt;&lt;P&gt;MediaData *m_pMediaOut = NULL;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;P&gt;if( m_pMediaOut == NULL)&lt;BR /&gt;{&lt;BR /&gt; m_pMediaOut = new MediaData();&lt;BR /&gt; m_pMediaOut-&amp;gt;Alloc(4*m_nWidth*m_nHeight); // this line of code created problem&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;after that I changed to m_pMediaOut-&amp;gt;SetBufferPointer(chEncodedData,nWidth*nHeight);&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;My Sample code is like below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;int CH264Codec::EncodeData(unsigned char *chYUVData,int nWidth, int nHeight, int nYUVSize, unsigned char *chEncodedData)&lt;BR /&gt;{&lt;BR /&gt;if(chYUVData == NULL)&lt;BR /&gt;return 0;&lt;/P&gt;&lt;P&gt;m_nEncodedSize = 0;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;UMC::Status ret = UMC_OK;&lt;/P&gt;&lt;P&gt;if(m_pEncoderParams &amp;amp;&amp;amp; m_pVideoIn )&lt;BR /&gt;{&lt;BR /&gt;ret = m_pVideoIn-&amp;gt;SetBufferPointer(chYUVData,nYUVSize);// It is for streaming data&lt;BR /&gt;m_pVideoIn-&amp;gt;SetDataSize(nYUVSize);&lt;/P&gt;&lt;P&gt;m_pVideoIn-&amp;gt;SetTime((m_nFramesEncoded+1)/m_pEncoderParams-&amp;gt;info.framerate);&lt;BR /&gt;m_pEncoderParams-&amp;gt;numEncodedFrames = m_nFramesEncoded;&lt;BR /&gt;m_pCodec-&amp;gt;SetParams(m_pEncoderParams);&lt;BR /&gt;m_nFramesEncoded++;&lt;/P&gt;&lt;P&gt;m_pMediaOut-&amp;gt;SetBufferPointer(chEncodedData,nWidth*nHeight);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if( m_pCodec &amp;amp;&amp;amp; m_pVideoIn &amp;amp;&amp;amp; m_pMediaOut )&lt;BR /&gt;{&lt;BR /&gt; ret = m_pCodec-&amp;gt;GetFrame(m_pVideoIn, m_pMediaOut);&lt;BR /&gt;if ( (ret != UMC_OK) &amp;amp;&amp;amp; (ret != UMC_ERR_NOT_ENOUGH_DATA) &amp;amp;&amp;amp; (ret != UMC_ERR_END_OF_STREAM))&lt;BR /&gt;{&lt;BR /&gt;logger.Print(LL_INTERR, PANLOG("H264 encoding failed\n"));&lt;BR /&gt;m_pVideoIn-&amp;gt;ReleaseImage();&lt;BR /&gt;m_pVideoIn-&amp;gt;Reset();&lt;BR /&gt;m_pMediaOut-&amp;gt;Reset();&lt;/P&gt;&lt;P&gt;return UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ( ret == UMC_OK )&lt;BR /&gt;m_nEncodedSize = (Ipp32s)m_pMediaOut-&amp;gt;GetDataSize();&lt;/P&gt;&lt;P&gt;m_pVideoIn-&amp;gt;ReleaseImage();&lt;BR /&gt;m_pVideoIn-&amp;gt;Reset();&lt;BR /&gt;m_pMediaOut-&amp;gt;Reset();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;catch(...)&lt;BR /&gt;{&lt;BR /&gt;logger.Print(LL_INTERR, PANLOG("[CH264Codec::EncodeData] Exception - Error: %ld\n"), GetLastError());&lt;BR /&gt;return m_nEncodedSize;&lt;BR /&gt;}&lt;BR /&gt;return m_nEncodedSize;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2010 11:36:37 GMT</pubDate>
    <dc:creator>Bhanuprakash-reddy</dc:creator>
    <dc:date>2010-05-27T11:36:37Z</dc:date>
    <item>
      <title>H.264 Encoder getting Access violation error during GetFrame function call</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875039#M9383</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have getting access violation error in memcopy.asm file during a function call H264VideoEncoder::GetFrame(MediaData *in, MediaData *out) for encoding a specific frame.&lt;BR /&gt;&lt;BR /&gt;I got a Access violation error below palce in memcopy.asm file,&lt;BR /&gt;&lt;BR /&gt;LeadUp2:&lt;BR /&gt; and edx,ecx ;U - trailing byte count&lt;BR /&gt; mov al,[esi] ;V - get first byte from source&lt;BR /&gt;&lt;BR /&gt; &lt;STRONG&gt;mov [edi],al ;U - write second byte to destination&lt;/STRONG&gt; -----------&amp;gt; Access violation error&lt;BR /&gt; mov al,[esi+1] ;V - get second byte from source&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Bhanuprakash.&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Sep 2009 08:47:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875039#M9383</guid>
      <dc:creator>Bhanuprakash-reddy</dc:creator>
      <dc:date>2009-09-09T08:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: H.264 Encoder getting Access violation error during GetFram</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875040#M9384</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Hello Bhanuprakash, &lt;BR /&gt;&lt;BR /&gt;What platform and Which IPP sample version are you using? Are you call it from mulithreads? It is better if you canprovide a piece of input frame (YUV file andinput parameter)for us to see what is the problem. &lt;BR /&gt;&lt;BR /&gt;Here is a sample h.264 encoder main.cpp&amp;lt;&amp;lt;&lt;A href="http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/"&gt;http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/&lt;/A&gt;&amp;gt; for your reference. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Ying</description>
      <pubDate>Fri, 11 Sep 2009 05:14:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875040#M9384</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2009-09-11T05:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: H.264 Encoder getting Access violation error during GetFram</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875041#M9385</link>
      <description>Hi Ying,&lt;BR /&gt;&lt;BR /&gt;I have solved my problem referring with intel-ipp-unified-media-classes-sample which you are provided.&lt;BR /&gt;&lt;BR /&gt;Previously I createdDataOut Object like below:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: x-small;"&gt;&lt;FONT size="2"&gt;&lt;P&gt;MediaData *m_pMediaOut = NULL;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;P&gt;if( m_pMediaOut == NULL)&lt;BR /&gt;{&lt;BR /&gt; m_pMediaOut = new MediaData();&lt;BR /&gt; m_pMediaOut-&amp;gt;Alloc(4*m_nWidth*m_nHeight); // this line of code created problem&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;after that I changed to m_pMediaOut-&amp;gt;SetBufferPointer(chEncodedData,nWidth*nHeight);&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;My Sample code is like below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;int CH264Codec::EncodeData(unsigned char *chYUVData,int nWidth, int nHeight, int nYUVSize, unsigned char *chEncodedData)&lt;BR /&gt;{&lt;BR /&gt;if(chYUVData == NULL)&lt;BR /&gt;return 0;&lt;/P&gt;&lt;P&gt;m_nEncodedSize = 0;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;UMC::Status ret = UMC_OK;&lt;/P&gt;&lt;P&gt;if(m_pEncoderParams &amp;amp;&amp;amp; m_pVideoIn )&lt;BR /&gt;{&lt;BR /&gt;ret = m_pVideoIn-&amp;gt;SetBufferPointer(chYUVData,nYUVSize);// It is for streaming data&lt;BR /&gt;m_pVideoIn-&amp;gt;SetDataSize(nYUVSize);&lt;/P&gt;&lt;P&gt;m_pVideoIn-&amp;gt;SetTime((m_nFramesEncoded+1)/m_pEncoderParams-&amp;gt;info.framerate);&lt;BR /&gt;m_pEncoderParams-&amp;gt;numEncodedFrames = m_nFramesEncoded;&lt;BR /&gt;m_pCodec-&amp;gt;SetParams(m_pEncoderParams);&lt;BR /&gt;m_nFramesEncoded++;&lt;/P&gt;&lt;P&gt;m_pMediaOut-&amp;gt;SetBufferPointer(chEncodedData,nWidth*nHeight);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if( m_pCodec &amp;amp;&amp;amp; m_pVideoIn &amp;amp;&amp;amp; m_pMediaOut )&lt;BR /&gt;{&lt;BR /&gt; ret = m_pCodec-&amp;gt;GetFrame(m_pVideoIn, m_pMediaOut);&lt;BR /&gt;if ( (ret != UMC_OK) &amp;amp;&amp;amp; (ret != UMC_ERR_NOT_ENOUGH_DATA) &amp;amp;&amp;amp; (ret != UMC_ERR_END_OF_STREAM))&lt;BR /&gt;{&lt;BR /&gt;logger.Print(LL_INTERR, PANLOG("H264 encoding failed\n"));&lt;BR /&gt;m_pVideoIn-&amp;gt;ReleaseImage();&lt;BR /&gt;m_pVideoIn-&amp;gt;Reset();&lt;BR /&gt;m_pMediaOut-&amp;gt;Reset();&lt;/P&gt;&lt;P&gt;return UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ( ret == UMC_OK )&lt;BR /&gt;m_nEncodedSize = (Ipp32s)m_pMediaOut-&amp;gt;GetDataSize();&lt;/P&gt;&lt;P&gt;m_pVideoIn-&amp;gt;ReleaseImage();&lt;BR /&gt;m_pVideoIn-&amp;gt;Reset();&lt;BR /&gt;m_pMediaOut-&amp;gt;Reset();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;catch(...)&lt;BR /&gt;{&lt;BR /&gt;logger.Print(LL_INTERR, PANLOG("[CH264Codec::EncodeData] Exception - Error: %ld\n"), GetLastError());&lt;BR /&gt;return m_nEncodedSize;&lt;BR /&gt;}&lt;BR /&gt;return m_nEncodedSize;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 11:36:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-264-Encoder-getting-Access-violation-error-during-GetFrame/m-p/875041#M9385</guid>
      <dc:creator>Bhanuprakash-reddy</dc:creator>
      <dc:date>2010-05-27T11:36:37Z</dc:date>
    </item>
  </channel>
</rss>

