From ae72cfc729117406c2680a487d19bf5385a57c15 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 14 Sep 2009 14:47:56 +0000 Subject: [PATCH] Add several HAVE_EBX_AVAILABLE conditions where necessary git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29681 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_ilpack.c | 4 ++++ libmpcodecs/vf_ivtc.c | 4 ++-- libmpcodecs/vf_tfields.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libmpcodecs/vf_ilpack.c b/libmpcodecs/vf_ilpack.c index b0a3f55300..b2005dcb57 100644 --- a/libmpcodecs/vf_ilpack.c +++ b/libmpcodecs/vf_ilpack.c @@ -88,6 +88,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y, pack_nn_C(dst, y, u, v, (w&7)); } +#if HAVE_EBX_AVAILABLE static void pack_li_0_MMX(unsigned char *dst, unsigned char *y, unsigned char *u, unsigned char *v, int w, int us, int vs) { @@ -307,6 +308,7 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y, ); pack_li_1_C(dst, y, u, v, (w&15), us, vs); } +#endif /* HAVE_EBX_AVAILABLE */ #endif static pack_func_t *pack_nn; @@ -399,8 +401,10 @@ static int open(vf_instance_t *vf, char* args) #if HAVE_MMX if(gCpuCaps.hasMMX) { pack_nn = (pack_func_t *)pack_nn_MMX; +#if HAVE_EBX_AVAILABLE pack_li_0 = pack_li_0_MMX; pack_li_1 = pack_li_1_MMX; +#endif } #endif diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c index c29a797f69..4d55d4446f 100644 --- a/libmpcodecs/vf_ivtc.c +++ b/libmpcodecs/vf_ivtc.c @@ -40,7 +40,7 @@ enum { F_SHOW }; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char *new, int os, int ns) { int i; @@ -516,7 +516,7 @@ static int open(vf_instance_t *vf, char* args) p->first = 1; if (args) sscanf(args, "%d", &p->drop); block_diffs = block_diffs_C; -#if HAVE_MMX +#if HAVE_MMX && HAVE_EBX_AVAILABLE if(gCpuCaps.hasMMX) block_diffs = block_diffs_MMX; #endif return 1; diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c index dd754256d5..481e96148e 100644 --- a/libmpcodecs/vf_tfields.c +++ b/libmpcodecs/vf_tfields.c @@ -168,6 +168,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds __asm__ volatile("emms \n\t" : : : "memory"); } +#if HAVE_EBX_AVAILABLE static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) { int i, j, ssd=ss; @@ -247,6 +248,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int if (!up) fast_memcpy(d, s, w); __asm__ volatile("emms \n\t" : : : "memory"); } +#endif /* HAVE_EBX_AVAILABLE */ #endif static inline int clamp(int a) @@ -480,8 +482,10 @@ static int open(vf_instance_t *vf, char* args) qpel_4tap = qpel_4tap_C; #if HAVE_MMX if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX; +#if HAVE_EBX_AVAILABLE if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX; #endif +#endif #if HAVE_MMX2 if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2; #endif