[pulseaudio-discuss] [PATCH] sconv: Use optimized conversion function for both directions

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Jul 28 01:04:44 PDT 2014


On Thu, 2014-07-24 at 09:49 +0200, Peter Meerwald wrote:
> for example, the conversion function for
> convert_from_float32ne(PA_SAMPLE_S16LE) can also be used for
> convert_to_s16ne(PA_SAMPLE_FLOAT32LE)
> 
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> ---
>  src/pulsecore/sconv_neon.c |    2 ++
>  src/pulsecore/sconv_sse.c  |    3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pulsecore/sconv_neon.c b/src/pulsecore/sconv_neon.c
> index 6c2a2b3..8e6a23c 100644
> --- a/src/pulsecore/sconv_neon.c
> +++ b/src/pulsecore/sconv_neon.c
> @@ -89,4 +89,6 @@ 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);
> +    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);

Can the NE/LE mismatch cause problems? I suppose it's fine on x86,
because NE means always LE, but isn't it possible that NE on ARM can
mean BE, in which case the optimized functions can't be used?

-- 
Tanu



More information about the pulseaudio-discuss mailing list