[Mplayer-cvslog] CVS: main/mp3lib Makefile,1.9,1.10 sr1.c,1.9,1.10 decod386.c,1.5,1.6

Nick Kurshev nick at mplayerhq.banki.hu
Tue Jul 3 09:50:55 CEST 2001


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

Modified Files:
	Makefile sr1.c decod386.c 
Log Message:
Portability and old binutils support

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile	29 Jun 2001 17:53:53 -0000	1.9
+++ Makefile	3 Jul 2001 07:50:52 -0000	1.10
@@ -1,12 +1,26 @@
 
-include config.mak
+include ../config.mak
 
-SRCS = sr1.c d_cpu.s decode_i586.s dct64_MMX.s decode_MMX.s tabinit_MMX.s\
-dct36_3dnow.s dct64_3dnow.s dct36_k7.s dct64_k7.s
-OBJS = sr1.o d_cpu.o decode_i586.o dct64_MMX.o decode_MMX.o tabinit_MMX.o\
-dct36_3dnow.o dct64_3dnow.o dct36_k7.o dct64_k7.o
+SRCS = sr1.c d_cpu.s
+OBJS = sr1.o d_cpu.o
 # OBJS = $(SRCS:.c,.s=.o)
 CFLAGS  = $(OPTFLAGS) $(EXTRA_INC)
+ifeq ($(TARGET_ARCH_X86),yes)
+SRCS += decode_i586.s
+OBJS += decode_i586.o
+ifeq ($(TARGET_MMX),yes)
+SRCS += decode_MMX.s dct64_MMX.s tabinit_MMX.s
+OBJS += decode_MMX.o dct64_MMX.o tabinit_MMX.o
+endif
+ifeq ($(TARGET_3DNOW),yes)
+SRCS += dct36_3dnow.s dct64_3dnow.s
+OBJS += dct36_3dnow.o dct64_3dnow.o
+endif
+ifeq ($(TARGET_3DNOWEX),yes)
+SRCS += dct36_k7.s dct64_k7.s
+OBJS += dct36_k7.o dct64_k7.o
+endif
+endif
 
 .SUFFIXES: .c .o
 

Index: sr1.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/sr1.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sr1.c	2 Jul 2001 08:07:41 -0000	1.9
+++ sr1.c	3 Jul 2001 07:50:52 -0000	1.10
@@ -415,12 +415,15 @@
     tables_done_flag=1;
 
     dct36_func=dct36;
+#ifdef HAVE_SSE
   if(_isse)
   {
     synth_func=synth_1to1_MMX;
     dct64_MMX_func=dct64_MMX;
   }    
   else
+#endif
+#ifdef HAVE_3DNOWEX
   if ( _3dnow > 1 )
   {
      synth_func=synth_1to1_MMX;
@@ -428,6 +431,8 @@
      dct64_MMX_func=dct64_MMX_3dnowex;
   }
   else
+#endif
+#ifdef HAVE_3DNOW
   if ( _3dnow )
   {
     synth_func=synth_1to1_MMX;
@@ -435,17 +440,22 @@
     dct64_MMX_func=dct64_MMX_3dnow;
   }
   else
+#endif
+#ifdef HAVE_MMX
   if ( _i586 > 1)
   {
     synth_func=synth_1to1_MMX;
     dct64_MMX_func=dct64_MMX;
   }    
   else
+#endif
+#ifdef ARCH_X86
   if ( _i586 )
   {
     synth_func=synth_1to1_pent;
   }    
   else
+#endif
   {
     synth_func = NULL;
   }

Index: decod386.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/decod386.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- decod386.c	29 Jun 2001 17:53:53 -0000	1.5
+++ decod386.c	3 Jul 2001 07:50:52 -0000	1.6
@@ -107,14 +107,15 @@
 
 synth_func_t synth_func;
 
+#ifdef HAVE_MMX
 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); 
     return 0;
-  } 
-
+} 
+#endif
 static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
   static real buffs[2][2][0x110];
@@ -125,7 +126,7 @@
   real *b0,(*buf)[0x110];
   int clip = 0;
   int bo1;
-
+#ifdef ARCH_X86
   if ( synth_func )
    {
     int ret;
@@ -133,7 +134,7 @@
     *pnt+=128;
     return ret;
    }
-
+#endif
   if(!channel) {     /* channel=0 */
     bo--;
     bo &= 0xf;


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list