opus.mak 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. OPUS_CELT_SAMPLES = $(addprefix testvector, 01 07 11) tron.6ch.tinypkts
  9. OPUS_HYBRID_SAMPLES = $(addprefix testvector, 05 06)
  10. OPUS_SILK_SAMPLES = $(addprefix testvector, 02 03 04)
  11. OPUS_SAMPLES = $(addprefix testvector, 08 09 10 12)
  12. define FATE_OPUS_TEST
  13. FATE_OPUS += fate-opus-$(1)
  14. FATE_OPUS$(2) += fate-opus-$(1)
  15. fate-opus-$(1): CMD = ffmpeg -i $(TARGET_SAMPLES)/opus/$(1).mka -f s16le -
  16. fate-opus-$(1): REF = $(SAMPLES)/opus/$(1).dec
  17. endef
  18. $(foreach N,$(OPUS_CELT_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),_CELT)))
  19. $(foreach N,$(OPUS_HYBRID_SAMPLES),$(eval $(call FATE_OPUS_TEST,$(N),_HYBRID)))
  20. $(foreach N,$(OPUS_SILK_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),_SILK)))
  21. $(foreach N,$(OPUS_SAMPLES), $(eval $(call FATE_OPUS_TEST,$(N),)))
  22. FATE_OPUS := $(sort $(FATE_OPUS))
  23. $(FATE_OPUS): CMP = stddev
  24. $(FATE_OPUS): CMP_UNIT = s16
  25. $(FATE_OPUS): FUZZ = 3
  26. fate-opus-testvector02: CMP_TARGET = 191
  27. fate-opus-testvector03: CMP_TARGET = 139
  28. fate-opus-testvector04: CMP_TARGET = 119
  29. fate-opus-testvector05: CMP_TARGET = 108
  30. fate-opus-testvector06: CMP_TARGET = 106
  31. fate-opus-testvector08: CMP_TARGET = 6
  32. fate-opus-testvector10: CMP_TARGET = 38
  33. fate-opus-testvector12: CMP_TARGET = 160
  34. $(FATE_OPUS_CELT): CMP = oneoff
  35. $(FATE_OPUS_CELT): FUZZ = 6
  36. FATE_SAMPLES_AVCONV-$(call DEMDEC, MATROSKA, OPUS) += $(FATE_OPUS)
  37. fate-opus-celt: $(FATE_OPUS_CELT)
  38. fate-opus-hybrid: $(FATE_OPUS_HYBRID)
  39. fate-opus-silk: $(FATE_OPUS_SILK)
  40. fate-opus: $(FATE_OPUS)