Skip to main content
← all demos
wai.image.jpegai entropy-consistency In the standard

The JPEG AI entropy decode, reproduced in this tab.

JPEG AI (ISO/IEC 6048) is a learned image codec. Its entropy stage is defined in integer arithmetic so it decodes identically on every device. This page runs that stage with the reference implementation's decoder, compiled to WebAssembly, with no ML runtime. The stream below was produced by the standard's reference software encoder. Your browser rebuilds the decode tables from the integer PMF rows and decodes the masked-ANS bitstream to residual symbols.

It then hashes the decoded symbols with BLAKE3 and checks the digest against the one the native reference recorded. That is entropy-consistency: the decoded symbols reproduce on every machine. The stream and symbols are the ones the reference implementation's cross-architecture check decodes natively.

stream—
coded symbols—
decode—
mismatches vs native—
blake3(symbols) — this tab
—
blake3(symbols) — native reference
—
decoded residual symbols

The whole image, decoded in this tab

The entropy decode and the hyper-decoder, context-model and synthesis networks are integer (16-bit post-training quantised). Dequantisation, latent refinement, the post-filter chain and colour conversion are IEEE-754 float in a fixed order, and the decoder calls no platform maths library.

This tab re-checks the decoded pixels against the hash the native WAI decoder produces. On the reference codestream that decoder differs from the standard's reference software by at most one level on a small fraction of samples, and its test holds it to a bar of two levels. The standard pins its output byte for byte, measured identical on the platforms its conformance test lists. The model downloads once; the readout shows its size and the decode time on this device.

model fetched—
decode—
sha256(RGB) — this tab
—
sha256(RGB) — native reference
—