Skip to content

Commit

Permalink
Tests/LibGfx: Add tests for JPEG2000 code block style
Browse files Browse the repository at this point in the history
Test files created by:

    for opt in lazy termall segsym vcausal pterm resetprob; do

    ../jasper-build/src/app/jasper --input \
        Tests/LibGfx/*-inputs/*2000/kakadu-lossless-rgba-u8-prog1*.jp2 \
        --output jasper-rgba-u8-cbstyle-$opt.jp2 \
        -O $opt

     done

Where jasper has this downstream patch applied:
jasper-software/jasper#392 (comment)

I then manually renamed the "lazy" one to "bypass" to match spec
language, and for all files manually inserted the code block style
bitmask in the name.

To test interactions between these, I also made a file that sets
all these options at once, by passing `-O lazy -O termall ...`.

We can't decode any of these yet.
  • Loading branch information
nico committed Feb 9, 2025
1 parent 5ff36ce commit 8ddbea3
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/LibGfx/TestImageDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,13 @@ TEST_CASE(test_jpeg2000_decode_greyscale)
TEST_CASE(test_jpeg2000_decode_unsupported)
{
Array test_inputs = {
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-01-bypass.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-02-resetprob.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-04-termall.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-08-vcausal.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-16-pterm.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-32-segsym.jp2"sv),
TEST_INPUT("jpeg2000/jasper-rgba-u8-cbstyle-63-all.jp2"sv),
TEST_INPUT("jpeg2000/kakadu-lossless-cmyk-u8-prog1-layers1-res6.jp2"sv),
TEST_INPUT("jpeg2000/kakadu-lossless-cmyka-u8-prog1-layers1-res6.jp2"sv),
TEST_INPUT("jpeg2000/kakadu-lossless-rgba-u16-prog1-layers1-res6.jp2"sv),
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 8ddbea3

Please sign in to comment.