diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2004-10-21 11:55:20 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2004-10-21 11:55:20 +0000 |
commit | 6e1c66bc06af5009b4aa5ab7e103a0e289b06310 (patch) | |
tree | 1dc49306fbec0a4d7d35103bf56d99c7e023a75c /postproc/yuv2rgb.c | |
parent | ed861c6bd24548f96019923c48b882e14070555d (diff) |
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
Originally committed as revision 13721 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/yuv2rgb.c')
-rw-r--r-- | postproc/yuv2rgb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/postproc/yuv2rgb.c b/postproc/yuv2rgb.c index 317ada954e..d8a31ef93a 100644 --- a/postproc/yuv2rgb.c +++ b/postproc/yuv2rgb.c @@ -156,7 +156,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ }; #endif -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) /* hope these constant values are cache line aligned */ uint64_t attribute_used __attribute__((aligned(8))) mmx_00ffw = 0x00ff00ff00ff00ffULL; @@ -183,14 +183,12 @@ uint64_t __attribute__((aligned(8))) dither8[2]={ 0x0004000400040004LL,}; #undef HAVE_MMX -#undef ARCH_X86 //MMX versions #undef RENAME #define HAVE_MMX #undef HAVE_MMX2 #undef HAVE_3DNOW -#define ARCH_X86 #define RENAME(a) a ## _MMX #include "yuv2rgb_template.c" @@ -199,7 +197,6 @@ uint64_t __attribute__((aligned(8))) dither8[2]={ #define HAVE_MMX #define HAVE_MMX2 #undef HAVE_3DNOW -#define ARCH_X86 #define RENAME(a) a ## _MMX2 #include "yuv2rgb_template.c" @@ -583,7 +580,7 @@ EPILOG(1) SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) { -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) if(c->flags & SWS_CPU_CAPS_MMX2){ switch(c->dstFormat){ case IMGFMT_BGR32: return yuv420_rgb32_MMX2; |