Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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. define ARESAMPLE
  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 -
  14.  
  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
  19.  
  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'
  23.  
  24. fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
  25. fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  26.  
  27. fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
  28. fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  29.  
  30. fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
  31. fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  32.  
  33. fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
  34. fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  35.  
  36. fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
  37. fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  38.  
  39. fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
  40. fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  41.  
  42. fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
  43. fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  44.  
  45. fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
  46. fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  47.  
  48. fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
  49. fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  50.  
  51. fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
  52. fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  53.  
  54. fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
  55. fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  56.  
  57. fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
  58. fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  59.  
  60. fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
  61. fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  62.  
  63. fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
  64. fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  65.  
  66. fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
  67. fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  68.  
  69. fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
  70. fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  71.  
  72. fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
  73. fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  74.  
  75. fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
  76. fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  77.  
  78. fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
  79. fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  80.  
  81. fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
  82. fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  83.  
  84. fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
  85. fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  86.  
  87. fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
  88. fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  89.  
  90. fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
  91. fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  92.  
  93. fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
  94. fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  95.  
  96. fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
  97. fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  98.  
  99. fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
  100. fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  101.  
  102. fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
  103. fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  104.  
  105. fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
  106. fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  107.  
  108. fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
  109. fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  110.  
  111. fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
  112. fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  113.  
  114. fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
  115. fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  116.  
  117. fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
  118. fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  119.  
  120. fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
  121. fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  122.  
  123. fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
  124. fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  125.  
  126. fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
  127. fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  128.  
  129. fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
  130. fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  131.  
  132. fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
  133. fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  134.  
  135. fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
  136. fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  137.  
  138. fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
  139. fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  140.  
  141. fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
  142. fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  143.  
  144. fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
  145. fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  146.  
  147. fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
  148. fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  149.  
  150. fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
  151. fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  152.  
  153. fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
  154. fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  155.  
  156. fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
  157. fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  158.  
  159. fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
  160. fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  161.  
  162. fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
  163. fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  164.  
  165. fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
  166. fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  167.  
  168. fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
  169. fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  170.  
  171. fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
  172. fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  173.  
  174. fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
  175. fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  176.  
  177. fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
  178. fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  179.  
  180. fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
  181. fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  182.  
  183. fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
  184. fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  185.  
  186. fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
  187. fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  188.  
  189. fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
  190. fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  191.  
  192. fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
  193. fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  194.  
  195. fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
  196. fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  197.  
  198. fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
  199. fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  200.  
  201. fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
  202. fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  203.  
  204. fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
  205. fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  206.  
  207. fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
  208. fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  209.  
  210. fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
  211. fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  212.  
  213. fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
  214. fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  215.  
  216. fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
  217. fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  218.  
  219. fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
  220. fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  221.  
  222. fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
  223. fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  224.  
  225. fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
  226. fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  227.  
  228. fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
  229. fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  230.  
  231. fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
  232. fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  233.  
  234. fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
  235. fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  236.  
  237. fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
  238. fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  239.  
  240. fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
  241. fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  242.  
  243. fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
  244. fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  245.  
  246. fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
  247. fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  248.  
  249. fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
  250. fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  251.  
  252. fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
  253. fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  254.  
  255. fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
  256. fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  257.  
  258. fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
  259. fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  260.  
  261. fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
  262. fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  263. endef
  264.  
  265.  
  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)
  270.  
  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)
  274.  
  275. FATE_FFMPEG += $(FATE_SWR)
  276. fate-swr: $(FATE_SWR)
  277.