mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Tests/JBIG2: Add test cases for custom adaptive template pixels
I manually wrote a bunch of .ini files and ran this script to produce the files: #!/bin/bash set -eu J=$HOME/Downloads/T-REC-T.88-201808-I\!\!SOFT-ZST-E/Software J=$J/JBIG2_SampleSoftware-A20180829/source/jbig2 for t in '' template1- template2- template3-; do for p in '' '-tpgdon'; do i=${t}customat$p echo $i.ini cat $i.ini $J -i Tests/LibGfx/test-inputs/bmp/bitmap -f bmp -o bitmap-$i \ -F jb2 -ini $i.ini cp bitmap-$i.jb2 Tests/LibGfx/test-inputs/jbig2/bitmap-$i.jbig2 done done The script's output (which shows the .ini file contents) was: ``` % ./make-custom-at.sh customat.ini -Gen -Seg 1 -Gen -Param -ATX1 -4 -Gen -Param -ATY1 -5 -Gen -Param -ATX2 6 -Gen -Param -ATY2 -7 -Gen -Param -ATX3 -8 -Gen -Param -ATY3 -9 -Gen -Param -ATX4 10 -Gen -Param -ATY4 -11 ENC Start ===>complete customat-tpgdon.ini -Gen -Seg 1 -Gen -Param -ATX1 -4 -Gen -Param -ATY1 -5 -Gen -Param -ATX2 6 -Gen -Param -ATY2 -7 -Gen -Param -ATX3 -8 -Gen -Param -ATY3 -9 -Gen -Param -ATX4 10 -Gen -Param -ATY4 -11 -Gen -Param -TpGDon 1 ENC Start ===>complete template1-customat.ini -Gen -Seg 1 -Gen -Param -Template 1 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 ENC Start ===>complete template1-customat-tpgdon.ini -Gen -Seg 1 -Gen -Param -Template 1 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 -Gen -Param -TpGDon 1 ENC Start ===>complete template2-customat.ini -Gen -Seg 1 -Gen -Param -Template 2 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 ENC Start ===>complete template2-customat-tpgdon.ini -Gen -Seg 1 -Gen -Param -Template 2 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 -Gen -Param -TpGDon 1 ENC Start ===>complete template3-customat.ini -Gen -Seg 1 -Gen -Param -Template 3 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 ENC Start ===>complete template3-customat-tpgdon.ini -Gen -Seg 1 -Gen -Param -Template 3 -Gen -Param -ATX1 17 -Gen -Param -ATY1 -2 -Gen -Param -TpGDon 1 ENC Start ===>complete ```
This commit is contained in:
parent
a0a14296f9
commit
b17a9ad82a
Notes:
sideshowbarker
2024-07-17 00:47:29 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/b17a9ad82a Pull-request: https://github.com/SerenityOS/serenity/pull/23831 Reviewed-by: https://github.com/trflynn89
9 changed files with 8 additions and 0 deletions
|
@ -356,13 +356,21 @@ TEST_CASE(test_jbig2_decode)
|
|||
|
||||
Array test_inputs = {
|
||||
TEST_INPUT("jbig2/bitmap.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-customat.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-customat-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template1.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template1-customat.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template1-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template1-customat-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template2.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template2-customat.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template2-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template2-customat-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template3.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template3-customat.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template3-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-template3-customat-tpgdon.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-textrefine.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-symbolrefine.jbig2"sv),
|
||||
|
|
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-customat-tpgdon.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-customat-tpgdon.jbig2
Normal file
Binary file not shown.
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-customat.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-customat.jbig2
Normal file
Binary file not shown.
Binary file not shown.
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template1-customat.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template1-customat.jbig2
Normal file
Binary file not shown.
Binary file not shown.
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template2-customat.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template2-customat.jbig2
Normal file
Binary file not shown.
Binary file not shown.
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template3-customat.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-template3-customat.jbig2
Normal file
Binary file not shown.
Loading…
Reference in a new issue