[Ffmpeg-devel] [FWD] [PATCH] immediate decoding of dvd stills

Michael Niedermayer michaelni
Sun Dec 3 01:55:10 CET 2006


Hi

On Sat, Dec 02, 2006 at 03:29:23PM +0100, Nico Sabbi wrote:
> Michael Niedermayer wrote:
> >Hi
> >
> >On Fri, Dec 01, 2006 at 11:10:03PM +0100, Nico Sabbi wrote:
> 
> >>sequence header+all sequence_extension headers
> >>I frame with temp_ref=0
> >>sequence_end
> >
> >
> >low_delay=0 for them or? if so then forcing low_delay=1 is not correct
> >
> >[...]
> >
> sorry, I don't understand what you mean in the last sentence.

a mpeg decoder MUST conform to the mpeg specification the mpeg specificaton
leaves no doubt that low_delay=0 in the header means low_delay=0


> 
> Is this patch acceptable?
> If the frame ends with a sequence end code && pict_type==I
> && temp_ref==0 then temporarily set low_delay=1.
> Before returning restore the original low_delay.
> Together with the second patch it works correctly with mplayer.

no, it looses the last frame and simply isnt correct, if they would have
wanted the decoder to behave as low_delay=1 they would have set that in
the header for still images, so i do not think this is the correct
way to handle it (feel free to point me to some spec which says otherwise)

also think of concatenated streams this should make the issue more obvious

            I0 P1 P2 E3 <a few seconds of zero padding>I4 P5 P6
            -  I0 P1                                   P2 I4 P5
the issue here is the last frame of the previous sequence is shown when
the next sequence starts not when the sequence ended
            -  I0 P1 P2                                -  I4 P5


so the correct solution seems to be:
all normal frames get decoded and displayed as they are currently
if an sequence end is hit, the last frame is output (and removed
   so it wont be output twice)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list