Expand description
Deflate (zlib) payloads and TIFF/DNG predictors.
DNG compression 8 stores tiles as zlib streams, optionally with predictor 2 (horizontal integer differencing), 34892-34894 (2/4-sample horizontal differencing) or 3/34894-34895 (floating-point byte-plane differencing).
Functions§
- decode_
float_ row - Decode one row of DNG floating-point samples straight into
out. - f16_
to_ f32 - Convert half-float bits to f32.
- f24_
to_ f32 - Convert 24-bit DNG float (1/7/16) bits to f32.
- float_
bytes_ to_ f32 - Decode big-endian float samples of
bps_bytes(2, 3 or 4) intoout. - inflate_
zlib - Inflate a zlib stream, refusing to produce more than
max_outbytes. - inflate_
zlib_ into - Inflate a zlib stream into
out, returning the number of bytes produced. Decodes in place into caller memory (no allocation); errors on corrupt data. Output beyond the stream’s length is left untouched; a stream larger thanoutis an error. - undo_
float_ predictor - Undo DNG floating-point predictor (TIFF predictor 3) for one row: bytes were
split into byte planes (most significant first) and then byte-differenced.
rowholdswidth * cpp * bytes_per_samplebytes; output is native samples in big-endian byte order ready forfloat_bytes_to_f32. - undo_
horizontal_ u16 - Undo horizontal integer differencing on u16 samples, in place, for one row
of
widthpixels withcppinterleaved samples and differencefactor(1 for TIFF predictor 2; 2 or 4 for DNG predictors 34892/34893).