1 CROSS_TEST = $(foreach I,$(1), \
3 $(if $(filter-out $(I),$(J)), \
4 $(eval $(call $(2),$(I),$(J),$(3),$(4),$(5))), \
8 SAMPLERATES = 2626 8000 44100 48000 96000
10 SAMPLERATES_LITE = 8000 44100 48000
12 SAMPLERATES_NN = 8000 44100
15 FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
16 fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
17 fate-swr-resample-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af atrim=end_sample=10240,aresample=$(2):internal_sample_fmt=$(3),aformat=$(3),aresample=$(1):internal_sample_fmt=$(3) -f wav -acodec pcm_s16le -
19 fate-swr-resample-$(3)-$(1)-$(2): CMP = stddev
20 fate-swr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
21 fate-swr-resample-$(3)-$(1)-$(2): FUZZ = 0.1
22 fate-swr-resample-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
24 #below list is generated by:
25 #you can use this if you need to update it!
26 #make -k `make fate-list | grep swr` | egrep 'TEST|stddev' | tr '\n' '@' | sed 's#TEST *\([^@]*\)@stddev: *\([0-9.]*\)[^b@]*bytes: *\([0-9]*\) */ *\([0-9]*\)@#fate-\1: CMP_TARGET = \2@fate-\1: SIZE_TOLERANCE = \3 - \4@@#g' | tr '@' '\n'
28 fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
29 fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
31 fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
32 fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
34 fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
35 fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
37 fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
38 fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
40 fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
41 fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
43 fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
44 fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
46 fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
47 fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
49 fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
50 fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
52 fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
53 fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
55 fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
56 fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
58 fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
59 fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
61 fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
62 fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
64 fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
65 fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
67 fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
68 fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
70 fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
71 fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
73 fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
74 fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
76 fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
77 fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
79 fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
80 fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
82 fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
83 fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
85 fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
86 fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
88 fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
89 fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
91 fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
92 fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
94 fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
95 fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
97 fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
98 fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
100 fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
101 fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
103 fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
104 fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
106 fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
107 fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
109 fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
110 fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
112 fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
113 fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
115 fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
116 fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
118 fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
119 fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
121 fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
122 fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
124 fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
125 fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
127 fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
128 fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
130 fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
131 fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
133 fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
134 fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
136 fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
137 fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
139 fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
140 fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
142 fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
143 fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
145 fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
146 fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
148 fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
149 fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
151 fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
152 fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
154 fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
155 fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
157 fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
158 fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
160 fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
161 fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
163 fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
164 fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
166 fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
167 fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
169 fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
170 fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
172 fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
173 fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
175 fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
176 fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
178 fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
179 fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
181 fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
182 fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
184 fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
185 fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
187 fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
188 fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
190 fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
191 fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
193 fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
194 fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
196 fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
197 fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
199 fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
200 fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
202 fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
203 fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
205 fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
206 fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
208 fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
209 fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
211 fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
212 fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
214 fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
215 fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
217 fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
218 fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
220 fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
221 fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
223 fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
224 fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
226 fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
227 fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
229 fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
230 fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
232 fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
233 fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
235 fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
236 fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
238 fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
239 fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
241 fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
242 fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
244 fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
245 fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
247 fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
248 fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
250 fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
251 fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
253 fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
254 fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
256 fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
257 fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
259 fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
260 fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
262 fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
263 fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
265 fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
266 fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
270 FATE_SWR_RESAMPLE += fate-swr-resample_lin-$(3)-$(1)-$(2)
271 fate-swr-resample_lin-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
272 fate-swr-resample_lin-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af atrim=end_sample=10240,aresample=$(2):linear_interp=1:internal_sample_fmt=$(3),aformat=$(3),aresample=$(1):internal_sample_fmt=$(3) -f wav -acodec pcm_s16le -
274 fate-swr-resample_lin-$(3)-$(1)-$(2): CMP = stddev
275 fate-swr-resample_lin-$(3)-$(1)-$(2): CMP_UNIT = $(5)
276 fate-swr-resample_lin-$(3)-$(1)-$(2): FUZZ = 0.1
277 fate-swr-resample_lin-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
279 fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63
280 fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
282 fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53
283 fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
285 fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45
286 fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
288 fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68
289 fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
291 fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41
292 fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
294 fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.86
295 fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
297 fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61
298 fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
300 fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50
301 fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
303 fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45
304 fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
306 fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67
307 fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
309 fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41
310 fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
312 fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.79
313 fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
317 FATE_SWR_RESAMPLE += fate-swr-resample_nn-$(3)-$(1)-$(2)
318 fate-swr-resample_nn-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
319 fate-swr-resample_nn-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af atrim=end_sample=10240,aresample=$(2):filter_size=1:phase_shift=0:internal_sample_fmt=$(3),aformat=$(3),aresample=$(1):internal_sample_fmt=$(3) -f wav -acodec pcm_s16le -
321 fate-swr-resample_nn-$(3)-$(1)-$(2): CMP = stddev
322 fate-swr-resample_nn-$(3)-$(1)-$(2): CMP_UNIT = $(5)
323 fate-swr-resample_nn-$(3)-$(1)-$(2): FUZZ = 0.1
324 fate-swr-resample_nn-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
326 fate-swr-resample_nn-fltp-44100-8000: CMP_TARGET = 590.98
327 fate-swr-resample_nn-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
329 fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 6330.39
330 fate-swr-resample_nn-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
332 fate-swr-resample_nn-s16p-44100-8000: CMP_TARGET = 590.97
333 fate-swr-resample_nn-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
335 fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 6330.47
336 fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
339 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
340 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
341 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
342 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
344 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16)
345 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16)
347 $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,s16p,s16le,s16)
348 $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,fltp,f32le,s16)
350 FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
351 fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
352 FATE_SWR += $(FATE_SWR_RESAMPLE-yes)
354 FATE_FFMPEG += $(FATE_SWR)
355 fate-swr: $(FATE_SWR)