summaryrefslogtreecommitdiff
path: root/src/pulsecore/sconv_sse.c
diff options
context:
space:
mode:
authorPeter Meerwald <p.meerwald@bct-electronic.com>2014-08-04 18:20:05 +0200
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-08-10 11:59:28 +0300
commit6d9891e8b951e6d41e10fccd18851dcd31f6ee7c (patch)
tree004747d3d6a9b71753d192f64f945c8dffc5f64c /src/pulsecore/sconv_sse.c
parent1499271f46c5b7289a61a4fa508cc412544842c4 (diff)
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@pmeerw.net>
Diffstat (limited to 'src/pulsecore/sconv_sse.c')
-rw-r--r--src/pulsecore/sconv_sse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/sconv_sse.c b/src/pulsecore/sconv_sse.c
index 10943bad0..9cfb9d97a 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__) */