mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-16 23:24:22 +00:00
Bit-packed uncompressed raw data was read one sample at a time through a bit accumulator. Rows of 10, 12 and 14-bit samples are now read a whole group (4x10, 2x12, 4x14 bits = 5, 3, 7 bytes) at a time; the row tail still goes through the general reader. A file whose only segment is the whole image row for row no longer copies it into a second full-size buffer: the decoded Vec becomes the plane. The predictor 2 undo works in place instead of on a copy. The summed-segment charge (#4959) and the per-segment limits are unchanged. A test compares the grouped reader with the plain bit reader for 10/12/14 bits, 1 and 3 samples and several widths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>