Viewing a single comment thread. View all comments

DirectControlAssumed t1_iud43ru wrote

>It'll join JPEG-2000 on the pile.

IMHO, JPEG-2000 seems to be the safest bet among all these "JPEG replacements" in a sense that if you store some photos with it for a long time you will not going to find yourself in a situation where the format is abandoned and there will be literally no software to open or transcode the photos in the future

JPEG-2000 is already 20 years old (i.e. U.S. patents on core coding have expired in addition to the fact that it was supposed to be royalty-free since the beginning), there are many codec implementations out there; there are image viewers supporting the format and there are industries that use it very extensively - digital cinema, medical imaging, geographic information systems, digital archives, etc. JPEG/ISO keeps publishing new parts (new features) for the format standard and that means there are people who actually care about it.

It is mostly absent on the consumer devices, yes, but who knows, maybe it will become more prominent since the patents are dead. It is also vendor-neutral unlike AVIF/JPEG XL/HEIF - there is no megacorporation behind it who constantly try to overtake its competitors in format wars. Google (who is the main sponsor of JPEG XL) is especially notorious for ruthlessly killing stuff people use.

I have recently played with JPEG-2000 and found that it has some very nice features. E.g. unlike plain JPEG you can make your image fit into specific size constraints - want to get 1Mb image out of 5Mb JPG? Easy! I also found that its lossless compression consistently beats PNG.

My very limited test also made me question JPEG XL superiority. While lossless JPEG XL constantly beated lossless JPEG 2000, I am not so sure about lossy compression. There are two modes of JPEG 2000 lossy compression (integer/real or reversible/irreversible). While default integer (reversible) lossy JPEG-2000 compression was usually worse than lossy JPEG XL for the same size, real (irreversible) was much better according to PSNR/NCC/AE metrics and directly competed with AVIF (though AVIF was usually better). JPEG-2000 artifacts also looked less ugly than JPEG XL's (though that may be due to the JPEG XL codec immaturity).

I don't know what JPEG-2000 lossy mode people use to make comparisions but I wouldn't be surprised if one of the reason why they find JPEG-2000 lossy performance lacking is that they use default compression settings.

There is also a very interesting thing named "arithmetic coded JPEG". It is a plain JPEG that has its lossless stage (Huffman coding) replaced with more efficient arithmetic coding. It demonstrates significant disk usage improvements over plain JPEG, especially for large images. You can convert JPEGs between Huffman and arithmetic coding without any quality losses - the images would be mathematically equal. This is similar to JPEG XL lossless JPEG re-compression but unlike JPEG XL it is not a brand new format - it is a part of JPEG specification since very long times! The reasons it wasn't used widely are patents that have long expired. Reference codecs like libjpeg supported it for a long time but the feature was often omitted by app developers because of patents so many image viewers still do not support it directly. The lossless nature of such recompression (and the fact that it is a part of plain old JPEG specification) means that you can use it to truly losslessly compress JPEGs for long storage.

I have done limited comparison of arithmetic coding and JPEG XL's JPEG recompression and haven't found absolute winner - sometimes it was arithmetic JPEG who was better, sometimes it was JPEG XL

2