[Ffmpeg-devel] Problems with output picture reordering in H.264 decoder

Loren Merritt lorenm
Wed Aug 9 19:14:19 CEST 2006


On Wed, 9 Aug 2006, Uoti Urpala wrote:
> On Wed, 2006-08-09 at 08:53 -0700, Loren Merritt wrote:
>> * Detect the frame before the out-of-order frame. No artifacts in the
>> normal case, but breaks if the stream does funny things with POC. (the
>> current implementation)
>
> What kind of container timestamps are you assuming and what kind of
> frame timing in the player? MPlayer wouldn't behave as you described,
> neither with old timing nor with -correct-pts, at least if I understood
> you correctly. By "detect the frame" do you mean the point at which the
> decoder doesn't output a frame?

I assume nothing about the container. This algorithm runs entirely inside 
libavcodec, using the h264's own pseudo-timestamps, "POC". If the current 
frame's POC increases by more than 1 frame's duration from the previous 
POC, then I assume that it's out-of-order and that there will be a 
following frame that fills in the gap. However, the standard doesn't 
define what 1 frame's duration is; it's just a convention in most H.264 
encoders to use delta_POC=2 between frames in a progressive stream, or 
delta_POC=1 between fields in an interlaced stream. But Diego found an 
encoder that uses delta_POC=4.

--Loren Merritt




More information about the ffmpeg-devel mailing list