Expand description
Samsung SRW compressions.
| TIFF compression | name | layout |
|---|---|---|
| 32770 + tag 40976 | V0 | per-row offsets; 16-sample blocks with a direction bit and four adaptive bit lengths; rows stored as 2x2-transposed pairs |
| 32772 | V1 | single predictive Huffman stream (fixed 10-bit table), see crate::nikon_huffman |
| 32773 | V2 | rows aligned to 16 bytes; 16-sample blocks with motion-compensated prediction from previous rows, adaptive bit lengths and a quantisation scale |
V0 and V2 read bits MSB-first from little-endian 32-bit words, fetching a new word
only when the buffered bits run out (Ph1Bits); V2 relies on this exact fetch
pattern for its row alignment.
Structs§
- Ph1Bits
- MSB-first reader over little-endian 32-bit words with lazy word fetches. Reading past the end yields all-ones words and is flagged.
Functions§
- decode_
v0 - Decode Samsung V0 (compression 32770 with a row offset table).
- decode_
v0_ reference - Sequential reference implementation of Samsung V0 (see
decode_v0); kept as the specification the two-phase decoder is tested against. - decode_
v0_ with decode_v0with explicit control over parallelism.- decode_
v1 - Decode Samsung V1 (compression 32772). Returns the row in which the data ran out
(
Nonewhen the stream was complete). - decode_
v2 - Decode Samsung V2 (compression 32773).
srcstarts at the image data.