|
The codec is extremely simple (hence why it's relatively fast even with such unoptimized code) and as such doesn't even use any entropy coding backend, which is what allows for the incredible scalability. Now, obviously, that means that when going for high quality output, it can't really match JPEG-XL, but that's just a tradeoff - using context-modelling would allow it to beat JXL, but then you couldn't really have byte-granularity scalability. So you can tell it to match the exact same file size of your JXL image, and compare both. At nearly perceptually lossless quality levels, even if it doesn't match JXL, it usually is quite acceptable also, and at extremelly high compression ratios (think over 250:1) it's usually better than JXL, which is important, otherwise the scalability would be a moot point. It was designed with a particular use case in mind - simplifying the process of serving visual content in a responsive environment. Instead of encoding the same image at 4 or 5 different resolutions and then serving the appropriate one based on the requested specifications - which usually would mean either storing those multiple versions or reencoding on-the-fly on an as-needed basis - you encode the image only once, at a quality you deem matches your maximum requirement; it can even be completely lossless. Then when you receive a request for an image at a lower quality/resolution, you can simply send only the first 1/10 of the file, or 1/8, or however you like. You can literally just truncate the file at a random offset and when you decode it, you just get a lower quality version of the image, but which is still exactly the best the codec could have done at that file size anyway. The requesting party can then simply downscale the lower quality image, hence why it's important to have good details even at high compression ratios, so that the downscaled version will look good. The format allows for all that, even progressive enhancement, but the provided library for now doesn't support all of this. There are other formats with similar scalability, but they're usually a lot more complex - SQZ is basically just a fancy run-length codec, in a single file header for C/C++. |
So the use case is, if I‘ve understood, to simplify serving content in “responsive” environments. What environments do you see this benefiting? I assume web development, particularly e-commerce where images are crucial. However, what’s the overhead for this? How well does this “encode once, read many” style scale compare to the typical “encode many, read many” in terms of server resources?