comparison mp3lib/decod386.c @ 9002:60d144a16088

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>
author arpi
date Sat, 18 Jan 2003 19:28:53 +0000
parents 1320f1b3229d
children 83822b2b0a17
comparison
equal deleted inserted replaced
9001:01a9cf43074c 9002:60d144a16088
156 static int bo = 1; 156 static int bo = 1;
157 synth_1to1_MMX_s(bandPtr, channel, samples, (short *) buffs, &bo); 157 synth_1to1_MMX_s(bandPtr, channel, samples, (short *) buffs, &bo);
158 return 0; 158 return 0;
159 } 159 }
160 #endif 160 #endif
161
162 #ifdef HAVE_ALTIVEC
163 #define dct64_base(a,b,c) if(gCpuCaps.hasAltiVec) dct64_altivec(a,b,c); else dct64(a,b,c)
164 #else /* HAVE_ALTIVEC */
165 #define dct64_base(a,b,c) dct64(a,b,c)
166 #endif /* HAVE_ALTIVEC */
167
161 static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt) 168 static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
162 { 169 {
163 static real buffs[2][2][0x110]; 170 static real buffs[2][2][0x110];
164 static const int step = 2; 171 static const int step = 2;
165 static int bo = 1; 172 static int bo = 1;
190 } 197 }
191 198
192 if(bo & 0x1) { 199 if(bo & 0x1) {
193 b0 = buf[0]; 200 b0 = buf[0];
194 bo1 = bo; 201 bo1 = bo;
195 dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr); 202 dct64_base(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
196 } 203 }
197 else { 204 else {
198 b0 = buf[1]; 205 b0 = buf[1];
199 bo1 = bo+1; 206 bo1 = bo+1;
200 dct64(buf[0]+bo,buf[1]+bo+1,bandPtr); 207 dct64_base(buf[0]+bo,buf[1]+bo+1,bandPtr);
201 } 208 }
202 209
203 { 210 {
204 register int j; 211 register int j;
205 real *window = mp3lib_decwin + 16 - bo1; 212 real *window = mp3lib_decwin + 16 - bo1;