2 ms·
The simplest form is just to pack 10 or 12 bit values. There's all kinds of variations of that: https://github.com/pedrocr/rawloader/blob/a59bb78d156277781ad40
by pedrocr 5y ago
The simplest form is just to pack 10 or 12 bit values. There's all kinds of variations of that:
https://github.com/pedrocr/rawloader/blob/a59bb78d156277781ad404d0c783edc4a0abce3d/src/decoders/packed.rs https://github.com/pedrocr/rawloader/blob/a59bb78d156277781a...
There are a few formats that use a curve and less bits. They do become lossy and doing dithering on decompress is useful to avoid banding.
The Nikon one you mention was only used very early and is decoded by decode_8bit_wtable() in that file. It's just looking up the 8 bit value in the table and then adding some randomness to prevent the banding.