[MPlayer-dev-eng] [PATCH] Bug with SWS_FAST_BILINEAR and runtime CPU detection in libswscale

Michael Niedermayer michaelni at gmx.at
Sat Aug 12 18:23:49 CEST 2006


Hi

On Sat, Aug 12, 2006 at 06:13:26PM +0300, Uoti Urpala wrote:
> On Sat, 2006-08-12 at 13:27 +0200, Michael Niedermayer wrote:
> > On Fri, Aug 11, 2006 at 08:40:06PM -0400, Jason Tackaberry wrote:
> > > is dereferenced in the asm code).  However, the code that allocates the
> > > memory for this in swscale.c doesn't get compiled because in swscale.c
> > > HAVE_MMX2 got undefined.
> > > 
> > > The attached patch fixes this problem by redefining HAVE_* when they
> > > have a corresponding COMPILE_* define
> > 
> > rejected, AFAIK the problem was introduced with the r19339 change, the 
> > solution is to reverse that
> 
> I think this could be fixed by using #ifdef COMPILE_MMX2 instead of
> #ifdef HAVE_MMX2 without reverting the whole r19339.
> 
> However when I checked that I noticed there are other uses of HAVE_MMX2
> after the #undef lines for swscale_template, added in revision 3153. Did
> I miss something obvious or has this been broken for almost 5 years (not
> using all the optimized routines)?

i think you missed something, if its obvious iam not sure, but apparently not

if  RUNTIME_CPUDETECT than all COMPILE_* will be set
if !RUNTIME_CPUDETECT than only one COMPILE_* will be set
the #undef /#define HAVE_* are under #ifdef COMPILE_* so
the only case where they are wrong is if RUNTIME_CPUDETECT is set

and the old #ifdef HAVE_* code is under ifndef RUNTIME_CPUDETECT
so it apparently wasnt buggy (unless i missed something too ...)


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is



More information about the MPlayer-dev-eng mailing list