summaryrefslogtreecommitdiffstats
path: root/mp3lib/decod386.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 19:28:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 19:28:53 +0000
commitf0c90c8e00f5452c7a27ed23522e7dc16e2db512 (patch)
treefe4e0db11dee246159d67b9a02658c6631c3e647 /mp3lib/decod386.c
parent418e699d7e94202cbfc178e4069298b4090b9c64 (diff)
downloadmpv-f0c90c8e00f5452c7a27ed23522e7dc16e2db512.tar.bz2
mpv-f0c90c8e00f5452c7a27ed23522e7dc16e2db512.tar.xz
An altivec-optimized DCT64 for mp3lib
(partially, it seems roughly three times as fast as the C code according to quick-n-dirty gprof tests) This one is bit-perfect. patch by Romain Dolbeau <dolbeau@irisa.fr> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9003 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib/decod386.c')
-rw-r--r--mp3lib/decod386.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mp3lib/decod386.c b/mp3lib/decod386.c
index c76d3bb843..7739cdb8d1 100644
--- a/mp3lib/decod386.c
+++ b/mp3lib/decod386.c
@@ -158,6 +158,13 @@ int synth_1to1_MMX( real *bandPtr,int channel,short * samples)
return 0;
}
#endif
+
+#ifdef HAVE_ALTIVEC
+#define dct64_base(a,b,c) if(gCpuCaps.hasAltiVec) dct64_altivec(a,b,c); else dct64(a,b,c)
+#else /* HAVE_ALTIVEC */
+#define dct64_base(a,b,c) dct64(a,b,c)
+#endif /* HAVE_ALTIVEC */
+
static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
{
static real buffs[2][2][0x110];
@@ -192,12 +199,12 @@ static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
if(bo & 0x1) {
b0 = buf[0];
bo1 = bo;
- dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
+ dct64_base(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
}
else {
b0 = buf[1];
bo1 = bo+1;
- dct64(buf[0]+bo,buf[1]+bo+1,bandPtr);
+ dct64_base(buf[0]+bo,buf[1]+bo+1,bandPtr);
}
{