1cabdff1aSopenharmony_ciCROSS_TEST = $(foreach I,$(1),                                          \
2cabdff1aSopenharmony_ci                 $(foreach J,$(1),                                      \
3cabdff1aSopenharmony_ci                     $(if $(filter-out $(I),$(J)),                      \
4cabdff1aSopenharmony_ci                         $(eval $(call $(2),$(I),$(J),$(3),$(4),$(5))), \
5cabdff1aSopenharmony_ci                     )))
6cabdff1aSopenharmony_ci
7cabdff1aSopenharmony_ciMIX_CHANNELS = 1 2 3 4 5 6 7 8
8cabdff1aSopenharmony_ci
9cabdff1aSopenharmony_cidefine MIX
10cabdff1aSopenharmony_ciFATE_LAVR_MIX += fate-lavr-mix-$(3)-$(1)-$(2)
11cabdff1aSopenharmony_cifate-lavr-mix-$(3)-$(1)-$(2): tests/data/asynth-44100-$(1).wav
12cabdff1aSopenharmony_cifate-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 -
13cabdff1aSopenharmony_cifate-lavr-mix-$(3)-$(1)-$(2): CMP = oneoff
14cabdff1aSopenharmony_cifate-lavr-mix-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-mix-$(3)-$(1)-$(2)
15cabdff1aSopenharmony_ciendef
16cabdff1aSopenharmony_ci
17cabdff1aSopenharmony_ci$(call CROSS_TEST,$(MIX_CHANNELS),MIX,q8,s16p)
18cabdff1aSopenharmony_ci$(call CROSS_TEST,$(MIX_CHANNELS),MIX,q15,s16p)
19cabdff1aSopenharmony_ci$(call CROSS_TEST,$(MIX_CHANNELS),MIX,flt,fltp)
20cabdff1aSopenharmony_ci
21cabdff1aSopenharmony_ci# test output zeroing with skipped corresponding input
22cabdff1aSopenharmony_ciFATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, CHANNELMAP RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-lavr-mix-output-zero
23cabdff1aSopenharmony_cifate-lavr-mix-output-zero: tests/data/filtergraphs/lavr_mix_output_zero tests/data/asynth-44100-4.wav
24cabdff1aSopenharmony_cifate-lavr-mix-output-zero: CMP = oneoff
25cabdff1aSopenharmony_cifate-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 -
26cabdff1aSopenharmony_cifate-lavr-mix-output-zero: REF = $(SAMPLES)/lavr/lavr-mix-output-zero
27cabdff1aSopenharmony_ci
28cabdff1aSopenharmony_ciFATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX)
29cabdff1aSopenharmony_cifate-lavr-mix: $(FATE_LAVR_MIX-yes)
30cabdff1aSopenharmony_ci#FATE_LAVR += $(FATE_LAVR_MIX-yes)
31cabdff1aSopenharmony_ci
32cabdff1aSopenharmony_ciSAMPLERATES = 2626 8000 44100 48000 96000
33cabdff1aSopenharmony_ci
34cabdff1aSopenharmony_cidefine RESAMPLE
35cabdff1aSopenharmony_ciFATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2)
36cabdff1aSopenharmony_cifate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
37cabdff1aSopenharmony_cifate-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 -
38cabdff1aSopenharmony_cifate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff
39cabdff1aSopenharmony_cifate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
40cabdff1aSopenharmony_cifate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6
41cabdff1aSopenharmony_cifate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v3
42cabdff1aSopenharmony_ciendef
43cabdff1aSopenharmony_ci
44cabdff1aSopenharmony_ci$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16)
45cabdff1aSopenharmony_ci$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16)
46cabdff1aSopenharmony_ci$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32)
47cabdff1aSopenharmony_ci$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64)
48cabdff1aSopenharmony_ci
49cabdff1aSopenharmony_ciFATE_LAVR_RESAMPLE += fate-lavr-resample-linear
50cabdff1aSopenharmony_cifate-lavr-resample-linear: tests/data/asynth-44100-1.wav
51cabdff1aSopenharmony_cifate-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 -
52cabdff1aSopenharmony_cifate-lavr-resample-linear: CMP = oneoff
53cabdff1aSopenharmony_cifate-lavr-resample-linear: CMP_UNIT = s16
54cabdff1aSopenharmony_cifate-lavr-resample-linear: REF = $(SAMPLES)/lavr/lavr-resample-linear
55cabdff1aSopenharmony_ci
56cabdff1aSopenharmony_ciFATE_LAVR_RESAMPLE += fate-lavr-resample-nearest
57cabdff1aSopenharmony_cifate-lavr-resample-nearest: tests/data/asynth-48000-1.wav
58cabdff1aSopenharmony_cifate-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 -
59cabdff1aSopenharmony_cifate-lavr-resample-nearest: CMP = oneoff
60cabdff1aSopenharmony_cifate-lavr-resample-nearest: CMP_UNIT = s16
61cabdff1aSopenharmony_cifate-lavr-resample-nearest: REF = $(SAMPLES)/lavr/lavr-resample-nearest
62cabdff1aSopenharmony_ci
63cabdff1aSopenharmony_ciFATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE)
64cabdff1aSopenharmony_cifate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes)
65cabdff1aSopenharmony_ci#FATE_LAVR += $(FATE_LAVR_RESAMPLE-yes)
66cabdff1aSopenharmony_ci
67cabdff1aSopenharmony_ciFATE_SAMPLES_AVCONV += $(FATE_LAVR)
68cabdff1aSopenharmony_cifate-lavr: $(FATE_LAVR)
69