libswresample.mak 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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. define ARESAMPLE
  8. FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
  9. fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  10. 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 -
  11. fate-swr-resample-$(3)-$(1)-$(2): CMP = stddev
  12. fate-swr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  13. fate-swr-resample-$(3)-$(1)-$(2): FUZZ = 0.1
  14. fate-swr-resample-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
  15. #below list is generated by:
  16. #you can use this if you need to update it!
  17. #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'
  18. fate-swr-resample-dblp-2626-44100: CMP_TARGET = 1393.01
  19. fate-swr-resample-dblp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  20. fate-swr-resample-dblp-2626-48000: CMP_TARGET = 1393.01
  21. fate-swr-resample-dblp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  22. fate-swr-resample-dblp-2626-8000: CMP_TARGET = 1393.90
  23. fate-swr-resample-dblp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  24. fate-swr-resample-dblp-2626-96000: CMP_TARGET = 1393.01
  25. fate-swr-resample-dblp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  26. fate-swr-resample-dblp-44100-2626: CMP_TARGET = 185.84
  27. fate-swr-resample-dblp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  28. fate-swr-resample-dblp-44100-48000: CMP_TARGET = 9.70
  29. fate-swr-resample-dblp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  30. fate-swr-resample-dblp-44100-8000: CMP_TARGET = 75.46
  31. fate-swr-resample-dblp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  32. fate-swr-resample-dblp-44100-96000: CMP_TARGET = 11.47
  33. fate-swr-resample-dblp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  34. fate-swr-resample-dblp-48000-2626: CMP_TARGET = 456.55
  35. fate-swr-resample-dblp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  36. fate-swr-resample-dblp-48000-44100: CMP_TARGET = 1.16
  37. fate-swr-resample-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  38. fate-swr-resample-dblp-48000-8000: CMP_TARGET = 62.41
  39. fate-swr-resample-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  40. fate-swr-resample-dblp-48000-96000: CMP_TARGET = 0.47
  41. fate-swr-resample-dblp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  42. fate-swr-resample-dblp-8000-2626: CMP_TARGET = 2506.01
  43. fate-swr-resample-dblp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  44. fate-swr-resample-dblp-8000-44100: CMP_TARGET = 15.09
  45. fate-swr-resample-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  46. fate-swr-resample-dblp-8000-48000: CMP_TARGET = 14.68
  47. fate-swr-resample-dblp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  48. fate-swr-resample-dblp-8000-96000: CMP_TARGET = 13.82
  49. fate-swr-resample-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  50. fate-swr-resample-dblp-96000-2626: CMP_TARGET = 675.14
  51. fate-swr-resample-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  52. fate-swr-resample-dblp-96000-44100: CMP_TARGET = 1.58
  53. fate-swr-resample-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  54. fate-swr-resample-dblp-96000-48000: CMP_TARGET = 1.04
  55. fate-swr-resample-dblp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  56. fate-swr-resample-dblp-96000-8000: CMP_TARGET = 58.60
  57. fate-swr-resample-dblp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  58. fate-swr-resample-fltp-2626-44100: CMP_TARGET = 1393.01
  59. fate-swr-resample-fltp-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  60. fate-swr-resample-fltp-2626-48000: CMP_TARGET = 1393.01
  61. fate-swr-resample-fltp-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  62. fate-swr-resample-fltp-2626-8000: CMP_TARGET = 1393.90
  63. fate-swr-resample-fltp-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  64. fate-swr-resample-fltp-2626-96000: CMP_TARGET = 1393.01
  65. fate-swr-resample-fltp-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  66. fate-swr-resample-fltp-44100-2626: CMP_TARGET = 185.84
  67. fate-swr-resample-fltp-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  68. fate-swr-resample-fltp-44100-48000: CMP_TARGET = 9.70
  69. fate-swr-resample-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  70. fate-swr-resample-fltp-44100-8000: CMP_TARGET = 75.46
  71. fate-swr-resample-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  72. fate-swr-resample-fltp-44100-96000: CMP_TARGET = 11.47
  73. fate-swr-resample-fltp-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  74. fate-swr-resample-fltp-48000-2626: CMP_TARGET = 456.55
  75. fate-swr-resample-fltp-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  76. fate-swr-resample-fltp-48000-44100: CMP_TARGET = 1.16
  77. fate-swr-resample-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  78. fate-swr-resample-fltp-48000-8000: CMP_TARGET = 62.41
  79. fate-swr-resample-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  80. fate-swr-resample-fltp-48000-96000: CMP_TARGET = 0.47
  81. fate-swr-resample-fltp-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  82. fate-swr-resample-fltp-8000-2626: CMP_TARGET = 2506.01
  83. fate-swr-resample-fltp-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  84. fate-swr-resample-fltp-8000-44100: CMP_TARGET = 15.09
  85. fate-swr-resample-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  86. fate-swr-resample-fltp-8000-48000: CMP_TARGET = 14.68
  87. fate-swr-resample-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  88. fate-swr-resample-fltp-8000-96000: CMP_TARGET = 13.82
  89. fate-swr-resample-fltp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  90. fate-swr-resample-fltp-96000-2626: CMP_TARGET = 675.14
  91. fate-swr-resample-fltp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  92. fate-swr-resample-fltp-96000-44100: CMP_TARGET = 1.58
  93. fate-swr-resample-fltp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  94. fate-swr-resample-fltp-96000-48000: CMP_TARGET = 1.04
  95. fate-swr-resample-fltp-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  96. fate-swr-resample-fltp-96000-8000: CMP_TARGET = 58.60
  97. fate-swr-resample-fltp-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  98. fate-swr-resample-s16p-2626-44100: CMP_TARGET = 1393.01
  99. fate-swr-resample-s16p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  100. fate-swr-resample-s16p-2626-48000: CMP_TARGET = 1392.99
  101. fate-swr-resample-s16p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  102. fate-swr-resample-s16p-2626-8000: CMP_TARGET = 1393.90
  103. fate-swr-resample-s16p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  104. fate-swr-resample-s16p-2626-96000: CMP_TARGET = 1393.08
  105. fate-swr-resample-s16p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  106. fate-swr-resample-s16p-44100-2626: CMP_TARGET = 185.84
  107. fate-swr-resample-s16p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  108. fate-swr-resample-s16p-44100-48000: CMP_TARGET = 9.71
  109. fate-swr-resample-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  110. fate-swr-resample-s16p-44100-8000: CMP_TARGET = 75.46
  111. fate-swr-resample-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  112. fate-swr-resample-s16p-44100-96000: CMP_TARGET = 11.48
  113. fate-swr-resample-s16p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  114. fate-swr-resample-s16p-48000-2626: CMP_TARGET = 456.55
  115. fate-swr-resample-s16p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  116. fate-swr-resample-s16p-48000-44100: CMP_TARGET = 1.22
  117. fate-swr-resample-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  118. fate-swr-resample-s16p-48000-8000: CMP_TARGET = 62.41
  119. fate-swr-resample-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  120. fate-swr-resample-s16p-48000-96000: CMP_TARGET = 0.50
  121. fate-swr-resample-s16p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  122. fate-swr-resample-s16p-8000-2626: CMP_TARGET = 2506.02
  123. fate-swr-resample-s16p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  124. fate-swr-resample-s16p-8000-44100: CMP_TARGET = 15.12
  125. fate-swr-resample-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  126. fate-swr-resample-s16p-8000-48000: CMP_TARGET = 14.69
  127. fate-swr-resample-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  128. fate-swr-resample-s16p-8000-96000: CMP_TARGET = 13.83
  129. fate-swr-resample-s16p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  130. fate-swr-resample-s16p-96000-2626: CMP_TARGET = 675.14
  131. fate-swr-resample-s16p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  132. fate-swr-resample-s16p-96000-44100: CMP_TARGET = 1.62
  133. fate-swr-resample-s16p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  134. fate-swr-resample-s16p-96000-48000: CMP_TARGET = 1.03
  135. fate-swr-resample-s16p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  136. fate-swr-resample-s16p-96000-8000: CMP_TARGET = 58.60
  137. fate-swr-resample-s16p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  138. fate-swr-resample-s32p-2626-44100: CMP_TARGET = 1393.01
  139. fate-swr-resample-s32p-2626-44100: SIZE_TOLERANCE = 31512 - 20480
  140. fate-swr-resample-s32p-2626-48000: CMP_TARGET = 1393.01
  141. fate-swr-resample-s32p-2626-48000: SIZE_TOLERANCE = 31512 - 20480
  142. fate-swr-resample-s32p-2626-8000: CMP_TARGET = 1393.90
  143. fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
  144. fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.01
  145. fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
  146. fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.84
  147. fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
  148. fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
  149. fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
  150. fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.46
  151. fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
  152. fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
  153. fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
  154. fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.55
  155. fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
  156. fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.16
  157. fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
  158. fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.41
  159. fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
  160. fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
  161. fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
  162. fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2506.01
  163. fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
  164. fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
  165. fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
  166. fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
  167. fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
  168. fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.82
  169. fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
  170. fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.14
  171. fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
  172. fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.58
  173. fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
  174. fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.04
  175. fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
  176. fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
  177. fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
  178. endef
  179. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
  180. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
  181. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
  182. $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
  183. FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
  184. fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
  185. FATE_SWR += $(FATE_SWR_RESAMPLE-yes)
  186. FATE_FFMPEG += $(FATE_SWR)
  187. fate-swr: $(FATE_SWR)