[FFmpeg-devel] [PATCH] Port tinterlace filter from MPlayer.

Stefano Sabatini stefano.sabatini-lala at poste.it
Mon Jun 27 23:49:09 CEST 2011


On date Sunday 2010-09-26 20:32:48 +0200, Michael Niedermayer wrote:
> On Sun, Sep 26, 2010 at 07:32:45PM +0200, Stefano Sabatini wrote:
[...]
> > +static int request_frame(AVFilterLink *outlink)
> > +{
> > +    AVFilterContext *ctx = outlink->src;
> > +    TInterlaceContext *tinterlace = ctx->priv;
> > +
> > +    while (!tinterlace->frame_pending) {
> > +        int ret;
> > +
> > +        if ((ret = avfilter_request_frame(outlink->src->inputs[0])))
> > +            return ret;
> > +    }
> > +
> > +    avfilter_start_frame(outlink, tinterlace->picref);
> > +    avfilter_draw_slice(outlink, 0, outlink->h, 1);
> > +    avfilter_end_frame(outlink);
> > +    tinterlace->picref = NULL;
> > +    tinterlace->frame_pending = 0;
> > +    return 0;
> > +}
> 
> imagine your filter is called with start_frame/draw_slice/end_frame but no
> request_frame (this happens after a split filter for example)
> 
> > +
> > +static int poll_frame(AVFilterLink *outlink)
> > +{
> > +    TInterlaceContext *tinterlace = outlink->src->priv;
> > +
> > +    return tinterlace->frame_pending;
> > +}
> 
> this doesnt look correct

Updated based on the tinterlace port from FFmbc, with some
simplifications.

Depends on the vsink_buffer which I'm going to send soon.
-- 
If someone had told me I would be Pope one day, I would have studied harder.
		-- Pope John Paul I
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavfi-port-tinterlace-filter-from-MPlayer.patch
Type: text/x-diff
Size: 14618 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110627/5b8ce827/attachment.bin>


More information about the ffmpeg-devel mailing list