[FFmpeg-devel] [PATCH] sws flags for ffmpeg
Michael Niedermayer
michaelni
Tue May 22 22:51:34 CEST 2007
Hi
On Tue, May 22, 2007 at 04:38:33PM +0200, Ivo wrote:
> 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?
[...]
>
> +int sws_getFlags(SwsContext *c) {
> + return c->flags;
> +}
this function is unneeded, av_get_int() should be enough
except that patch ok
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/ff093d0c/attachment.pgp>
More information about the ffmpeg-devel
mailing list