[pulseaudio-commits] src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Sun Aug 10 02:00:31 PDT 2014


 src/pulsecore/sconv_neon.c |    4 ++++
 src/pulsecore/sconv_sse.c  |    3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 6d9891e8b951e6d41e10fccd18851dcd31f6ee7c
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Aug 4 18:20:05 2014 +0200

    sconv: Use optimized conversion function for both directions
    
    for example, the conversion function for
    convert_from_float32ne(PA_SAMPLE_S16LE) can also be used for
    convert_to_s16ne(PA_SAMPLE_FLOAT32LE)
    
    v2: ARM can potentially be big- or little endian; only apply
    optimization on LE based on WORDS_BIGENDIAN #define (thanks, Tanu)
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulsecore/sconv_neon.c b/src/pulsecore/sconv_neon.c
index 6c2a2b3..11d94d2 100644
--- a/src/pulsecore/sconv_neon.c
+++ b/src/pulsecore/sconv_neon.c
@@ -89,4 +89,8 @@ void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags) {
     pa_log_info("Initialising ARM NEON optimized conversions.");
     pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_neon);
     pa_set_convert_to_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_to_f32ne_neon);
+#ifndef WORDS_BIGENDIAN
+    pa_set_convert_from_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_to_f32ne_neon);
+    pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_neon);
+#endif
 }
diff --git a/src/pulsecore/sconv_sse.c b/src/pulsecore/sconv_sse.c
index 10943ba..9cfb9d9 100644
--- a/src/pulsecore/sconv_sse.c
+++ b/src/pulsecore/sconv_sse.c
@@ -168,10 +168,11 @@ void pa_convert_func_init_sse(pa_cpu_x86_flag_t flags) {
     if (flags & PA_CPU_X86_SSE2) {
         pa_log_info("Initialising SSE2 optimized conversions.");
         pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse2);
-
+        pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse2);
     } else if (flags & PA_CPU_X86_SSE) {
         pa_log_info("Initialising SSE optimized conversions.");
         pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse);
+        pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse);
     }
 
 #endif /* defined (__i386__) || defined (__amd64__) */



More information about the pulseaudio-commits mailing list