libavresample.mak 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # test output zeroing with skipped corresponding input
  18. FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, CHANNELMAP RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-lavr-mix-output-zero
  19. fate-lavr-mix-output-zero: tests/data/filtergraphs/lavr_mix_output_zero tests/data/asynth-44100-4.wav
  20. fate-lavr-mix-output-zero: CMP = oneoff
  21. fate-lavr-mix-output-zero: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-4.wav -filter_script $(TARGET_PATH)/tests/data/filtergraphs/lavr_mix_output_zero -f s16le -
  22. fate-lavr-mix-output-zero: REF = $(SAMPLES)/lavr/lavr-mix-output-zero
  23. FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX)
  24. fate-lavr-mix: $(FATE_LAVR_MIX-yes)
  25. #FATE_LAVR += $(FATE_LAVR_MIX-yes)
  26. SAMPLERATES = 2626 8000 44100 48000 96000
  27. define RESAMPLE
  28. FATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2)
  29. fate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
  30. 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 -
  31. fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff
  32. fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
  33. fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6
  34. fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v3
  35. endef
  36. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16)
  37. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16)
  38. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32)
  39. $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64)
  40. FATE_LAVR_RESAMPLE += fate-lavr-resample-linear
  41. fate-lavr-resample-linear: tests/data/asynth-44100-1.wav
  42. fate-lavr-resample-linear: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -ar 48000 -filter_size 32 -linear_interp 1 -f s16le -af atrim=end_sample=10240 -
  43. fate-lavr-resample-linear: CMP = oneoff
  44. fate-lavr-resample-linear: CMP_UNIT = s16
  45. fate-lavr-resample-linear: REF = $(SAMPLES)/lavr/lavr-resample-linear
  46. FATE_LAVR_RESAMPLE += fate-lavr-resample-nearest
  47. fate-lavr-resample-nearest: tests/data/asynth-48000-1.wav
  48. fate-lavr-resample-nearest: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-48000-1.wav -ar 44100 -filter_size 0 -phase_shift 0 -f s16le -af atrim=end_sample=10240 -
  49. fate-lavr-resample-nearest: CMP = oneoff
  50. fate-lavr-resample-nearest: CMP_UNIT = s16
  51. fate-lavr-resample-nearest: REF = $(SAMPLES)/lavr/lavr-resample-nearest
  52. FATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE)
  53. fate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes)
  54. #FATE_LAVR += $(FATE_LAVR_RESAMPLE-yes)
  55. FATE_SAMPLES_AVCONV += $(FATE_LAVR)
  56. fate-lavr: $(FATE_LAVR)