changeset 28907:ccbde3575f0a

Check for HAVE_EBX_AVAILABLE before enabling MMX code that needs the EBX register. Makes things a bit simpler for everyone who insists on compiling MPlayer as PIE-code.
author reimar
date Fri, 13 Mar 2009 17:12:40 +0000
parents 6cc8cc259dc1
children 3f077f2d4e84
files libmpcodecs/vf_decimate.c libmpcodecs/vf_divtc.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_decimate.c	Fri Mar 13 17:09:39 2009 +0000
+++ b/libmpcodecs/vf_decimate.c	Fri Mar 13 17:12:40 2009 +0000
@@ -19,7 +19,7 @@
 	int max, last, cnt;
 };
 
-#if HAVE_MMX
+#if HAVE_MMX && HAVE_EBX_AVAILABLE
 static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
 {
 	volatile short out[4];
@@ -164,7 +164,7 @@
 	p->frac = 0.33;
 	if (args) sscanf(args, "%d:%d:%d:%f", &p->max, &p->hi, &p->lo, &p->frac);
 	diff = diff_C;
-#if HAVE_MMX
+#if HAVE_MMX && HAVE_EBX_AVAILABLE
 	if(gCpuCaps.hasMMX) diff = diff_MMX;
 #endif
 	return 1;
--- a/libmpcodecs/vf_divtc.c	Fri Mar 13 17:09:39 2009 +0000
+++ b/libmpcodecs/vf_divtc.c	Fri Mar 13 17:12:40 2009 +0000
@@ -33,7 +33,7 @@
  * diff_MMX and diff_C stolen from vf_decimate.c
  */
 
-#if HAVE_MMX
+#if HAVE_MMX && HAVE_EBX_AVAILABLE
 static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
    {
    volatile short out[4];
@@ -683,7 +683,7 @@
       goto nomem;
 
    diff = diff_C;
-#if HAVE_MMX
+#if HAVE_MMX && HAVE_EBX_AVAILABLE
    if(gCpuCaps.hasMMX) diff = diff_MMX;
 #endif