[Libav-user] yadif deinterlace how?
ronag89 at gmail.com
Sat Jun 18 12:12:32 CEST 2011
I have some questions in the code below. Also is there any way to
multithread a filter?
// Do I need to free the filter context somehow?
implementation(size_t width, size_t height, PixelFormat pix_fmt)
: graph_(avfilter_graph_alloc(), avfilter_graph_free)
// What is this "buffer" filter and why do I need to configure it with
snprintf(args, sizeof(args), "%d:%d:%d:%d:%d", width, height, pix_fmt,
avfilter_get_by_name("buffer"), "src", args, NULL, filter_graph);
// Can yadif be at the end of the filter or do I need to add some form
// Where will the check that the yadif filter supports the
pix_fmt provided to "buffer" or not?
avfilter_get_by_name("yadif"), "out", NULL, NULL, filter_graph);
// I hope this is correct?
// Is this required?
std::shared_ptr<AVFrame> execute(const std::shared_ptr<AVFrame>& frame)
// Not sure why this is the "out" link?
AVFilterLink* out = video_out_filter->inputs;
// Will this make a copy of the frame? Or do I need to store it in a buffer
in order to guarantee it is not freed while the filter is working on it?
av_vsrc_buffer_add_frame(video_in_filter, frame, 0);
// Do I need to get all the frames poll_frame says exists, or can I just
if(avfilter_poll_frame(out) > 0)
// Where is my resulting frame?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user