aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-24 04:25:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-24 04:25:44 +0100
commit8683fa541bdf2998f6167b43b72b09f701fec573 (patch)
treea3b5f9ac9d32d8355ae0f06e7dfd37f84c26b3bb
parente03c3ac5390086412737df44398f72160e721bd6 (diff)
downloadffmpeg-8683fa541bdf2998f6167b43b72b09f701fec573.tar.gz
fate: add tests for linearly interpolated resampling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--tests/fate/libswresample.mak51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak
index dd47de913d..5e46230eea 100644
--- a/tests/fate/libswresample.mak
+++ b/tests/fate/libswresample.mak
@@ -7,6 +7,8 @@ CROSS_TEST = $(foreach I,$(1), \
SAMPLERATES = 2626 8000 44100 48000 96000
+SAMPLERATES_LITE = 8000 44100 48000
+
define ARESAMPLE
FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
@@ -262,12 +264,61 @@ fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.60
fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
endef
+define ARESAMPLE_LIN
+FATE_SWR_RESAMPLE += fate-swr-resample_lin-$(3)-$(1)-$(2)
+fate-swr-resample_lin-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
+fate-swr-resample_lin-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af atrim=end_sample=10240,aresample=$(2):linear_interp=1:internal_sample_fmt=$(3),aformat=$(3),aresample=$(1):internal_sample_fmt=$(3) -f wav -acodec pcm_s16le -
+
+fate-swr-resample_lin-$(3)-$(1)-$(2): CMP = stddev
+fate-swr-resample_lin-$(3)-$(1)-$(2): CMP_UNIT = $(5)
+fate-swr-resample_lin-$(3)-$(1)-$(2): FUZZ = 0.1
+fate-swr-resample_lin-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
+
+fate-swr-resample_lin-s16p-8000-44100: CMP_TARGET = 14.63
+fate-swr-resample_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
+
+fate-swr-resample_lin-s16p-8000-48000: CMP_TARGET = 14.53
+fate-swr-resample_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
+
+fate-swr-resample_lin-s16p-44100-8000: CMP_TARGET = 75.45
+fate-swr-resample_lin-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
+
+fate-swr-resample_lin-s16p-44100-48000: CMP_TARGET = 9.68
+fate-swr-resample_lin-s16p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
+
+fate-swr-resample_lin-s16p-48000-8000: CMP_TARGET = 62.41
+fate-swr-resample_lin-s16p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
+
+fate-swr-resample_lin-s16p-48000-44100: CMP_TARGET = 0.86
+fate-swr-resample_lin-s16p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
+
+fate-swr-resample_lin-fltp-8000-44100: CMP_TARGET = 14.61
+fate-swr-resample_lin-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480
+
+fate-swr-resample_lin-fltp-8000-48000: CMP_TARGET = 14.50
+fate-swr-resample_lin-fltp-8000-48000: SIZE_TOLERANCE = 96000 - 20480
+
+fate-swr-resample_lin-fltp-44100-8000: CMP_TARGET = 75.45
+fate-swr-resample_lin-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486
+
+fate-swr-resample_lin-fltp-44100-48000: CMP_TARGET = 9.67
+fate-swr-resample_lin-fltp-44100-48000: SIZE_TOLERANCE = 529200 - 20482
+
+fate-swr-resample_lin-fltp-48000-8000: CMP_TARGET = 62.41
+fate-swr-resample_lin-fltp-48000-8000: SIZE_TOLERANCE = 576000 - 20484
+
+fate-swr-resample_lin-fltp-48000-44100: CMP_TARGET = 0.79
+fate-swr-resample_lin-fltp-48000-44100: SIZE_TOLERANCE = 576000 - 20480
+endef
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,fltp,f32le,s16)
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,dblp,f64le,s16)
+$(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,s16p,s16le,s16)
+$(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_LIN,fltp,f32le,s16)
+
FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE)
fate-swr-resample: $(FATE_SWR_RESAMPLE-yes)
FATE_SWR += $(FATE_SWR_RESAMPLE-yes)