# HG changeset patch # User michael # Date 1006816884 0 # Node ID 5da6e1b6c93e4d2e02c3b5ac03d326405ff55c8e # Parent 3164eaa9339640efd1141a053d25a65ddba0437b runtime cpu detection diff -r 3164eaa93396 -r 5da6e1b6c93e libmpeg2/decode.c --- 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