Wiki » History » Version 7

Chris Cannam, 2013-10-21 01:32 PM

1 1 Chris Cannam
h1. Summary of results
2 6 Chris Cannam
3 6 Chris Cannam
{{>toc}}
4 1 Chris Cannam
5 1 Chris Cannam
We compared
6 1 Chris Cannam
7 7 Chris Cannam
 * @decimate@: the "Decimator":http://code.soundsoftware.ac.uk/projects/qm-dsp/embedded/classDecimator.html implementation in the "qm-dsp":/projects/qm-dsp library, which uses an 8-tap IIR lowpass filter;
8 1 Chris Cannam
9 2 Chris Cannam
 * @resample_hq@, @resample_mq@, @resample_lq@: the "Resampler":http://code.soundsoftware.ac.uk/projects/qm-dsp/embedded/classResampler.html implementation in the "qm-dsp":/projects/qm-dsp library, which uses a lengthy Kaiser-windowed sinc filter, at three different quality settings;
10 1 Chris Cannam
   
11 1 Chris Cannam
 * @src@: the sndfile-resample program which uses "libsamplerate":http://mega-nerd.com/SRC/, a well trusted resampler also using a Kaiser-windowed sinc implementation, at its default quality setting;
12 1 Chris Cannam
13 1 Chris Cannam
 * @zoh@: the sndfile-resample zero-order hold resampler, which just takes every Nth sample without any filtering, serving as a baseline.
14 3 Chris Cannam
15 3 Chris Cannam
h2. Speed
16 3 Chris Cannam
17 4 Chris Cannam
For 5292000 input frames on a Core i3-3229Y low-voltage CPU. (Frames-per-second values are for input frames.)
18 3 Chris Cannam
19 4 Chris Cannam
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.
20 1 Chris Cannam
21 5 Chris Cannam
The decimate implementation supports factors up to 8 only, so 16x, 32x and 64x are handled in two passes.
22 5 Chris Cannam
23 4 Chris Cannam
All implementations use libsndfile for audio file I/O, so that should not be a factor in overall speed.
24 4 Chris Cannam
25 4 Chris Cannam
h3. Implementations by decimation factor
26 4 Chris Cannam
27 3 Chris Cannam
h4. Factor 2
28 3 Chris Cannam
29 3 Chris Cannam
|Frames per second|Clock time|Implementation|
30 3 Chris Cannam
|  14225806|0.372|decimate|
31 3 Chris Cannam
|   8939189|0.592|zoh|
32 3 Chris Cannam
|   3732016|1.418|resample_lq|
33 3 Chris Cannam
|   1856842|2.850|resample_mq|
34 1 Chris Cannam
|    989158|5.350|resample_hq|
35 3 Chris Cannam
|    516141|10.253|src|
36 4 Chris Cannam
37 1 Chris Cannam
h4. Factor 4
38 4 Chris Cannam
39 4 Chris Cannam
|Frames per second|Clock time|Implementation|
40 4 Chris Cannam
|17070967|0.310|zoh|
41 4 Chris Cannam
|14659279|0.361|decimate|
42 4 Chris Cannam
| 4285020|1.235|resample_lq|
43 4 Chris Cannam
| 2186776|2.420|resample_mq|
44 4 Chris Cannam
| 1056287|5.010|resample_hq|
45 4 Chris Cannam
|  610099|8.674|src|
46 4 Chris Cannam
47 1 Chris Cannam
h4. Factor 8
48 4 Chris Cannam
49 4 Chris Cannam
|Frames per second|Clock time|Implementation|
50 4 Chris Cannam
|26328358|0.201|zoh|
51 4 Chris Cannam
|13926315|0.380|decimate|
52 4 Chris Cannam
| 4895467|1.081|resample_lq|
53 4 Chris Cannam
| 2470588|2.142|resample_mq|
54 4 Chris Cannam
| 1166409|4.537|resample_hq|
55 4 Chris Cannam
|  614919|8.606|src|
56 4 Chris Cannam
57 1 Chris Cannam
h4. Factor 16
58 4 Chris Cannam
59 4 Chris Cannam
|Frames per second|Clock time|Implementation|
60 4 Chris Cannam
|33493670|0.158|zoh|
61 4 Chris Cannam
|12721153|0.416|decimate|
62 4 Chris Cannam
| 5093358|1.039|resample_lq|
63 4 Chris Cannam
| 2515209|2.104|resample_mq|
64 4 Chris Cannam
| 1182041|4.477|resample_hq|
65 4 Chris Cannam
|  668857|7.912|src|
66 4 Chris Cannam
67 1 Chris Cannam
h4. Factor 32
68 4 Chris Cannam
69 4 Chris Cannam
|Frames per second|Clock time|Implementation|
70 4 Chris Cannam
|41669291|0.127|zoh|
71 4 Chris Cannam
|14498630|0.365|decimate|
72 4 Chris Cannam
| 5318592|0.995|resample_lq|
73 4 Chris Cannam
| 2312937|2.288|resample_mq|
74 4 Chris Cannam
| 1148936|4.606|resample_hq|
75 4 Chris Cannam
|  670467|7.893|src|
76 4 Chris Cannam
77 1 Chris Cannam
h4. Factor 64
78 4 Chris Cannam
79 4 Chris Cannam
|Frames per second|Clock time|Implementation|
80 4 Chris Cannam
|42000000|0.126|zoh|
81 4 Chris Cannam
|13397468|0.395|decimate|
82 4 Chris Cannam
| 5040000|1.050|resample_lq|
83 4 Chris Cannam
| 2365668|2.237|resample_mq|
84 4 Chris Cannam
| 1232704|4.293|resample_hq|
85 1 Chris Cannam
|  636057|8.320|src|
86 5 Chris Cannam
87 5 Chris Cannam
h3. Decimation factors by implementation
88 4 Chris Cannam
89 4 Chris Cannam
h4. Implementation zoh
90 4 Chris Cannam
91 4 Chris Cannam
|Frames per second|Clock time|Factor|
92 4 Chris Cannam
|42000000|0.126|factor 64|
93 4 Chris Cannam
|41669291|0.127|factor 32|
94 4 Chris Cannam
|33493670|0.158|factor 16|
95 4 Chris Cannam
|26328358|0.201|factor 8|
96 4 Chris Cannam
|17070967|0.310|factor 4|
97 4 Chris Cannam
| 8939189|0.592|factor 2|
98 4 Chris Cannam
99 4 Chris Cannam
h4. Implementation decimate
100 4 Chris Cannam
101 4 Chris Cannam
|Frames per second|Clock time|Factor|
102 4 Chris Cannam
|14659279|0.361|factor 4|
103 4 Chris Cannam
|14498630|0.365|factor 32|
104 4 Chris Cannam
|14225806|0.372|factor 2|
105 4 Chris Cannam
|13926315|0.380|factor 8|
106 4 Chris Cannam
|13397468|0.395|factor 64|
107 4 Chris Cannam
|12721153|0.416|factor 16|
108 4 Chris Cannam
109 4 Chris Cannam
h4. Implementation resample_hq
110 4 Chris Cannam
111 4 Chris Cannam
|Frames per second|Clock time|Factor|
112 4 Chris Cannam
| 1232704|4.293|factor 64|
113 4 Chris Cannam
| 1182041|4.477|factor 16|
114 4 Chris Cannam
| 1166409|4.537|factor 8|
115 4 Chris Cannam
| 1148936|4.606|factor 32|
116 4 Chris Cannam
| 1056287|5.010|factor 4|
117 4 Chris Cannam
|  989158|5.350|factor 2|
118 4 Chris Cannam
119 4 Chris Cannam
h4. Implementation resample_mq
120 4 Chris Cannam
121 4 Chris Cannam
|Frames per second|Clock time|Factor|
122 4 Chris Cannam
| 2515209|2.104|factor 16|
123 4 Chris Cannam
| 2470588|2.142|factor 8|
124 4 Chris Cannam
| 2365668|2.237|factor 64|
125 4 Chris Cannam
| 2312937|2.288|factor 32|
126 4 Chris Cannam
| 2186776|2.420|factor 4|
127 4 Chris Cannam
| 1856842|2.850|factor 2|
128 4 Chris Cannam
129 4 Chris Cannam
h4. Implementation resample_lq
130 4 Chris Cannam
131 4 Chris Cannam
|Frames per second|Clock time|Factor|
132 4 Chris Cannam
| 5318592|0.995|factor 32|
133 4 Chris Cannam
| 5093358|1.039|factor 16|
134 4 Chris Cannam
| 5040000|1.050|factor 64|
135 4 Chris Cannam
| 4895467|1.081|factor 8|
136 4 Chris Cannam
| 4285020|1.235|factor 4|
137 4 Chris Cannam
| 3732016|1.418|factor 2|
138 4 Chris Cannam
139 4 Chris Cannam
h4. Implementation src
140 4 Chris Cannam
141 4 Chris Cannam
|Frames per second|Clock time|Factor|
142 4 Chris Cannam
|  670467|7.893|factor 32|
143 4 Chris Cannam
|  668857|7.912|factor 16|
144 4 Chris Cannam
|  636057|8.320|factor 64|
145 4 Chris Cannam
|  614919|8.606|factor 8|
146 4 Chris Cannam
|  610099|8.674|factor 4|
147 4 Chris Cannam
|  516141|10.253|factor 2|