[FFmpeg-devel] [PATCH] Add tests for audio encoders: aac, dca, ra144 and nellymoser.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Apr 6 16:08:40 CEST 2012
The PSNR values are not useful at all, and I do not know which
of these will be bit-exact across platforms, but it would be
good to have at least some basic tests for them.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
tests/codec-regression.sh | 20 ++++++++++++++++++++
tests/ref/acodec/aac | 4 ++++
tests/ref/acodec/dca | 4 ++++
tests/ref/acodec/nellymoser | 4 ++++
tests/ref/acodec/ra144 | 4 ++++
tests/regression-funcs.sh | 2 +-
6 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 tests/ref/acodec/aac
create mode 100644 tests/ref/acodec/dca
create mode 100644 tests/ref/acodec/nellymoser
create mode 100644 tests/ref/acodec/ra144
diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh
index ae1ea1b..dd2a0d6 100755
--- a/tests/codec-regression.sh
+++ b/tests/codec-regression.sh
@@ -439,6 +439,26 @@ do_audio_encoding flac.flac "-acodec flac -compression_level 2"
do_audio_decoding
fi
+if [ -n "$do_aac" ] ; then
+do_audio_encoding aac.aac "-b:a 512k -strict -2 -acodec aac"
+do_audio_decoding
+fi
+
+if [ -n "$do_dca" ] ; then
+do_audio_encoding dca.dts "-strict -2 -channel_layout 3 -acodec dca"
+do_audio_decoding
+fi
+
+if [ -n "$do_ra144" ] ; then
+do_audio_encoding ra144.ra "-ac 1 -acodec real_144"
+do_audio_decoding "-ac 2"
+fi
+
+if [ -n "$do_nellymoser" ] ; then
+do_audio_encoding nellymoser.flv "-ac 1 -acodec nellymoser"
+do_audio_decoding "-ac 2"
+fi
+
#if [ -n "$do_vorbis" ] ; then
# vorbis
#disabled because it is broken
diff --git a/tests/ref/acodec/aac b/tests/ref/acodec/aac
new file mode 100644
index 0000000..cfb3bb7
--- /dev/null
+++ b/tests/ref/acodec/aac
@@ -0,0 +1,4 @@
+021a46cb2d8edd42b8c4e1afa31b3896 *./tests/data/acodec/aac.aac
+206625 ./tests/data/acodec/aac.aac
+17bff7905bed1a3defb62febf64b7532 *./tests/data/aac.acodec.out.wav
+stddev:10838.47 PSNR: 15.63 MAXDIFF:65356 bytes: 1064960/ 1058400
diff --git a/tests/ref/acodec/dca b/tests/ref/acodec/dca
new file mode 100644
index 0000000..2e89e68
--- /dev/null
+++ b/tests/ref/acodec/dca
@@ -0,0 +1,4 @@
+66bd0e602be7fb97dc19151554c0ee29 *./tests/data/acodec/dca.dts
+1097124 ./tests/data/acodec/dca.dts
+e1842f7616c65612b10b23245645ac40 *./tests/data/dca.acodec.out.wav
+stddev: 8944.44 PSNR: 17.30 MAXDIFF:56478 bytes: 1060864/ 1058400
diff --git a/tests/ref/acodec/nellymoser b/tests/ref/acodec/nellymoser
new file mode 100644
index 0000000..03eb6ae
--- /dev/null
+++ b/tests/ref/acodec/nellymoser
@@ -0,0 +1,4 @@
+46830431216729f78e15c634e91e6ebf *./tests/data/acodec/nellymoser.flv
+82916 ./tests/data/acodec/nellymoser.flv
+ae1e5ec9f206e0e665e54c1c4559fc61 *./tests/data/nellymoser.acodec.out.wav
+stddev:10148.84 PSNR: 16.20 MAXDIFF:55923 bytes: 1058816/ 1058400
diff --git a/tests/ref/acodec/ra144 b/tests/ref/acodec/ra144
new file mode 100644
index 0000000..7768049
--- /dev/null
+++ b/tests/ref/acodec/ra144
@@ -0,0 +1,4 @@
+d6740bee5e20fa665e6c94298125b834 *./tests/data/acodec/ra144.ra
+53227 ./tests/data/acodec/ra144.ra
+16d1a0d6cae06cf8a4db009d0fe7a952 *./tests/data/ra144.acodec.out.wav
+stddev: 9525.99 PSNR: 16.75 MAXDIFF:55906 bytes: 1059200/ 1058400
diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh
index 7244b66..0e6d64a 100755
--- a/tests/regression-funcs.sh
+++ b/tests/regression-funcs.sh
@@ -120,5 +120,5 @@ do_audio_encoding()
do_audio_decoding()
{
- do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav
+ do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav $1
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list