| 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 | endef |
| 24 | |
| 25 | #below list is generated by: |
| 26 | #you can use this if you need to update it! |
| 27 | #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 | |
| 29 | fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01 |
| 30 | fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480 |
| 31 | |
| 32 | fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01 |
| 33 | fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480 |
| 34 | |
| 35 | fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90 |
| 36 | fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482 |
| 37 | |
| 38 | fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01 |
| 39 | fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480 |
| 40 | |
| 41 | fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84 |
| 42 | fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490 |
| 43 | |
| 44 | fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70 |
| 45 | fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 46 | |
| 47 | fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46 |
| 48 | fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 49 | |
| 50 | fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47 |
| 51 | fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482 |
| 52 | |
| 53 | fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55 |
| 54 | fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510 |
| 55 | |
| 56 | fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16 |
| 57 | fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 58 | |
| 59 | fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41 |
| 60 | fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 61 | |
| 62 | fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47 |
| 63 | fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480 |
| 64 | |
| 65 | fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01 |
| 66 | fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486 |
| 67 | |
| 68 | fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09 |
| 69 | fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 70 | |
| 71 | fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68 |
| 72 | fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 73 | |
| 74 | fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82 |
| 75 | fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480 |
| 76 | |
| 77 | fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14 |
| 78 | fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474 |
| 79 | |
| 80 | fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58 |
| 81 | fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480 |
| 82 | |
| 83 | fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04 |
| 84 | fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480 |
| 85 | |
| 86 | fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60 |
| 87 | fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496 |
| 88 | |
| 89 | fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01 |
| 90 | fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480 |
| 91 | |
| 92 | fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01 |
| 93 | fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480 |
| 94 | |
| 95 | fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90 |
| 96 | fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482 |
| 97 | |
| 98 | fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01 |
| 99 | fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480 |
| 100 | |
| 101 | fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84 |
| 102 | fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490 |
| 103 | |
| 104 | fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70 |
| 105 | fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 106 | |
| 107 | fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46 |
| 108 | fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 109 | |
| 110 | fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47 |
| 111 | fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482 |
| 112 | |
| 113 | fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55 |
| 114 | fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510 |
| 115 | |
| 116 | fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16 |
| 117 | fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 118 | |
| 119 | fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41 |
| 120 | fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 121 | |
| 122 | fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47 |
| 123 | fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480 |
| 124 | |
| 125 | fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01 |
| 126 | fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486 |
| 127 | |
| 128 | fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09 |
| 129 | fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 130 | |
| 131 | fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68 |
| 132 | fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 133 | |
| 134 | fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82 |
| 135 | fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480 |
| 136 | |
| 137 | fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14 |
| 138 | fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474 |
| 139 | |
| 140 | fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58 |
| 141 | fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480 |
| 142 | |
| 143 | fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04 |
| 144 | fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480 |
| 145 | |
| 146 | fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60 |
| 147 | fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496 |
| 148 | |
| 149 | fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01 |
| 150 | fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480 |
| 151 | |
| 152 | fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99 |
| 153 | fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480 |
| 154 | |
| 155 | fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90 |
| 156 | fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482 |
| 157 | |
| 158 | fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08 |
| 159 | fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480 |
| 160 | |
| 161 | fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84 |
| 162 | fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490 |
| 163 | |
| 164 | fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71 |
| 165 | fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 166 | |
| 167 | fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46 |
| 168 | fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 169 | |
| 170 | fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48 |
| 171 | fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482 |
| 172 | |
| 173 | fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55 |
| 174 | fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510 |
| 175 | |
| 176 | fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22 |
| 177 | fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 178 | |
| 179 | fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41 |
| 180 | fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 181 | |
| 182 | fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50 |
| 183 | fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480 |
| 184 | |
| 185 | fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02 |
| 186 | fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486 |
| 187 | |
| 188 | fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12 |
| 189 | fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 190 | |
| 191 | fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69 |
| 192 | fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 193 | |
| 194 | fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83 |
| 195 | fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480 |
| 196 | |
| 197 | fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14 |
| 198 | fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474 |
| 199 | |
| 200 | fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62 |
| 201 | fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480 |
| 202 | |
| 203 | fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03 |
| 204 | fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480 |
| 205 | |
| 206 | fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60 |
| 207 | fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496 |
| 208 | |
| 209 | fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01 |
| 210 | fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480 |
| 211 | |
| 212 | fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01 |
| 213 | fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480 |
| 214 | |
| 215 | fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90 |
| 216 | fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482 |
| 217 | |
| 218 | fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01 |
| 219 | fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480 |
| 220 | |
| 221 | fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84 |
| 222 | fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490 |
| 223 | |
| 224 | fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70 |
| 225 | fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 226 | |
| 227 | fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46 |
| 228 | fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 229 | |
| 230 | fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47 |
| 231 | fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482 |
| 232 | |
| 233 | fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55 |
| 234 | fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510 |
| 235 | |
| 236 | fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16 |
| 237 | fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 238 | |
| 239 | fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41 |
| 240 | fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 241 | |
| 242 | fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47 |
| 243 | fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480 |
| 244 | |
| 245 | fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01 |
| 246 | fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486 |
| 247 | |
| 248 | fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09 |
| 249 | fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 250 | |
| 251 | fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68 |
| 252 | fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 253 | |
| 254 | fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82 |
| 255 | fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480 |
| 256 | |
| 257 | fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14 |
| 258 | fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474 |
| 259 | |
| 260 | fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58 |
| 261 | fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480 |
| 262 | |
| 263 | fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04 |
| 264 | fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480 |
| 265 | |
| 266 | fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60 |
| 267 | fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496 |
| 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):linear_interp=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 | endef |
| 279 | |
| 280 | fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63 |
| 281 | fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 282 | |
| 283 | fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53 |
| 284 | fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 285 | |
| 286 | fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45 |
| 287 | fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 288 | |
| 289 | fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68 |
| 290 | fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 291 | |
| 292 | fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41 |
| 293 | fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 294 | |
| 295 | fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.68 |
| 296 | fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 297 | |
| 298 | fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61 |
| 299 | fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 300 | |
| 301 | fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50 |
| 302 | fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 303 | |
| 304 | fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45 |
| 305 | fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 306 | |
| 307 | fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67 |
| 308 | fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 309 | |
| 310 | fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41 |
| 311 | fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 312 | |
| 313 | fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.63 |
| 314 | fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 315 | |
| 316 | fate-swr-resample_lin-dblp-8000-44100: CMP_TARGET = 14.61 |
| 317 | fate-swr-resample_lin-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 318 | |
| 319 | fate-swr-resample_lin-dblp-8000-48000: CMP_TARGET = 14.50 |
| 320 | fate-swr-resample_lin-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480 |
| 321 | |
| 322 | fate-swr-resample_lin-dblp-44100-8000: CMP_TARGET = 75.45 |
| 323 | fate-swr-resample_lin-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 324 | |
| 325 | fate-swr-resample_lin-dblp-44100-48000: CMP_TARGET = 9.67 |
| 326 | fate-swr-resample_lin-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482 |
| 327 | |
| 328 | fate-swr-resample_lin-dblp-48000-8000: CMP_TARGET = 62.41 |
| 329 | fate-swr-resample_lin-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484 |
| 330 | |
| 331 | fate-swr-resample_lin-dblp-48000-44100: CMP_TARGET = 0.63 |
| 332 | fate-swr-resample_lin-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480 |
| 333 | |
| 334 | define ARESAMPLE_NN |
| 335 | FATE_SWR_RESAMPLE += fate-swr-resample_nn-$(3)-$(1)-$(2) |
| 336 | fate-swr-resample_nn-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav |
| 337 | 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 - |
| 338 | |
| 339 | fate-swr-resample_nn-$(3)-$(1)-$(2): CMP = stddev |
| 340 | fate-swr-resample_nn-$(3)-$(1)-$(2): CMP_UNIT = $(5) |
| 341 | fate-swr-resample_nn-$(3)-$(1)-$(2): FUZZ = 0.1 |
| 342 | fate-swr-resample_nn-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav |
| 343 | endef |
| 344 | |
| 345 | fate-swr-resample_nn-fltp-44100-8000: CMP_TARGET = 590.98 |
| 346 | fate-swr-resample_nn-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 347 | |
| 348 | fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 3163.32 |
| 349 | fate-swr-resample_nn-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 350 | |
| 351 | fate-swr-resample_nn-s16p-44100-8000: CMP_TARGET = 590.97 |
| 352 | fate-swr-resample_nn-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486 |
| 353 | |
| 354 | fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 3163.39 |
| 355 | fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480 |
| 356 | |
| 357 | define ARESAMPLE_ASYNC |
| 358 | FATE_SWR_RESAMPLE += fate-swr-resample_async-$(3)-$(1)-$(2) |
| 359 | fate-swr-resample_async-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav |
| 360 | fate-swr-resample_async-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af atrim=end_sample=10240,asetpts=PTS+random\(0\)*200-100,aresample=$(2):async=50:min_hard_comp=0.100000:first_pts=0:internal_sample_fmt=$(3),aformat=$(3),aresample=$(1):internal_sample_fmt=$(3) -f wav -acodec pcm_s16le - |
| 361 | |
| 362 | fate-swr-resample_async-$(3)-$(1)-$(2): CMP = stddev |
| 363 | fate-swr-resample_async-$(3)-$(1)-$(2): CMP_UNIT = $(5) |
| 364 | fate-swr-resample_async-$(3)-$(1)-$(2): FUZZ = 0.1 |
| 365 | fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav |
| 366 | endef |
| 367 | |
| 368 | fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4047.25 |
| 369 | fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20132 |
| 370 | |
| 371 | fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11193.77 |
| 372 | fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20312 |
| 373 | |
| 374 | fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4047.24 |
| 375 | fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20132 |
| 376 | |
| 377 | fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11194.08 |
| 378 | fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20312 |
| 379 | |
| 380 | $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16) |
| 381 | $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16) |
| 382 | $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16) |
| 383 | $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16) |
| 384 | |
| 385 | $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16) |
| 386 | $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16) |
| 387 | $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,dblp,f64le,s16) |
| 388 | |
| 389 | $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,s16p,s16le,s16) |
| 390 | $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,fltp,f32le,s16) |
| 391 | |
| 392 | $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_ASYNC,s16p,s16le,s16) |
| 393 | $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_ASYNC,fltp,f32le,s16) |
| 394 | |
| 395 | |
| 396 | FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE) |
| 397 | fate-swr-resample: $(FATE_SWR_RESAMPLE-yes) |
| 398 | FATE_SWR += $(FATE_SWR_RESAMPLE-yes) |
| 399 | |
| 400 | FATE_FFMPEG += $(FATE_SWR) |
| 401 | fate-swr: $(FATE_SWR) |