]> git.sesse.net Git - vlc/commitdiff
Move SSE2 chromas to sse2/
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jan 2010 14:46:27 +0000 (16:46 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jan 2010 14:46:27 +0000 (16:46 +0200)
configure.ac
modules/Makefile.am
modules/sse2/.gitignore [new file with mode: 0644]
modules/sse2/Modules.am [new file with mode: 0644]
modules/video_chroma/Modules.am
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i422_yuy2.c

index 9e09a8f644d64debc466e13428386c6d9cfba64c..ee562ecac22e82601373e3f702ec1e4538e1683d 100644 (file)
@@ -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
 ])
 
index d4ead52ccf3ef282232cc061d76da545c0827376..9476872729dc1251d9922be6fe33f58fea5cdcfb 100644 (file)
@@ -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 (file)
index 0000000..08a6d72
--- /dev/null
@@ -0,0 +1 @@
+Makefile.am
diff --git a/modules/sse2/Modules.am b/modules/sse2/Modules.am
new file mode 100644 (file)
index 0000000..899634b
--- /dev/null
@@ -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)
index 60be5211f454e93240a8172c1fb3b26188a877e2..1371ec14bf59a3d830bd3014a976ecfa87019f51 100644 (file)
@@ -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)
index 0d5bf647edbf64e3b537f34261604ec49d384b81..cfaeb734a5679c1d6f0d73cf46406ef2f7004415 100644 (file)
@@ -35,7 +35,6 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_filter.h>
-#include <vlc_cpu.h>
 
 #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 ()
index f05b746f68d4cdcbb07db19a59f9a45c50d97949..86b2800cdd94971749cd3f0a38e66120cf8c3968 100644 (file)
@@ -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) );
index 9d86ec6cfab416c99843c1343a45d64183843565..fc426ffbc714bec0542c1fd78ba22b8f531488c2 100644 (file)
@@ -33,7 +33,6 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_filter.h>
-#include <vlc_cpu.h>
 
 #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 ()