[Ffmpeg-devel] Interlaced decoding internals?

Kostya kostya.shishkov
Tue Feb 6 08:47:18 CET 2007


On Tue, Feb 06, 2007 at 01:16:17AM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Mon, Feb 05, 2007 at 08:31:41PM +0200, Kostya wrote:
> > I'm working on adding interlaced frame support for VC-1 and
> > has some question regarding AVCodecContext internals:
> > What do avctx->interlaced_frame, avctx->top_field_first
> > and avctx->repeat_pict affect if set by decoder?
> 
> they are not in AVCodecContext but AVFrame
> they affect display, top_field_first affects the order in which
> fields are shown, interlaced_frame affects if the frame is shown
> as frame or as 2 fields at 2 seperate times (assuming the player
> applictaion cares about the at all of course ...)

So that is just hints for player and picture->interlaced_frame
signals that just one field is decoded (top_field_first is
also significant here). Right?
 
> > And is it enough to set them and lavc will do the rest of work
> > or decoder also needs to output picture in standard format? 
> 
> the decoder always outputs frames, they can either be made of 
> 2 fields (even and odd lines) or 1 frame 
> btw, can VC1 not switch interlaced coding at macroblock level
> like MPEG2, MPEG4 and H264?

There are three modes:
1. Progressive frame (just pretending to be interlaced)
2. Interlaced frame
3. Interlaced fields 

Variants 2 and 3 have special element to indicate macroblock mode
(macroblock type, number of motion vectors and is it field or frame block)
So it definitely can for true interlaced mode.
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> I do not agree with what you have to say, but I'll defend to the death your
> right to say it. -- Voltaire






More information about the ffmpeg-devel mailing list