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

Ivo ivop
Tue May 22 16:38:33 CEST 2007


Hi,

On Tuesday 22 May 2007 13:09, Michael Niedermayer wrote:
> On Tue, May 22, 2007 at 11:46:35AM +0200, Ivo wrote:
> > On Monday 21 May 2007 21:16, Michael Niedermayer wrote:
> > > On Mon, May 21, 2007 at 08:52:41PM +0200, Ivo wrote:
> > > > +static void opt_sws_type(const char *arg) {
> > > > +    struct sws_flags_list sws_type_list[] = {
> > > > +        { "fast_bilinear",      SWS_FAST_BILINEAR },
[...]
> > > > +        { 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 ...

Ok, I looked into it a little bit harder :)  How about this?

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



More information about the ffmpeg-devel mailing list