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

Stefano Sabatini stefano.sabatini-lala
Mon May 18 23:49:50 CEST 2009

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.

Try it for example with:
ffplay in.avi -vfilters "pad = exp_w=in_w*3/2 : exp_h=3/2*in_h : color=bikeshed"

FFmpeg = Foolish & Fantastic Multipurpose Power Extravagant Genius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavfi-memcpy-less-using-request-frame.patch
Type: text/x-diff
Size: 9916 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090518/b62bb476/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pad-implement.patch
Type: text/x-diff
Size: 12162 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090518/b62bb476/attachment-0001.patch>

More information about the ffmpeg-devel mailing list