[Libav-user] yadif example

Fermín Ayuso fayuso83 at yahoo.es
Fri Oct 16 11:03:35 CEST 2015


Thank you Stefano,

After see filtering_video.c, I'm not sure how to continue with my code. I
setup the filter with this function:

AVFilterGraph *filter_graph;
AVFrame *src_frame;
AVFrame *deint_frame;

int MyDecoder::setup_filters()
{
int ret = 0;
// Register all built-in filters
avfilter_register_all();

AVFilter *yadif = avfilter_get_by_name("yadif");

filter_graph = avfilter_graph_alloc();

if (ret = (avfilter_graph_alloc_filter(filter_graph, yadif,
"my_yadif_filter")) < 0)
{
avfilter_graph_free(&filter_graph);
return ret;
}
       /*Here, how can I deinterlace src_frame?*/
return ret;
}

But now, I don't know what can I do with filter_graph and my AVFrame. How
to apply the yadif filter to my source frame to obtain a deinterlace frame?
Any clue?

Thanks!

El vie., 16 oct. 2015 a las 10:34, Stefano Sabatini (<stefasab at gmail.com>)
escribió:

> In data Thursday 2015-10-15 11:17:44 +0000, Fermín Ayuso Márquez ha
> scritto:
> > Hello everybody,
> > I need some help.
>
> > We had a C++ code that use avpicture_deinterlace. For some reason,
> > we have needed upgrade ffmpeg to 2.8.1 version.Now, this function is
> > not available anymore.
> >
>
> > We have tried to use yadif filter using the filtering_video.c
> > example as a model, but we could not deinterlace our video frames,
> > we always have problems with avfilter_graph_config function (returns
> > -22).We searched on Google too, but there is no clear information
> > about how to deinterlace a video using "new" libavfilter.
>
> Basically, with libavfilter you need to setup a filter graph. It's not
> possible to use a single function for performing filtering
> (e.g. deinterlacing). See the examples video_filtering.c in the
> doc/examples directory.
>
> [...]
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151016/8719c4da/attachment.html>


More information about the Libav-user mailing list