Skip to content

Add 21 JXL files exposing libjxl/jxl-rs LZ77 distance-cluster bug#5

Open
lilith wants to merge 1 commit into
mainfrom
add-jxl-rs-issue-765-regression
Open

Add 21 JXL files exposing libjxl/jxl-rs LZ77 distance-cluster bug#5
lilith wants to merge 1 commit into
mainfrom
add-jxl-rs-issue-765-regression

Conversation

@lilith

@lilith lilith commented May 6, 2026

Copy link
Copy Markdown
Member

21 VarDCT bitstreams that exercise the Optimal/Greedy LZ77 path. Produced by imazen/jxl-encoder at e9 + low distance on screen content.

libjxl djxl 0.12.0 and jxl-oxide 0.12.5 decode all 21 cleanly.
libjxl/jxl-rs v0.4.3 rejects all 21 with Invalid AC: N nonzeros after decoding block due to a context-map padding bug (root cause + fix in libjxl/jxl-rs#766).

libjxl's encoder pins LZ77 to kRLE for VarDCT at every effort tier (lib/jxl/enc_ans_params.h + lib/jxl/enc_frame.cc:1259-1263), so existing libjxl test corpora don't exercise this code path. Adding these to conformance ensures any future regression in Optimal/Greedy LZ77 + VarDCT decoding is caught.

Files (21 total)

  • akfcrc022_e9_d{1.5,2.0,3.0}.jxl — 3 files, 22-29 KB. The 22 KB d3.0 variant is the smallest reproducer.
  • gb82-sc_{terminal,gui,codec_wi,gmessage,graph,imac_dar,windows,windows9}_d{0.25,0.5,1.0,1.5,2.0}.jxl — 18 files, 32-447 KB. Screen-content variants at varying distances.

References regenerate via jxl/generate_references.sh against djxl 0.12.0.

Refs

@lilith lilith self-assigned this May 6, 2026
@lilith
lilith force-pushed the add-jxl-rs-issue-765-regression branch from e573a71 to 7c9beed Compare May 6, 2026 03:50
Three VarDCT bitstreams chosen to cover the distinct error variants
the bug manifests as. All from the same root cause (LZ77 distance
cluster shifted away from context_map.last() by AC-context padding)
but each fails at a different validation point in the AC reader.

libjxl djxl 0.12.0 and jxl-oxide 0.12.5 decode all three cleanly.
libjxl/jxl-rs v0.4.3 rejects them; fix in libjxl/jxl-rs#766.

| file                        | size  | manifests as                                        |
| akfcrc022_e9_d3.0.jxl       | 22 KB | Invalid AC: 8 nonzeros after decoding block         |
| gb82-sc_windows9_d0.25.jxl  | 51 KB | Invalid AC: nonzeros 144 is too large for 1 8x8 blocks |
| gb82-sc_terminal_d0.5.jxl   | 58 KB | ANS stream checksum mismatch                        |

Encoder: imazen/jxl-encoder at e9 + low distance on screen content
(uses Optimal/Greedy LZ77 — libjxl never emits these for VarDCT, so
its existing test corpora can't catch the bug).

References regenerate via jxl/generate_references.sh.

Refs:
- libjxl/jxl-rs#765 (bug)
- libjxl/jxl-rs#766 (fix)
- imazen/zenjxl-decoder#15 (downstream tracking + regression test)
- imazen/jxl-encoder#29 (encoder default rationale)
@lilith
lilith force-pushed the add-jxl-rs-issue-765-regression branch from 7c9beed to b381cf4 Compare May 6, 2026 03:51
lilith added a commit to imazen/zenjxl-decoder that referenced this pull request May 6, 2026
Cleanup of the issue-15 branch before merge to main:

- Replace the corpus-walking regression test with a single in-tree
  file test pinned to the smallest reproducer (akfcrc022_e9_d3.0.jxl,
  22 KB). The full historical corpus (3 distinct-variant files)
  lives in imazen/codec-corpus PR #5 under jxl/conformance/ and is
  exercised by the existing codec_corpus parity tests when the
  corpus is reachable.
- Remove hard-coded /mnt/v/fuzzes/... path. Path now resolves via
  CARGO_MANIFEST_DIR -- CI-portable, no external setup required.
- Drop benchmark TSVs and the issue-15 sweep summary md from this
  branch; they were investigation scratch and the conclusions are
  captured in the upstream PR + tracking issues.

Test fingerprints the bug: decode succeeds, output is 512x512x{3,4}u8.
Pixel parity is verified by the codec_corpus tests against the
codec-corpus reference outputs once that PR merges.

Refs:
- libjxl/jxl-rs#765 (bug)
- libjxl/jxl-rs#766 (fix)
- imazen/codec-corpus#5 (full corpus)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant