11 ms·
JPEG XL against AVIF tested on ImageEngine
- praseodym 3y agoFor me, the most interesting property of JPEG XL is that it allows lossless recompression of JPEG images. This seems a great way to save storage in a photo library without any loss of quality.
- mortenjorck 3y agoWhile I would prioritize other factors in a next-gen image format, the fact that JXL manages to lead in all those plus the ability to “upgrade library” is an incredible achievement.
- thund 3y agoOT: had to uninstall mastodon to read the post. The alternative was to join the server, just to read… Pretty bad experience if you ask me. I was hoping someone would post a mirrored link
- brucethemoose2 3y agoThat seems like a huge oversight. Why can't the app load it if browsers can get it through HTML?
- ocdtrekkie 3y agoThis definitely is not my experience on iOS. I have both the official Mastodon app and regularly browse servers using Safari without issue.
- Szpadel 3y agointeresting results, when i performed such tests i constantly was getting bigger file sizes with similar dssim in comparison with avif
- fyrn_ 3y agoNot surprising, it's hard to compare image formats, it takes a lot of sample images before you can say anything, and even then it's hard to rule out sampling bias
- bscphil 3y agoObjective metrics (like dssim) are not the best way to compare image codecs. This is in part for the obvious reason - that none of them are perfect and the human eye is better - but also for other reasons, including that some codecs use metrics internally for bitrate targeting, and these metrics can disagree with the metrics used by other codecs. Without a visual comparison, it's impossible to say which metrics are better for a given set of images. JPEG XL was based (in part) on Google's "pik" codec, which used the Butteraugli metric for bitrate targeting. Use your eyes instead: https://afontenot.github.io/image-formats-comparison/#wasserfassstelle&avif=m&jxl=m https://afontenot.github.io/image-formats-comparison/#wasser...
- tuxoko 3y agoYeah, whenever I see the image comparison. I more often then not find the result of webp or avif undesirable even against a good jpeg compression. webp and avif tends to blur out detailed textures too much and just looks worse than jpeg which while looks a bit rough and has some artifact, but you can still somewhat see the detailed textures.
- WithinReason 3y agoAVIF looks better to me at low bitrates, JXL has much more visible block artifacts: https://afontenot.github.io/image-formats-comparison/#vid-gajsek&avif=t&jxl=t https://afontenot.github.io/image-formats-comparison/#vid-ga...
- bscphil 3y agoI think this is definitely the most common response. AVIF, as a video intra-frame based codec, works best at very low bitrates. JPEG XL is considerably better at high bitrates.
- WithinReason 3y agoI'm guessing the reason is that for predicting video frames hallucinating detail is undesirable, so you would rather remove detail than add non-existent detail. AVIF also seems to have some kind of deblocking filter which JXL lacks, to my surprise.
- xnx 3y agoVisual quality, file size, compression time, decompression time, browser support, toolchain support, patent restrictions. Considering any one of those in isolation is insufficient for evaluating image formats.
- bla3 3y agoAlso features like alpha support, yuv444 support in addition to yuv420, progressive rendering are interesting. Do jxl and avif both have all of these?
- krasin 3y agoAlso 16-bit colors support! The fact that AVIF does not have it is a bummer (although, understandable given the fact AVIF is for a video codec, not for editing HDR images).
- jdiff 3y agoHonestly that plus the awful tiling behavior at relatively low resolutions should have been enough to disqualify it from being mangled into something resembling an image format. It was made and tuned for movies, not stills. But its image format gets to inherit all of the drawbacks of that initial use case, including awful encode/decode performance.
- cubefox 3y agoWait, after decades they are introducing a new image format, and it doesn't even have HDR support?! But surely AV1 supports HDR, so why not AVIF? Edit: According to this table, AVIF does in fact support HDR: https://jpegxl.info/ https://jpegxl.info/
- krasin 3y agoAVIF supports "8-, 10-, and 12-bit color depths". It does not support 16-bit color depths (which is my claim made in the comment above). See https://en.wikipedia.org/wiki/AVIF https://en.wikipedia.org/wiki/AVIF The need for 16-bit colors arises when HDR content is edited, but unnecessary for just playback. AVIF is a playback format, so they didn't feel the need to support 16-bit colors, I guess.
- gyanreyer 3y agoOne of the biggest things I'm interested in is encode times. I have a static site where I automatically optimize and create a webp version of every image at build time and it's always very fast. When I tried adding avif into the mix as well, build times absolutely skyrocketed. Obviously I was able to resolve that problem with caching, but it just all becomes much more of a pain to manage.
- tambourine_man 3y agoJPEG and PNG are good enough. Encoders and decoders are heavily optimized and omnipresent. No patent issues (either patent-free or expired). We should focus on other more pressing issues. This one is basically solved.
- devmor 3y agoYou are free to focus on whatever issues you find pressing.
- Demmme 3y agoAh yes the ubundend fiber in rural areas around the globe. You do understand that this is not for you if you have high bandwidth and low latency right?
- calpaterson 3y agoThe trouble is that images are a large fraction of the page size even for well optimised websites. Using smaller images via changing format often makes a significant difference in the page load time. It's also relatively easy for new formats to be adopted - the html picture tag makes it really easy to serve the same image in multiple formats to allow for backward compatibility. And of course image decoders are easily distributed - JXL's encoder/decoder are open source. The combination of those two factors probably means that this will never be a settled area now. It's fairly easy for websites to adopt a new format and there are strong reasons to. Means, motive and opportunity. I reckon Chrome will cave in eventually. The pressure on browser performance is intense. Unless they want to see Safari faster in benchmarks of image heavy pages they will have to adopt it.
- CharlesW 3y ago> The trouble is that images are a large fraction of the page size even for well optimised websites. Using smaller images via changing format often makes a significant difference in the page load time. That's true, but even savvy people don't seem to care much about this. For example, (open) podcasts are still universally MP3-based even though it's been possible for many years to halve their size using modern, ubiquitous audio formats. > I reckon Chrome will cave in eventually. The pressure on browser performance is intense. Unless they want to see Safari faster in benchmarks of image heavy pages they will have to adopt it. What's curious about this to me is why Apple is single-handedly saving JPEG-XL from obscurity when AV1 is also a fine substitute for mainstream image compression use cases.
- toastal 3y agoWhat’s missing is the encoding time difference. AVIFs are slow.
- shmerl 3y agoCan't GPU encoders be used for it? If they work for AV1 they should work for AVIF too. And software encoders are improving as well.
- brucethemoose2 3y agoTheoretically... But: - There are no implementations of this, AFAIK - They would suffer from the same adoption difficulty hardware video encoding suffers from. - They would suffer from the same quality issues and format limitations compared to software encoders (where intel/nvidia dGPU hardware AV1 maxes out at ~x265 medium last I checked)
- shmerl 3y agoStill it would be interesting to see it implemented. Sure it might be more limited in features compared to software encoders, but at least it could be an option when it's acceptable with software encoders being another one when more features are needed. Adoption time is applicable to anything new(ish), so AV1 isn't really special in that sense. It's already close to reaching wide adoption in hardware, so it's progressing well.
- brucethemoose2 3y agoIts not ubiquitous like AVC and HEVC though, which is a problem. There have been some holdouts (like Apple, IIRC) Google will integrate hardware AVIF into Pixels if anyone does, so we will get to see it in action there at least.
- shmerl 3y agoHEVC wasn't ubiquitous right away either. But it's DOA because of patent trolls like MPEG-LA. AV1 came later, so it will take its time to become ubiquitous while avoiding issues of HEVC. Apple is a brake on the progress, as always. They'll arrive last.
- andybak 3y ago[flagged]
- Dwedit 3y agoNote that AVIF is badly broken on the stable version of Gimp (2.10.34). Chroma is upscaled using NEAREST NEIGHBOR. Gimp does not do that when you load a JPEG or other lossy file which uses chroma subsampling.
- pornel 3y agoSadly, upsampling algorithm in AVIF has been explicitly left unspecified, because the video industry doesn't see a problem with that. IMO using chroma subsampling with AVIF is always an error. That mode shouldn't exist, and it's there only due to video legacy. Just always use full-res color. AV1 has chroma-from-luma feature to deal with full-res chroma efficiently. If you destroy color resolution like it's 1953, you're just degrading both the quality and the compression for no good reason.
- JyrkiAlakuijala 3y agoI tried to keep it away from pik (successfully) and jpeg xl (with moderate success), but in the end we needed to add yuv420/yuv422 for old school jpeg recompression (75 % of old jpegs are in this unfortunate mode). Usual JPEG XL images are always yuv444.
- brucethemoose2 3y agoThere are some valid critiques, like dssim being an old and questionable metric, and AVIF using unoptimized settings, and maybe JXL having an "unfair" advantage depending on how the source images (jpegs?) were ingested. But this is a real world benchmark. If this is an example of how a seasoned backend dev would typically set up AVIF and JPEG XL, its extremely telling.
- llm_nerd 3y agoIn prior discussions about JPEG XL on here, some didn't realize that modern browsers already let you pick the "best fit" image from a set of images in basic HTML. https://dennisforbes.ca/articles/jpegxl_just_won_the_image_wars.html https://dennisforbes.ca/articles/jpegxl_just_won_the_image_w... So if a site decided to support JPEG XL (including recompressing their existing JPEG library, going forward additionally high-quality encoding to better codecs for new images) they can easily support it in a way that lets the browser choose. No weird reverse proxies or machinations or polyfills to support it. Another great aspect of JPEG XL is that it is a short circuit answer to almost any "what format should you store an image in?" question. Instead of the classic "is it comic book style? GIF or PNG. Photorealistic? JPEG. Need transparency....oof, is it photorealistic, because then things get ugly....", with JPEG XL it truly becomes the universal answer. At least outside of absurdly high compression rates on photorealistic content where it does suffer.
- kllrnohj 3y ago> Another great aspect of JPEG XL is that it is a short circuit answer to almost any "what format should you store an image in?" question. WebP offered that as well. Nobody ended up caring. Animated WebP even exists! A truly universal container that also got basically no usage.
- chungy 3y agoWebP lossy has abysmal quality compared to JPEG, and MozJPEG closed the file size gap quite a lot to make old JPEG a clear winner over WebP. JPEG XL doesn't fall into the same trappings of basing on a video intraframe and limited chroma support.
- mikae1 3y agoYes, this. ^ > WebP seems to have about 10% better compression compared to libjpeg in most cases, except with 1500px images where the compression is about equal.[1] [1] https://siipo.la/blog/is-webp-really-better-than-jpeg https://siipo.la/blog/is-webp-really-better-than-jpeg
- MutableLambda 3y agoPersonally, I've seen JPEG XL source code and I'd rather not have it in my production, unless it's rewritten or at least security audited / Google fuzz-tested. It's a bit of a mess (the last time I checked was 6 months ago)
- cynicalsecurity 3y agoThere are millions of old devices that are never going to support new image formats. Overall, the benefits of the new formats don't overweight the negative aspects yet.