Hacker News new | ask | show | jobs
by xoa 1159 days ago
So right away on the first item:

>Max image size is limited to 4K (3840x2160) in AVIF, which is a deal breaker to me. You can tile images, but seams are visible at the edges, which makes this unusable. JPEG XL supports image sizes of up to 1,073,741,823x1,073,741,824. You won’t run out of image space anytime soon.

>JXL has a maximum of 32 bits per channel. AVIF supports up to 10.

Max resolution and bit depth is certainly massively higher for for JPEG XL, but spec [0] says that:

>"NOTE: [AV1] supports 3 bit depths: 8, 10 and 12 bits, and the maximum dimensions of a coded image is 65536x65536, when seq_level_idx is set to 31 (maximum parameters level)."

And 12-bits per channel is considered a lot for end user final display formats? It also seems to be supported in browsers too so it's not just theoretical. It looks like back in 2021 there was discussion around this and clarifying that the profiles decided on in 2018/2019 were more about giving targets for hardware acceleration of the time, but software decoders by 2021 supported essentially the whole spec (and it appears to me that another 2 years later now final lingering stuff has been dealt with) [1,2]:

>Cyril has proposed a pull request (#130) to better clarify what is and is not supported in AVIF. In short, AVIF supports everything that AV1 supports, which includes 12-bit encoding. The current software decoder implementations also support more or less all of AV1, which can be seen if you try to decode a 12-bit AVIF file in a web browser.

And for still images, hardware acceleration isn't important, so as a practical matter unlike AV1 video pure software for max features is fine. So 65k x 65k and 36-bit color appear to be the limit, which definitely isn't as much as JPEG XL, but is pretty respectable for majority of end user usage?

Edit to add: the comments there also mention complaints that the JPEG XL author has a history of spreading misinformation about AVIF, "See the article and infographic recently posted by the JPEG-XL author that claims (among other things) that AVIF does not support 12-bit images". So apparently there has been some good old dev drama going on during the last few years which means one may need to be a little suspicious about any "Good summaries" :(.

----

0: https://aomediacodec.github.io/av1-avif/#profiles-overview

1: https://github.com/AOMediaCodec/av1-avif/issues/128

2: https://github.com/AOMediaCodec/av1-avif/pull/130

3 comments

> And 12-bits per channel is considered a lot for end user final display formats?

WebP and AVIF introduced a bifurcation between general purpose image formats and ‘end user final display formats’ (i.e. internet delivery to consumer entertainment devices). I don't think this is a good thing.

> and the maximum dimensions of a coded image is 65536x65536

As pointed out in another comment, this is less of 65536 by 65536 and more of 65536* by 65536* if you followed some more complicated steps. Considering that the original JPEG supports that without relying internally on multiple images (the trick AVIF used to "support" the full 65536 by 65536), it seems not suitable for software which writes images in one pass.

No, it's AV1 that uses (up to) 16-bit fields for image dimensions. HEIF grids, which is the AVIF feature that combines multiple AV1 images into one, have 32-bit fields for dimensions so are limited only by what the decoder is willing to allocate.
Claiming someone to 'spread misinformation' is not helpful. All the people related to compression that I know are trying their best to find the technically best solution by ethically best means. No dirty fighting observed.

Check the site out:

https://cloudinary.com/blog/time_for_next_gen_codecs_to_deth...

"Meanwhile, it has been clarified that the AVIF limits listed above apply to the highest currently defined AVIF profile (the “Advanced” profile). It is also possible to use AVIF without a profile, and then the AV1 limits apply: a precision of up to 12-bit, and maximum dimensions of up to 65535x65535 (or more using grids). For HEIC, it is possible to use the container with a HEVC payload with a precision of up to 16-bit and with 4:4:4, although most hardware implementations do not support that."

Some related worries:

No AVIF implementation supports all what the clarification there claims. Sometimes it has happened that the implementations led to the practical standardization, instead of what is written in the spec.

No one has yet seen the tile grid artefacts. One could expect that there will be barely visible stripes extending from one side of the image to the other, and from bottom to top. This would be because of 'loop filtering' and 'noise synthesis' states not shared between frames.

No one really knows how the coding performance is for 12-bit photographs. AV1 needs to double escape large values which can reduce entropy coding performance of large values. Lossless coding commonly codifies larger values than lossy (due to less quantization). One might be able to observe this in the performance of the lossless coding.

No one knows how much progressive AVIF will compress. The implementation doesn't exist yet. The progressive approach chosen is new, very different from JPEG1/JPEG XL approach. It will be interesting to learn about its performance.