Wiki » History » Version 5

« Previous - Version 5/22 (diff) - Next » - Current version
Chris Cannam, 2013-10-21 01:31 PM


Summary of results

We compared

  • decimate: the "Decimator"http://code.soundsoftware.ac.uk/projects/qm-dsp/embedded/classDecimator.html implementation in the qm-dsp library, which uses an 8-tap IIR lowpass filter;
  • resample_hq, resample_mq, resample_lq: the Resampler implementation in the qm-dsp library, which uses a lengthy Kaiser-windowed sinc filter, at three different quality settings;
  • src: the sndfile-resample program which uses libsamplerate, a well trusted resampler also using a Kaiser-windowed sinc implementation, at its default quality setting;
  • zoh: the sndfile-resample zero-order hold resampler, which just takes every Nth sample without any filtering, serving as a baseline.

Speed

For 5292000 input frames on a Core i3-3229Y low-voltage CPU. (Frames-per-second values are for input frames.)

The qm-dsp implementations (resample_* and decimate) were compiled with -O3 -ffast-math while the libsamplerate implementations (src and zoh) were standard Ubuntu packages, so probably -O2. This is likely to make a very significant difference, so these results are more useful for comparison among the qm-dsp implementations than between qm-dsp and libsamplerate.

The decimate implementation supports factors up to 8 only, so 16x, 32x and 64x are handled in two passes.

All implementations use libsndfile for audio file I/O, so that should not be a factor in overall speed.

Implementations by decimation factor

Factor 2

Frames per second Clock time Implementation
14225806 0.372 decimate
8939189 0.592 zoh
3732016 1.418 resample_lq
1856842 2.850 resample_mq
989158 5.350 resample_hq
516141 10.253 src

Factor 4

Frames per second Clock time Implementation
17070967 0.310 zoh
14659279 0.361 decimate
4285020 1.235 resample_lq
2186776 2.420 resample_mq
1056287 5.010 resample_hq
610099 8.674 src

Factor 8

Frames per second Clock time Implementation
26328358 0.201 zoh
13926315 0.380 decimate
4895467 1.081 resample_lq
2470588 2.142 resample_mq
1166409 4.537 resample_hq
614919 8.606 src

Factor 16

Frames per second Clock time Implementation
33493670 0.158 zoh
12721153 0.416 decimate
5093358 1.039 resample_lq
2515209 2.104 resample_mq
1182041 4.477 resample_hq
668857 7.912 src

Factor 32

Frames per second Clock time Implementation
41669291 0.127 zoh
14498630 0.365 decimate
5318592 0.995 resample_lq
2312937 2.288 resample_mq
1148936 4.606 resample_hq
670467 7.893 src

Factor 64

Frames per second Clock time Implementation
42000000 0.126 zoh
13397468 0.395 decimate
5040000 1.050 resample_lq
2365668 2.237 resample_mq
1232704 4.293 resample_hq
636057 8.320 src

Decimation factors by implementation

Implementation zoh

Frames per second Clock time Factor
42000000 0.126 factor 64
41669291 0.127 factor 32
33493670 0.158 factor 16
26328358 0.201 factor 8
17070967 0.310 factor 4
8939189 0.592 factor 2

Implementation decimate

Frames per second Clock time Factor
14659279 0.361 factor 4
14498630 0.365 factor 32
14225806 0.372 factor 2
13926315 0.380 factor 8
13397468 0.395 factor 64
12721153 0.416 factor 16

Implementation resample_hq

Frames per second Clock time Factor
1232704 4.293 factor 64
1182041 4.477 factor 16
1166409 4.537 factor 8
1148936 4.606 factor 32
1056287 5.010 factor 4
989158 5.350 factor 2

Implementation resample_mq

Frames per second Clock time Factor
2515209 2.104 factor 16
2470588 2.142 factor 8
2365668 2.237 factor 64
2312937 2.288 factor 32
2186776 2.420 factor 4
1856842 2.850 factor 2

Implementation resample_lq

Frames per second Clock time Factor
5318592 0.995 factor 32
5093358 1.039 factor 16
5040000 1.050 factor 64
4895467 1.081 factor 8
4285020 1.235 factor 4
3732016 1.418 factor 2

Implementation src

Frames per second Clock time Factor
670467 7.893 factor 32
668857 7.912 factor 16
636057 8.320 factor 64
614919 8.606 factor 8
610099 8.674 factor 4
516141 10.253 factor 2

zoh-wave.png 55.8 KB, downloaded 72 times Chris Cannam, 2013-10-22 04:31 PM

zoh-spec.png 991 KB, downloaded 90 times Chris Cannam, 2013-10-22 04:32 PM

decimate-wave.png 59.9 KB, downloaded 68 times Chris Cannam, 2013-10-22 04:32 PM

decimate-spec.png 1000 KB, downloaded 62 times Chris Cannam, 2013-10-22 04:32 PM

decimate-b-wave.png 54.8 KB, downloaded 67 times Chris Cannam, 2013-10-22 04:32 PM

decimate-b-spec.png 696 KB, downloaded 95 times Chris Cannam, 2013-10-22 04:32 PM

resample-hq-wave.png 51.4 KB, downloaded 60 times Chris Cannam, 2013-10-22 04:33 PM

resample-hq-spec.png 480 KB, downloaded 70 times Chris Cannam, 2013-10-22 04:33 PM

resample-mq-wave.png 50.6 KB, downloaded 48 times Chris Cannam, 2013-10-22 04:33 PM

resample-mq-spec.png 510 KB, downloaded 46 times Chris Cannam, 2013-10-22 04:33 PM

resample-lq-wave.png 52 KB, downloaded 48 times Chris Cannam, 2013-10-22 04:34 PM

resample-lq-spec.png 888 KB, downloaded 50 times Chris Cannam, 2013-10-22 04:34 PM

src-wave.png 47.8 KB, downloaded 55 times Chris Cannam, 2013-10-22 04:34 PM

src-spec.png 472 KB, downloaded 61 times Chris Cannam, 2013-10-22 04:34 PM