[FFmpeg-devel] [PATCH] libavfilter-soc: implement pad filter

Stefano Sabatini stefano.sabatini-lala
Tue May 19 21:35:41 CEST 2009


On date Tuesday 2009-05-19 02:09:53 +0200, Stefano Sabatini encoded:
> On date Monday 2009-05-18 23:49:50 +0200, Stefano Sabatini encoded:
> > On date Sunday 2009-05-17 13:14:22 +0200, Stefano Sabatini encoded:
> > > On date Monday 2009-05-11 19:17:51 +0200, Vitor Sessak encoded:
> > [...]
> > > I'm going to try this approach:
> > > int request_frame(AVFilterLink *link, int width, int height, int left, int top);
> > > picref *avfilter_get_video_buffer(link, int exp_w, int exp_h, int left, int top, AV_PERM_WRITE);
> > > 
> > > the additional parameters given to avfilter_get_video_buffer() (at
> > > least left and top) seem to be necessary to correctly free the buffer.
> > > 
> > > An alternative approach would be to extend avfilter_config_links() to
> > > take the additional parameters w, h, left, top and store them in the
> > > link, but looks somehow more complicated.
> > 
> > And implementation attached.
> > 
> > Note how I also extended avfilter_poll_frame(): this seems to be
> > required for the way it is used in vf_fps.c.
> 
> Please don't still review it, I'm still nailing down some bugs.

Should be fixed now, try for example with:

ffplay in.avi -vfilters "pad = exp_w=in_w+30 : exp_h=in_h + 30 : color = red,
                         pad = exp_w=in_w+30 : exp_h=in_h + 30 : color = blue,
                         pad = exp_w=in_w+30 : exp_h=in_h + 30 : color = yellow"

This should provide a good base for further development, in particular
it shouldn't be too hard to add support for RGB colorspaces.

Enjoy, regards.
-- 
FFmpeg = Fundamentalist Fierce Magical Powered Experimenting Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavfi-memcpy-less-using-request-frame.patch
Type: text/x-diff
Size: 18661 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090519/41474f52/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pad-implement.patch
Type: text/x-diff
Size: 14000 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090519/41474f52/attachment-0001.patch>



More information about the ffmpeg-devel mailing list