<?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 with h.264 decoding CIF and 2CIF in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770540#M657</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have developed an RTSP application that displays video from cameras on a local network. &lt;BR /&gt;&lt;BR /&gt;My development platform is:&lt;BR /&gt;Windows 7 (32 bit) &lt;BR /&gt;Visual Studio 2008&lt;BR /&gt;IPP vers 7.0.4.196&lt;BR /&gt;&lt;BR /&gt;I am displaying video successfully for multiple stream formats excluding CIF (352288) and 2CIF (704x240). &lt;/P&gt;&lt;P&gt;The image produced from the decoder for 352x288 is blocky and the color is off (see CIF_252x288.png). &lt;/P&gt;&lt;P&gt;The image produced from the decoder for 704x240 is squatty. The image is displayed by the ratio defined instead of 704x480 (2CIF_704x240.png).&lt;/P&gt;&lt;P&gt;As stated the application displays other streams successfully. For example 1280x720 streams great. Because of this I am handling SPS and PPS properly (at least some of the time). Is there Pre or Post processing of the image the application should be doing before or after h.264 decoder or is the h.264 decoder supposes to handle these images?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Im hoping someone will be kind and direct me on my error. &lt;BR /&gt;&lt;BR /&gt;&lt;IMG height="60" width="176" src="http://software.intel.com/file/m/45521" /&gt; 2CIF (704X240)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG height="144" width="176" src="http://software.intel.com/file/m/45520" /&gt;CIF (352x288&lt;BR /&gt;&lt;BR /&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;//Below is how I am initiating decoder. I removed failure lines to consolidate code&lt;BR /&gt;&lt;BR /&gt;// pData -- byte array containing SPS and FPS parameters&lt;BR /&gt;//nSize -- Size of pData array&lt;BR /&gt;// nThreadCount -- always 1&lt;BR /&gt;// nWidth -- return video width to calling function&lt;BR /&gt;// nHeight -- returns video height to calling function&lt;/P&gt;&lt;P&gt;bool Init (BYTE *pData, unsigned long nSize, int nThreadCount, int &amp;amp;nWidth, int &amp;amp;nHeight)&lt;BR /&gt;{&lt;BR /&gt; bool bRetVal = false;&lt;BR /&gt;UMC::Status nStatus;&lt;BR /&gt;nWidth = 0;&lt;BR /&gt;nHeight = 0;&lt;BR /&gt;UMC::VideoDecoderParams VidDecodeParams;&lt;BR /&gt;m_pvidDecoder = new UMC::H264VideoDecoder();&lt;BR /&gt;if (m_pvidDecoder)&lt;BR /&gt;{&lt;BR /&gt; m_inVid.SetBufferPointer (pData, nSize);&lt;BR /&gt;m_inVid.SetDataSize (nSize);&lt;BR /&gt;&lt;BR /&gt;VidDecodeParams.pPostProcessing = NULL;&lt;BR /&gt;VidDecodeParams.info.stream_type = UMC::H264_VIDEO;&lt;BR /&gt;VidDecodeParams.numThreads = nThreadCount;&lt;BR /&gt;VidDecodeParams.lFlags = 0;&lt;BR /&gt;VidDecodeParams.m_pData = &amp;amp;m_inVid;&lt;BR /&gt;nStatus = m_pvidDecoder-&amp;gt;Init(&amp;amp;VidDecodeParams);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; UMC::H264VideoDecoderParams params;&lt;BR /&gt;nStatus = m_pvidDecoder-&amp;gt;GetInfo (&amp;amp;params);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; nWidth = params.info.clip_info.width;&lt;BR /&gt;nHeight = params.info.clip_info.height;&lt;BR /&gt;nStatus = m_outVid.Init (nWidth, nHeight, UMC::YUY2, 8);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; nStatus = m_outVid.Alloc ();&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; bRetVal = true;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt; return (bRetVal);&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2012 14:41:56 GMT</pubDate>
    <dc:creator>bcisrd</dc:creator>
    <dc:date>2012-08-09T14:41:56Z</dc:date>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770540#M657</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have developed an RTSP application that displays video from cameras on a local network. &lt;BR /&gt;&lt;BR /&gt;My development platform is:&lt;BR /&gt;Windows 7 (32 bit) &lt;BR /&gt;Visual Studio 2008&lt;BR /&gt;IPP vers 7.0.4.196&lt;BR /&gt;&lt;BR /&gt;I am displaying video successfully for multiple stream formats excluding CIF (352288) and 2CIF (704x240). &lt;/P&gt;&lt;P&gt;The image produced from the decoder for 352x288 is blocky and the color is off (see CIF_252x288.png). &lt;/P&gt;&lt;P&gt;The image produced from the decoder for 704x240 is squatty. The image is displayed by the ratio defined instead of 704x480 (2CIF_704x240.png).&lt;/P&gt;&lt;P&gt;As stated the application displays other streams successfully. For example 1280x720 streams great. Because of this I am handling SPS and PPS properly (at least some of the time). Is there Pre or Post processing of the image the application should be doing before or after h.264 decoder or is the h.264 decoder supposes to handle these images?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Im hoping someone will be kind and direct me on my error. &lt;BR /&gt;&lt;BR /&gt;&lt;IMG height="60" width="176" src="http://software.intel.com/file/m/45521" /&gt; 2CIF (704X240)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG height="144" width="176" src="http://software.intel.com/file/m/45520" /&gt;CIF (352x288&lt;BR /&gt;&lt;BR /&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;//Below is how I am initiating decoder. I removed failure lines to consolidate code&lt;BR /&gt;&lt;BR /&gt;// pData -- byte array containing SPS and FPS parameters&lt;BR /&gt;//nSize -- Size of pData array&lt;BR /&gt;// nThreadCount -- always 1&lt;BR /&gt;// nWidth -- return video width to calling function&lt;BR /&gt;// nHeight -- returns video height to calling function&lt;/P&gt;&lt;P&gt;bool Init (BYTE *pData, unsigned long nSize, int nThreadCount, int &amp;amp;nWidth, int &amp;amp;nHeight)&lt;BR /&gt;{&lt;BR /&gt; bool bRetVal = false;&lt;BR /&gt;UMC::Status nStatus;&lt;BR /&gt;nWidth = 0;&lt;BR /&gt;nHeight = 0;&lt;BR /&gt;UMC::VideoDecoderParams VidDecodeParams;&lt;BR /&gt;m_pvidDecoder = new UMC::H264VideoDecoder();&lt;BR /&gt;if (m_pvidDecoder)&lt;BR /&gt;{&lt;BR /&gt; m_inVid.SetBufferPointer (pData, nSize);&lt;BR /&gt;m_inVid.SetDataSize (nSize);&lt;BR /&gt;&lt;BR /&gt;VidDecodeParams.pPostProcessing = NULL;&lt;BR /&gt;VidDecodeParams.info.stream_type = UMC::H264_VIDEO;&lt;BR /&gt;VidDecodeParams.numThreads = nThreadCount;&lt;BR /&gt;VidDecodeParams.lFlags = 0;&lt;BR /&gt;VidDecodeParams.m_pData = &amp;amp;m_inVid;&lt;BR /&gt;nStatus = m_pvidDecoder-&amp;gt;Init(&amp;amp;VidDecodeParams);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; UMC::H264VideoDecoderParams params;&lt;BR /&gt;nStatus = m_pvidDecoder-&amp;gt;GetInfo (&amp;amp;params);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; nWidth = params.info.clip_info.width;&lt;BR /&gt;nHeight = params.info.clip_info.height;&lt;BR /&gt;nStatus = m_outVid.Init (nWidth, nHeight, UMC::YUY2, 8);&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; nStatus = m_outVid.Alloc ();&lt;BR /&gt;if(nStatus == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt; bRetVal = true;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt; return (bRetVal);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 14:41:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770540#M657</guid>
      <dc:creator>bcisrd</dc:creator>
      <dc:date>2012-08-09T14:41:56Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770541#M658</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Do you have raw video stream, and if you play with these raw video with simpleplayer application, and see it work? &lt;/P&gt;&lt;P&gt;Also I see you implicitly to cover the the video from YUV420 to YUY2 format, if you just decoded as YUV420, how does the video work? &lt;/P&gt;&lt;P&gt;thanks,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 05:28:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770541#M658</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2012-08-10T05:28:22Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770542#M659</link>
      <description>&lt;P&gt;I do not have raw video to use with sample player. With a little research I could create a compatible file.&lt;/P&gt;&lt;P&gt;My video display code currently only works with YUY2. So I will have to do some work to get an answer regarding YUV420 question.&lt;/P&gt;&lt;P&gt;Reviewing the SDP I receive from the camera I found that I wasnt doing anything with profile-level-id data. &lt;/P&gt;&lt;P&gt;v=0&lt;BR /&gt;o=- 0 0 IN IP4 10.1.12.237&lt;BR /&gt;s=LIVE VIEW&lt;BR /&gt;t=0 0&lt;BR /&gt;c=IN IP4 0.0.0.0&lt;BR /&gt;m=video 0 RTP/AVP 35&lt;BR /&gt;a=rtpmap:35 H264/90000&lt;BR /&gt;a=control:rtsp://10.1.12.237/video&lt;BR /&gt;a=fmtp:35 packetization-mode=1;profile-level-id=42001e;sprop-parameter-sets=Z0IAHtoCwfP/AAUACykC,aN4FYg==&lt;BR /&gt;&lt;BR /&gt;Currently my application converts sprop-parameter-sets data and passes it decoder Init function (pData array). But Im not using profile-level-id &lt;/P&gt;&lt;P&gt; profile-level-id=42001e&lt;BR /&gt; profile_idc  66&lt;BR /&gt;profile_iop  0&lt;BR /&gt; level_idc  30&lt;/P&gt;&lt;P&gt;My question is how do I assign these values to the decoder? I have tried below without any changes. Is this the wrong approach? Is this info supose to be included in the pData array along with 'sprop-parameter-sets' ?&lt;/P&gt;&lt;P&gt;bool Init (BYTE *pData, unsigned long nSize, int nThreadCount, int &amp;amp;nWidth, int &amp;amp;nHeight, CString strProfileLevelId)&lt;BR /&gt;{&lt;BR /&gt; &lt;BR /&gt; UMC::VideoDecoderParams VidDecodeParams;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; BYTE nProfileIdc = 0;&lt;BR /&gt; BYTE nProfileIop = 0;&lt;BR /&gt; BYTE nLevel_idc = 0;&lt;BR /&gt; if(!strProfileLevelId.IsEmpty ())&lt;BR /&gt; {&lt;BR /&gt; if(strProfileLevelId.GetLength () &amp;gt;= 2)&lt;BR /&gt; {&lt;BR /&gt; nProfileIdc = HexToDec(strProfileLevelId.Mid (0, 2));&lt;BR /&gt; if(strProfileLevelId.GetLength () &amp;gt;= 4)&lt;BR /&gt; {&lt;BR /&gt; nProfileIop = HexToDec(strProfileLevelId.Mid (2, 2));&lt;BR /&gt; if(strProfileLevelId.GetLength () &amp;gt;= 6)&lt;BR /&gt; nLevel_idc = HexToDec(strProfileLevelId.Mid (4, 2));&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt; VidDecodeParams.pPostProcessing = NULL;&lt;BR /&gt; VidDecodeParams.info.stream_type = UMC::H264_VIDEO;&lt;BR /&gt; &lt;BR /&gt; // profile_idc&lt;BR /&gt; VidDecodeParams.info.profile = nProfileIdc;&lt;BR /&gt;&lt;BR /&gt; //profile_iop&lt;BR /&gt; VidDecodeParams.info. ???&lt;BR /&gt;&lt;BR /&gt; // level_idc&lt;BR /&gt; VidDecodeParams.info.level = nLevel_idc;&lt;BR /&gt;&lt;BR /&gt; VidDecodeParams.numThreads = nThreadCount;&lt;BR /&gt; VidDecodeParams.lFlags = 0;&lt;BR /&gt; VidDecodeParams.m_pData = &amp;amp;m_inVid;&lt;BR /&gt; &lt;BR /&gt; nStatus = m_pvidDecoder-&amp;gt;Init(&amp;amp;VidDecodeParams);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:12:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770542#M659</guid>
      <dc:creator>bcisrd</dc:creator>
      <dc:date>2012-08-10T14:12:05Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770543#M660</link>
      <description>&lt;BR /&gt;Hello, &lt;BR /&gt;&lt;BR /&gt;Profile and level id are not needed forinputparamters for decoder. They are the output from the decoder. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao</description>
      <pubDate>Mon, 13 Aug 2012 01:46:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770543#M660</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2012-08-13T01:46:29Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770544#M661</link>
      <description>&lt;P&gt;The simple player does not play the 2 streams.&lt;BR /&gt;&lt;BR /&gt;See next post.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 17:37:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770544#M661</guid>
      <dc:creator>bcisrd</dc:creator>
      <dc:date>2012-08-14T17:37:47Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770545#M662</link>
      <description>&lt;P&gt;Okay, I think I have found my problem. It appears the RTSP program is not handling STAP-A packets properly.&lt;BR /&gt;&lt;BR /&gt;I will address this problem and update this post.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the help.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 20:54:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770545#M662</guid>
      <dc:creator>bcisrd</dc:creator>
      <dc:date>2012-08-14T20:54:17Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770546#M663</link>
      <description>Most of my problem was addressed by processing the RTP STAP-A type properly. But, I still have an issue on displaying the 2Cif image (704x240). It is becoming apparent that there is pre/post processing required!? &lt;BR /&gt;&lt;BR /&gt;Will someone explain the proper procedure to display a 2CIF video? As stated in earlier post the image produced by the encoder is 704x240 instead of expected 704x480. &lt;BR /&gt;&lt;BR /&gt;Also, if you review the attachment you will see the quality of the image distorts and clears up towards the end of video stream. Any direction on howcorrect this would be helpful.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the help.&lt;P&gt;&lt;/P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:01:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770546#M663</guid>
      <dc:creator>bcisrd</dc:creator>
      <dc:date>2012-08-15T19:01:37Z</dc:date>
    </item>
    <item>
      <title>Problem with h.264 decoding CIF and 2CIF</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770547#M664</link>
      <description>Good day.&lt;BR /&gt;&lt;BR /&gt;You need to correct image size to match DAR.&lt;BR /&gt;For simple_player it would be something like this:&lt;BR /&gt;&lt;BR /&gt;avsync.cpp, line 253:&lt;BR /&gt;[cpp]            m_DecodedFrameSize = m_pVideoInfo-&amp;gt;clip_info;

            // correct DAR
            if(m_pVideoInfo-&amp;gt;aspect_ratio_width != m_pVideoInfo-&amp;gt;aspect_ratio_height)
            {
                Ipp32f fScale = ((Ipp32f)m_pVideoInfo-&amp;gt;aspect_ratio_width/m_DecodedFrameSize.width)/((Ipp32f)m_pVideoInfo-&amp;gt;aspect_ratio_height/m_DecodedFrameSize.height);
                if(fScale &amp;gt; 1)
                    m_DecodedFrameSize.width = m_DecodedFrameSize.width*fScale;
                else
                    m_DecodedFrameSize.height = m_DecodedFrameSize.height/fScale;
            }[/cpp] &lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV style="text-align: left;"&gt;Also, if you review the attachment you will see the quality of the image
 distorts and clears up towards the end of video stream. Any direction 
on howcorrect this would be helpful.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;It seems that there are data losses in the stream, codec had reconstructed that it could.</description>
      <pubDate>Thu, 16 Aug 2012 14:56:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770547#M664</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2012-08-16T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Just as a side note you might</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770548#M665</link>
      <description>Just as a side note you might want to verify the pixel aspect ratio before using it as shown above. I've seen some video streams report ratios such as 0x1 and 0x0 (this case would be fine in the code above), etc. Also I've found its not always reliable (especially regarding 2CIF) as some streams don't properly report the pixel aspect ratio as 1x2 or a similar value. As a general rule if its valid and the aspect width or aspect height are greater than 1 then use it. In other cases you may want to explicitly list known 2CIF resolutions (or other known resolutions with issues) and adjust for the proper pixel aspect ratios.</description>
      <pubDate>Thu, 18 Oct 2012 14:02:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-h-264-decoding-CIF-and-2CIF/m-p/770548#M665</guid>
      <dc:creator>Steve_Browne</dc:creator>
      <dc:date>2012-10-18T14:02:47Z</dc:date>
    </item>
  </channel>
</rss>

