FATE: add a test for the lavr mixing case fixed in fc6a3ef40d34ce8443ae57c2452f3f273d...
[ffmpeg.git] / tests / fate / libavresample.mak
index 516c6e6..543a499 100644 (file)
@@ -1,7 +1,7 @@
 CROSS_TEST = $(foreach I,$(1),                                        \
                  $(foreach J,$(1),                                    \
                      $(if $(filter-out $(I),$(J)),                    \
-                         $(eval $(call $(2),$(I),$(J),$(3),$(4))),    \
+                         $(eval $(call $(2),$(I),$(J),$(3),$(4),$(5))),    \
                      )))
 
 MIX_CHANNELS = 1 2 3 4 5 6 7 8
@@ -18,6 +18,13 @@ $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q8,s16p)
 $(call CROSS_TEST,$(MIX_CHANNELS),MIX,q15,s16p)
 $(call CROSS_TEST,$(MIX_CHANNELS),MIX,flt,fltp)
 
+# test output zeroing with skipped corresponding input
+FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, CHANNELMAP RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-lavr-mix-output-zero
+fate-lavr-mix-output-zero: tests/data/filtergraphs/lavr_mix_output_zero tests/data/asynth-44100-4.wav
+fate-lavr-mix-output-zero: CMP = oneoff
+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 -
+fate-lavr-mix-output-zero: REF = $(SAMPLES)/lavr/lavr-mix-output-zero
+
 FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX)
 fate-lavr-mix: $(FATE_LAVR_MIX-yes)
 FATE_LAVR += $(FATE_LAVR_MIX-yes)
@@ -29,13 +36,15 @@ FATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2)
 fate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
 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 -
 fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff
+fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5)
+fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6
 fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)
 endef
 
-$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le)
-$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le)
-$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le)
-$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le)
+$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16)
+$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16)
+$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32)
+$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64)
 
 FATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE)
 fate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes)