[pulseaudio-discuss] [PATCH] sconv: Cleanup ARM NEON code

Peter Meerwald pmeerw at pmeerw.net
Wed Apr 23 13:34:07 PDT 2014


From: Peter Meerwald <p.meerwald at bct-electronic.com>

Fix compiler warning, code formatting

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/pulsecore/sconv_neon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/pulsecore/sconv_neon.c b/src/pulsecore/sconv_neon.c
index 071ba85..6c2a2b3 100644
--- a/src/pulsecore/sconv_neon.c
+++ b/src/pulsecore/sconv_neon.c
@@ -18,8 +18,6 @@
 #include <config.h>
 #endif
 
-#include <pulse/rtclock.h>
-
 #include <pulsecore/macro.h>
 #include <pulsecore/endianmacros.h>
 
@@ -60,9 +58,10 @@ static void pa_sconv_s16le_from_f32ne_neon(unsigned n, const float *src, int16_t
 
 static void pa_sconv_s16le_to_f32ne_neon(unsigned n, const int16_t *src, float *dst) {
     unsigned i = n & 3;
+    const float invscale = 1.0f / (1 << 15);
 
     __asm__ __volatile__ (
-        "movs        %[n], %[n], lsr #2     \n\t"
+        "movs       %[n], %[n], lsr #2      \n\t"
         "beq        2f                      \n\t"
 
         "1:                                 \n\t"
@@ -81,7 +80,6 @@ static void pa_sconv_s16le_to_f32ne_neon(unsigned n, const int16_t *src, float *
     );
 
     /* leftovers */
-    const float invscale = 1.0f / (1 << 15);
     while (i--) {
         *dst++ = *src++ * invscale;
     }
-- 
1.9.1



More information about the pulseaudio-discuss mailing list