diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-09-08 13:16:15 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-09-08 13:16:15 +0000 |
commit | 539ff40c2d685508c62f040693df0f0facda39ff (patch) | |
tree | 940ada51c043be2a3e0904a9e8099c6cae0b078a /libswscale/rgb2rgb.c | |
parent | ccf22d3ed181a14019d0c2f02f2ce30ac8e23ef5 (diff) | |
download | ffmpeg-539ff40c2d685508c62f040693df0f0facda39ff.tar.gz |
rgb2rgb: build SSE2 codepath
Originally committed as revision 32068 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/rgb2rgb.c')
-rw-r--r-- | libswscale/rgb2rgb.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index f92e165c6b..3eab9d87d1 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -175,11 +175,20 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; #define RENAME(a) a ## _MMX2 #include "rgb2rgb_template.c" +//SSE2 versions +#undef RENAME +#undef HAVE_SSE2 +#define HAVE_SSE2 1 +#define RENAME(a) a ## _SSE2 +#include "rgb2rgb_template.c" + //3DNOW versions #undef RENAME #undef HAVE_MMX2 +#undef HAVE_SSE2 #undef HAVE_AMD3DNOW #define HAVE_MMX2 0 +#define HAVE_SSE2 0 #define HAVE_AMD3DNOW 1 #define RENAME(a) a ## _3DNOW #include "rgb2rgb_template.c" @@ -196,7 +205,9 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; void sws_rgb2rgb_init(int flags) { #if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX - if (flags & SWS_CPU_CAPS_MMX2) + if (flags & SWS_CPU_CAPS_SSE2) + rgb2rgb_init_SSE2(); + else if (flags & SWS_CPU_CAPS_MMX2) rgb2rgb_init_MMX2(); else if (flags & SWS_CPU_CAPS_3DNOW) rgb2rgb_init_3DNOW(); |