My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TestSuiteDocumentation  
Test Suite Documentation
Updated Dec 23, 2011 by mathieu.malaterre

TEST SUITE openjpeg

Conformance testing

These tests are hardcoded in tests/conformance/CMakeLists.txt and they return to the logic described in Standard (Part 4). The data is stored in OPJ_DATA_ROOT/input/conformance.

Decoding

It is necessary:

  • to decode each file provided by the committee. => ETS-CxPx-${filenameInput}-decode
  • comparing the extracted file with the file reference provided by some tolerances also provided (Tables C1, C4, C6 and C7 version ISO / IEC 15444-4:2004). => ETS-CxPx-${filenameInput}-compare2ref

For the daily monitoring of lib, we added tests that compare the output with an uncompressed file baseline and to ensure non-regression of these lib files conformance => CxPx-NR-${filenameInput}-compare2base.

Note 1: it is possible for a file the first two tests pass but the latter fails because of an amendment to Part lossy decompression. It would then be possible after analysis of why to update the baseline to take the test. Indeed primortdial test is to stay within the tolerances provided by the standard.

In addition to ensure non regression of the primary file, we set up tests to write to a text file the information in the main header. => $ {NR} filenameInput-dump. This text file is then compared with baseline => $ {NR} filenameInput compare_dump2base.

Note 2: reading tests of the main header JPEG2000 files have a different output from the version of the trunk and that of the 1.5 so the baselines corresponding start and opj opj_v2 respectively.

Conclusion: there is no need to add input files to this part of the tests, only the baselines tests compare2base comparedump2base and in some cases may be updated.

TODO: in the case files. JP2 of conformance, there is no comparison tests with the reference or at the baseline (see issue 100)

Encoding

No test suite specified by the standard.

Regression tests

The main tests of regression are based on the file /tests/nonregression/test_suite.ctest.in them together in a simple form for the user. In fact the user can add a command line on a file to compress or decompress the file and automatically via the associated regression testing will be generated.

Decoding

From a command line type j2k_to_image-i-o file.j2k file.j2k.pgx, the following tests are generated:

  • it executes the command line => $ NR-DEC-INPUT_FILENAME_NAME {} - $ {} IT_TEST_DEC-decode
  • TODO should compare the output of the previous test with a baseline to ensure non-regression (see issue 100)

Note: If the latter is achieved, it would be necessary to add a baseline every time we add a command line in the file j2k_to_image test_suite.ctest.in

Encoding

From a command line type j2k_to_image-i-o file.j2k file.j2k.pgx, the following tests are generated:

  1. it executes the command line => $NR-ENC-${INPUT_FILENAME_NAME}-{encode}-IT_TEST_ENC
  2. is written to a file the file information generated by the previous test in order to verify that the correct parameters have been used for encoding => $NR-ENC-{INPUT_FILENAME_NAME}-{$}-dump IT_TEST_ENC
  3. Comparing the file generated by the previous test with a baseline => NR-ENC-${INPUT_FILENAME_NAME}-{$}-IT_TEST_ENC compare_dump2base
  4. If kdu_expand is available, it decodes the encoded file by openjpeg with kakadu => NR-ENC-${INPUT_FILENAME_NAME}-IT_TEST_ENC-decode-ref
  5. If kdu_expand is available, we compare the output of the previous test with a baseline => NR-ENC-INPUT_FILENAME_NAME $ {} - {$}-IT_TEST_ENC compare_dec-ref-out2base

It is necessary to add two baselines every time we add a command line with image_to_j2k in tests/nonregression/test_suite.ctest.in (see point 3 and 5).

j2k_dump

Each file in the directory added JPEG2000 OPJ_DATA_ROOT/input/nonregression is listed in the tests/nonregression/CMakeList.txt and automatically generates two tests:

  • we write JPEG2000 file information for entry into a text file => NR-${INPUT_FILENAME_NAME}-dump
  • Comparing the file generated by the previous test with a baseline => NR-${INPUT_FILENAME_NAME}-compare_dump2base
It is therefore necessary to add a baseline every time we add a JPEG2000 file in the directory OPJ_DATA_ROOT/input/nonregression (see point 2).


Sign in to add a comment
Powered by Google Project Hosting