[FFmpeg-devel] mpegvideo : interlaced_frame with picture_structure == PICT_FRAME

Vanista Herion vanista at gmail.com
Tue Jan 6 14:28:41 CET 2015


Good explanation, I neglected telecine; wasn't aware of how it worked.
Agreed, yadif should handle that, the decoder cannot reverse-telecine by
itself without some kind of hinting of the original frames correspondence.
Thanks a lot.

2015-01-05 18:35 GMT-05:00 Michael Niedermayer <michaelni at gmx.at>:

> On Mon, Jan 05, 2015 at 03:17:32PM -0500, Vanista Herion wrote:
> > Some MPEG 2 video will give bad interlacing information in AVFrame. If
> the
> > parameters are used by a deinterlace filter such as yadif, frames will be
> > processed needlessly and impair the quality.
> >
> > By reviewing the code in mpegvideo.c which sets the interlaced_frame
> > and top_field_first, I noticed that picture_structure is not considered
> > whereas it probably supersedes everything else. The H.262 specification
> is
> > not very clear on that but in the case of this sample, the stream is
> > definitely progressive, picture_structure is equal to 3 (Frame picture)
> and
> > top_field_first alternates true and false.
> >
> > The result is that frames come out reported as tff, bff and progressive,
> > cycling at every frame.
> > I propose a simple patch to set interlaced_frame to false when
> > picture_structure is equal to PICT_FRAME.
>
> fixed differently, that is by detecting telecined content in yadif
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> When the tyrant has disposed of foreign enemies by conquest or treaty, and
> there is nothing more to fear from them, then he is always stirring up
> some war or other, in order that the people may require a leader. -- Plato
>


More information about the ffmpeg-devel mailing list