Compression of Spectral Images Using Spectral JPEG XL
jcgt.org
jcgt.org
Unrelated, I'd also be curious to know how their initial data transformation varies from that of your TIFF scheme.
With my tiff lzw:2 it only takes the diffs for 2 consecutive lines per each sub-image, which is a shame. But still 50% compression. With jxl it would compress down to 10% or more with a sub-image base.
"In principle, JPEG XL supports having one main image and up to 255 sub-images, which sounds like a good match for c0 and f1, . . . , fn−1. Unfortunately, the current implementation in libjxl does not allow us to tweak the compression ratio and subsampling on a per-sub-image basis. Due to these limitations, we currently use one JPEG XL file per channel so that we have full control over the compression parameters."
This follows a general trend in modern codecs where the format itself allows for many different tools, and the job of the encoder is to make good use of them. See "Encoder Coding Tool Selection Guideline" for a nice chart of the possibilities: https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf
But usually exotic things are easier to engineer if you do them outside of the container, then you don't need to figure out how the standard works.
It does seem a bit weird to me that we're going to end up with image files being more like video container formats where you need the appropriate codec available in order to decode them. But I suppose when the use cases are so widely varied it was probably inevitable.
Maybe we should just cut to the chase and standardize codecs that fit inside of mp4 or mkv for all media, including still images, audio, everything. I'm only half joking - it feels like where this is headed.
If you pull away enough layers in any modern video codec, you will find that the intraframe compression case looks very similar to how JPEG operates. You have a block/partitioning scheme, a transform (DCT/DST), quantization, and then some sort of entropy coding.