I think you know this, Jake, but just to clarify for everyone here, while WebP lossy and lossless are basically completely separate things, JXL’s VarDCT mode (the lossy JPEG-like mode) heavily relies on its Modular mode (the FLIF/FUIF-like mode). The original JPEG has a lossless method of compression, which applies after the DCT step, but it really sucks. Really basic prediction for DC values based on previous DC values, run-length encoding, and of course Huffman. JXL also has to losslessly compress stuff after the DCT step, and since it has a high quality lossless codec built in, it of course uses it where-ever applicable. So it’s kinda like how Opus has two modes, but they’re heavily integrated and work together.
(If I recall correctly, AVIF’s lossless mode is basically like JPEG’s lossless step. Its primary purpose is to compress the data after lossy encoding, so while it was repurposed for lossless pixel compression, it doesn’t work well for that use case.)
And of course there’s the fun patches feature, where the encoder can notice repeating elements like font glyphs and encode them separately on a sprite sheet to be inserted into the main lossy image. Oh, and another bit of trivia is that the Modular mode supports lossy operation. Obviously there’s the classic trick of tweaking your pixel values to have lower prediction residuals, but Modular mode actually has (imagine a drum roll) wavelets! Sort of. It can do a Haar-like transform. Actually, often when used with lossy VarDCT, often some of the associated Modular mode frames will be encoded this way.
I think you know this, Jake, but just to clarify for everyone here, while WebP lossy and lossless are basically completely separate things, JXL’s VarDCT mode (the lossy JPEG-like mode) heavily relies on its Modular mode (the FLIF/FUIF-like mode). The original JPEG has a lossless method of compression, which applies after the DCT step, but it really sucks. Really basic prediction for DC values based on previous DC values, run-length encoding, and of course Huffman. JXL also has to losslessly compress stuff after the DCT step, and since it has a high quality lossless codec built in, it of course uses it where-ever applicable. So it’s kinda like how Opus has two modes, but they’re heavily integrated and work together.
(If I recall correctly, AVIF’s lossless mode is basically like JPEG’s lossless step. Its primary purpose is to compress the data after lossy encoding, so while it was repurposed for lossless pixel compression, it doesn’t work well for that use case.)
And of course there’s the fun patches feature, where the encoder can notice repeating elements like font glyphs and encode them separately on a sprite sheet to be inserted into the main lossy image. Oh, and another bit of trivia is that the Modular mode supports lossy operation. Obviously there’s the classic trick of tweaking your pixel values to have lower prediction residuals, but Modular mode actually has (imagine a drum roll) wavelets! Sort of. It can do a Haar-like transform. Actually, often when used with lossy VarDCT, often some of the associated Modular mode frames will be encoded this way.
score 1 · canonical