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

Ivo ivop
Tue May 22 11:46:35 CEST 2007


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.

> and i think that maybe that list should be somewhere in libswscale
> instead of ffmpeg.c ...

Yes, I agree. I have moved the lists to swscale.c and made them vissible 
through swscale.h.

--Ivo
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-sws-flags.patch
Type: text/x-diff
Size: 4818 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070522/1c490248/attachment.patch>



More information about the ffmpeg-devel mailing list