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)
This commit is contained in:
Wim Taymans 2001-02-27 19:44:49 +00:00
parent 3aa8975af6
commit 52fa416005
3 changed files with 13 additions and 2 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -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");