From 52fa41600589f29bfcf5af7fd0105127491075c4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 27 Feb 2001 19:44:49 +0000 Subject: [PATCH] CPU detection of MMXEXT and probably 3DNOW (not on Athlon yet) Original commit message from CVS: CPU detection of MMXEXT and probably 3DNOW (not on Athlon yet) Renamed the mmxe motion compentation files. disabled SSE optimisation in ac3dec because it apparently faults.. enable MMXEXT motion compensation on non SSE CPUs (AMD) --- gst/gstcpu.c | 11 ++++++++++- gst/gstcpu.h | 2 ++ test/videotest.c | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gst/gstcpu.c b/gst/gstcpu.c index 22a77d0..d286bf7 100644 --- a/gst/gstcpu.c +++ b/gst/gstcpu.c @@ -63,14 +63,23 @@ _gst_cpu_initialize (void) } if (edx & (1<<25)) { _gst_cpu_flags |= GST_CPU_FLAG_SSE; + _gst_cpu_flags |= GST_CPU_FLAG_MMXEXT; featurelist = stringcat(featurelist,"SSE "); } + if (edx & (1<<24)) { + _gst_cpu_flags |= GST_CPU_FLAG_MMXEXT; + featurelist = stringcat(featurelist,"MMXEXT "); + } + if (edx & (1<<31)) { + _gst_cpu_flags |= GST_CPU_FLAG_3DNOW; + featurelist = stringcat(featurelist,"3DNOW "); + } if (!_gst_cpu_flags) { featurelist = stringcat(featurelist,"NONE"); } - GST_INFO (GST_CAT_GST_INIT, "CPU features: %s",featurelist); + GST_INFO (GST_CAT_GST_INIT, "CPU features: (%08lx) %s",edx, featurelist); g_free(featurelist); } diff --git a/gst/gstcpu.h b/gst/gstcpu.h index f31e709..e79b9c9 100644 --- a/gst/gstcpu.h +++ b/gst/gstcpu.h @@ -27,6 +27,8 @@ typedef enum { GST_CPU_FLAG_MMX = (1<<0), GST_CPU_FLAG_SSE = (1<<1), + GST_CPU_FLAG_MMXEXT = (1<<2), + GST_CPU_FLAG_3DNOW = (1<<3), } GstCPUFlags; void _gst_cpu_initialize (void); diff --git a/test/videotest.c b/test/videotest.c index 752948f..3bd4ad7 100644 --- a/test/videotest.c +++ b/test/videotest.c @@ -38,7 +38,7 @@ int main(int argc,char *argv[]) { g_return_if_fail(videosinkfactory != NULL); src = gst_elementfactory_create(srcfactory,"src"); - gtk_object_set(GTK_OBJECT(src),"format",3,NULL); + //gtk_object_set(GTK_OBJECT(src),"format",3,NULL); gtk_object_set(GTK_OBJECT(src),"width",320,"height",240,NULL); videosink = gst_elementfactory_create(videosinkfactory,"videosink"); -- 2.7.4