[FFmpeg-devel] [PATCH] libavfilter-soc: make scale algorithm configurable

Stefano Sabatini stefano.sabatini-lala
Sat Feb 7 20:30:01 CET 2009


On date Friday 2009-02-06 01:36:52 +0100, Michael Niedermayer encoded:
> On Fri, Jan 23, 2009 at 12:06:30AM +0100, Stefano Sabatini wrote:
> > Hi all,
> > 
> > the first patch make vf_scale configurable via parameters/opaque, this
> > is required for passing the ffmpeg sws_scale flags to the scale and so
> > be able to pass regression tests.
> > 
> > I also defined a flag in the AVFilterGraph, maybe a better idea would
> > be to make it like a context and defines an
> > avfilter_graph_alloc_context() for it.
> 
> after realizing some shortcomings in the current sws API iam ok with the
> patches, except that the "sws_flags" key should also be explicitly needed
> so that full AVOption support can be added without requireing special
> treatment of the first value after w/h later

Sorry I cannot understand what you mean, in particular I'm unsure
about how to interpret:
"the "sws_flags" key should also be explicitly needed"

I'm reappending the vf_scale patch.
...

But I agree on the limitation of the libswscale API, ideally maybe we
should be able to pass in the opaque a pointer to an already allocated
swscale context already containing sws flags + vectors + whatever,
which we could allocate with something like:

sws_allocContext(...);

then fill with AVOption and pass it to the AVFilterGraph(), rather
than pass it just the swscale.

The vf_scale could then read the args string of the vf_scale filter
then could be read and set the values in the context (or a copy of the
context), finally config_props could set the input and output pixel
formats and initialize the context with something like:

sws_initContext(sws_ctx);

Regards.
-- 
FFmpeg = Freak & Foolish Multipurpose Prodigious Extended Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set-scale-flags.patch
Type: text/x-diff
Size: 2171 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/c53e86c4/attachment.patch>



More information about the ffmpeg-devel mailing list