[vlc-devel] commit: Optimize a little bit more ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 6 14:07:00 CEST 2009


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

Optimize a little bit more

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

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

diff --git a/modules/audio_filter/converter/neon.c b/modules/audio_filter/converter/neon.c
index 3b41e2c..838d3a8 100644
--- a/modules/audio_filter/converter/neon.c
+++ b/modules/audio_filter/converter/neon.c
@@ -173,15 +173,28 @@ static void Do_S32_S16 (aout_instance_t *aout, aout_filter_t *filter,
             :
             : "q0", "memory");
 
+    if (nb_samples & 8)
+        asm volatile (
+            "vld1.s32 {q0-q1}, [%[inp]]!\n"
+            "vrshrn.i32 d0, q0, #13\n"
+            "vrshrn.i32 d1, q1, #13\n"
+            "vst1.s16 {q0}, [%[outp]]!\n"
+            : [outp] "+r" (outp), [inp] "+r" (inp)
+            :
+            : "q0", "q1", "memory");
+
     while (inp != endp)
         asm volatile (
             "vld1.s32 {q0-q1}, [%[inp]]!\n"
+            "vld1.s32 {q2-q3}, [%[inp]]!\n"
             "vrshrn.s32 d0, q0, #13\n"
             "vrshrn.s32 d1, q1, #13\n"
-            "vst1.s16 {q0}, [%[outp]]!\n"
+            "vrshrn.s32 d2, q2, #13\n"
+            "vrshrn.s32 d3, q3, #13\n"
+            "vst1.s16 {q0-q1}, [%[outp]]!\n"
             : [outp] "+r" (outp), [inp] "+r" (inp)
             :
-            : "q0", "q1", "memory");
+            : "q0", "q1", "q2", "q3", "memory");
 
     outbuf->i_nb_samples = inbuf->i_nb_samples;
     outbuf->i_nb_bytes = inbuf->i_nb_bytes / 2;




More information about the vlc-devel mailing list