[FFmpeg-cvslog] r32068 - in trunk/libswscale: options.c rgb2rgb.c swscale.h
ramiro
subversion
Wed Sep 8 15:16:16 CEST 2010
Author: ramiro
Date: Wed Sep 8 15:16:15 2010
New Revision: 32068
Log:
rgb2rgb: build SSE2 codepath
Modified:
trunk/libswscale/options.c
trunk/libswscale/rgb2rgb.c
trunk/libswscale/swscale.h
Modified: trunk/libswscale/options.c
==============================================================================
--- trunk/libswscale/options.c Wed Sep 8 11:53:24 2010 (r32067)
+++ trunk/libswscale/options.c Wed Sep 8 15:16:15 2010 (r32068)
@@ -49,6 +49,7 @@ static const AVOption options[] = {
{ "accurate_rnd", "accurate rounding", 0, FF_OPT_TYPE_CONST, SWS_ACCURATE_RND, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "mmx", "MMX SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_MMX, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "mmx2", "MMX2 SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_MMX2, INT_MIN, INT_MAX, VE, "sws_flags" },
+ { "sse2", "SSE2 SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_SSE2, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "3dnow", "3DNOW SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_3DNOW, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "altivec", "AltiVec SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_ALTIVEC, INT_MIN, INT_MAX, VE, "sws_flags" },
{ "bfin", "Blackfin SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_BFIN, INT_MIN, INT_MAX, VE, "sws_flags" },
Modified: trunk/libswscale/rgb2rgb.c
==============================================================================
--- trunk/libswscale/rgb2rgb.c Wed Sep 8 11:53:24 2010 (r32067)
+++ trunk/libswscale/rgb2rgb.c Wed Sep 8 15:16:15 2010 (r32068)
@@ -175,11 +175,20 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15ma
#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_15ma
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();
Modified: trunk/libswscale/swscale.h
==============================================================================
--- trunk/libswscale/swscale.h Wed Sep 8 11:53:24 2010 (r32067)
+++ trunk/libswscale/swscale.h Wed Sep 8 15:16:15 2010 (r32068)
@@ -92,6 +92,7 @@ const char *swscale_license(void);
#define SWS_CPU_CAPS_3DNOW 0x40000000
#define SWS_CPU_CAPS_ALTIVEC 0x10000000
#define SWS_CPU_CAPS_BFIN 0x01000000
+#define SWS_CPU_CAPS_SSE2 0x02000000
#define SWS_MAX_REDUCE_CUTOFF 0.002
More information about the ffmpeg-cvslog
mailing list