Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

H.264 Decoder Issue in IPP v. 8

Rohit_S_2
Beginner
379 Views

I am trying to decode an H.264 video clip that was encoded by a video camera with built in H.264 encoding capability.  Our software is currently using IPP version 7 and we are in the process of upgrading our application to IPP version 8.

There are no issues with decoding the video when we use the IPP version 7 H.264 decoder implementation.  However, when we plugged in the IPP version 8 H.264 decoder implementation, the decoded video looks strange.  We can see 3 visual planes in the decoded output - 2 small ones near the top of the viewing area and a third stretched out plane near the botto).  The 2 small planes are identical and reflect the recorded video stream; the third one is noise (no discernable image/video).  Also, the color scheme is very strange and definitely not indicative of what it should be.

The decoder implementation was taken from the IPP version 8 sample code.

The video clip container format is .AVI.

The H.264 decoder implementation has changed from version 7 to version 8 and we suspect that we are not initializing the version 8 decoder correctly.

Here are the parameters that we specify when we initialize it (version 7):

  1. video clip width
  2. video clip height
  3. number of processing threads (set to 1)

Here are the parameters that we specify when we initialize the output frame structure (version 7):

  1. video clip width
  2. video clip height
  3. color format (set to YUY2)

We noticed that H.264 decoder implementation uses the YUV420 color format internally and that if specify something different (such as YUY2) it simply does not work - the decoder throws exceptions and completely fails to produce a decoded video.  We changed the color format parameter in the init call of the output frame from YUY2 to YUV420 and now we get a video but it looks strange.

Does somebody know what we might be doing wrong?

Thank you.

0 Kudos
2 Replies
Ramashankar
New Contributor III
379 Views

Hi Rohit,

The way you explained the behavior of your output video, initially it seems to me only the issue of incorrect color format or frame size calculation. Can you take the dump of your YUV output video and try to play that YUV files in any yuv player with different differnt color fomat (like YUV420 and YUV422, YUY2 etc).

>> We changed the color format parameter in the init call of the output frame from YUY2 to YUV420 and now we get a video but it looks strange.

Just to check: When you change the format to YUV420 in Decoder's Init(), then have you changed the format of output VideoData (like in m_DataOut.Init(...) ) also?

0 Kudos
Rohit_S_2
Beginner
379 Views

The problem was that the post processing handling was removed from the H.264 decoder in version 8 (this fact was not documented anywhere AFAIK).  So I added that step in our code and then it worked.

0 Kudos
Reply