Imported Debian version 2.4.3~trusty1
[deb_ffmpeg.git] / ffmpeg / tests / fate / opus.mak
CommitLineData
2ba45a60
DM
1# The samples were produced by simply rewrapping the official test vectors from
2# their custom format into Matroska.
3# The reference files were created with our decoder and tested against the
4# libopus output with the official opus_compare tool. We cannot use libopus
5# output as reference directly, because the use of different resamplers would
6# require too high fuzz values, which can hide bugs.
7# Before adding new tests here, always make sure they pass opus_compare.
8
9OPUS_CELT_SAMPLES = $(addprefix testvector, 01 07 11) tron.6ch.tinypkts
10OPUS_HYBRID_SAMPLES = $(addprefix testvector, 05 06)
11OPUS_SILK_SAMPLES = $(addprefix testvector, 02 03 04)
12OPUS_SAMPLES = $(addprefix testvector, 08 09 10 12)
13
14define FATE_OPUS_TEST
15FATE_OPUS += fate-opus-$(1)
16FATE_OPUS$(2) += fate-opus-$(1)
17fate-opus-$(1): CMD = ffmpeg -i $(TARGET_SAMPLES)/opus/$(1).mka -f s16le -
18fate-opus-$(1): REF = $(SAMPLES)/opus/$(1).dec
19endef
20
21$(foreach N,$(OPUS_CELT_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),_CELT)))
22$(foreach N,$(OPUS_HYBRID_SAMPLES),$(eval $(call FATE_OPUS_TEST,$(N),_HYBRID)))
23$(foreach N,$(OPUS_SILK_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),_SILK)))
24$(foreach N,$(OPUS_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),)))
25
26FATE_OPUS := $(sort $(FATE_OPUS))
27
28$(FATE_OPUS): CMP = stddev
29$(FATE_OPUS): CMP_UNIT = s16
30$(FATE_OPUS): FUZZ = 3
31fate-opus-testvector02: CMP_TARGET = 191
32fate-opus-testvector03: CMP_TARGET = 139
33fate-opus-testvector04: CMP_TARGET = 119
34fate-opus-testvector05: CMP_TARGET = 108
35fate-opus-testvector06: CMP_TARGET = 106
36fate-opus-testvector08: CMP_TARGET = 6
37fate-opus-testvector10: CMP_TARGET = 38
38fate-opus-testvector12: CMP_TARGET = 160
39
40$(FATE_OPUS_CELT): CMP = oneoff
41$(FATE_OPUS_CELT): FUZZ = 6
42
43FATE_SAMPLES_AVCONV-$(call DEMDEC, MATROSKA, OPUS) += $(FATE_OPUS)
44fate-opus-celt: $(FATE_OPUS_CELT)
45fate-opus-hybrid: $(FATE_OPUS_HYBRID)
46fate-opus-silk: $(FATE_OPUS_SILK)
47fate-opus: $(FATE_OPUS)