wai-rs: jpegai_pipeline::dequant + e2e integration (entropy→dequant byte-exact) #3

Merged
dcharlot merged 1 commit from feat/jpegai-pipeline-dequant into main 2026-07-08 07:14:27 -04:00

2026-07-08

Transaction Science
wai-rs: jpegai_pipeline::dequant + e2e integration (entropy→dequant byte-exact, synthesis Y/UV on real latent)
Start the JPEG-AI decode-pipeline glue that wires the byte-exact stages together.

- jpegai_pipeline::dequant — resi[c,p] = y_q[c,p] · gain_map[c,p], where the
  per-position gain map already folds the per-channel gain (scaler_vec) and the
  residual-variance scale (RVS). Deterministic f32.
- e2e entropy→dequant: decode the real test256.bin y-latent (40960 symbols) with
  the mANS decoder, dequantize, and match the reference resi_dq_y checkpoint —
  BYTE-EXACT (max|Δ| = 0). Proves the mANS output IS the dequant input.
- e2e synthesis on the real reference latent: decode_y(y_lsbs)→ypix at 58.85 dB and
  decode_uv(concat(y_lsbs,uv_lsbs))→uvpix at 58.88 dB — the full synthesis stage
  validated on real pipeline data, and the UV input assembly (y‖uv) pinned.

All feature-gated on the checkpoint/fixtures. Builds toward decode(bitstream)→pixels.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-08 07:13:13 -04:00