From e5130a8562b6bfd4c7b2620483f116de5bacd78d Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 10 Jan 2010 16:46:27 +0200 Subject: [PATCH] Move SSE2 chromas to sse2/ --- configure.ac | 8 ++++---- modules/Makefile.am | 4 ++++ modules/sse2/.gitignore | 1 + modules/sse2/Modules.am | 30 ++++++++++++++++++++++++++++++ modules/video_chroma/Modules.am | 17 ----------------- modules/video_chroma/i420_rgb.c | 2 -- modules/video_chroma/i420_yuy2.c | 1 - modules/video_chroma/i422_yuy2.c | 2 -- 8 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 modules/sse2/.gitignore create mode 100644 modules/sse2/Modules.am diff --git a/configure.ac b/configure.ac index 9e09a8f644..ee562ecac2 100644 --- a/configure.ac +++ b/configure.ac @@ -1406,6 +1406,7 @@ AC_ARG_ENABLE(sse, ;; esac ]) +have_sse2="no" AS_IF([test "${enable_sse}" != "no"], [ ARCH="${ARCH} sse sse2" @@ -1430,7 +1431,6 @@ AS_IF([test "${enable_sse}" != "no"], [ AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, [Define to 1 if SSE2 intrinsics are available.]) SSE2_CFLAGS="-msse2" - VLC_ADD_CFLAGS([i420_rgb_sse2 i420_yuy2_sse2 i422_yuy2_sse2],[-msse2]) ]) AC_CACHE_CHECK([if $CC groks SSE inline assembly], @@ -1451,9 +1451,7 @@ AS_IF([test "${enable_sse}" != "no"], [ AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [ AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.]) - VLC_ADD_PLUGIN([i420_rgb_sse2]) - VLC_ADD_PLUGIN([i420_yuy2_sse2]) - VLC_ADD_PLUGIN([i422_yuy2_sse2]) + have_sse2="yes" ]) # SSE3 @@ -1506,6 +1504,7 @@ AS_IF([test "${enable_sse}" != "no"], [ [Define to 1 if SSE4A inline assembly is available.]) ]) ]) AC_SUBST(SSE2_CFLAGS) +AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"]) have_3dnow="no" AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], @@ -5191,6 +5190,7 @@ AC_CONFIG_FILES([ modules/mmx/Makefile modules/mmxext/Makefile modules/3dnow/Makefile + modules/sse2/Makefile modules/altivec/Makefile ]) diff --git a/modules/Makefile.am b/modules/Makefile.am index d4ead52ccf..9476872729 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -23,6 +23,7 @@ EXTRA_SUBDIRS = \ stream_out \ mmx \ mmxext \ + sse2 \ 3dnow \ altivec \ $(NULL) @@ -38,6 +39,9 @@ endif if HAVE_MMXEXT SUBDIRS += mmxext endif +if HAVE_SSE2 +SUBDIRS += sse2 +endif if HAVE_3DNOW SUBDIRS += 3dnow endif diff --git a/modules/sse2/.gitignore b/modules/sse2/.gitignore new file mode 100644 index 0000000000..08a6d725b5 --- /dev/null +++ b/modules/sse2/.gitignore @@ -0,0 +1 @@ +Makefile.am diff --git a/modules/sse2/Modules.am b/modules/sse2/Modules.am new file mode 100644 index 0000000000..899634ba66 --- /dev/null +++ b/modules/sse2/Modules.am @@ -0,0 +1,30 @@ +AM_CFLAGS += $(SSE2_CFLAGS) + +libi420_rgb_sse2_plugin_la_SOURCES = \ + ../video_chroma/i420_rgb.c \ + ../video_chroma/i420_rgb.h \ + ../video_chroma/i420_rgb16.c \ + ../mmx/i420_rgb_mmx.h +libi420_rgb_sse2_plugin_la_CFLAGS = $(AM_CFLAGS) +libi420_rgb_sse2_plugin_la_LIBADD = $(AM_LIBADD) +libi420_rgb_sse2_plugin_la_DEPENDENCIES = + +libi420_yuy2_sse2_plugin_la_SOURCES = \ + ../video_chroma/i420_yuy2.c \ + ../video_chroma/i420_yuy2.h +libi420_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS) +libi420_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD) +libi420_yuy2_sse2_plugin_la_DEPENDENCIES = + +libi422_yuy2_sse2_plugin_la_SOURCES = \ + ../video_chroma/i422_yuy2.c \ + ../video_chroma/i422_yuy2.h +libi422_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS) +libi422_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD) +libi422_yuy2_sse2_plugin_la_DEPENDENCIES = + +libvlc_LTLIBRARIES += \ + libi420_rgb_sse2_plugin.la \ + libi420_yuy2_sse2_plugin.la \ + libi422_yuy2_sse2_plugin.la \ + $(NULL) diff --git a/modules/video_chroma/Modules.am b/modules/video_chroma/Modules.am index 60be5211f4..1371ec14bf 100644 --- a/modules/video_chroma/Modules.am +++ b/modules/video_chroma/Modules.am @@ -6,23 +6,11 @@ SOURCES_i420_rgb = \ i420_rgb_c.h \ $(NULL) -SOURCES_i420_rgb_sse2 = \ - i420_rgb.c \ - i420_rgb.h \ - i420_rgb16.c \ - i420_rgb_mmx.h \ - $(NULL) - SOURCES_i420_yuy2 = \ i420_yuy2.c \ i420_yuy2.h \ $(NULL) -SOURCES_i420_yuy2_sse2 = \ - i420_yuy2.c \ - i420_yuy2.h \ - $(NULL) - SOURCES_i420_yuy2_altivec = \ i420_yuy2.c \ i420_yuy2.h \ @@ -33,11 +21,6 @@ SOURCES_i422_yuy2 = \ i422_yuy2.h \ $(NULL) -SOURCES_i422_yuy2_sse2 = \ - i422_yuy2.c \ - i422_yuy2.h \ - $(NULL) - SOURCES_i422_i420 = \ i422_i420.c \ $(NULL) diff --git a/modules/video_chroma/i420_rgb.c b/modules/video_chroma/i420_rgb.c index 0d5bf647ed..cfaeb734a5 100644 --- a/modules/video_chroma/i420_rgb.c +++ b/modules/video_chroma/i420_rgb.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "i420_rgb.h" #if defined (MODULE_NAME_IS_i420_rgb) @@ -92,7 +91,6 @@ vlc_module_begin () set_description( N_( "SSE2 I420,IYUV,YV12 to " "RV15,RV16,RV24,RV32 conversions") ) set_capability( "video filter2", 120 ) - add_requirement( SSE2 ) #endif set_callbacks( Activate, Deactivate ) vlc_module_end () diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c index f05b746f68..86b2800cdd 100644 --- a/modules/video_chroma/i420_yuy2.c +++ b/modules/video_chroma/i420_yuy2.c @@ -94,7 +94,6 @@ vlc_module_begin () #elif defined (MODULE_NAME_IS_i420_yuy2_sse2) set_description( N_("SSE2 conversions from " SRC_FOURCC " to " DEST_FOURCC) ) set_capability( "video filter2", 250 ) - add_requirement( SSE2 ) #elif defined (MODULE_NAME_IS_i420_yuy2_altivec) set_description( _("AltiVec conversions from " SRC_FOURCC " to " DEST_FOURCC) ); diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c index 9d86ec6cfa..fc426ffbc7 100644 --- a/modules/video_chroma/i422_yuy2.c +++ b/modules/video_chroma/i422_yuy2.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "i422_yuy2.h" @@ -77,7 +76,6 @@ vlc_module_begin () #elif defined (MODULE_NAME_IS_i422_yuy2_sse2) set_description( N_("SSE2 conversions from " SRC_FOURCC " to " DEST_FOURCC) ) set_capability( "video filter2", 120 ) - add_requirement( SSE2 ) #endif set_callbacks( Activate, NULL ) vlc_module_end () -- 2.39.2