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
11 FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
12 fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
13 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 -
15 fate-swr-resample-$(3)-$(1)-$(2): CMP = stddev
16 fate-swr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
17 fate-swr-resample-$(3)-$(1)-$(2): FUZZ = 0.1
18 fate-swr-resample-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
20 #below list is generated by:
21 #you can use this if you need to update it!
22 #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'
24 fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
25 fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
27 fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
28 fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
30 fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
31 fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
33 fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
34 fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
36 fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
37 fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
39 fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
40 fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
42 fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
43 fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
45 fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
46 fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
48 fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
49 fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
51 fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
52 fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
54 fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
55 fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
57 fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
58 fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
60 fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
61 fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
63 fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
64 fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
66 fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
67 fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
69 fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
70 fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
72 fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
73 fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
75 fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
76 fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
78 fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
79 fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
81 fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
82 fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
84 fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
85 fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
87 fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
88 fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
90 fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
91 fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
93 fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
94 fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
96 fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
97 fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
99 fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
100 fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
102 fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
103 fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
105 fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
106 fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
108 fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
109 fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
111 fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
112 fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
114 fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
115 fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
117 fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
118 fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
120 fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
121 fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
123 fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
124 fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
126 fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
127 fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
129 fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
130 fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
132 fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
133 fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
135 fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
136 fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
138 fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
139 fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
141 fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
142 fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
144 fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
145 fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
147 fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
148 fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
150 fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
151 fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
153 fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
154 fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
156 fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
157 fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
159 fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
160 fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
162 fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
163 fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
165 fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
166 fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
168 fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
169 fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
171 fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
172 fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
174 fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
175 fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
177 fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
178 fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
180 fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
181 fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
183 fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
184 fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
186 fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
187 fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
189 fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
190 fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
192 fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
193 fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
195 fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
196 fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
198 fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
199 fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
201 fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
202 fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
204 fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
205 fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
207 fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
208 fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
210 fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
211 fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
213 fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
214 fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
216 fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
217 fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
219 fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
220 fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
222 fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
223 fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
225 fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
226 fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
228 fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
229 fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
231 fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
232 fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
234 fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
235 fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
237 fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
238 fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
240 fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
241 fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
243 fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
244 fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
246 fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
247 fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
249 fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
250 fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
252 fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
253 fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
255 fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
256 fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
258 fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
259 fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
261 fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
262 fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
266 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
267 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
268 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
269 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
271 FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
272 fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
273 FATE_SWR += $(FATE_SWR_RESAMPLE-yes)
275 FATE_FFMPEG += $(FATE_SWR)
276 fate-swr: $(FATE_SWR)