Community
cancel
Showing results for 
Search instead for 
Did you mean: 
franknatoli
New Contributor I
43 Views

H.264 Decoder "not enough data"

I find that H264VideoDecoder method GetFrame has to be called 31 times before it finally returns a firstoutput frame. I believe that each call to splitter method GetNextData is extracting a complete, contiguous set of bytes that form all the data necessary to decode a frame. Yet this has to happen 31 times, stretching across multiple MOOF/MDAT MPEG-4 boxes, before H264VideoDecoder returns a frame.

The particular MPEG-4 I'm working with has I-frames and P-frames but no B-frames, so there is never a necessity to look forward to decode a previous frame. The above mentioned 31 calls to GetFrame has for its first call an I-frame, whose data is of course complete and needs no subsequent P-frame data.

In my application, where extracting a specific frame given its ownH.264 data is critical, these 31 calls is intolerable. What is the H264VideoDecoder doing? What is error "not enough data" occurring?

0 Kudos
2 Replies
Ying_H_Intel
Employee
43 Views

Hello franknatoli,

The problem seemed have been discussed in the forum. Here is some of them.

http://software.intel.com/en-us/forums/showthread.php?t=51584

http://software.intel.com/en-us/forums/showthread.php?t=67755

The main reason of the delay is becuase following the standard, decoder could't return frame until DPB is full enough (it is needed for correct reordering frames process) andsome workaround for example moidfy code, (just for simple case).

Hope they can help

Regards,

Ying

franknatoli
New Contributor I
43 Views

Thank you. Rather than fiddle with level_idc, considering that regardless of the value I would still need to push at least one additional frame's worth of H.264 into the decoder before getting the first frame out, I enhanced my code to do as many frames as the decoder requires.

Reply