diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-06 15:59:24 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-07 11:50:18 +0200 |
commit | 796097c69666753c9f49de56f1e44c00fd7ca2f9 (patch) | |
tree | f029f474db3b3df0da315eb66c2b1d1ca4fda8f6 | |
parent | ecd7455e9626cdc38e7471ce938a8640bab688fa (diff) | |
download | ffmpeg-796097c69666753c9f49de56f1e44c00fd7ca2f9.tar.gz |
Add tests for audio encoders: aac, dca, ra144 and nellymoser.
The PSNR values are of varying usefulness, though at least
the DTS and AAC ones are useful with the right shift value.
Note: due to usage of floats some of these may fail on other
architectures.
In that case they should be converted into a CMD = stddev
FATE test, but it seems useful to try this way first.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rwxr-xr-x | tests/codec-regression.sh | 24 | ||||
-rw-r--r-- | tests/ref/acodec/aac | 5 | ||||
-rw-r--r-- | tests/ref/acodec/dca | 5 | ||||
-rw-r--r-- | tests/ref/acodec/nellymoser | 5 | ||||
-rw-r--r-- | tests/ref/acodec/ra144 | 5 | ||||
-rwxr-xr-x | tests/regression-funcs.sh | 2 |
6 files changed, 45 insertions, 1 deletions
diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index ae1ea1be43..76059bb681 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 4096 +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 0000000000..c4c9a6f262 --- /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: 1862.44 PSNR: 30.93 MAXDIFF:43902 bytes: 1060864/ 1058400 diff --git a/tests/ref/acodec/dca b/tests/ref/acodec/dca new file mode 100644 index 0000000000..e420db9fca --- /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 0000000000..fa04f83ee2 --- /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 0000000000..83c8ebdc1b --- /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 7244b6614e..0e6d64aa26 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 } |