On 10 April 2018 at 22:21, Patrick Keroulas < patrick.kerou...@savoirfairelinux.com> wrote:
> From: Damien Riegel <damien.rie...@savoirfairelinux.com> > > This codec is already capable of depacking some combinations of pixel > formats and depth as defined in the RFC4175. The only difference between > progressive and interlace is that either a packet will contain the whole > frame, or only a field of the frame. > > As FFmpeg is not capable of handling fields only and recompose an > interlaced frame from that, it has to be done by the codec. To achieve > that, it must use two AVPacket: one for each field (top and bottom). > > Signed-off-by: Damien Riegel <damien.rie...@savoirfairelinux.com> > Signed-off-by: Patrick Keroulas <patrick.kerou...@savoirfairelinux.com> > --- > libavcodec/avcodec.h | 4 +++ > libavcodec/bitpacked.c | 76 ++++++++++++++++++++++++++++++ > ++++++++++++-------- > 2 files changed, 68 insertions(+), 12 deletions(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index fb0c6fa..350e8d9 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -1480,6 +1480,10 @@ typedef struct AVPacket { > */ > #define AV_PKT_FLAG_DISPOSABLE 0x0010 > > +/** > + * The packet contains a top field. > + */ > +#define AV_PKT_FLAG_TOP_FIELD 0x0010 > You need a bottom field flag here as well. The decoder should not play with heuristisc to figure out what's progressive, what's top or bottom. It should also handle switching between interlaced and progressive at any point. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel