3 ms·
Lossy RAW is sometimes even simpler than that. E.g. Nikon's old compression was just remapping values in a log-like fashion, which reduced resolution in the bri
by formerly_proven 5y ago
Lossy RAW is sometimes even simpler than that. E.g. Nikon's old compression was just remapping values in a log-like fashion, which reduced resolution in the brightest few stops[1] to save a few bits per sample.
[1] Perception is pretty logarithmic as usual, so for a 14-bit readout, half the values represent the brightest stop and a little bit, the other half holds the other 12+ stops.
- pedrocr 5y agoThe 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.