v4.0f — native arithmetic-coded JPEG support (SOF C9/CA)
Native arithmetic-coded JPEG support for the v4.0 LTS line. On-disk .pjg format is unchanged from v4.0b/c/d/e — output is byte-exact, full backward compatibility: v4.0f decodes every v4.0-line file (v4.0, v4.0a, v4.0b, v4.0c, v4.0d, v4.0e). Purely additive — no format break, no v4.1.
What's new
-
Native arithmetic-coded JPEG support (SOF C9/CA) — packJPG now covers both entropy coders of classic JPEG: Huffman (existing) and arithmetic (QM-coder, T.81 Annex D/F/G), both sequential and progressive. No API or CLI changes — the same commands now also handle arithmetic-coded input transparently. No new
.pjgsub-marker was needed; arithmetic origin is re-derived from the header on decode. -
Extensively verified:
- Standalone codec tests (byte-exact against libjpeg ground truth)
- Full integration into
decode_jpeg/recode_jpeg/merge_jpeg - Real Windows 10 and Windows 7 VMs (native, not emulated)
- Widened real-world corpus: CMYK/4-component, 4:4:4, 4:2:2 chroma subsampling, 20 diverse real photos
- A clean ASan+UBSan fuzzing pass (after finding and fixing 2 bugs: an out-of-bounds read on malformed restart intervals, and a left-shift-of-negative-value UB in AC coefficient refinement)
-
Legacy build (XP/Vista/7/8) bumped to v4.0f with the same native arithmetic support, verified on real Windows 7.
-
Also guards the apt-repo publish workflow against prerelease events.