rawspeed icon indicating copy to clipboard operation
rawspeed copied to clipboard

Support JPEG XL compression in DNG

Open kmilos opened this issue 2 years ago • 6 comments

Just added in DNG 1.7, and is allowed for e.g. 3-channel LinearRaw photometric interpretation.

Available (C) implementations:

https://github.com/libjxl/libjxl (reference) https://github.com/lifthrasiir/j40 (single header, public domain)

kmilos avatar Sep 01 '23 15:09 kmilos

Good hint. Disappointed that they only specified it for LinearRaw but not for CFA.

cytrinox avatar Sep 01 '23 17:09 cytrinox

Disappointed that they only specified it for LinearRaw but not for CFA.

Check the new ColumnInterLeaveFactor as well.

kmilos avatar Sep 01 '23 18:09 kmilos

And now also looks like it's in Samsung Galaxy enhanced ExpertRAW DNGs.

kmilos avatar Jan 19 '24 08:01 kmilos

Check the new ColumnInterLeaveFactor as well.

The stated purpose here describes a nonstandard/proprietary method of encoding raw sensor data I remember seeing a few years ago, but can't find at the moment (and in the process, ALMOST makes it standardized except for one issue, see my last comment) - Take the individual color planes from the CFA, and store them as adjacent images in a monochrome JPEG. A potential use case for this would be hardware that was severely IO-bound but had a reasonably performing hardware JPEG engine (I can think of one specific camera that would REALLY benefit from this, as it has a hardware JPEG engine but USB 2.0 and stores bracketed shots from 25 10-bit sensors, which wouldn't lose too much with nonlinear encoding to 8 bits/sample...), or to allow lossy storage of CFA data with JXL.

It seems that JXL + the new RowInterleaveFactor and ColumnInterleaveFactor would support exactly this, but wouldn't that technically require PhotometricInterpretation to be 32803 (CFA)? e.g. "so close yet so far" here.

Entropy512 avatar Mar 13 '24 18:03 Entropy512