[go: nahoru, domu]

fixed-point resample: remove 1-bit shift right before interpolation

This was added in
https://gitlab.xiph.org/xiph/speexdsp/-/commit/0dd7bfebe55abcac7e9acbca9d2ac2eddeee2b6f#5424d940076d3b85a3fc2d9f2dcf0d905c43abf0_466_472
to address truncation reported at
http://lists.xiph.org/pipermail/speex-dev/2009-June/007277.html

Truncation of the most-signficant bit was occuring on conversion to
spx_word16_t in MULT16_32_Q15().  Changes to MULT16_32_Q15() mean this will no
longer occur.

The associated adjustment to the bit-shift before saturation was accidentally
removed in
https://gitlab.xiph.org/xiph/speexdsp/-/commit/0e5d424fdba2fd1c132428da38add0c0845b4178#6479ffd77de750bc70cf92af3f9b8a4c1e15a98a_473_478
which caused the output to have half the intended amplitude when the
interpolating resampler was used.

Reported by Andreas Pehrson.
1 file changed