[MPlayer-dev-eng] Re: -of mpeg
Michael Niedermayer
michaelni at gmx.at
Tue Oct 21 16:18:27 CEST 2003
Hi
On Tuesday 21 October 2003 15:46, D Richard Felker III wrote:
> On Tue, Oct 21, 2003 at 01:15:50PM +0200, Michael Niedermayer wrote:
> > Hi
> >
> > On Saturday 18 October 2003 00:53, D Richard Felker III wrote:
> > [...]
> >
> > > I'm curious...is there any way to encode duplicate frames in mpeg
> > > output?
> >
> > mpeg2 standard:
> > ----
> > If progressive_sequence is equal to '1', this flag, combined
> > with repeat_first_field, indicates how many times (one, two or
> > three) the reconstructed frame is output by the decoding process.
> > ----
> >
> > so yes, if the video is progresive then we can duplicate frames
>
> You can only lengthen frames by 50% (3 field duration) which doesn't
> seem very useful except for correcting minor a/v sync issues.
thats the case for interlaced streams, but for progressive u can duplicate
frames
heres the relevant code from lavc
---
if (s->repeat_first_field) {
if (s->progressive_sequence) {
if (s->top_field_first)
s->current_picture_ptr->repeat_pict = 4;
else
s->current_picture_ptr->repeat_pict = 2;
} else if (s->progressive_frame) {
s->current_picture_ptr->repeat_pict = 1;
}
}
---
yes they are (miss)using top_field_first here
and heres the MPEG2 standard:
---
top_field_first -- The meaning of this element depends upon
picture_structure, progressive_sequence and repeat_first_field.
If progressive_sequence is equal to '0', this flag indicates what field of
a reconstructed frame is output first by the decoding process:
In a field picture top_field_first shall have the value '0', and the only
field output by the decoding process is the decoded field picture.
In a frame picture top_field_first being set to '1' indicates that the top
field of the reconstructed frame is the first field output by the decoding
process. top_field_first being set to '0' indicates that the bottom field
of the reconstructed frame is the first field output by decoding process
If progressive_sequence is equal to '1', this flag, combined with
repeat_first_field, indicates how many times (one, two or three) the
reconstructed frame is output by the decoding process.
If repeat_first_field is set to 0, top_field_first shall be set to '0'.
In this case the output of the decoding process corresponding to this
reconstructed frame consists of one progressive frame.
If top_field_first is set to 0 and repeat_first_field is set to '1', the
output of the decoding process corresponding to this reconstructed frame
consists of two identical progressive frames.
If top_field_first is set to 1 and repeat_first_field is set to '1', the
output of the decoding process corresponding to this reconstructed frame
consists of three identical progressive frames.
---
[...]
--
Michael
level[i]= get_vlc(); i+=get_vlc(); (violates patent EP0266049)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates patent #5,905,535)
buf[i]= qp - buf[i-1]; (violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en
More information about the MPlayer-dev-eng
mailing list