[FFmpeg-devel] [PATCH] swscale: Support setting filters through AVOptions

Michael Niedermayer michaelni at gmx.at
Mon Oct 7 02:44:21 CEST 2013


On Mon, Oct 07, 2013 at 12:10:16AM +0200, wm4 wrote:
> On Sat,  5 Oct 2013 22:49:55 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > anything else could be used or the routine even be made to accept
> > any character as separator.
> > 
> > Docs are omitted as i expect long bikesheds on the syntax and which
> > separator char to use
> > 
> > Examples:
> > -vf scale=640:480:src_filter=1#h-0.5#0#0#0#1
> > -vf scale=640:480:src_filter=1#c1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1#1
> > -vf scale=640:480:src_filter=1#lh-0.2#1#-0.2#lv1#0#0#0#0#0#0#0#0#0#0#0#0#1
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> 
> Can't say much about it. I assume this easily allows
> porting code that uses sws_getDefaultFilter()?

that should not be hard we could just add support in the parser to use
sws_getDefaultFilter() from user specified parameters
like s=2 instead of 0#0#1

or the parameters could be seperated out into individual int/float
AVOptions



> What about code that
> constructs SwsFilters directly?

we could move the parser code into libavutil/opt.c
and add a AV_OPT_TYPE_FILTER_COEFFS
and then use SwsFilters more or less directly

or add a function that turns a SwsFilter into a char*

or add some set/get functions to set non string SwsFilter
which would API wise basically be what was in the new API proposal

or maybe theres another idea ?

what do people (mainly sws API users) prefer ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131007/821c78ec/attachment.asc>


More information about the ffmpeg-devel mailing list