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
13 FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
14 fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
15 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 -
17 fate-swr-resample-$(3)-$(1)-$(2): CMP = stddev
18 fate-swr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
19 fate-swr-resample-$(3)-$(1)-$(2): FUZZ = 0.1
20 fate-swr-resample-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
22 #below list is generated by:
23 #you can use this if you need to update it!
24 #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'
26 fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
27 fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
29 fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
30 fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
32 fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
33 fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
35 fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
36 fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
38 fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
39 fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
41 fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
42 fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
44 fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
45 fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
47 fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
48 fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
50 fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
51 fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
53 fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
54 fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
56 fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
57 fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
59 fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
60 fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
62 fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
63 fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
65 fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
66 fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
68 fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
69 fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
71 fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
72 fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
74 fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
75 fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
77 fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
78 fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
80 fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
81 fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
83 fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
84 fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
86 fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
87 fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
89 fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
90 fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
92 fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
93 fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
95 fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
96 fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
98 fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
99 fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
101 fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
102 fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
104 fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
105 fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
107 fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
108 fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
110 fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
111 fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
113 fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
114 fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
116 fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
117 fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
119 fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
120 fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
122 fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
123 fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
125 fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
126 fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
128 fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
129 fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
131 fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
132 fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
134 fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
135 fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
137 fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
138 fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
140 fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
141 fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
143 fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
144 fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
146 fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
147 fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
149 fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
150 fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
152 fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
153 fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
155 fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
156 fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
158 fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
159 fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
161 fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
162 fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
164 fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
165 fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
167 fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
168 fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
170 fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
171 fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
173 fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
174 fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
176 fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
177 fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
179 fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
180 fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
182 fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
183 fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
185 fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
186 fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
188 fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
189 fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
191 fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
192 fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
194 fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
195 fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
197 fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
198 fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
200 fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
201 fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
203 fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
204 fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
206 fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
207 fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
209 fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
210 fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
212 fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
213 fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
215 fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
216 fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
218 fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
219 fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
221 fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
222 fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
224 fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
225 fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
227 fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
228 fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
230 fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
231 fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
233 fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
234 fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
236 fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
237 fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
239 fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
240 fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
242 fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
243 fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
245 fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
246 fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
248 fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
249 fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
251 fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
252 fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
254 fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
255 fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
257 fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
258 fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
260 fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
261 fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
263 fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
264 fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
268 FATE_SWR_RESAMPLE += fate-swr-resample_lin-$(3)-$(1)-$(2)
269 fate-swr-resample_lin-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
270 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 -
272 fate-swr-resample_lin-$(3)-$(1)-$(2): CMP = stddev
273 fate-swr-resample_lin-$(3)-$(1)-$(2): CMP_UNIT = $(5)
274 fate-swr-resample_lin-$(3)-$(1)-$(2): FUZZ = 0.1
275 fate-swr-resample_lin-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
277 fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63
278 fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
280 fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53
281 fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
283 fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45
284 fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
286 fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68
287 fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
289 fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41
290 fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
292 fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.86
293 fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
295 fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61
296 fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
298 fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50
299 fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
301 fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45
302 fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
304 fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67
305 fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
307 fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41
308 fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
310 fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.79
311 fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
314 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
315 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
316 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
317 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
319 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16)
320 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16)
322 FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
323 fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
324 FATE_SWR += $(FATE_SWR_RESAMPLE-yes)
326 FATE_FFMPEG += $(FATE_SWR)
327 fate-swr: $(FATE_SWR)