libavresample.mak 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. MIX_CHANNELS = 1 2 3 4 5 6 7 8
  7. define MIX
  8. FATE_LAVR_MIX += fate-lavr-mix-$(3)-$(1)-$(2)
  9. fate-lavr-mix-$(3)-$(1)-$(2): tests/data/asynth-44100-$(1).wav
  10. fate-lavr-mix-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-$(1).wav -ac $(2) -mix_coeff_type $(3) -internal_sample_fmt $(4) -f s16le -af atrim=end_sample=1024 -
  11. fate-lavr-mix-$(3)-$(1)-$(2): CMP = oneoff
  12. fate-lavr-mix-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-mix-$(3)-$(1)-$(2)
  13. endef
  14. $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q8,s16p)
  15. $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q15,s16p)
  16. $(call CROSS_TEST,$(MIX_CHANNELS),MIX,flt,fltp)
  17. FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX)
  18. fate-lavr-mix: $(FATE_LAVR_MIX-yes)
  19. #FATE_LAVR += $(FATE_LAVR_MIX-yes)
  20. SAMPLERATES = 2626 8000 44100 48000 96000
  21. define RESAMPLE
  22. FATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2)
  23. fate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  24. fate-lavr-resample-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -ar $(2) -internal_sample_fmt $(3) -f $(4) -af atrim=end_sample=10240 -
  25. fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff
  26. fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  27. fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6
  28. fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)
  29. endef
  30. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16)
  31. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16)
  32. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32)
  33. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64)
  34. FATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE)
  35. fate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes)
  36. #FATE_LAVR += $(FATE_LAVR_RESAMPLE-yes)
  37. FATE_SAMPLES_AVCONV += $(FATE_LAVR)
  38. fate-lavr: $(FATE_LAVR)