|Site sponsored by IGEL|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[directfb-dev] Re: Seeing "tearing" using mplayer dfbmga
email@example.com (firstname.lastname@example.org): > > The problem is that interlaced MPEG files may give frames as either > > top-field-first or bottom-field-first and they may switch if the > > repeat-first-field flag is ever used in the file. > > This is an MPEG2 compression technique to basically say that there was > no change between the last field and this one, so just repeat the last > field? > > Do you think MPlayer ignores these and just continues to take field > after field and make "progressive" frames out of them? Would this not > screw up the A/V sync? You're making this more complicated than it is. In the MPEG2 file the interlaced stream is split logically into frames already. These frames get output by libmpeg2 into mplayer. They may be interlaced or not. Some may have a duration of 1.5 frames instead of 1 frame, only used for 3:2 pulldown encoding. So, you have four cases: 1. A top-field first frame. Only show for 2 fields. 2. A bottom-field first frame. Only show for 2 fields. 3. A top-field first frame. Show for 3 fields (show top field twice). 4. A bottom-field first frame. Show for 3 fields. So use of the repeat-first-field flag can change the parity of a frame. [Top Bot] [Top Bot] [Top Bot Top] [Bot Top] [Bot Top] [Bot Top] Like that. mplayer doesn't get out of A/V sync since it just puts display timestamps on each of the output frames to say when they should be shown, and it correctly increments its counter by 1 frame or 1.5 frame's worth according to the repeat_first_field flag. It's all very simple. Since mplayer doesn't care about top-first or bottom-first, they only have two cases: frame with a duration of 1 frame's time, or frame with a duration of 1.5 frame's time. -- Billy Biggs email@example.com -- Info: To unsubscribe send a mail to firstname.lastname@example.org with "unsubscribe directfb-dev" as subject.