mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
Rows below the split row use the existing lossy Huffman path; from the split row on every pixel is a (bits - 4)-bit word: a complete prefix code for the difference category followed by the top bits of the T.81 extra bits, dequantised to the centre of the kept bin, with the usual two-left predictor and an unclamped running value. The rule was derived by black-box analysis of the 11 CC0 samples (all decode to the same samples as the analysis decoder). The decoder checks that the fixed-rate section ends within the last byte of the strip (whole rows plus 0..7 padding bits) and otherwise keeps refusing the file (preview only), so a file that does not follow the rule is never decoded wrongly. RENDER_CACHE_VERSION 28 (main is 22, open PRs use 23-27): adjust at merge.