[MPlayer-dev-eng] [PATCH] Make mp3lib SIMD optimizations work on AMD64, the Finale

Diego Biurrun diego at biurrun.de
Wed Jun 6 10:53:30 CEST 2007


On Wed, Jun 06, 2007 at 04:34:57PM +0800, Zuxy Meng wrote:
> 
> 2007/6/6, Diego Biurrun <diego at biurrun.de>:
> > On Wed, Jun 06, 2007 at 02:33:28PM +0800, Zuxy Meng wrote:
> > >
> > > The attached patch modifies macros and the Makefile, effectively
> > > turning everything on for AMD64. The result is 47% faster decoding on
> > > a K8.
> > >
> > > --- mp3lib/Makefile   ?????? 23483??
> > > +++ mp3lib/Makefile   ????????????
> > > @@ -3,18 +3,23 @@
> > >
> > >  SRCS_COMMON = sr1.c
> > > +ifeq ($(TARGET_ARCH_X86),yes)
> > > +SRCS_COMMON-$(TARGET_MMX)     += decode_MMX.c
> > > +SRCS_COMMON-$(TARGET_SSE)     += dct64_sse.c
> > >  ifeq ($(TARGET_ARCH_X86_32),yes)
> > >  SRCS_COMMON                   += decode_i586.c
> > > -SRCS_COMMON-$(TARGET_MMX)     += decode_MMX.c dct64_MMX.c
> > > +SRCS_COMMON-$(TARGET_MMX)     += dct64_MMX.c
> > >  SRCS_COMMON-$(TARGET_3DNOW)   += dct36_3dnow.c dct64_3dnow.c
> > >  SRCS_COMMON-$(TARGET_3DNOWEX) += dct36_k7.c dct64_k7.c
> > > -SRCS_COMMON-$(TARGET_SSE)     += dct64_sse.c
> > >  endif
> > > +endif
> > >  SRCS_COMMON-$(TARGET_ALTIVEC) += dct64_altivec.c
> >
> > I'd prefer it you would avoid the nested conditionals.
> 
> OK.
> 
> > >  include ../mpcommon.mak
> > >
> > > +ifeq ($(TARGET_ARCH_X86_32),yes)
> > >  decode_i586.o: CFLAGS += -fomit-frame-pointer
> > > +endif
> >
> > This is ugly, move it into the conditional above.  Also, could you
> > doublecheck it is still required?
> 
> CFLAGS are defined in mpcommon.mak so this line can't be merged with
> other parts.

Right.

> And this line must be disabled for AMD64 because
> decode_i586 can't compile.

Then it should be unnecessary, decode_i586 is not compiled at all on
AMD64...

Diego



More information about the MPlayer-dev-eng mailing list