[vlc-devel] commit: converter_neon: minor tweaks for fl32->fi32 ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 6 12:55:48 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep  6 13:44:15 2009 +0300| [b1aa778c9337b0a9d2e02b8691f73baa1af1aa33] | committer: Rémi Denis-Courmont 

converter_neon: minor tweaks for fl32->fi32

 * always use NEON VCVT
 * avoid pointless interlace/deinterlace in load/store

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

 modules/audio_filter/converter/neon.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/modules/audio_filter/converter/neon.c b/modules/audio_filter/converter/neon.c
index 15b9755..45a2a62 100644
--- a/modules/audio_filter/converter/neon.c
+++ b/modules/audio_filter/converter/neon.c
@@ -74,7 +74,17 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter,
     int32_t *outp = (int32_t *)outbuf->p_buffer;
 
     if (nb_samples & 1)
-        *(outp++) = *(inp++) * FIXED32_ONE;
+    {
+        asm volatile (
+            "vldr.32 s0, [%[inp]]\n"
+            "vcvt.s32.f32 d0, d0, #28\n"
+            "vstr.32 s0, [%[outp]]\n"
+            :
+            : [outp] "r" (outp), [inp] "r" (inp)
+            : "d0", "memory");
+        outp++;
+        inp++;
+    }
 
     if (nb_samples & 2)
         asm volatile (
@@ -87,19 +97,19 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter,
 
     if (nb_samples & 4)
         asm volatile (
-            "vld2.f32 {q0}, [%[inp]]!\n"
+            "vld1.f32 {q0}, [%[inp]]!\n"
             "vcvt.s32.f32 q0, q0, #28\n"
-            "vst2.s32 {q0}, [%[outp]]!\n"
+            "vst1.s32 {q0}, [%[outp]]!\n"
             : [outp] "+r" (outp), [inp] "+r" (inp)
             :
             : "q0", "memory");
 
     while (inp != endp)
         asm volatile (
-            "vld4.f32 {q0-q1}, [%[inp]]!\n"
+            "vld1.f32 {q0-q1}, [%[inp]]!\n"
             "vcvt.s32.f32 q0, q0, #28\n"
             "vcvt.s32.f32 q1, q1, #28\n"
-            "vst4.s32 {q0-q1}, [%[outp]]!\n"
+            "vst1.s32 {q0-q1}, [%[outp]]!\n"
             : [outp] "+r" (outp), [inp] "+r" (inp)
             :
             : "q0", "q1", "memory");




More information about the vlc-devel mailing list