? liba52/resample_altivec.c Index: liba52/Makefile =================================================================== RCS file: /cvsroot/mplayer/main/liba52/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- liba52/Makefile 11 Aug 2003 20:52:50 -0000 1.9 +++ liba52/Makefile 12 Jan 2004 15:30:23 -0000 @@ -19,7 +19,7 @@ $(AR) r $(LIBNAME) $(OBJS) test: $(LIBNAME) test.c - $(CC) $(CFLAGS) test.c ../cpudetect.c -o test ./liba52.a -lm + $(CC) $(CFLAGS) test.c ../cpudetect.c ../mp_msg.c -o test ./liba52.a -lm test2: $(LIBNAME) test.c $(CC) $(CFLAGS) test.c -o test2 ../libac3/libac3.a ./liba52.a -lm Index: liba52/resample.c =================================================================== RCS file: /cvsroot/mplayer/main/liba52/resample.c,v retrieving revision 1.15 diff -u -r1.15 resample.c --- liba52/resample.c 19 Jan 2002 05:12:34 -0000 1.15 +++ liba52/resample.c 12 Jan 2004 15:30:23 -0000 @@ -19,6 +19,10 @@ #include "resample_mmx.c" #endif +#ifdef HAVE_ALTIVEC +#include "resample_altivec.c" +#endif + void* a52_resample_init(uint32_t mm_accel,int flags,int chans){ void* tmp; @@ -32,7 +36,17 @@ } } #endif - +#ifdef HAVE_ALTIVEC + if(mm_accel&MM_ACCEL_PPC_ALTIVEC){ + tmp=a52_resample_altivec(flags,chans); + if(tmp){ + if(a52_resample==NULL) fprintf(stderr, "Using AltiVec optimized resampler\n"); + a52_resample=tmp; + return tmp; + } + } +#endif + tmp=a52_resample_C(flags,chans); if(tmp){ if(a52_resample==NULL) fprintf(stderr, "No accelerated resampler found\n"); Index: liba52/test.c =================================================================== RCS file: /cvsroot/mplayer/main/liba52/test.c,v retrieving revision 1.6 diff -u -r1.6 test.c --- liba52/test.c 30 Dec 2001 21:38:53 -0000 1.6 +++ liba52/test.c 12 Jan 2004 15:30:23 -0000 @@ -49,9 +49,9 @@ #endif FILE *temp= stdout; - stdout= stderr; //EVIL HACK FIXME +// stdout= stderr; //EVIL HACK FIXME GetCpuCaps(&gCpuCaps); - stdout= temp; +// stdout= temp; // gCpuCaps.hasMMX=0; // gCpuCaps.hasSSE=0; if(gCpuCaps.hasMMX) accel |= MM_ACCEL_X86_MMX; @@ -59,6 +59,7 @@ if(gCpuCaps.hasSSE) accel |= MM_ACCEL_X86_SSE; if(gCpuCaps.has3DNow) accel |= MM_ACCEL_X86_3DNOW; // if(gCpuCaps.has3DNowExt) accel |= MM_ACCEL_X86_3DNOWEXT; + if(gCpuCaps.hasAltiVec) accel |= MM_ACCEL_PPC_ALTIVEC; samples = a52_init (accel); if (samples == NULL) {