[FFmpeg-devel] [PATCH] libavfilter-soc: make scale algorithm configurable
Sun Feb 8 23:45:34 CET 2009
On date Sunday 2009-02-08 03:01:37 +0100, Michael Niedermayer encoded:
> On Sat, Feb 07, 2009 at 08:30:01PM +0100, Stefano Sabatini wrote:
> > 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 mean sws_flags=5 vs. 5
> > 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:
> am i missing something that make this opaque stuff needed, compared to
> simply passing char* ?
I'd like to avoid to convert the sws_flags of the AVFilterGraph to a
string when creating and inserting the scale filter.
The scale filter should be able to accept in input the sws context
parameters from the args string.
But using the args interface for passing the flags from the
AVFilterGraph sws_flags to the scale filter is quite awkward, and
involves doing snprintf in the
At the same time my previous solution (putting in opaque a pointer to
the sws_flags) is not extensible if we want to pass other parameters
apart the swscale flags.
Ideally we should have a SwsContext in the AVFilterGraph and pass a
pointer in opaque to the scale filter, which will do a copy of it.
This way we can easily extend both the scale filter and AVFilterGraph
without to break their interfaces.
If you like this plan I can try to hack libswscale to implement it.
FFmpeg = Fiendish & Fierce Majestic Purposeless Encoding/decoding Gospel
More information about the ffmpeg-devel