]> git.sesse.net Git - ffmpeg/blob - tests/fate/libswresample.mak
fate/libswresample: add tests with filter_size=1 phase_shift=0
[ffmpeg] / tests / fate / libswresample.mak
1 CROSS_TEST = $(foreach I,$(1),                                        \
2                  $(foreach J,$(1),                                    \
3                      $(if $(filter-out $(I),$(J)),                    \
4                          $(eval $(call $(2),$(I),$(J),$(3),$(4),$(5))),    \
5                      )))
6
7
8 SAMPLERATES = 2626 8000 44100 48000 96000
9
10 SAMPLERATES_LITE = 8000 44100 48000
11
12 SAMPLERATES_NN = 8000 44100
13
14 define ARESAMPLE
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 -
18
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
23
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'
27
28 fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
29 fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
30
31 fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
32 fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
33
34 fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
35 fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
36
37 fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
38 fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
39
40 fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
41 fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
42
43 fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
44 fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
45
46 fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
47 fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
48
49 fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
50 fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
51
52 fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
53 fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
54
55 fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
56 fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
57
58 fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
59 fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
60
61 fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
62 fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
63
64 fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
65 fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
66
67 fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
68 fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
69
70 fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
71 fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
72
73 fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
74 fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
75
76 fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
77 fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
78
79 fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
80 fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
81
82 fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
83 fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
84
85 fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
86 fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
87
88 fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
89 fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
90
91 fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
92 fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
93
94 fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
95 fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
96
97 fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
98 fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
99
100 fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
101 fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
102
103 fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
104 fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
105
106 fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
107 fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
108
109 fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
110 fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
111
112 fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
113 fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
114
115 fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
116 fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
117
118 fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
119 fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
120
121 fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
122 fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
123
124 fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
125 fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
126
127 fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
128 fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
129
130 fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
131 fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
132
133 fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
134 fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
135
136 fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
137 fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
138
139 fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
140 fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
141
142 fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
143 fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
144
145 fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
146 fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
147
148 fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
149 fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
150
151 fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
152 fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
153
154 fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
155 fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
156
157 fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
158 fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
159
160 fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
161 fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
162
163 fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
164 fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
165
166 fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
167 fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
168
169 fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
170 fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
171
172 fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
173 fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
174
175 fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
176 fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
177
178 fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
179 fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
180
181 fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
182 fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
183
184 fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
185 fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
186
187 fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
188 fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
189
190 fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
191 fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
192
193 fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
194 fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
195
196 fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
197 fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
198
199 fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
200 fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
201
202 fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
203 fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
204
205 fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
206 fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
207
208 fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
209 fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
210
211 fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
212 fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
213
214 fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
215 fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
216
217 fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
218 fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
219
220 fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
221 fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
222
223 fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
224 fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
225
226 fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
227 fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
228
229 fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
230 fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
231
232 fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
233 fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
234
235 fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
236 fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
237
238 fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
239 fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
240
241 fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
242 fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
243
244 fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
245 fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
246
247 fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
248 fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
249
250 fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
251 fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
252
253 fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
254 fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
255
256 fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
257 fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
258
259 fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
260 fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
261
262 fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
263 fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
264
265 fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
266 fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
267 endef
268
269 define ARESAMPLE_LIN
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 -
273
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
278
279 fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63
280 fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
281
282 fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53
283 fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
284
285 fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45
286 fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
287
288 fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68
289 fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
290
291 fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41
292 fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
293
294 fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.86
295 fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
296
297 fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61
298 fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
299
300 fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50
301 fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
302
303 fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45
304 fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
305
306 fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67
307 fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
308
309 fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41
310 fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
311
312 fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.79
313 fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
314 endef
315
316 define ARESAMPLE_NN
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 -
320
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
325
326 fate-swr-resample_nn-fltp-44100-8000: CMP_TARGET = 590.98
327 fate-swr-resample_nn-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
328
329 fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 6330.39
330 fate-swr-resample_nn-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
331
332 fate-swr-resample_nn-s16p-44100-8000: CMP_TARGET = 590.97
333 fate-swr-resample_nn-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
334
335 fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 6330.47
336 fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
337 endef
338
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)
343
344 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16)
345 $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16)
346
347 $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,s16p,s16le,s16)
348 $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,fltp,f32le,s16)
349
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)
353
354 FATE_FFMPEG += $(FATE_SWR)
355 fate-swr: $(FATE_SWR)