Hello.

Georg Lippitsch and I created 2 FATE tests for the EBU Peak Envelope Chunk:
Test 1: Normal WAV file with levl-chunk and audio data.
Test 2: "Peakfile" WAV with levl-chunk, without audio data.

I tried to follow the style of existing lavf-regression tests in FATE as
good as possible.

Regards,
Pb
>From bec0905cc5b896a287d8e0953c9931e41a62972d Mon Sep 17 00:00:00 2001
From: Peter B <p...@das-werkstatt.com>
Date: Thu, 17 Jul 2014 18:51:38 +0200
Subject: [PATCH] fate: Add test for wav Peak Envelope Chunk encoder (levl
 chunk).

---
 tests/fate/avformat.mak      |    2 ++
 tests/lavf-regression.sh     |    9 +++++++++
 tests/ref/lavf/wav_peak      |    3 +++
 tests/ref/lavf/wav_peak_only |    2 ++
 4 files changed, 16 insertions(+)
 create mode 100644 tests/ref/lavf/wav_peak
 create mode 100644 tests/ref/lavf/wav_peak_only

diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index 5f9c8c1..1040afa 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -45,6 +45,8 @@ FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2,       MPEGTS)             += ts
 FATE_LAVF-$(call ENCDEC,  PCM_U8,                VOC)                += voc
 FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             VOC)                += voc_s16
 FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             WAV)                += wav
+FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             WAV)                += wav_peak
+FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             WAV)                += wav_peak_only
 FATE_LAVF-$(call ENCMUX,  PCM_S16LE,             W64)                += w64
 FATE_LAVF-$(call ENCDEC,  MP2,                   WTV)                += wtv
 FATE_LAVF-$(call ENCDEC,  XBM,                   IMAGE2)             += xbm
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 0efbc9c..7e6ad06 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -274,6 +274,15 @@ if [ -n "$do_wav" ] ; then
 do_audio_only wav
 fi
 
+if [ -n "$do_wav_peak" ] ; then
+do_audio_only peak.wav "" "-write_peak on"
+fi
+
+if [ -n "$do_wav_peak_only" ] ; then
+file=${outfile}lavf.peak_only.wav
+do_avconv $file $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -write_peak only
+fi
+
 if [ -n "$do_alaw" ] ; then
 do_audio_only al "" "" "-ar 44100"
 fi
diff --git a/tests/ref/lavf/wav_peak b/tests/ref/lavf/wav_peak
new file mode 100644
index 0000000..aa7e5fc
--- /dev/null
+++ b/tests/ref/lavf/wav_peak
@@ -0,0 +1,3 @@
+35148d1f6e66b0080893851d917ecbf4 *./tests/data/lavf/lavf.peak.wav
+89094 ./tests/data/lavf/lavf.peak.wav
+./tests/data/lavf/lavf.peak.wav CRC=0x3a1da17e
diff --git a/tests/ref/lavf/wav_peak_only b/tests/ref/lavf/wav_peak_only
new file mode 100644
index 0000000..dccd0e7
--- /dev/null
+++ b/tests/ref/lavf/wav_peak_only
@@ -0,0 +1,2 @@
+b609a363e6d490710ed52231a8d09d3c *./tests/data/lavf/lavf.peak_only.wav
+832 ./tests/data/lavf/lavf.peak_only.wav
-- 
1.7.9.5

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to