[Speex-dev] Resampler set_rate improvements
Wim Taymans
wim.taymans at gmail.com
Thu Feb 4 04:17:18 PST 2016
Hi,
These patches improve the resampler set_rate function.
The first 2 patches do some cleanups in the GCD calculation and avoid an
overflow when calculating the new phase. This patch could probably be
simplified
if we allowed 64bits operations in speexdsp.
The 3rd patch avoid rounding errors in the phase calculation. The problem
is that the new rate is calculated with the reduced rate, which can cause
large rounding errors and audible artifacts.
Patch 4 demonstrates the effect of patch 3. Compare the resampler output
before and after patch 3.
Patch 5 attempts to strike a balance between accuracy and memory usage by
allowing a small rounding error in the phase.
Let me know what you think,
Wim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-resample-Improve-GCD-calculation.patch
Type: text/x-patch
Size: 1760 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-resample-avoid-overflow-in-phase-calculation.patch
Type: text/x-patch
Size: 1809 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-resample-avoid-creating-rounding-errors-in-the-phase.patch
Type: text/x-patch
Size: 862 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-test-add-test-for-dynamic-sample-rate-changes.patch
Type: text/x-patch
Size: 4488 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment-0003.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-resample-allow-small-errors-in-the-phase.patch
Type: text/x-patch
Size: 1987 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20160204/a02d0b8b/attachment-0004.bin
More information about the Speex-dev
mailing list