[FFmpeg-devel] [PATCH] Add tests for audio encoders: aac, dca, ra144 and nellymoser.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Apr 6 18:45:01 CEST 2012


The PSNR values are of varying usefulness, though at least
the DCA one is useful with the right shift value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 tests/codec-regression.sh   |   24 ++++++++++++++++++++++++
 tests/ref/acodec/aac        |    5 +++++
 tests/ref/acodec/dca        |    5 +++++
 tests/ref/acodec/nellymoser |    5 +++++
 tests/ref/acodec/ra144      |    5 +++++
 tests/regression-funcs.sh   |    2 +-
 6 files changed, 45 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..40a7858 100755
--- a/tests/codec-regression.sh
+++ b/tests/codec-regression.sh
@@ -439,6 +439,30 @@ 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
+$tiny_psnr $pcm_dst $pcm_ref 2 1096
+fi
+
+if [ -n "$do_dca" ] ; then
+do_audio_encoding dca.dts "-strict -2 -channel_layout 3 -acodec dca"
+do_audio_decoding
+$tiny_psnr $pcm_dst $pcm_ref 2 1920
+fi
+
+if [ -n "$do_ra144" ] ; then
+do_audio_encoding ra144.ra "-ac 1 -acodec real_144"
+do_audio_decoding "-ac 2"
+$tiny_psnr $pcm_dst $pcm_ref 2 640
+fi
+
+if [ -n "$do_nellymoser" ] ; then
+do_audio_encoding nellymoser.flv "-ac 1 -acodec nellymoser"
+do_audio_decoding "-ac 2"
+$tiny_psnr $pcm_dst $pcm_ref 2 252
+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..46aa5bf
--- /dev/null
+++ b/tests/ref/acodec/aac
@@ -0,0 +1,5 @@
+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
+stddev: 9704.68 PSNR: 16.59 MAXDIFF:64730 bytes:  1063864/  1058400
diff --git a/tests/ref/acodec/dca b/tests/ref/acodec/dca
new file mode 100644
index 0000000..e420db9
--- /dev/null
+++ b/tests/ref/acodec/dca
@@ -0,0 +1,5 @@
+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
+stddev: 2424.93 PSNR: 28.64 MAXDIFF:13723 bytes:  1058944/  1058400
diff --git a/tests/ref/acodec/nellymoser b/tests/ref/acodec/nellymoser
new file mode 100644
index 0000000..fa04f83
--- /dev/null
+++ b/tests/ref/acodec/nellymoser
@@ -0,0 +1,5 @@
+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
+stddev: 8398.32 PSNR: 17.85 MAXDIFF:55915 bytes:  1058564/  1058400
diff --git a/tests/ref/acodec/ra144 b/tests/ref/acodec/ra144
new file mode 100644
index 0000000..83c8ebd
--- /dev/null
+++ b/tests/ref/acodec/ra144
@@ -0,0 +1,5 @@
+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
+stddev: 5696.26 PSNR: 21.22 MAXDIFF:44956 bytes:  1058560/  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