Mercurial > mplayer.hg
diff postproc/rgb2rgb.c @ 13720:821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
author | aurel |
---|---|
date | Thu, 21 Oct 2004 11:55:20 +0000 |
parents | b80f95e24c96 |
children | fed5d4ab5e5f |
line wrap: on
line diff
--- a/postproc/rgb2rgb.c Thu Oct 21 11:36:20 2004 +0000 +++ b/postproc/rgb2rgb.c Thu Oct 21 11:55:20 2004 +0000 @@ -11,6 +11,7 @@ #include "../config.h" #include "rgb2rgb.h" #include "swscale.h" +#include "../cpudetect.h" #include "../mangle.h" #include "../bswap.h" #include "../libvo/fastmemcpy.h" @@ -68,7 +69,7 @@ int srcStride1, int srcStride2, int srcStride3, int dstStride); -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL; static const uint64_t mmx_one __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL; static const uint64_t mask32b attribute_used __attribute__((aligned(8))) = 0x000000FF000000FFULL; @@ -152,7 +153,7 @@ #define RENAME(a) a ## _C #include "rgb2rgb_template.c" -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) //MMX versions #undef RENAME @@ -181,7 +182,7 @@ #define RENAME(a) a ## _3DNOW #include "rgb2rgb_template.c" -#endif //ARCH_X86 +#endif //ARCH_X86 || ARCH_X86_64 /* rgb15->rgb16 Original by Strepto/Astral @@ -191,7 +192,7 @@ */ void sws_rgb2rgb_init(int flags){ -#ifdef ARCH_X86 +#if defined(ARCH_X86) || defined(ARCH_X86_64) if(flags & SWS_CPU_CAPS_MMX2){ rgb15to16= rgb15to16_MMX2; rgb15to24= rgb15to24_MMX2;