Changes between Version 12 and Version 13 of FATE/AddingATest

May 10, 2016, 6:40:25 PM (3 years ago)

add enc_dec_pcm description


  • FATE/AddingATest

    v12 v13  
    110110It is very important for you to declare the dependencies of a test if it uses any external files, like special samples or synthetic files.
     112=== Configuration ===
     113This controls how the test will be run, the parameters of each test and so on. There exist many commands, the basic commands are:
     115==== enc_dec_pcm ====
     116This command first encodes an input file and then decodes the encoded file. It’s useful to test a video encoder. An example of this command is fate-vorbis-encode test, which can be found in `tests/fate/vorbis.mak`. The code of this command is the following:
     119FATE_VORBIS += fate-vorbis-encode
     120fate-vorbis-encode: CMD = enc_dec_pcm ogg wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a vorbis -strict experimental
     121fate-vorbis-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
     122fate-vorbis-encode: CMP_SHIFT = 0
     123fate-vorbis-encode: CMP_TARGET = 2000
     124fate-vorbis-encode: SIZE_TOLERANCE = 12123
     125fate-vorbis-encode: FUZZ = 0
     127fate-vorbis-encode: CMP = stddev
     130* CMD
     131  * enc_dec_pcm: indicates the command to be executed.
     132  * ogg: indicates the format in which to encode the input file
     133  * wav: indicates the format in which to decode the encoded file.
     134  * s16le: indicates the codec_name.
     135  * file: the input file
     136  * @: the other commands to be included
     138* REF: indicates the reference file, the decoded file will be compared with this file.
     139* CMP_SHIFT: to calculate the CMP_SHIFT value you can use the tests/tini_psnr command. A guide how to use it is [ explained here].
     140* CMP_TARGET: it depends on what “CMP=  “ is set.
     141* FUZZ: is the difference that is considered ok between the CMP_TARGET and the actual value.
     142* SIZE_TOLERANCE is the difference between the input and output sizes. The value of this parameter is calculated by subtracting the size of the two files.
     145#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     149The CMP_TARGET and FUZZ may differ to one architecture to another. You may need to adjust these values depending on the architecture.
     152To do a new test do the following:
     1531. Compute CMP_SHIFT value with tiny_psnr. The program needs the encoder input and decoder output (that is 2 pcm wav or raw files).
     1542. Copy the fate test to the .mak file and adjust the CMD options to match your needs.
     1553. Run the new test, it should show errors like:
     157stddev:  296.37 PSNR: 46.89 MAXDIFF: 4810 bytes:  1675800/  1679360
     158stddev: |296.37 - 2000| >= 0
     1604. The CMP_TARGET for your test is 296 and your FUZZ is 0.
     1615. The SIZE_TOLERANCE is 1679360 - 1675800 = 3560.
    112164== Filter Tests ==