From c869e5d1b14360ec9c3a1f7c6e014e7595f4cbb0 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 5 Aug 2006 10:00:54 +0000 Subject: Do not assemble MMX, MMX2 or 3DNOW code unconditionally on X86 and X86_64. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19339 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libswscale/rgb2rgb.c') diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index 0b51b04f0e..29b6e5e989 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -72,9 +72,11 @@ void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *sr long srcStride1, long srcStride2, long srcStride3, long dstStride); -#if defined(ARCH_X86) || defined(ARCH_X86_64) +#if defined(HAVE_MMX) static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL; static const uint64_t mmx_one __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL; +#endif +#if defined(ARCH_X86) || defined(ARCH_X86_64) static const uint64_t mask32b attribute_used __attribute__((aligned(8))) = 0x000000FF000000FFULL; static const uint64_t mask32g attribute_used __attribute__((aligned(8))) = 0x0000FF000000FF00ULL; static const uint64_t mask32r attribute_used __attribute__((aligned(8))) = 0x00FF000000FF0000ULL; @@ -195,7 +197,7 @@ static uint64_t __attribute__((aligned(8))) dither8[2]={ */ void sws_rgb2rgb_init(int flags){ -#if defined(ARCH_X86) || defined(ARCH_X86_64) +#if defined(HAVE_MMX2) || defined(HAVE_3DNOW) || defined(HAVE_MMX) if(flags & SWS_CPU_CAPS_MMX2){ rgb15to16= rgb15to16_MMX2; rgb15to24= rgb15to24_MMX2; @@ -287,7 +289,7 @@ void sws_rgb2rgb_init(int flags){ vu9_to_vu12= vu9_to_vu12_MMX; yvu9_to_yuy2= yvu9_to_yuy2_MMX; }else -#endif /* defined(ARCH_X86) || defined(ARCH_X86_64) */ +#endif /* defined(HAVE_MMX2) || defined(HAVE_3DNOW) || defined(HAVE_MMX) */ { rgb15to16= rgb15to16_C; rgb15to24= rgb15to24_C; -- cgit v1.2.3