[FFmpeg-devel] [PATCH] sws flags for ffmpeg

Michael Niedermayer michaelni
Tue May 22 13:09:27 CEST 2007


Hi

On Tue, May 22, 2007 at 11:46:35AM +0200, Ivo wrote:
> Hi,
> 
> On Monday 21 May 2007 21:16, Michael Niedermayer wrote:
> > On Mon, May 21, 2007 at 08:52:41PM +0200, Ivo wrote:
> > > The attached patch adds support for various SWS flags to ffmpeg. One
> > > can select the type of scaler and override cpuflags, which is mostly
> > > useful to force swscale to use the C version during benchmarking
> > > without recompiling and commenting out the SIMD block of code.
> [...]
> > > +#if defined(CONFIG_SWSCALER)
> >
> > #ifdef
> 
> Fixed.
> 
> > > +static void opt_sws_type(const char *arg) {
> > > +    struct sws_flags_list sws_type_list[] = {
> > > +        { "fast_bilinear",      SWS_FAST_BILINEAR },
> > > +        { "bilinear",           SWS_BILINEAR      },
> > > +        { "bicubic",            SWS_BICUBIC       },
> > > +        { "experimental",       SWS_X             },
> > > +        { "neighbor",           SWS_POINT         },
> > > +        { "area",               SWS_AREA          },
> > > +        { "bicubic_bilinear",   SWS_BICUBLIN      },
> > > +        { "gauss",              SWS_GAUSS         },
> > > +        { "sinc",               SWS_SINC          },
> > > +        { "lanczos",            SWS_LANCZOS       },
> > > +        { "spline",             SWS_SPLINE        },
> > > +        { NULL,                 0                 }
> > > +    };
> >
> > cant AVOption be somehow used for that? same for the mmx*/... stuff ?
> 
> I looked into it and I don't see a way how that would make the code simpler 
> or smaller. For example, -vcodec uses a small strcmp loop too.

well and how would your code handle 
SWS_PRINT_INFO
SWS_ACCURATE_RND
...

furthermore how would other applications convert their command line "strings"
to these flags, ffmpeg.c is just one of many, then what if new flags are
added, the user apps shouldnt need to be changed to support them, ...
(lets just assume i would add a SWS_GRAYSCALE that wouldnt fit into the
existing tables ...)
AVOption deals with all that and i cant see how a single AVOption array
wouldnt be simpler ...

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

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070522/f9e45603/attachment.pgp>



More information about the ffmpeg-devel mailing list