[FFmpeg-devel] [PATCH 1/2] libavfilter: Add new tinterlace mode

Stefano Sabatini stefasab at gmail.com
Mon Apr 30 23:14:14 CEST 2012


On date Sunday 2012-04-29 15:35:46 +0200, Stefano Sabatini encoded:
> On date Saturday 2012-04-28 11:27:14 +0100, Stuart Morris encoded:
> > --- On Fri, 27/4/12, Stuart Morris <stuart_morris at talk21.com> wrote:
> > 
> > > Is there a potential problem if the source video is
> > > progressive?
> > > 
> > > I think the interlaced flag will toggle back and forth at
> > > each frame.
> > > Rather than merely refer to the current frame, would it be
> > > better to
> > > re-interlace it by copying both of its fields to a new
> > > buffer and
> > > marking it as interlaced? Not only would the flag be correct
> > > but
> 
> > > also the colour space would now be interlaced to.
> 
> I don't know what this means (how can a color space be interlaced?).
> 
> > I just watched some progressive material with tinterlace mode 6 and
> > I see no colour artifacts.
>  
> > Concerning the interlace flag, is there a way to set the flag
> > without having to copy the whole frame?
> 
> Yes, simply set the property in the new frame before sending it to the
> next filter:
> 
> out = avfilter_ref_buffer(cur, AV_PERM_READ);
> out->video->interlaced = 1;
> 
> This has still the problem that in case of progressive video the new
> reference will be always marked as bottom_field_first
> (i.e. top_field_first = 0) but you can always change it with setfield
> so it shouldn't be an issue.
> 
> Updated patch in attachment, Stuart since the patch is yours please
> test with the interlaced flag trick and resend the patch if it works
> for you.

Applied the current patch, and the interlaced flag is added in a
following patch.
-- 
FFmpeg = Fascinating and Foolish Mean Phony Erudite Gorilla


More information about the ffmpeg-devel mailing list