[RFC] g722: Add a fate test for the encoder

Message ID 1318879977-3081-1-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Oct. 17, 2011, 7:32 p.m.
---
Is there any mono raw audio in the fate suite that could be
used as input for audio encoder fate tests? The asynth1.sw
file is stereo afaik, and if encoding it with -ac 1, the
data is passed through the audio resampler, which isn't
really desired for such a test.

Sure, an option could be passed to interpret asynth1.sw
as mono data, too, which would be totally ok for blindly
testing the encoder, but perhaps isn't a "good" sample.

 tests/fate2.mak        |    3 +
 tests/ref/fate/g722enc |  259 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+), 0 deletions(-)
 create mode 100644 tests/ref/fate/g722enc

Comments

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

> ---
> Is there any mono raw audio in the fate suite that could be
> used as input for audio encoder fate tests? The asynth1.sw
> file is stereo afaik, and if encoding it with -ac 1, the
> data is passed through the audio resampler, which isn't
> really desired for such a test.
>
> Sure, an option could be passed to interpret asynth1.sw
> as mono data, too, which would be totally ok for blindly
> testing the encoder, but perhaps isn't a "good" sample.

Feel free to extend tests/audiogen to create samples with other
parameters and call it appropriately.

Patch

diff --git a/tests/fate2.mak b/tests/fate2.mak
index 0bb6654..af34851 100644
--- a/tests/fate2.mak
+++ b/tests/fate2.mak
@@ -133,6 +133,9 @@  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: CMD = framecrc -ar 16000 -ac 2 -f s16le -i $(SAMPLES)/ffmpeg-synthetic/asynth1.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..04d2914
--- /dev/null
+++ b/tests/ref/fate/g722enc
@@ -0,0 +1,259 @@ 
+0, 0, 507, 0x5095870e
+0, 2852, 512, 0xc16d8abe
+0, 5732, 512, 0x7f598662
+0, 8612, 512, 0x6c7d8ae0
+0, 11492, 512, 0x4b4a88b8
+0, 14372, 512, 0xfb708e91
+0, 17252, 512, 0x90ff8734
+0, 20132, 512, 0xb23c8981
+0, 23012, 512, 0x9c00866a
+0, 25892, 512, 0x80868b08
+0, 28772, 512, 0x3ae28a7c
+0, 31652, 512, 0xfc928a4a
+0, 34532, 512, 0x11e18985
+0, 37412, 512, 0xf2b4891a
+0, 40292, 512, 0xc21889a4
+0, 43172, 512, 0xfec98ef7
+0, 46052, 512, 0xaae787a4
+0, 48932, 512, 0xd3f68b21
+0, 51812, 512, 0x207e8653
+0, 54692, 512, 0x65df8915
+0, 57572, 512, 0xdd7b8606
+0, 60452, 512, 0x27699070
+0, 63332, 512, 0xd11089b0
+0, 66212, 512, 0x1eb58ae9
+0, 69092, 512, 0xa2338ab5
+0, 71972, 512, 0xaaf48c89
+0, 74852, 512, 0x67e0888b
+0, 77732, 512, 0x46e5852b
+0, 80612, 512, 0x8fd58e19
+0, 83492, 512, 0xfcaf88b3
+0, 86372, 512, 0x0f2d8c00
+0, 89252, 512, 0x96de87d4
+0, 92132, 512, 0x152f89de
+0, 95012, 512, 0x509a8a5d
+0, 97892, 512, 0x81258940
+0, 100772, 512, 0xa4f78816
+0, 103652, 512, 0x0d2f8b87
+0, 106532, 512, 0x3f808aa9
+0, 109412, 512, 0x28538e5e
+0, 112292, 512, 0xd7e98558
+0, 115172, 512, 0xb7a98691
+0, 118052, 512, 0xdee08933
+0, 120932, 512, 0x87728d3d
+0, 123812, 512, 0x77578f69
+0, 126692, 512, 0x68ba8fc4
+0, 129572, 512, 0x23798e45
+0, 132452, 512, 0x5b2b886f
+0, 135332, 512, 0x58d0876a
+0, 138212, 512, 0xe1958cc1
+0, 141092, 512, 0xe2058e4d
+0, 143972, 512, 0x81848a8e
+0, 146852, 512, 0xa76c9595
+0, 149732, 512, 0xd2fa8d35
+0, 152612, 512, 0xd2bf925a
+0, 155492, 512, 0x03df8a69
+0, 158372, 512, 0xfe257e59
+0, 161252, 512, 0x16888416
+0, 164132, 512, 0xdc5a7ae7
+0, 167012, 512, 0xc6447d54
+0, 169892, 512, 0xcdef8b9d
+0, 172772, 512, 0x73d187e3
+0, 175652, 512, 0x7e248080
+0, 178532, 512, 0x20d970a4
+0, 181412, 512, 0x8aab6b47
+0, 184292, 512, 0xa40a6c8e
+0, 187172, 512, 0xaddc76f3
+0, 190052, 512, 0x4c30846d
+0, 192932, 512, 0xf2377ac9
+0, 195812, 512, 0xf8f66cb4
+0, 198692, 512, 0xc2346718
+0, 201572, 512, 0x6be07369
+0, 204452, 512, 0x7b95635d
+0, 207332, 512, 0x5630536e
+0, 210212, 512, 0xb5db431f
+0, 213092, 512, 0xd5e73f0d
+0, 215972, 512, 0x8dd533e7
+0, 218852, 512, 0xf1182b4e
+0, 221732, 512, 0xdd132a13
+0, 224612, 512, 0x0c3c2dc0
+0, 227492, 512, 0xac552258
+0, 230372, 512, 0xfbe830c9
+0, 233252, 512, 0x9760208c
+0, 236132, 512, 0x7b4e1dba
+0, 239012, 512, 0x73b32520
+0, 241892, 512, 0x89322ea6
+0, 244772, 512, 0x66362a4f
+0, 247652, 512, 0x050b0620
+0, 250532, 512, 0xbb720ee8
+0, 253412, 512, 0xc54309ab
+0, 256292, 512, 0xb6700e9a
+0, 259172, 512, 0x88890e26
+0, 262052, 512, 0xb76d1005
+0, 264932, 512, 0xf0920f2c
+0, 267812, 512, 0x42900acf
+0, 270692, 512, 0x4e7f1186
+0, 273572, 512, 0x2f7a0148
+0, 276452, 512, 0x34290cc5
+0, 279332, 512, 0x9a07104f
+0, 282212, 512, 0x5ba004f8
+0, 285092, 512, 0x7d190ad9
+0, 287972, 512, 0xf957068a
+0, 290852, 512, 0xc1b60d36
+0, 293732, 512, 0x57bf0e81
+0, 296612, 512, 0xa16d0187
+0, 299492, 512, 0xba550c82
+0, 302372, 512, 0xfa990e40
+0, 305252, 512, 0x2be60a7e
+0, 308132, 512, 0xa589fdb3
+0, 311012, 512, 0x49f9c22f
+0, 313892, 512, 0x5c3bc6ce
+0, 316772, 512, 0x3d31cb88
+0, 319652, 512, 0x9c03cb64
+0, 322532, 512, 0xc13dc841
+0, 325412, 512, 0xb5e5cb6f
+0, 328292, 512, 0xa8e2cce3
+0, 331172, 512, 0xd69bc561
+0, 334052, 512, 0xf339ca4c
+0, 336932, 512, 0xd374c698
+0, 339812, 512, 0xa629cbd8
+0, 342692, 512, 0x88acd0fb
+0, 345572, 512, 0x8daed209
+0, 348452, 512, 0x5880cecf
+0, 351332, 512, 0xc247c757
+0, 354212, 512, 0xa2bdcdc5
+0, 357092, 512, 0xec24d0e9
+0, 359972, 512, 0x9dfdc52d
+0, 362852, 512, 0xc34dcbb4
+0, 365732, 512, 0x08a8c6a0
+0, 368612, 512, 0x4cc5cce0
+0, 371492, 512, 0x9e5f5338
+0, 374372, 512, 0x650186e1
+0, 377252, 512, 0x0be385de
+0, 380132, 512, 0xc72c805e
+0, 383012, 512, 0x92d18e35
+0, 385892, 512, 0x7d108465
+0, 388772, 512, 0xd0d687e4
+0, 391652, 512, 0x02b386c4
+0, 394532, 512, 0x00588fea
+0, 397412, 512, 0x7bd586da
+0, 400292, 512, 0x4183902b
+0, 403172, 512, 0x6e6290b7
+0, 406052, 512, 0x04c08fa0
+0, 408932, 512, 0x0bbf8ea2
+0, 411812, 512, 0x14918c63
+0, 414692, 512, 0x54479850
+0, 417572, 512, 0x190a9436
+0, 420452, 512, 0x0701921d
+0, 423332, 512, 0x0a61921f
+0, 426212, 512, 0x215c94fd
+0, 429092, 512, 0x3be19a1a
+0, 431972, 512, 0x53b192c9
+0, 434852, 512, 0x213597b2
+0, 437732, 512, 0xf3d89513
+0, 440612, 512, 0x87339489
+0, 443492, 512, 0x09a696a0
+0, 446372, 512, 0x927f9c66
+0, 449252, 512, 0x98d49bad
+0, 452132, 512, 0x70d68bc3
+0, 455012, 512, 0x2a748fd4
+0, 457892, 512, 0x66ae946f
+0, 460772, 512, 0x9c648b69
+0, 463652, 512, 0x77c792e1
+0, 466532, 512, 0x9f4790fa
+0, 469412, 512, 0x3fd88c9a
+0, 472292, 512, 0x7dfa8c9e
+0, 475172, 512, 0x62788ad8
+0, 478052, 512, 0x45299280
+0, 480932, 512, 0x79188cd0
+0, 483812, 512, 0x22f992af
+0, 486692, 512, 0x6b4c8d28
+0, 489572, 512, 0x78648fb3
+0, 492452, 512, 0x62ce8f3f
+0, 495332, 512, 0x1abc8a8f
+0, 498212, 512, 0x2aba9311
+0, 501092, 512, 0xb0bf8f95
+0, 503972, 512, 0x18e48d20
+0, 506852, 512, 0xdbca8ca6
+0, 509732, 512, 0x206c926c
+0, 512612, 512, 0x4ca28f63
+0, 515492, 512, 0xb4b28bbf
+0, 518372, 512, 0x45598a88
+0, 521252, 512, 0xf2628df1
+0, 524132, 512, 0x7c5c94f3
+0, 527012, 512, 0x4bd79502
+0, 529892, 512, 0xe42b8e8a
+0, 532772, 512, 0xb1048e7a
+0, 535652, 512, 0x3af28e87
+0, 538532, 512, 0xfd658eeb
+0, 541412, 512, 0x1c598bb5
+0, 544292, 512, 0x7dc09044
+0, 547172, 512, 0x248b8c07
+0, 550052, 512, 0x35f290c4
+0, 552932, 512, 0x05188d4b
+0, 555812, 512, 0x8fad8c74
+0, 558692, 512, 0xb9308f59
+0, 561572, 512, 0x85878d2d
+0, 564452, 512, 0xd88e8eb2
+0, 567332, 512, 0xce6d90c5
+0, 570212, 512, 0xd96b8d4a
+0, 573092, 512, 0x1dad9002
+0, 575972, 512, 0x074e8f0e
+0, 578852, 512, 0xc37b8f16
+0, 581732, 512, 0x94508c9b
+0, 584612, 512, 0xd2f58d31
+0, 587492, 512, 0xadd59332
+0, 590372, 512, 0x9aca956e
+0, 593252, 512, 0xdf3a8875
+0, 596132, 512, 0x74de8c2f
+0, 599012, 512, 0xb9ba8b2a
+0, 601892, 512, 0xbcc08f3a
+0, 604772, 512, 0x571f9060
+0, 607652, 512, 0x4281894a
+0, 610532, 512, 0xc2e78c49
+0, 613412, 512, 0xcbc18ff8
+0, 616292, 512, 0xa1838ee0
+0, 619172, 512, 0x58e891f2
+0, 622052, 512, 0x9ce08bc7
+0, 624932, 512, 0x594b8c5a
+0, 627812, 512, 0x3b319304
+0, 630692, 512, 0x083d8bea
+0, 633572, 512, 0xf79a8ef0
+0, 636452, 512, 0x1a428e0e
+0, 639332, 512, 0x32fd8cf7
+0, 642212, 512, 0xb66f8b89
+0, 645092, 512, 0x8c93905e
+0, 647972, 512, 0x914d91c9
+0, 650852, 512, 0xd58a8f50
+0, 653732, 512, 0xbb9f92e1
+0, 656612, 512, 0x409f8dd9
+0, 659492, 512, 0x49b68ac8
+0, 662372, 512, 0xbcb88ab3
+0, 665252, 512, 0x01f49240
+0, 668132, 512, 0x64c98ab4
+0, 671012, 512, 0x7d4c890d
+0, 673892, 512, 0x614a8bc0
+0, 676772, 512, 0x9dbd92be
+0, 679652, 512, 0x3a638704
+0, 682532, 512, 0xfc1b897f
+0, 685412, 512, 0x568b8fac
+0, 688292, 512, 0x6faf9118
+0, 691172, 512, 0x3b08904a
+0, 694052, 512, 0xc4778f77
+0, 696932, 512, 0xaea88f74
+0, 699812, 512, 0x1ef3943b
+0, 702692, 512, 0x83de8ce4
+0, 705572, 512, 0x91e9900b
+0, 708452, 512, 0x38238bcd
+0, 711332, 512, 0x32c48deb
+0, 714212, 512, 0xfa258cae
+0, 717092, 512, 0xb17990d9
+0, 719972, 512, 0x2ca7908f
+0, 722852, 512, 0xa7e29205
+0, 725732, 512, 0xa1c18fc9
+0, 728612, 512, 0x69849279
+0, 731492, 512, 0xb9898fd8
+0, 734372, 512, 0xe9b28eb7
+0, 737252, 512, 0xb89e8cf8
+0, 740132, 512, 0xe9b7944a
+0, 743012, 204, 0xef0c9cde