HNHacker News
TopNewBestAskShowJobs

JyrkiAlakuijala

1,179 karma · joined June 29, 2016

submissionscomments
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Gainmaps don't solve 8-bit mach banding. If anything you get more banding: two bandings, one banding from each of the two 8-bit fields multiplied together.

Gainmaps "solve" the problem of computing a local tone mapping by declaring that it needs to be done at server side or at image creation time rather than at viewing time.

My prediction: Gainmaps are going to be too complex of a solution for us as a community and we are going to find something else that is easier. Perhaps we could end up standardizing a small set of local tone mapping algorithms applied at viewing time.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
This limit didn't exist in my first version as well as the 4 GB limit. These were artificially introduced to "match" the properties of lossy WebP. We could have done better there.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Also more savings will come for JPEG XL soon.

Possibly mostly focused on medium and low quality.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
I plan to add 15–25 % more quality in the ugly lowest end quality in JPEG XL in the coming two months.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
* [...] monetary or hardware costs.

We could perhaps create a GoFundMe page for making it cost neutral for Chrome's partners. Perhaps some industry partners would chime in.

* Does JPEG XL work best for the web?

Yes.

* What is JPEG XL compression performance across a broad range of images?

All of them. The more difficult it is to compress, the better JPEG XL is. It is at its best at natural images with noisy textures.

* Is the decoder fast?

Yes. See blog post.

* Does it render small images fast?

Yes. I don't have a link, but I tried it.

* Is encoding fast?

Yes. See blog post.

* Hardware support keeping encoding costs reasonable for large users.

https://www.shikino.co.jp/eng/ is building it based on libjxl-tiny.

* Do we need it at all or just optimize existing formats to meet new use-cases?

Jpegli is great. JPEG XL allows for 35 % more. It creates wealth of a few hundred billion in comparison to jpegli, in users' waiting times. So, it's a yes.

* Do other browsers and OSes support JPEG XL?

Possibly. iOS and Safari support. DNG supports. Windows and some androids don't support.

* Can it be done sufficiently well with WASM?

Wasm creates additional complexity, adds to load times, and possibly to computation times too.

Some more work is needed before all of Chrome's questions can be answered.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
It is worth noting that the JPEG XL effort produced a nice new parallelism library called Highway. This library is powering not only JPEG XL but also Google's latest Gemma AI models.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Often with this kind of pareto it can be argued that even when continuous decisions are not available, a compression system could keep choosing every second at effort 7 and every second at effort 6 (or any ratio), leading, on the average interpolated results. Naturally such interpolation does not produce straight lines in log space.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
If Rav1e found better ways of encoding, why would the aom folks copy it in libaom?
JyrkiAlakuijala··on JPEG XL and the Pareto Front
That matches my observations. I believe that WebP lossy does not add value when Jpegli is an option and is having hard time to compete even with MozJPEG.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I don't know
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I managed to add that requirement to jpeg xl. I think it will be helpful to preserve our digital legacy intact without lossy re-encodings.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Ideally one would use human ratings.

The author of the blog post did exactly that in a previous blog post:

https://cloudinary.com/labs/cid22/plots

Human ratings are expensive and clumsy so people often use computed aka objective metrics, too.

The best OSS metrics today are butteraugli, dssim and simulacra. The author is using one of them. None of the codecs was optimized for that metrics except jpegli partially.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
It is consistent to what I have seen. Both in metrics and in eyeballing. Mozjpeg gives good results around quality 75, but less good at 90+++
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I edited the answer into the previous message for better flow.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I made a mistake there with subtract green.

If I had just added 128 to the residuals, all remaining prediction arithmetic would have worked better and it would have given 1 % more density.

This is because most related arithmetic for predicting pixels is done in unsigned 8 bit arithmetic. Subtract green moves such predictions to often cross the 0 -> 255 boundary, and then averaging, deltas etc make little sense and add to the entropy.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
I believe it is more fundamental. I like to think that AV1 entropy coding just becomes ineffective for large values. Large values are dominantly present in high quality photography and in lossless coding. Large values are repeatedly prefix coded and this makes effective adaptation of the statistics difficult for large integers. This is a fundamental difference and not a minor difference in focus.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I try to make a bulletin point list of the individual concerns, the original statement is written in a style that is a bit confusing for a non-native speaker such as me.

* Chrome's browser partners say JPEG XL adds monetary or hardware costs.

* Chrome's device partners say JPEG XL adds monetary or hardware costs.

* Does JPEG XL work best for the web?

* What is JPEG XL compression performance across a broad range of images?

* Is the decoder fast?

* Does it render small images fast?

* Is encoding fast?

* Hardware support keeping encoding costs reasonable for large users.

* Do we need it at all or just optimize existing formats to meet new use-cases?

* Do other browsers and OSes support JPEG XL?

* Can it be done sufficiently well with WASM?

JyrkiAlakuijala··on JPEG XL and the Pareto Front
I believe that Google's patent application dealt with interleaving non-compressed and ANS data in a manner that made streaming coding easy and fast in software, not a general ANS patent. I didn't read it but discussed shortly about it with a capable engineer who had.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Thank you! <3

WebP also has a near-lossless encoding mode based on lossless WebP specification that is mostly unadvertised, but should be preferred over real lossless in almost every use case. Often you can half the size without additional visible loss.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
Agreed. For web use they all decode fast enough. Any time difference might be in progression or streaming decoding, vs. waiting for all the data to arrive before starting to decode.

For image gallery use of camera resolution photographs (12-50 Mpixels) it can be more fun to have 100+ Mpixels/s, even 300 Pixels/s.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
I wasn't able to convince myself about that when approaching that question with with back-off-the-envelope calculation, published research and prototypes.

Very few applications are constantly decoding images. Today a single image is often decided in a few milliseconds, but watched 1000x longer. If you 10x or even 100x energy consumption of image decoding, it is still not going to compete with display, radio and video decoding as a battery drain.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
I like to think that there might be an easy way to improve AV2 today — drop the whole keyframe coding and replace it with JPEG XL images as keyframes.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
I followed Mozilla/Firefox integration closely. I was able to observe enthusiasm from their junior to staff level engineers (linkedin-assisted analysis of the related bugs ;-). However, an engineering director stepped in and locked the discussions because they were in "no new information" stage, and their position has been neutral on JPEG XL, and the integration has not progressed from the nightly builds to the next stage.

Ten years ago Mozilla used to have the most prominent image and video compression effort called Daala. They posted inspiring blog posts about their experiments. Some of their work was integrated with Cisco's Thor and On2's/Chrome's VP8/9/10, leading to AV1 and AVIF. Today, I believe, Mozilla has focused away from this research and the ex-Daala researchers have found new roles.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
Why not take Chrome's word for it:

---cut---

Helping the web to evolve is challenging, and it requires us to make difficult choices. We've also heard from our browser and device partners that every additional format adds costs (monetary or hardware), and we’re very much aware that these costs are borne by those outside of Google. When we evaluate new media formats, the first question we have to ask is whether the format works best for the web. With respect to new image formats such as JPEG XL, that means we have to look comprehensively at many factors: compression performance across a broad range of images; is the decoder fast, allowing for speedy rendering of smaller images; are there fast encoders, ideally with hardware support, that keep encoding costs reasonable for large users; can we optimize existing formats to meet any new use-cases, rather than adding support for an additional format; do other browsers and OSes support it?

After weighing the data, we’ve decided to stop Chrome’s JPEG XL experiment and remove the code associated with the experiment. [...]

From: https://groups.google.com/a/chromium.org/g/blink-dev/c/WjCKc...

JyrkiAlakuijala··on JPEG XL and the Pareto Front
That ANS patent supposedly relates to refining the coding tables based on symbols being decided.

It is slower for decoding and Jpeg xl does not do that for decoding speed reasons.

The specification doesn't allow it. All coding tables need to be in final form.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
While WebP lossy still has image quality issues it has improved a lot over the years. One should not consider a comparison done with 2010-2015 implementations indicative of quality performance today.
JyrkiAlakuijala··on JPEG XL and the Pareto Front
Pik was designed initially without quality options only to do the best there is to achieve distance 1.0.

We kept a lot of focus on visually lossless and I didn't want to add format features which would add complexity but not help at high quality settings.

In addition to modeling features, the context modeling and efficiency of entropy coding is critical at high quality. I consider AVIFs entropy coding ill-suited for high quality or lossless photography.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
Is rav1e pareto-curve ahead of libaom pareto-curve?

Does fast rav1e look better than jpegli at high encode speeds?

JyrkiAlakuijala··on JPEG XL and the Pareto Front
During the design process of pik/jpeg xl I experimented on decode speed as a personal experience to have an opinion about this. I tried a special version of chrome that artificially throttled the image decoding. Once the decoding speed gets into the 20 megapixels per second the feeling coming from the additional speed was difficult to notice. I tried 2, 20 and 200 megapixels per second throttlings. This naturally depends on image sizes and uses too.

There was a much more easy to notice impact from progressive images and even sequential images displayed in a streaming manner during the download. As a rule of thumb, sequential top-to-bottom streaming feels 2x faster as a waiting rendering, and progressive feels 2x faster than sequential streaming.

JyrkiAlakuijala··on JPEG XL and the Pareto Front
It is because JPEG is given 0.5 bits per pixel, where JPEG XL and AVIF are given around 0.22 and 0.2.

These images attempt to be at equal level of distortion, not at equal compression.

Bpps are reported beside the images.

In practice, use of quality 65 is rare in the internet and only used at the lowest quality tier sites. Quality 75 seems to be usual poor quality and quality 85 the average. I use quality 94 yuv444 or better when I need to compress.

← PreviousPage 5 of 13Next →