[2/2] g722: Add a fate test for the encoder

Message ID 1318882232-11213-2-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Oct. 17, 2011, 8:10 p.m.
---
 tests/fate2.mak        |    4 ++
 tests/ref/fate/g722enc |   94 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 0 deletions(-)
 create mode 100644 tests/ref/fate/g722enc

Comments

Mans Rullgard Oct. 17, 2011, 8:17 p.m. | #1
Martin Storsjö <martin@martin.st> writes:

> ---
>  tests/fate2.mak        |    4 ++
>  tests/ref/fate/g722enc |   94 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 98 insertions(+), 0 deletions(-)
>  create mode 100644 tests/ref/fate/g722enc
>
> diff --git a/tests/fate2.mak b/tests/fate2.mak
> index 0bb6654..4653da5 100644
> --- a/tests/fate2.mak
> +++ b/tests/fate2.mak
> @@ -133,6 +133,10 @@ fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav
>  FATE_TESTS += fate-g722dec-1
>  fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722
>
> +FATE_TESTS += fate-g722enc
> +fate-g722enc: tests/data/asynth-16000-1.sw
> +fate-g722enc: CMD = framecrc -ar 16000 -ac 1 -f s16le -i tests/data/asynth-16000-1.sw -acodec g722 -ac 1
> +
>  FATE_TESTS += fate-msmpeg4v1
>  fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an
>
> diff --git a/tests/ref/fate/g722enc b/tests/ref/fate/g722enc
> new file mode 100644
> index 0000000..77f794c
> --- /dev/null
> +++ b/tests/ref/fate/g722enc
> @@ -0,0 +1,94 @@
> +0, 0, 512, 0xec3e85e4
> +0, 2880, 512, 0xb2e48424
> +0, 5760, 512, 0x4f37851a
> +0, 8640, 512, 0xea8d85ef

Is there any point in per-frame checksums here, or would a single
checksum of the full output be just as good?  In other words, is it
likely for only a few of the frames to change and would knowing which
ones did provide useful information?  If not, this is just wasting space.
Mans Rullgard Oct. 17, 2011, 8:20 p.m. | #2
Martin Storsjö <martin@martin.st> writes:

> +fate-g722enc: CMD = framecrc -ar 16000 -ac 1 -f s16le -i tests/data/asynth-16000-1.sw -acodec g722 -ac 1

This command needs to use $(TARGET_PATH)/tests/... or it will fail when
running tests on another system.
Martin Storsjö Oct. 17, 2011, 8:25 p.m. | #3
On Mon, 17 Oct 2011, Måns Rullgård wrote:

> Martin Storsjö <martin@martin.st> writes:
>
>> ---
>>  tests/fate2.mak        |    4 ++
>>  tests/ref/fate/g722enc |   94 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 98 insertions(+), 0 deletions(-)
>>  create mode 100644 tests/ref/fate/g722enc
>>
>> diff --git a/tests/fate2.mak b/tests/fate2.mak
>> index 0bb6654..4653da5 100644
>> --- a/tests/fate2.mak
>> +++ b/tests/fate2.mak
>> @@ -133,6 +133,10 @@ fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav
>>  FATE_TESTS += fate-g722dec-1
>>  fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722
>>
>> +FATE_TESTS += fate-g722enc
>> +fate-g722enc: tests/data/asynth-16000-1.sw
>> +fate-g722enc: CMD = framecrc -ar 16000 -ac 1 -f s16le -i tests/data/asynth-16000-1.sw -acodec g722 -ac 1
>> +
>>  FATE_TESTS += fate-msmpeg4v1
>>  fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an
>>
>> diff --git a/tests/ref/fate/g722enc b/tests/ref/fate/g722enc
>> new file mode 100644
>> index 0000000..77f794c
>> --- /dev/null
>> +++ b/tests/ref/fate/g722enc
>> @@ -0,0 +1,94 @@
>> +0, 0, 512, 0xec3e85e4
>> +0, 2880, 512, 0xb2e48424
>> +0, 5760, 512, 0x4f37851a
>> +0, 8640, 512, 0xea8d85ef
>
> Is there any point in per-frame checksums here, or would a single
> checksum of the full output be just as good?  In other words, is it
> likely for only a few of the frames to change and would knowing which
> ones did provide useful information?  If not, this is just wasting space.

Good point - it should be bitexact. If it fails, I'm not really sure if it 
helps to have per-frame crcs (the codec doesn't have any inherent frame 
size in itself, so the cutting is quite arbitrary). So if any difference 
is found in any configuration, I guess it requires just as much 
investigation either way.

// Martin

Patch

diff --git a/tests/fate2.mak b/tests/fate2.mak
index 0bb6654..4653da5 100644
--- a/tests/fate2.mak
+++ b/tests/fate2.mak
@@ -133,6 +133,10 @@  fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav
 FATE_TESTS += fate-g722dec-1
 fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722
 
+FATE_TESTS += fate-g722enc
+fate-g722enc: tests/data/asynth-16000-1.sw
+fate-g722enc: CMD = framecrc -ar 16000 -ac 1 -f s16le -i tests/data/asynth-16000-1.sw -acodec g722 -ac 1
+
 FATE_TESTS += fate-msmpeg4v1
 fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an
 
diff --git a/tests/ref/fate/g722enc b/tests/ref/fate/g722enc
new file mode 100644
index 0000000..77f794c
--- /dev/null
+++ b/tests/ref/fate/g722enc
@@ -0,0 +1,94 @@ 
+0, 0, 512, 0xec3e85e4
+0, 2880, 512, 0xb2e48424
+0, 5760, 512, 0x4f37851a
+0, 8640, 512, 0xea8d85ef
+0, 11520, 512, 0x2ffe8730
+0, 14400, 512, 0x87398632
+0, 17280, 512, 0x6508780a
+0, 20160, 512, 0x6bfd7839
+0, 23040, 512, 0xd73d7fad
+0, 25920, 512, 0x806d7b24
+0, 28800, 512, 0x5fa37dc3
+0, 31680, 512, 0xc8187928
+0, 34560, 512, 0x04197550
+0, 37440, 512, 0x5eb58089
+0, 40320, 512, 0xdf108238
+0, 43200, 512, 0xffcc8434
+0, 46080, 512, 0x2957810d
+0, 48960, 512, 0x23ce7c17
+0, 51840, 512, 0x9e3669e2
+0, 54720, 512, 0x60433f0e
+0, 57600, 512, 0x6a9c1fa6
+0, 60480, 512, 0x0bec2c51
+0, 63360, 512, 0xbb13270c
+0, 66240, 512, 0x60591a59
+0, 69120, 512, 0xc5ac256b
+0, 72000, 512, 0xb56735ca
+0, 74880, 512, 0x26e8408e
+0, 77760, 512, 0xfb183a70
+0, 80640, 512, 0xe2f9414c
+0, 83520, 512, 0x3cda284b
+0, 86400, 512, 0x05cd274c
+0, 89280, 512, 0xcad002d0
+0, 92160, 512, 0xb430e91d
+0, 95040, 512, 0x3891ef23
+0, 97920, 512, 0x0851faef
+0, 100800, 512, 0xcf11f2c0
+0, 103680, 512, 0x7d21e7e2
+0, 106560, 512, 0xb3a3f446
+0, 109440, 512, 0xd0e1ef67
+0, 112320, 512, 0xef1ec923
+0, 115200, 512, 0x8f1ac15f
+0, 118080, 512, 0x32d1ba06
+0, 120960, 512, 0x8550c16a
+0, 123840, 512, 0x63c4c977
+0, 126720, 512, 0xf669c437
+0, 129600, 512, 0xa6dabde7
+0, 132480, 512, 0x2103cfed
+0, 135360, 512, 0x76017036
+0, 138240, 512, 0x577e6d8b
+0, 141120, 512, 0x3a987971
+0, 144000, 512, 0xd82e8812
+0, 146880, 512, 0xa3f988a5
+0, 149760, 512, 0x154b7dd9
+0, 152640, 512, 0x8fce7a1f
+0, 155520, 512, 0x85ef7a8f
+0, 158400, 512, 0xc2a97ce9
+0, 161280, 512, 0x3e4e8620
+0, 164160, 512, 0xac3c92d3
+0, 167040, 512, 0x6691950d
+0, 169920, 512, 0x29be8f02
+0, 172800, 512, 0xde2389ea
+0, 175680, 512, 0x4d3987ed
+0, 178560, 512, 0x157a8bc4
+0, 181440, 512, 0xe25d8db3
+0, 184320, 512, 0xeafc8c2c
+0, 187200, 512, 0x8d53939c
+0, 190080, 512, 0x649a99e5
+0, 192960, 512, 0xd4339786
+0, 195840, 512, 0x9d288e5a
+0, 198720, 512, 0xed238b71
+0, 201600, 512, 0xff518dfd
+0, 204480, 512, 0x9fe78fbb
+0, 207360, 512, 0x1b1e9922
+0, 210240, 512, 0x3e1295dc
+0, 213120, 512, 0x18d0970d
+0, 216000, 512, 0x556397bb
+0, 218880, 512, 0x730a8db0
+0, 221760, 512, 0xeeff8e37
+0, 224640, 512, 0xee188df8
+0, 227520, 512, 0xa3f08bb9
+0, 230400, 512, 0x0cab9351
+0, 233280, 512, 0x084e9679
+0, 236160, 512, 0x133c9904
+0, 239040, 512, 0xb4668eb8
+0, 241920, 512, 0x7e9b8f37
+0, 244800, 512, 0xffa58e39
+0, 247680, 512, 0x67428fa3
+0, 250560, 512, 0x2f788c8c
+0, 253440, 512, 0xf1d98fd1
+0, 256320, 512, 0x24489065
+0, 259200, 512, 0x9b4c98dc
+0, 262080, 512, 0x674d9618
+0, 264960, 512, 0x0d229229
+0, 267840, 384, 0x6e4529d8