@@ -50,9 +50,9 @@ namespace lsp
50
50
/* *
51
51
* The number of additionally reserved samples at the tail of the buffer
52
52
*/
53
- #define LSP_DSP_RESAMPLING_RSV_SAMPLES 64
53
+ #define LSP_DSP_RESAMPLING_RSV_SAMPLES 1024
54
54
55
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
55
+ /* * Perform 2x lanczos oversampling (2 lobes) , destination buffer must be cleared and contain only
56
56
* resampling tail from previous resampling
57
57
*
58
58
* @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -61,7 +61,7 @@ namespace lsp
61
61
*/
62
62
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x2, float *dst, const float *src, size_t count);
63
63
64
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
64
+ /* * Perform 2x lanczos oversampling (3 lobes) , destination buffer must be cleared and contain only
65
65
* resampling tail from previous resampling
66
66
*
67
67
* @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -70,7 +70,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_2x2, float *dst, const float *src, siz
70
70
*/
71
71
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x3, float *dst, const float *src, size_t count);
72
72
73
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
73
+ /* * Perform 2x lanczos oversampling (4 lobes) , destination buffer must be cleared and contain only
74
74
* resampling tail from previous resampling
75
75
*
76
76
* @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -79,7 +79,35 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_2x3, float *dst, const float *src, siz
79
79
*/
80
80
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x4, float *dst, const float *src, size_t count);
81
81
82
- /* * Perform lanczos resampling, destination buffer must be cleared and contain only
82
+ /* * Perform 2x lanczos oversampling (4 lobes for 12-bit sample precision), destination buffer must be cleared and contain only
83
+ * resampling tail from previous resampling
84
+ *
85
+ * @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
86
+ * @param src source buffer of count samples
87
+ * @param count number of samples
88
+ */
89
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x12bit, float *dst, const float *src, size_t count);
90
+
91
+ /* * Perform 2x lanczos oversampling (10 lobes for 16-bit sample precision), destination buffer must be cleared and contain only
92
+ * resampling tail from previous resampling
93
+ *
94
+ * @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
95
+ * @param src source buffer of count samples
96
+ * @param count number of samples
97
+ */
98
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x16bit, float *dst, const float *src, size_t count);
99
+
100
+ /* * Perform 2x lanczos oversampling (62 lobes for 24-bit sample precision), destination buffer must be cleared and contain only
101
+ * resampling tail from previous resampling
102
+ *
103
+ * @param dst destination buffer of count*2 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
104
+ * @param src source buffer of count samples
105
+ * @param count number of samples
106
+ */
107
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_2x24bit, float *dst, const float *src, size_t count);
108
+
109
+
110
+ /* * Perform 3x lanczos oversampling (2 lobes), destination buffer must be cleared and contain only
83
111
* resampling tail from previous resampling
84
112
*
85
113
* @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -88,7 +116,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_2x4, float *dst, const float *src, siz
88
116
*/
89
117
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x2, float *dst, const float *src, size_t count);
90
118
91
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
119
+ /* * Perform 3x lanczos oversampling (3 lobes) , destination buffer must be cleared and contain only
92
120
* resampling tail from previous resampling
93
121
*
94
122
* @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -97,7 +125,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_3x2, float *dst, const float *src, siz
97
125
*/
98
126
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x3, float *dst, const float *src, size_t count);
99
127
100
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
128
+ /* * Perform 3x lanczos oversampling (4 lobes) , destination buffer must be cleared and contain only
101
129
* resampling tail from previous resampling
102
130
*
103
131
* @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -106,7 +134,35 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_3x3, float *dst, const float *src, siz
106
134
*/
107
135
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x4, float *dst, const float *src, size_t count);
108
136
109
- /* * Perform lanczos resampling, destination buffer must be cleared and contain only
137
+ /* * Perform 3x lanczos oversampling (4 lobes for 12-bit sample precision), destination buffer must be cleared and contain only
138
+ * resampling tail from previous resampling
139
+ *
140
+ * @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
141
+ * @param src source buffer of count samples
142
+ * @param count number of samples
143
+ */
144
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x12bit, float *dst, const float *src, size_t count);
145
+
146
+ /* * Perform 3x lanczos oversampling (10 lobes for 16-bit sample precision), destination buffer must be cleared and contain only
147
+ * resampling tail from previous resampling
148
+ *
149
+ * @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
150
+ * @param src source buffer of count samples
151
+ * @param count number of samples
152
+ */
153
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x16bit, float *dst, const float *src, size_t count);
154
+
155
+ /* * Perform 3x lanczos oversampling (62 lobes for 24-bit sample precision), destination buffer must be cleared and contain only
156
+ * resampling tail from previous resampling
157
+ *
158
+ * @param dst destination buffer of count*3 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
159
+ * @param src source buffer of count samples
160
+ * @param count number of samples
161
+ */
162
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_3x24bit, float *dst, const float *src, size_t count);
163
+
164
+
165
+ /* * Perform 4x lanczos oversampling (2 lobes), destination buffer must be cleared and contain only
110
166
* resampling tail from previous resampling
111
167
*
112
168
* @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -115,7 +171,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_3x4, float *dst, const float *src, siz
115
171
*/
116
172
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x2, float *dst, const float *src, size_t count);
117
173
118
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
174
+ /* * Perform 4x lanczos oversampling (3 lobes) , destination buffer must be cleared and contain only
119
175
* resampling tail from previous resampling
120
176
*
121
177
* @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -124,7 +180,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_4x2, float *dst, const float *src, siz
124
180
*/
125
181
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x3, float *dst, const float *src, size_t count);
126
182
127
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
183
+ /* * Perform 4x lanczos oversampling (4 lobes) , destination buffer must be cleared and contain only
128
184
* resampling tail from previous resampling
129
185
*
130
186
* @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -133,7 +189,35 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_4x3, float *dst, const float *src, siz
133
189
*/
134
190
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x4, float *dst, const float *src, size_t count);
135
191
136
- /* * Perform lanczos resampling, destination buffer must be cleared and contain only
192
+ /* * Perform 4x lanczos oversampling (4 lobes for 12-bit sample precision), destination buffer must be cleared and contain only
193
+ * resampling tail from previous resampling
194
+ *
195
+ * @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
196
+ * @param src source buffer of count samples
197
+ * @param count number of samples
198
+ */
199
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x12bit, float *dst, const float *src, size_t count);
200
+
201
+ /* * Perform 4x lanczos oversampling (4 lobes for 16-bit sample precision), destination buffer must be cleared and contain only
202
+ * resampling tail from previous resampling
203
+ *
204
+ * @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
205
+ * @param src source buffer of count samples
206
+ * @param count number of samples
207
+ */
208
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x16bit, float *dst, const float *src, size_t count);
209
+
210
+ /* * Perform 4x lanczos oversampling (4 lobes for 24-bit sample precision), destination buffer must be cleared and contain only
211
+ * resampling tail from previous resampling
212
+ *
213
+ * @param dst destination buffer of count*4 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
214
+ * @param src source buffer of count samples
215
+ * @param count number of samples
216
+ */
217
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_4x24bit, float *dst, const float *src, size_t count);
218
+
219
+
220
+ /* * Perform 6x lanczos oversampling (2 lobes), destination buffer must be cleared and contain only
137
221
* resampling tail from previous resampling
138
222
*
139
223
* @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -142,7 +226,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_4x4, float *dst, const float *src, siz
142
226
*/
143
227
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x2, float *dst, const float *src, size_t count);
144
228
145
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
229
+ /* * Perform 6x lanczos oversampling (3 lobes) , destination buffer must be cleared and contain only
146
230
* resampling tail from previous resampling
147
231
*
148
232
* @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -151,7 +235,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_6x2, float *dst, const float *src, siz
151
235
*/
152
236
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x3, float *dst, const float *src, size_t count);
153
237
154
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
238
+ /* * Perform 6x lanczos oversampling (4 lobes) , destination buffer must be cleared and contain only
155
239
* resampling tail from previous resampling
156
240
*
157
241
* @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -160,7 +244,35 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_6x3, float *dst, const float *src, siz
160
244
*/
161
245
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x4, float *dst, const float *src, size_t count);
162
246
163
- /* * Perform lanczos resampling, destination buffer must be cleared and contain only
247
+ /* * Perform 6x lanczos oversampling (4 lobes for 12-bit sample precision), destination buffer must be cleared and contain only
248
+ * resampling tail from previous resampling
249
+ *
250
+ * @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
251
+ * @param src source buffer of count samples
252
+ * @param count number of samples
253
+ */
254
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x12bit, float *dst, const float *src, size_t count);
255
+
256
+ /* * Perform 6x lanczos oversampling (10 lobes for 16-bit sample precision), destination buffer must be cleared and contain only
257
+ * resampling tail from previous resampling
258
+ *
259
+ * @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
260
+ * @param src source buffer of count samples
261
+ * @param count number of samples
262
+ */
263
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x16bit, float *dst, const float *src, size_t count);
264
+
265
+ /* * Perform 6x lanczos oversampling (62 lobes for 24-bit sample precision), destination buffer must be cleared and contain only
266
+ * resampling tail from previous resampling
267
+ *
268
+ * @param dst destination buffer of count*6 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
269
+ * @param src source buffer of count samples
270
+ * @param count number of samples
271
+ */
272
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_6x24bit, float *dst, const float *src, size_t count);
273
+
274
+
275
+ /* * Perform 8x lanczos oversampling (2 lobes), destination buffer must be cleared and contain only
164
276
* resampling tail from previous resampling
165
277
*
166
278
* @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -169,7 +281,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_6x4, float *dst, const float *src, siz
169
281
*/
170
282
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x2, float *dst, const float *src, size_t count);
171
283
172
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
284
+ /* * Perform 8x lanczos oversampling (3 lobes) , destination buffer must be cleared and contain only
173
285
* resampling tail from previous resampling
174
286
*
175
287
* @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -178,7 +290,7 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_8x2, float *dst, const float *src, siz
178
290
*/
179
291
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x3, float *dst, const float *src, size_t count);
180
292
181
- /* * Perform lanczos resampling , destination buffer must be cleared and contain only
293
+ /* * Perform 8x lanczos oversampling (4 lobes) , destination buffer must be cleared and contain only
182
294
* resampling tail from previous resampling
183
295
*
184
296
* @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
@@ -187,6 +299,33 @@ LSP_DSP_LIB_SYMBOL(void, lanczos_resample_8x3, float *dst, const float *src, siz
187
299
*/
188
300
LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x4, float *dst, const float *src, size_t count);
189
301
302
+ /* * Perform 8x lanczos oversampling (4 lobes for 12-bit sample precision), destination buffer must be cleared and contain only
303
+ * resampling tail from previous resampling
304
+ *
305
+ * @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
306
+ * @param src source buffer of count samples
307
+ * @param count number of samples
308
+ */
309
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x12bit, float *dst, const float *src, size_t count);
310
+
311
+ /* * Perform 8x lanczos oversampling (10 lobes for 16-bit sample precision), destination buffer must be cleared and contain only
312
+ * resampling tail from previous resampling
313
+ *
314
+ * @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
315
+ * @param src source buffer of count samples
316
+ * @param count number of samples
317
+ */
318
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x16bit, float *dst, const float *src, size_t count);
319
+
320
+ /* * Perform 8x lanczos oversampling (62 lobes for 24-bit sample precision), destination buffer must be cleared and contain only
321
+ * resampling tail from previous resampling
322
+ *
323
+ * @param dst destination buffer of count*8 samples + LSP_DSP_RESAMPLING_RSV_SAMPLES samples for convolution tail
324
+ * @param src source buffer of count samples
325
+ * @param count number of samples
326
+ */
327
+ LSP_DSP_LIB_SYMBOL (void , lanczos_resample_8x24bit, float *dst, const float *src, size_t count);
328
+
190
329
/* * Copy each even sample to output buffer
191
330
*
192
331
* @param dst destination buffer
0 commit comments