pulseaudio/src
Peter Meerwald e66e846418 sconv: Change/fix conversion to/from float32
use (1<<15) instead of 0x7fff as a factor when converting from s16 to float32
use (1<<31) instead of 0x7fffffff as a factor when converting from s32 to float32

the change is motivated by the following desireable properties:
* s16_from_f32(f32_from_s16(x)) == x for all possible s16 values
* x / (1.0f << 15) == x * (1.0f / (1 << 15)) for all x in s16

above changes enable easier optimization while guaranteeing bit-exact results

further, other audio sample conversion code (libavresample) does it the same way

v3 (comments Tanu):
* fix saturation in pa_sconv_s16le_from_f32ne_neon(), use vqrshrn
v2 (comments Tanu):
* fix comments in ARM NEON code
* use llrintf() in pa_sconv_s32le_from_float32ne()

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Cc: Tanu Kaskinen <tanuk@iki.fi>
2013-02-04 12:07:14 +02:00
..
daemon cpulimit: Explicitly ignore pa_read() return value. 2012-12-19 12:31:50 +02:00
modules reserve: Fix leaking NameLost signals after release+acquire 2013-01-31 14:04:45 +02:00
pulse pulse: Initialize pa_operation objects to all-zero. 2013-01-13 03:15:23 +02:00
pulsecore sconv: Change/fix conversion to/from float32 2013-02-04 12:07:14 +02:00
tests tests: Fix sconv sample correctness in cpu-test 2013-02-01 10:06:03 +02:00
utils pactl: Document @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@ 2013-02-04 10:01:57 +01:00
.gitignore .gitignore: Add cpu-test. 2012-09-07 17:22:10 +03:00
depmod.py remove remaining $ 2008-06-18 22:38:32 +02:00
Makefile.am role-ducking: Apply a ducking effect based on streams roles 2012-12-19 12:31:48 +02:00
map-file pulse: Add pa_operation_set_state_callback() API 2013-01-12 17:55:07 +02:00