changeset 3147:5da6e1b6c93e

runtime cpu detection
author michael
date Mon, 26 Nov 2001 23:21:24 +0000
parents 3164eaa93396
children 58467d46373a
files libmpeg2/decode.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpeg2/decode.c	Mon Nov 26 23:08:48 2001 +0000
+++ b/libmpeg2/decode.c	Mon Nov 26 23:21:24 2001 +0000
@@ -42,6 +42,7 @@
 
 #include "mm_accel.h"
 
+#include "../cpudetect.h"
 
 //this is where we keep the state of the decoder
 //picture_t picture_data;
@@ -71,15 +72,12 @@
 
     printf (PACKAGE"-"VERSION" (C) 2000-2001 Aaron Holtzman & Michel Lespinasse\n");
     config.flags = 0;
-#ifdef HAVE_MMX
+if(gCpuCaps.hasMMX)
     config.flags |= MM_ACCEL_X86_MMX;
-#endif
-#ifdef HAVE_SSE
+if(gCpuCaps.hasMMX2)
     config.flags |= MM_ACCEL_X86_MMXEXT;
-#endif
-#ifdef HAVE_3DNOW
+if(gCpuCaps.has3DNow)
     config.flags |= MM_ACCEL_X86_3DNOW;
-#endif
 #ifdef HAVE_MLIB
     config.flags |= MM_ACCEL_MLIB;
 #endif