comparison mp3lib/decod386.c @ 23495:059d7c379fb3

Enable SIMD optmizations for mp3lib on AMD64
author zuxy
date Fri, 08 Jun 2007 14:38:25 +0000
parents 73656c3dd7f9
children 49aa1cef1867
comparison
equal deleted inserted replaced
23494:80cfe191bdbb 23495:059d7c379fb3
100 return ret; 100 return ret;
101 } 101 }
102 102
103 static synth_func_t synth_func; 103 static synth_func_t synth_func;
104 104
105 #if defined(CAN_COMPILE_X86_ASM) && defined(HAVE_MMX) 105 #ifdef HAVE_MMX
106 extern int synth_1to1_MMX( real *bandPtr,int channel,short * samples); 106 extern int synth_1to1_MMX( real *bandPtr,int channel,short * samples);
107 #endif 107 #endif
108 108
109 #ifdef HAVE_ALTIVEC 109 #ifdef HAVE_ALTIVEC
110 #define dct64_base(a,b,c) if(gCpuCaps.hasAltiVec) dct64_altivec(a,b,c); else dct64(a,b,c) 110 #define dct64_base(a,b,c) if(gCpuCaps.hasAltiVec) dct64_altivec(a,b,c); else dct64(a,b,c)
123 int bo1; 123 int bo1;
124 124
125 *pnt += 128; 125 *pnt += 128;
126 126
127 /* optimized for x86 */ 127 /* optimized for x86 */
128 #if defined(CAN_COMPILE_X86_ASM) 128 #ifdef ARCH_X86
129 if ( synth_func ) 129 if ( synth_func )
130 { 130 {
131 // printf("Calling %p, bandPtr=%p channel=%d samples=%p\n",synth_func,bandPtr,channel,samples); 131 // printf("Calling %p, bandPtr=%p channel=%d samples=%p\n",synth_func,bandPtr,channel,samples);
132 // FIXME: synth_func() may destroy EBP, don't rely on stack contents!!! 132 // FIXME: synth_func() may destroy EBP, don't rely on stack contents!!!
133 return (*synth_func)( bandPtr,channel,samples); 133 return (*synth_func)( bandPtr,channel,samples);