resample: implement flushing
[ffmpeg.git] / tests / fate / libavresample.mak
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 MIX_CHANNELS = 1 2 3 4 5 6 7 8
8
9 define MIX
10 FATE_LAVR_MIX += fate-lavr-mix-$(3)-$(1)-$(2)
11 fate-lavr-mix-$(3)-$(1)-$(2): tests/data/asynth-44100-$(1).wav
12 fate-lavr-mix-$(3)-$(1)-$(2): CMD = avconv -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 -
13 fate-lavr-mix-$(3)-$(1)-$(2): CMP = oneoff
14 fate-lavr-mix-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-mix-$(3)-$(1)-$(2)
15 endef
16
17 $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q8,s16p)
18 $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q15,s16p)
19 $(call CROSS_TEST,$(MIX_CHANNELS),MIX,flt,fltp)
20
21 # test output zeroing with skipped corresponding input
22 FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, CHANNELMAP RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-lavr-mix-output-zero
23 fate-lavr-mix-output-zero: tests/data/filtergraphs/lavr_mix_output_zero tests/data/asynth-44100-4.wav
24 fate-lavr-mix-output-zero: CMP = oneoff
25 fate-lavr-mix-output-zero: CMD = avconv -i $(TARGET_PATH)/tests/data/asynth-44100-4.wav -filter_script $(TARGET_PATH)/tests/data/filtergraphs/lavr_mix_output_zero -f s16le -
26 fate-lavr-mix-output-zero: REF = $(SAMPLES)/lavr/lavr-mix-output-zero
27
28 FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX)
29 fate-lavr-mix: $(FATE_LAVR_MIX-yes)
30 FATE_LAVR += $(FATE_LAVR_MIX-yes)
31
32 SAMPLERATES = 2626 8000 44100 48000 96000
33
34 define RESAMPLE
35 FATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2)
36 fate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
37 fate-lavr-resample-$(3)-$(1)-$(2): CMD = avconv -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -ar $(2) -internal_sample_fmt $(3) -f $(4) -af atrim=end_sample=10240 -
38 fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff
39 fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
40 fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6
41 fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v2
42 endef
43
44 $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16)
45 $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16)
46 $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32)
47 $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64)
48
49 FATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE)
50 fate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes)
51 FATE_LAVR += $(FATE_LAVR_RESAMPLE-yes)
52
53 FATE_SAMPLES_AVCONV += $(FATE_LAVR)
54 fate-lavr: $(FATE_LAVR)