Expand description
The “load flags” family of bit-packed layouts.
Many Nikon, Pentax and Samsung uncompressed raws are described by a handful of “load flags” rather than by standard TIFF packing:
| flag bits | meaning |
|---|---|
1 | one padding byte after every 10 samples (Nikon D100 “compressed”) |
2 | rows stored as two interlaced fields (even rows, then odd rows) |
4 | the second field starts at a separate offset |
8 | 16 | bits are gathered in little-endian units of 16/24/32 bits, MSB first |
64 | swap each pair of output columns |
128 | rows are padded to an even number of bytes |
PackedSpec::fast_layout maps the common combinations onto
crate::packed (parallel, SIMD); everything else uses the exact sequential
path in decode, which is the specification.
Structs§
- Packed
Spec - A load-flags packed raster description.
Functions§
- decode
- Decode
srcintoout(rows ofstridesamples). Truncated input is an error (decoding aborts at the first row that starts past EOF) unlesslenient(recovering truncated data): then every complete sample is decoded and the rest are left zero (outmust be zeroed). - decode_
exact - Exact sequential decode of any load-flags layout (the specification).