<?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 H264 stream decoding: never get the decoder frame in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/H264-stream-decoding-never-get-the-decoder-frame/m-p/904584#M13261</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am using Intel IPP 5.2 (and Iwill upgrade to 5.3 soon) with Intel UMC to decode H264 streams coming via rtsp.&lt;/P&gt;
&lt;P&gt;All the depacketisation part was already done and validated with ffmpeg library. We send to the decoder the NAL units with delimiter(0x00000001) in front of every units and the SPS/PPS unitsare extracted from the SDP and sent with every I-Frame with delimiter also. &lt;/P&gt;
&lt;P&gt;When I try to use theIntel decoder I have got a UMC_OK code returned by GetInfo() and Init() so I guess that the SPS and PPS are correctly read and understand by the decoder. However I have never get the UMC_OK from GetFrame(). It always returnsUMC_ERR_NOT_ENOUGH_DATA.&lt;/P&gt;
&lt;P&gt;I read many threads on the forum talking about this behavior, butas far as I understand I can not find whatismissing. Even if I "forced" to get the decoded frame with "GetFrame(NULL,..)" it fails.&lt;/P&gt;
&lt;P&gt;In one of the thread (&lt;A href="https://community.intel.com/en-us/forums//topic/58845"&gt;http://software.intel.com/en-us/forums//topic/58845&lt;/A&gt;) it looks like the decoder is not able to process FU-A units (fragmented ones) which appear strange to me.&lt;/P&gt;
&lt;P&gt;Is it really the case ?&lt;/P&gt;
&lt;P&gt;Do you think my problem comes from that ? (I know that I receive many FU-A units).&lt;/P&gt;
&lt;P&gt;How can I process these units ?&lt;/P&gt;
&lt;P&gt;The way my decoder wrapper works is the following :&lt;/P&gt;
&lt;P&gt;- my wrapper class contains among all:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;UMC::VideoDecoderParams *m_pVideoDecoderParams;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;UMC::MediaData *m_pInputNALData; &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;UMC::VideoData *m_pOutputData;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;UMC::VideoDecoder *m_pVideoDecoder;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;- In my wrapper contructor:&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;m_pInputNALData = &lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::MediaData();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;m_pOutputData = &lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::VideoData();&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoderParams = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::VideoDecoderParams();&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoderParams-&amp;gt;uiLimitThreads = 1; &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;m_pVideoDecoderParams-&amp;gt;m_pData = m_pInputNALData;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_pVideoDecoder = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::H264VideoDecoder();&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;- My wrapper receivesevery NAL unit one by one inside a buffer.&lt;/P&gt;
&lt;P&gt;For I-Frame,the buffer contains : &lt;DELIMITER code=""&gt;SPS unit&lt;DELIMITER code=""&gt;PPS unit&lt;DELIMITER code=""&gt;NAL unit&lt;/DELIMITER&gt;&lt;/DELIMITER&gt;&lt;/DELIMITER&gt;&lt;/P&gt;
&lt;P&gt;as it is explained in RFC 3984&lt;/P&gt;
&lt;P&gt;For the other frame, there is &lt;DELIMITER code=""&gt;NAL unit.&lt;/DELIMITER&gt;&lt;/P&gt;
&lt;P&gt;NAL units can be STAP-A, STAP-B or FU-A unit (and eventually others)&lt;/P&gt;
&lt;P&gt;For each buffer received, I do (I removed "details" like return code check, memory allocation etc..):&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// Set the input buffer with the NAL unit data (pBuffer)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pInputNALData-&amp;gt;SetBufferPointer(pInputBuffer,nSize);&lt;/P&gt;
&lt;P&gt;m_pInputNALData-&amp;gt;SetDataSize(nSize);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// Init the intel decoder with the decoder parameters&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoder-&amp;gt;Init(m_pVideoDecoderParams);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_pVideoDecoder-&amp;gt;GetInfo(m_pVideoDecoderParams);&lt;/P&gt;
&lt;P&gt;// If the get info is OK and the info are correct, I allocate the output data buffer. This is done only once if the info size do not change&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;......&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_nCurrentWidth = m_pVideoDecoderParams-&amp;gt;info.clip_info.width;&lt;/P&gt;
&lt;P&gt;m_nCurrentHeight = m_pVideoDecoderParams-&amp;gt;info.clip_info.height;&lt;/P&gt;
&lt;P&gt;m_nBufferSize = m_nCurrentWidth * m_nCurrentHeight * 1.5; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// this is for YUV420&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pOutputBuffer = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;unsigned&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;char&lt;/FONT&gt;&lt;FONT size="2"&gt;[m_nBufferSize];&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;// Then I init my ouput VideoData object&lt;/P&gt;
&lt;P&gt;m_pOutputData-&amp;gt;Init(m_nCurrentWidth,m_nCurrentHeight,UMC::YUV420,8);&lt;/P&gt;
&lt;P&gt;m_pOutputData-&amp;gt;SetBufferPointer((Ipp8u*)m_pOutputBuffer,m_nBufferSize);&lt;/P&gt;
&lt;P&gt;nRet = m_pVideoDecoder-&amp;gt;GetFrame(m_pInputNALData,m_pOutputData);&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;// This is where I always get the UMC_ERR_NOT_ENOUGH_DATA.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Any help and suggestions are welcomed&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;N.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Aug 2008 16:05:09 GMT</pubDate>
    <dc:creator>npoirier</dc:creator>
    <dc:date>2008-08-13T16:05:09Z</dc:date>
    <item>
      <title>H264 stream decoding: never get the decoder frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H264-stream-decoding-never-get-the-decoder-frame/m-p/904584#M13261</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am using Intel IPP 5.2 (and Iwill upgrade to 5.3 soon) with Intel UMC to decode H264 streams coming via rtsp.&lt;/P&gt;
&lt;P&gt;All the depacketisation part was already done and validated with ffmpeg library. We send to the decoder the NAL units with delimiter(0x00000001) in front of every units and the SPS/PPS unitsare extracted from the SDP and sent with every I-Frame with delimiter also. &lt;/P&gt;
&lt;P&gt;When I try to use theIntel decoder I have got a UMC_OK code returned by GetInfo() and Init() so I guess that the SPS and PPS are correctly read and understand by the decoder. However I have never get the UMC_OK from GetFrame(). It always returnsUMC_ERR_NOT_ENOUGH_DATA.&lt;/P&gt;
&lt;P&gt;I read many threads on the forum talking about this behavior, butas far as I understand I can not find whatismissing. Even if I "forced" to get the decoded frame with "GetFrame(NULL,..)" it fails.&lt;/P&gt;
&lt;P&gt;In one of the thread (&lt;A href="https://community.intel.com/en-us/forums//topic/58845"&gt;http://software.intel.com/en-us/forums//topic/58845&lt;/A&gt;) it looks like the decoder is not able to process FU-A units (fragmented ones) which appear strange to me.&lt;/P&gt;
&lt;P&gt;Is it really the case ?&lt;/P&gt;
&lt;P&gt;Do you think my problem comes from that ? (I know that I receive many FU-A units).&lt;/P&gt;
&lt;P&gt;How can I process these units ?&lt;/P&gt;
&lt;P&gt;The way my decoder wrapper works is the following :&lt;/P&gt;
&lt;P&gt;- my wrapper class contains among all:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;UMC::VideoDecoderParams *m_pVideoDecoderParams;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;UMC::MediaData *m_pInputNALData; &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;UMC::VideoData *m_pOutputData;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;UMC::VideoDecoder *m_pVideoDecoder;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;- In my wrapper contructor:&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;m_pInputNALData = &lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::MediaData();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;m_pOutputData = &lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::VideoData();&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoderParams = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::VideoDecoderParams();&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoderParams-&amp;gt;uiLimitThreads = 1; &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;m_pVideoDecoderParams-&amp;gt;m_pData = m_pInputNALData;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_pVideoDecoder = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; UMC::H264VideoDecoder();&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;- My wrapper receivesevery NAL unit one by one inside a buffer.&lt;/P&gt;
&lt;P&gt;For I-Frame,the buffer contains : &lt;DELIMITER code=""&gt;SPS unit&lt;DELIMITER code=""&gt;PPS unit&lt;DELIMITER code=""&gt;NAL unit&lt;/DELIMITER&gt;&lt;/DELIMITER&gt;&lt;/DELIMITER&gt;&lt;/P&gt;
&lt;P&gt;as it is explained in RFC 3984&lt;/P&gt;
&lt;P&gt;For the other frame, there is &lt;DELIMITER code=""&gt;NAL unit.&lt;/DELIMITER&gt;&lt;/P&gt;
&lt;P&gt;NAL units can be STAP-A, STAP-B or FU-A unit (and eventually others)&lt;/P&gt;
&lt;P&gt;For each buffer received, I do (I removed "details" like return code check, memory allocation etc..):&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// Set the input buffer with the NAL unit data (pBuffer)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pInputNALData-&amp;gt;SetBufferPointer(pInputBuffer,nSize);&lt;/P&gt;
&lt;P&gt;m_pInputNALData-&amp;gt;SetDataSize(nSize);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// Init the intel decoder with the decoder parameters&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pVideoDecoder-&amp;gt;Init(m_pVideoDecoderParams);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_pVideoDecoder-&amp;gt;GetInfo(m_pVideoDecoderParams);&lt;/P&gt;
&lt;P&gt;// If the get info is OK and the info are correct, I allocate the output data buffer. This is done only once if the info size do not change&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;......&lt;P&gt;&lt;/P&gt;
&lt;P&gt;m_nCurrentWidth = m_pVideoDecoderParams-&amp;gt;info.clip_info.width;&lt;/P&gt;
&lt;P&gt;m_nCurrentHeight = m_pVideoDecoderParams-&amp;gt;info.clip_info.height;&lt;/P&gt;
&lt;P&gt;m_nBufferSize = m_nCurrentWidth * m_nCurrentHeight * 1.5; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;// this is for YUV420&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;m_pOutputBuffer = &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;unsigned&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;char&lt;/FONT&gt;&lt;FONT size="2"&gt;[m_nBufferSize];&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;// Then I init my ouput VideoData object&lt;/P&gt;
&lt;P&gt;m_pOutputData-&amp;gt;Init(m_nCurrentWidth,m_nCurrentHeight,UMC::YUV420,8);&lt;/P&gt;
&lt;P&gt;m_pOutputData-&amp;gt;SetBufferPointer((Ipp8u*)m_pOutputBuffer,m_nBufferSize);&lt;/P&gt;
&lt;P&gt;nRet = m_pVideoDecoder-&amp;gt;GetFrame(m_pInputNALData,m_pOutputData);&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;// This is where I always get the UMC_ERR_NOT_ENOUGH_DATA.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Any help and suggestions are welcomed&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;N.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2008 16:05:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H264-stream-decoding-never-get-the-decoder-frame/m-p/904584#M13261</guid>
      <dc:creator>npoirier</dc:creator>
      <dc:date>2008-08-13T16:05:09Z</dc:date>
    </item>
  </channel>
</rss>

