Hacker News new | ask | show | jobs
by snickerbockers 1049 days ago
I'm just reading through the wikipedia page on this for the first time.

Does JPEG XL allow encoders to switch between the DCT and modular modes on a per-macroblock basis, or is it just on a per-channel basis?

If it's the former then I can see this offering a lot of utility over other image formats because you'd be able to disable the DCT on high-contrast macroblocks and finally be done with all those god-awful "checkerboard" artifacts around the edges of objects.

But if it's merely on a per-channel basis then I'm not sure I see what the point of this is since I can already use a different format when I need lossless encoding; If anything JXL would become an annoyance because I can't tell if a JXL image is lossless or not based on the file's extension.

3 comments

This is a good look at the benefits of JPEG XL: https://cloudinary.com/blog/jpeg-xl-how-it-started-how-its-g...

It was discussed here a few weeks ago: https://news.ycombinator.com/item?id=36801448

> Does JPEG XL allow encoders to switch between the DCT and modular modes on a per-macroblock basis, or is it just on a per-channel basis?

Tricky but it can be indeed done on a per-macroblock basis. The encoding itself is fixed per frame, but JPEG XL mandates zero-duration frames to be merged with the prior frame, so multiple frames with different encodings can be used for that. In fact I believe patches already work like this.

JPEG XL has 10 8x8 transforms and 9 larger transforms (IIRC).

Two of the 8x8 transforms are extremely local. One is called IDENTITY and the other DCT2x2. It is very difficult to produce ringing artefacts when using these transforms.

When going to higher quality settings in libjxl, it tends to favor the DCT2x2 quite a bit.

This is in VarDCT -- not modular coding.