Skip to content

LibGfx/JBIG2: Add context reuse tests for symbol bitmaps - #26877

Open
Sreeram5678 wants to merge 1 commit into
SerenityOS:masterfrom
Sreeram5678:jbig2-context-reuse-tests
Open

LibGfx/JBIG2: Add context reuse tests for symbol bitmaps#26877
Sreeram5678 wants to merge 1 commit into
SerenityOS:masterfrom
Sreeram5678:jbig2-context-reuse-tests

Conversation

@Sreeram5678

Copy link
Copy Markdown

Addresses #26560.

Currently, the test suite only has a single test case (bitmap-symbol-context-reuse) for testing arithmetic context reuse in symbol dictionaries where refinement (uses_refinement_or_aggregate_coding) and Huffman coding (uses_huffman_encoding) are both set to false.

This PR adds two new test cases under Tests/LibGfx/test-inputs/jbig2 to ensure context reuse is fully covered when refinement is enabled:

  1. refagg=1 and huffman=0 (bitmap-symbol-context-reuse-refagg)
  2. refagg=1 and huffman=1 (bitmap-symbol-context-reuse-huffman-refagg)

Both test inputs have been successfully compiled to .jbig2 using jbig2-from-json, registered in the TestImageDecoder test suite and verified to decode and match the reference bitmap pixel-by-pixel.

@github-actions github-actions Bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 pr-needs-review PR needs review from a maintainer or community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant