From 1f1b999cb94a1c98be13db954cba9ed3f41f6378 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 13 Mar 2009 17:12:40 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28942 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_decimate.c | 4 ++-- libmpcodecs/vf_divtc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c index 676c97b2e3..a6eb3dad5b 100644 --- a/libmpcodecs/vf_decimate.c +++ b/libmpcodecs/vf_decimate.c @@ -19,7 +19,7 @@ struct vf_priv_s { 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 @@ static int open(vf_instance_t *vf, char* args) 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; diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c index f7baf61807..fa2918135e 100644 --- a/libmpcodecs/vf_divtc.c +++ b/libmpcodecs/vf_divtc.c @@ -33,7 +33,7 @@ struct vf_priv_s * 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 @@ static int open(vf_instance_t *vf, char* args) goto nomem; diff = diff_C; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE if(gCpuCaps.hasMMX) diff = diff_MMX; #endif