[vlc-devel] commit: Move ARM NEON optimizations to arm_neon/ ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Jan 10 17:13:19 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 10 17:47:34 2010 +0200| [fbd95be806aa6ee8df82cfccb7628fba6bf0c085] | committer: Rémi Denis-Courmont 

Move ARM NEON optimizations to arm_neon/

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbd95be806aa6ee8df82cfccb7628fba6bf0c085
---

 configure.ac                                       |   11 +++++++++--
 modules/Makefile.am                                |    4 ++++
 modules/arm_neon/.gitignore                        |    1 +
 modules/arm_neon/Modules.am                        |   20 ++++++++++++++++++++
 .../converter/neon.c => arm_neon/audio_format.c}   |    4 +---
 .../i420_yuyv_neon.S => arm_neon/i420_yuy2.S}      |    0 
 .../{video_chroma/neon.c => arm_neon/i420_yuy2.c}  |    2 +-
 .../neon_s32_s16.S => arm_neon/s32_s16.S}          |    0 
 modules/audio_filter/converter/Modules.am          |    6 ------
 modules/video_chroma/Modules.am                    |   10 ----------
 po/POTFILES.in                                     |    4 ++--
 11 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4e70382..53f95e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1526,16 +1526,22 @@ AC_ARG_ENABLE(neon,
 ])
 AS_IF([test "${enable_neon}" != "no"], [
   AC_CACHE_CHECK([if $CC groks NEON inline assembly], [ac_cv_neon_inline], [
+    CFLAGS="${CFLAGS_save} -mfpu=neon"
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM(,[[asm volatile("vqmovun.s64 d0, q1":::"d0");]])
     ], [
-      ac_cv_neon_inline="yes"
+      ac_cv_neon_inline="-mfpu=neon"
     ], [
       ac_cv_neon_inline="no"
     ])
   ])
+  ARM_NEON_CFLAGS="$ac_cv_neon_inline"
+], [
+  ac_cv_neon_inline="no"
 ])
-AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_neon_inline}" = "yes"])
+AC_SUBST(ARM_NEON_CFLAGS)
+AM_CONDITIONAL(HAVE_ARM_NEON, [test "${ac_cv_neon_inline}" != "no"])
+
 
 AC_ARG_ENABLE(altivec,
 [  --disable-altivec       disable AltiVec optimizations (default auto)],, [
@@ -5190,6 +5196,7 @@ AC_CONFIG_FILES([
   modules/3dnow/Makefile
   modules/sse2/Makefile
   modules/altivec/Makefile
+  modules/arm_neon/Makefile
 ])
 
 dnl Generate makefiles
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 9476872..e533432 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -26,6 +26,7 @@ EXTRA_SUBDIRS = \
 	sse2 \
 	3dnow \
 	altivec \
+	arm_neon \
 	$(NULL)
 
 SUBDIRS = $(BASE_SUBDIRS)
@@ -48,6 +49,9 @@ endif
 if HAVE_ALTIVEC
 SUBDIRS += altivec
 endif
+if HAVE_ARM_NEON
+SUBDIRS += arm_neon
+endif
 
 dist_noinst_SCRIPTS = genmf list.sh
 dist_noinst_DATA = LIST
diff --git a/modules/arm_neon/.gitignore b/modules/arm_neon/.gitignore
new file mode 100644
index 0000000..08a6d72
--- /dev/null
+++ b/modules/arm_neon/.gitignore
@@ -0,0 +1 @@
+Makefile.am
diff --git a/modules/arm_neon/Modules.am b/modules/arm_neon/Modules.am
new file mode 100644
index 0000000..1ba5c5d
--- /dev/null
+++ b/modules/arm_neon/Modules.am
@@ -0,0 +1,20 @@
+AM_CFLAGS += $(ARM_NEON_CFLAGS)
+
+libaudio_format_neon_plugin_la_SOURCES = \
+	s32_s16.S \
+	audio_format.c
+libaudio_format_neon_plugin_la_CFLAGS = $(AM_CFLAGS)
+libaudio_format_neon_plugin_la_LIBADD = $(AM_LIBADD)
+libaudio_format_neon_plugin_la_DEPENDENCIES =
+
+libi420_yuy2_neon_plugin_la_SOURCES = \
+	i420_yuy2.S \
+	i420_yuy2.c
+libi420_yuy2_neon_plugin_la_CFLAGS = $(AM_CFLAGS)
+libi420_yuy2_neon_plugin_la_LIBADD = $(AM_LIBADD)
+libi420_yuy2_neon_plugin_la_DEPENDENCIES =
+
+libvlc_LTLIBRARIES += \
+	libaudio_format_neon_plugin.la \
+	libi420_yuy2_neon_plugin.la \
+	$(NULL)
diff --git a/modules/audio_filter/converter/neon.c b/modules/arm_neon/audio_format.c
similarity index 97%
rename from modules/audio_filter/converter/neon.c
rename to modules/arm_neon/audio_format.c
index ce2441b..94005a6 100644
--- a/modules/audio_filter/converter/neon.c
+++ b/modules/arm_neon/audio_format.c
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * arm_neon.c: NEON assembly optimized audio conversions
+ * audio_format.c: NEON assembly optimized audio conversions
  *****************************************************************************
  * Copyright (C) 2009 Rémi Denis-Courmont
  *
@@ -26,7 +26,6 @@
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_filter.h>
-#include <vlc_cpu.h>
 
 #include <assert.h>
 
@@ -36,7 +35,6 @@ vlc_module_begin ()
     set_description (N_("ARM NEON audio format conversions") )
     set_capability ("audio filter", 20)
     set_callbacks (Open, NULL)
-    add_requirement (NEON)
 vlc_module_end ()
 
 static block_t *Do_F32_S32 (filter_t *, block_t *);
diff --git a/modules/video_chroma/i420_yuyv_neon.S b/modules/arm_neon/i420_yuy2.S
similarity index 100%
rename from modules/video_chroma/i420_yuyv_neon.S
rename to modules/arm_neon/i420_yuy2.S
diff --git a/modules/video_chroma/neon.c b/modules/arm_neon/i420_yuy2.c
similarity index 97%
rename from modules/video_chroma/neon.c
rename to modules/arm_neon/i420_yuy2.c
index 625ae7a..ae5d60b 100644
--- a/modules/video_chroma/neon.c
+++ b/modules/arm_neon/i420_yuy2.c
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * neon.c : ARM NEONv1 chroma conversion module for VLC
+ * i420_yuy2.c : ARM NEONv1 YUV 4:2:0 to YUV :2:2 chroma conversion for VLC
  *****************************************************************************
  * Copyright (C) 2009 Rémi Denis-Courmont
  *
diff --git a/modules/audio_filter/converter/neon_s32_s16.S b/modules/arm_neon/s32_s16.S
similarity index 100%
rename from modules/audio_filter/converter/neon_s32_s16.S
rename to modules/arm_neon/s32_s16.S
diff --git a/modules/audio_filter/converter/Modules.am b/modules/audio_filter/converter/Modules.am
index 1f0f611..5fc3263 100644
--- a/modules/audio_filter/converter/Modules.am
+++ b/modules/audio_filter/converter/Modules.am
@@ -1,8 +1,5 @@
 SOURCES_converter_fixed = fixed.c
 SOURCES_converter_float = float.c
-SOURCES_converter_neon = \
-	neon_s32_s16.S \
-	neon.c
 SOURCES_a52tospdif = a52tospdif.c
 SOURCES_a52tofloat32 = a52tofloat32.c
 SOURCES_dtstospdif = dtstospdif.c
@@ -15,6 +12,3 @@ libvlc_LTLIBRARIES += \
 	libconverter_fixed_plugin.la \
 	libconverter_float_plugin.la \
 	$(NULL)
-if HAVE_NEON
-libvlc_LTLIBRARIES += libconverter_neon_plugin.la
-endif
diff --git a/modules/video_chroma/Modules.am b/modules/video_chroma/Modules.am
index 3e01f16..b90632d 100644
--- a/modules/video_chroma/Modules.am
+++ b/modules/video_chroma/Modules.am
@@ -36,13 +36,3 @@ libvlc_LTLIBRARIES += \
 	libi420_rgb_plugin.la \
 	libgrey_yuv_plugin.la \
 	$(NULL)
-
-libchroma_neon_plugin_la_SOURCES = \
-	i420_yuyv_neon.S \
-	neon.c
-libchroma_neon_plugin_la_CFLAGS = $(AM_CFLAGS)
-libchroma_neon_plugin_la_LIBADD = $(AM_LIBADD)
-libchroma_neon_plugin_la_DEPENDENCIES =
-if HAVE_NEON
-libvlc_LTLIBRARIES += libchroma_neon_plugin.la
-endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 31c1ccb..a8b9fb2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -311,6 +311,8 @@ modules/access_output/rtmp.c
 modules/access_output/shout.c
 modules/access_output/udp.c
 modules/altivec/memcpy.c
+modules/arm_neon/audio_format.c
+modules/arm_neon/i420_yuy2.c
 modules/audio_filter/channel_mixer/dolby.c
 modules/audio_filter/channel_mixer/headphone.c
 modules/audio_filter/channel_mixer/mono.c
@@ -325,7 +327,6 @@ modules/audio_filter/converter/fixed.c
 modules/audio_filter/converter/float.c
 modules/audio_filter/converter/format.c
 modules/audio_filter/converter/mpgatofixed32.c
-modules/audio_filter/converter/neon.c
 modules/audio_filter/equalizer.c
 modules/audio_filter/equalizer_presets.h
 modules/audio_filter/normvol.c
@@ -1076,7 +1077,6 @@ modules/video_chroma/i420_yuy2.h
 modules/video_chroma/i422_i420.c
 modules/video_chroma/i422_yuy2.c
 modules/video_chroma/i422_yuy2.h
-modules/video_chroma/neon.c
 modules/video_chroma/yuy2_i420.c
 modules/video_chroma/yuy2_i422.c
 modules/video_filter/adjust.c




More information about the vlc-devel mailing list