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

Michael Niedermayer michaelni
Fri Dec 1 03:05:28 CET 2006


Hi

On Fri, Dec 01, 2006 at 01:24:13AM +0100, Nico Sabbi wrote:
> Michael Niedermayer wrote:
> 
> >
> >this is wrong, if you output a picture, then it must be removed otherwise
> >it would be output again with the next I frame
> >
> >and no iam not saying s2->next_picture_ptr= NULL is enough for this, just
> >that doing nothing is definitly not correct
> >
> >[...]
> 
> this patch works exactly as I need (mplayer -fps 1 file.m2v 
> shows the stills with 0 delay without setting low_delay in 
> the flags),
> but I don't know if it's even remotely acceptable or how 
> much it sucks, apologies in advance :)
> 
> The seq_end_code is stored at the end of the frame, and 
> based on its presence slice_end() works as if low_delay was set;
> ff_draw_horiz_band() works on ->current_picture_ptr if
> the codec is mpeg12 && pict_type== I_frame and ->temp_ref==0

this is wrong, it totally violate the spec and it will cause 
artifacts for every i frame with temp_ref==0


> (that should be true for all mpeg12 stills).
> If this method is wrong I'd like to have some direction, 
> please :) At the moment I'm just stabbing in the dark

ok, see below, i hope it makes sense as iam tired if not ill retry tomorow

(S=still image, E=seq end, please correct me if some assumtion is wrong)

as stored:               I0 P3 B1 B2 P6 B4 B5 P7 S8 E9 IA PD BB BC
decoding with your code:    I0 B1 B2 P3 B4 B5 P6 S8    S8?IA BB BC
what should be output:      I0 B1 B2 P3 B4 B5 P6 P7 S8    IA BB BC

your code looses the last frame before the still image (iam assuming that
this shouldnt happen, but i dunno, maybe iam wrong in what spec is the
still picture stuff?)

[...]
-- 
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