audioconvert: use pack/unpack functions
authorWim Taymans <wtaymans@redhat.com>
Fri, 23 Oct 2015 14:58:17 +0000 (16:58 +0200)
committerWim Taymans <wtaymans@redhat.com>
Fri, 23 Oct 2015 14:58:17 +0000 (16:58 +0200)
commit2b626a5adf276002d32bce96633c8ffea01d834e
tree2029c9a1206e078359deb5e6c5aac1fa3f1d845d
parent53f135cec7ac63b8951797568b9e8e153bd6ad2e
audioconvert: use pack/unpack functions

Rework the converter to use the pack/unpack functions
Because the unpack functions can only unpack to 1 format, add a separate
conversion step for doubles when the unpack function produces int.
Do conversion to S32 in the quantize function directly.
Tweak the conversion factor for doing float->int conversion slightly to
get the full range of negative samples, use clamp to make sure we don't
exceed our int range on the positive axis (see also #755301)
gst/audioconvert/audioconvert.c
gst/audioconvert/audioconvert.h
gst/audioconvert/gstaudioconvertorc.orc
gst/audioconvert/gstaudioquantize.c
gst/audioconvert/gstchannelmix.c