[Mplayer-cvslog] CVS: main/mp3lib decod386.c,1.7,1.8

Atmosfear atmos4 at mplayer.dev.hu
Sun Sep 23 03:44:57 CEST 2001


Update of /cvsroot/mplayer/main/mp3lib
In directory mplayer:/var/tmp.root/cvs-serv16616/mp3lib

Modified Files:
	decod386.c 
Log Message:
Fix for mp3 decoding on alpha/64bit platforms wupposed by Bob McElrath.


Index: decod386.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/decod386.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- decod386.c	14 Jul 2001 16:52:09 -0000	1.7
+++ decod386.c	23 Sep 2001 01:44:37 -0000	1.8
@@ -56,7 +56,7 @@
 
    /* sizeof(int) == 4 */
 #define WRITE_SAMPLE(samples,sum,clip) { \
-  double dtemp; long v;                  \
+  double dtemp; int v;                  \
   dtemp = ((((65536.0 * 65536.0 * 16)+(65536.0 * 0.5))* 65536.0)) + (sum);\
   v = (((int *)&dtemp)[MANTISSA_OFFSET] - 0x80000000); \
   if( v > 32767) { *(samples) = 0x7fff; (clip)++; } \
@@ -150,11 +150,13 @@
 synth_func_t synth_func;
 
 #ifdef HAVE_MMX
-int synth_1to1_MMX( real *bandPtr,int channel,short * samples)
+int synth_1to1_MMX( real *bandPtr ,int channel,short * samples)
 {
-    static short buffs[2][2][0x110];
-    static int bo = 1;
-    synth_1to1_MMX_s(bandPtr, channel, samples, (short *) buffs, &bo); 
+    real *mybandPtr __attribute__((aligned(16))) = bandPtr;
+    short *mysamples __attribute__((aligned(16))) = samples;
+    static short buffs[2][2][0x110] __attribute__((aligned(16)));
+    static int bo __attribute__((aligned(16))) = 1;
+    synth_1to1_MMX_s(mybandPtr, channel, mysamples, (short *) buffs, &bo); 
     return 0;
 } 
 #endif




More information about the MPlayer-cvslog mailing list