[3/3] g722: Add a regression test for muxing/demuxing in wav

Message ID 1322953478-79863-1-git-send-email-martin@martin.st
State Committed
Commit 714cd7e758ef8c579a3f98b364d8b3d746ee289b
Headers show

Commit Message

Martin Storsjö Dec. 3, 2011, 11:04 p.m.
---
 tests/codec-regression.sh |    5 +++++
 tests/ref/acodec/g722     |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 tests/ref/acodec/g722

Comments

Justin Ruggles Dec. 4, 2011, 12:19 a.m. | #1
On 12/03/2011 06:04 PM, Martin Storsjö wrote:

> ---
>  tests/codec-regression.sh |    5 +++++
>  tests/ref/acodec/g722     |    4 ++++
>  2 files changed, 9 insertions(+), 0 deletions(-)
>  create mode 100644 tests/ref/acodec/g722
> 
> diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh
> index 5133345..0e6151b 100755
> --- a/tests/codec-regression.sh
> +++ b/tests/codec-regression.sh
> @@ -291,6 +291,11 @@ do_audio_encoding ac3.rm "-vn -acodec ac3_fixed"
>  #$tiny_psnr $pcm_dst $pcm_ref 2 1024
>  fi
>  
> +if [ -n "$do_g722" ] ; then
> +do_audio_encoding g722.wav "-b 64k -ac 1 -ar 16000 -acodec g722"
> +do_audio_decoding
> +fi
> +
>  if [ -n "$do_g726" ] ; then
>  do_audio_encoding g726.wav "-b 32k -ac 1 -ar 8000 -acodec g726"
>  do_audio_decoding
> diff --git a/tests/ref/acodec/g722 b/tests/ref/acodec/g722
> new file mode 100644
> index 0000000..a1fc72a
> --- /dev/null
> +++ b/tests/ref/acodec/g722
> @@ -0,0 +1,4 @@
> +b380355e0360b4e50ee78f33fd60a0f5 *./tests/data/acodec/g722.wav
> +47991 ./tests/data/acodec/g722.wav
> +82fdd5bb059336e0550de7ba5947c5bb *./tests/data/g722.acodec.out.wav
> +stddev: 8860.44 PSNR: 17.38 MAXDIFF:33814 bytes:   191732/  1058400


I suppose it's fine. But really we should change the g726 test and this
one to decode to stereo/44100 for an apples-to-apples comparison with
the original pcm source. Same for pcm_s24daud, but that has other issues
due to 6-channel vs. 2-channel.

-Justin

Patch

diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh
index 5133345..0e6151b 100755
--- a/tests/codec-regression.sh
+++ b/tests/codec-regression.sh
@@ -291,6 +291,11 @@  do_audio_encoding ac3.rm "-vn -acodec ac3_fixed"
 #$tiny_psnr $pcm_dst $pcm_ref 2 1024
 fi
 
+if [ -n "$do_g722" ] ; then
+do_audio_encoding g722.wav "-b 64k -ac 1 -ar 16000 -acodec g722"
+do_audio_decoding
+fi
+
 if [ -n "$do_g726" ] ; then
 do_audio_encoding g726.wav "-b 32k -ac 1 -ar 8000 -acodec g726"
 do_audio_decoding
diff --git a/tests/ref/acodec/g722 b/tests/ref/acodec/g722
new file mode 100644
index 0000000..a1fc72a
--- /dev/null
+++ b/tests/ref/acodec/g722
@@ -0,0 +1,4 @@ 
+b380355e0360b4e50ee78f33fd60a0f5 *./tests/data/acodec/g722.wav
+47991 ./tests/data/acodec/g722.wav
+82fdd5bb059336e0550de7ba5947c5bb *./tests/data/g722.acodec.out.wav
+stddev: 8860.44 PSNR: 17.38 MAXDIFF:33814 bytes:   191732/  1058400