You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

356 lines
15KB

  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. SAMPLERATES = 2626 8000 44100 48000 96000
  7. SAMPLERATES_LITE = 8000 44100 48000
  8. SAMPLERATES_NN = 8000 44100
  9. define ARESAMPLE
  10. FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
  11. fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  12. 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 -
  13. fate-swr-resample-$(3)-$(1)-$(2): CMP = stddev
  14. fate-swr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  15. fate-swr-resample-$(3)-$(1)-$(2): FUZZ = 0.1
  16. fate-swr-resample-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
  17. #below list is generated by:
  18. #you can use this if you need to update it!
  19. #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'
  20. fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
  21. fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  22. fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
  23. fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  24. fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
  25. fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  26. fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
  27. fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  28. fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
  29. fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  30. fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
  31. fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  32. fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
  33. fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  34. fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
  35. fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  36. fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
  37. fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  38. fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
  39. fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  40. fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
  41. fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  42. fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
  43. fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  44. fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
  45. fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  46. fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
  47. fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  48. fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
  49. fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  50. fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
  51. fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  52. fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
  53. fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  54. fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
  55. fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  56. fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
  57. fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  58. fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
  59. fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  60. fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
  61. fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  62. fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
  63. fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  64. fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
  65. fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  66. fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
  67. fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  68. fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
  69. fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  70. fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
  71. fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  72. fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
  73. fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  74. fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
  75. fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  76. fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
  77. fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  78. fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
  79. fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  80. fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
  81. fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  82. fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
  83. fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  84. fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
  85. fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  86. fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
  87. fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  88. fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
  89. fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  90. fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
  91. fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  92. fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
  93. fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  94. fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
  95. fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  96. fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
  97. fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  98. fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
  99. fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  100. fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
  101. fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  102. fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
  103. fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  104. fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
  105. fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  106. fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
  107. fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  108. fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
  109. fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  110. fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
  111. fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  112. fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
  113. fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  114. fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
  115. fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  116. fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
  117. fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  118. fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
  119. fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  120. fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
  121. fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  122. fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
  123. fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  124. fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
  125. fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  126. fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
  127. fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  128. fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
  129. fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  130. fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
  131. fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  132. fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
  133. fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  134. fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
  135. fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  136. fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
  137. fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  138. fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
  139. fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  140. fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
  141. fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  142. fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
  143. fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  144. fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
  145. fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  146. fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
  147. fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  148. fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
  149. fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  150. fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
  151. fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  152. fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
  153. fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  154. fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
  155. fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  156. fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
  157. fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  158. fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
  159. fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  160. fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
  161. fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  162. fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
  163. fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  164. fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
  165. fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  166. fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
  167. fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  168. fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
  169. fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  170. fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
  171. fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  172. fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
  173. fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  174. fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
  175. fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  176. fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
  177. fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  178. fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
  179. fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  180. endef
  181. define ARESAMPLE_LIN
  182. FATE_SWR_RESAMPLE += fate-swr-resample_lin-$(3)-$(1)-$(2)
  183. fate-swr-resample_lin-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  184. 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 -
  185. fate-swr-resample_lin-$(3)-$(1)-$(2): CMP = stddev
  186. fate-swr-resample_lin-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  187. fate-swr-resample_lin-$(3)-$(1)-$(2): FUZZ = 0.1
  188. fate-swr-resample_lin-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
  189. fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63
  190. fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  191. fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53
  192. fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  193. fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45
  194. fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  195. fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68
  196. fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  197. fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41
  198. fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  199. fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.86
  200. fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  201. fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61
  202. fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  203. fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50
  204. fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  205. fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45
  206. fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  207. fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67
  208. fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  209. fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41
  210. fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  211. fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.79
  212. fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  213. endef
  214. define ARESAMPLE_NN
  215. FATE_SWR_RESAMPLE += fate-swr-resample_nn-$(3)-$(1)-$(2)
  216. fate-swr-resample_nn-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  217. 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 -
  218. fate-swr-resample_nn-$(3)-$(1)-$(2): CMP = stddev
  219. fate-swr-resample_nn-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  220. fate-swr-resample_nn-$(3)-$(1)-$(2): FUZZ = 0.1
  221. fate-swr-resample_nn-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
  222. fate-swr-resample_nn-fltp-44100-8000: CMP_TARGET = 590.98
  223. fate-swr-resample_nn-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  224. fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 3163.32
  225. fate-swr-resample_nn-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  226. fate-swr-resample_nn-s16p-44100-8000: CMP_TARGET = 590.97
  227. fate-swr-resample_nn-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  228. fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 3163.39
  229. fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  230. endef
  231. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
  232. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
  233. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
  234. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
  235. $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16)
  236. $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16)
  237. $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,s16p,s16le,s16)
  238. $(call CROSS_TEST,$(SAMPLERATES_NN),ARESAMPLE_NN,fltp,f32le,s16)
  239. FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
  240. fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
  241. FATE_SWR += $(FATE_SWR_RESAMPLE-yes)
  242. FATE_FFMPEG += $(FATE_SWR)
  243. fate-swr: $(FATE_SWR)