On Tue, Apr 26, 2011 at 01:18:25AM +0200, Janne Grunau wrote:
> On Tue, Apr 26, 2011 at 12:56:09AM +0200, Diego Biurrun wrote:
> > On Tue, Apr 26, 2011 at 12:27:46AM +0200, Janne Grunau wrote:
> > > use AV_CPU_FLAG_* internally and deprecate SWS_CPU_CAPS_*.
> > > add cpu_flags to swsContext and use AVOptions to set it.
> > > auto detection is only done if no SWS_CPU_CAPS are set in flags and
> > > cpu_flags does not contain AV_CPU_FLAG_FORCE.
> > >
> > > --- a/libswscale/utils.c
> > > +++ b/libswscale/utils.c
> > > @@ -172,7 +173,7 @@ static double getSplineCoeff(double a, double b,
> > > double c, double d, double dist
> > >
> > > static int initFilter(int16_t **outFilter, int16_t **filterPos, int
> > > *outFilterSize, int xInc,
> > > - int srcW, int dstW, int filterAlign, int one, int
> > > flags,
> > > + int srcW, int dstW, int filterAlign, int one, int
> > > flags, int cpu_flags,
> > > SwsVector *srcFilter, SwsVector *dstFilter, double
> > > param[2])
> >
> > This function has 17 (!!!) parameters to begin with, I'm not sure
> > adding another is the way forward.
>
> what do you expect of a 300+ line function? I'm not going to change this
I don't expect you to. I'm just commenting on some of the
crazyness in libswscale... :)
> > > @@ -1094,31 +1140,31 @@ int sws_init_context(SwsContext *c, SwsFilter
> > > *srcFilter, SwsFilter *dstFilter)
> > > if (isPlanarYUV(dstFormat)) {
> > > if (c->vLumFilterSize==1)
> > > - av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for
> > > vertical scaling (YV12 like)\n", (flags & SWS_CPU_CAPS_MMX) ? "MMX" :
> > > "C");
> > > + av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for
> > > vertical scaling (YV12 like)\n", (HAVE_MMX && cpu_flags &
> > > AV_CPU_FLAG_MMX) ? "MMX" : "C");
> >
> > extra good karma for breaking long lines here and below
>
> I really dislike those messages, breaking those long lines doesn't help
> this patch and doesn't make the code pretty. I'll fix them.
Feel free to ignore them. Everything that I write with "karma" or
"nit" in there is just a drive-by comment I make about little things
I notice. While I try to clean things up where I can and believe
that every little bit helps, I certainly don't impose that on others.
Make of it what you will...
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel