[Mplayer-cvslog] CVS: main/mp3lib sr1.c,1.13,1.14
Alex Beregszaszi
alex at mplayer.dev.hu
Wed Nov 21 17:12:24 CET 2001
Update of /cvsroot/mplayer/main/mp3lib
In directory mplayer:/var/tmp.root/cvs-serv3264
Modified Files:
sr1.c
Log Message:
hotfix regarding to Markus Ingalsuo's mp3lib-sse bug
Index: sr1.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/sr1.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- sr1.c 27 Jul 2001 17:21:23 -0000 1.13
+++ sr1.c 21 Nov 2001 16:12:21 -0000 1.14
@@ -370,12 +370,17 @@
extern void dct64_MMX_sse( void );
void (*dct64_MMX_func)( void );
+#include <sys/utsname.h>
// Init decoder tables. Call first, once!
#ifdef USE_FAKE_MONO
void MP3_Init(int fakemono){
#else
void MP3_Init(){
#endif
+ struct utsname machine;
+ int use_sse;
+
+ uname(&machine);
#ifdef ARCH_X86
_CpuID=CpuDetect();
_i586=ipentium();
@@ -396,6 +401,19 @@
#ifndef HAVE_SSE2
_isse &= 1;
#endif
+ /* check for buggy linux 2.2.x and disable sse support if any */
+ if (!strcasecmp(machine.sysname, "Linux") && _isse)
+ {
+ int main;
+ int sub;
+ int patch;
+
+ if (sscanf(machine.release, "%d.%d.%d", &main, &sub, &patch) == 3)
+ if ((main == 2) && (sub == 2))
+ _isse = 0; /* also disable under Linux 2.2.x */
+// printf("kernel: main: %d, sub: %d (sysname: %s, version: %s)\n",
+// main, sub, machine.sysname, machine.release);
+ }
_has_mmx=_i586>1||_3dnow||_isse;
printf( "mp3lib: Processor ID: %x\n",_CpuID );
if(_i586&&!_3dnow&&!_isse)
More information about the MPlayer-cvslog
mailing list