-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lossless avif worse than a bmp in a zip file #2434
Comments
Hi, thx for the report. AVIF lossless is lossy with not quantization which makes it work great for photos but not for artificial content, where other algorithms perform better.
You can also push WebP to get an even lower size:
|
Hello, i used
What i noticed is that the larger the image is, the more likely lossless avif is to beat zipped bmp files. This one has 1363x1512, which is on the larger end already. I made a screenshot of your reply and tested it with that.
While it is nice that the
I attached all the files here: |
To test this one, i downloaded the current bing.com wallpaper and converted it to png, which outputed a 3.8 MB PNG file. While lossless avif is 10% more effective than zipping a bmp file in this case, it is also 16% larger than the PNG file. Here the files of this test: |
You are right, in a way, it is by design because there is no specific path for lossless. E.g., WebP lossless is totally different from lossy. At least, the last photo you sent can be compressed to 2.9 M using |
@uriesk May I know why |
@y-guyon |
Did you encounter issues due to repeated
Could you share the details of your use case?
The graph you linked says "PNG is used by 80.6% of all the websites", not "80.6% of images are PNGs". JPEG's market share is around 10% higher than PNG:
In some cases PNG is used for its translucency support, not for its lossless compression capabilities. |
There is something wrong with lack of design, i.e. actual "rgb" lossless compression wasn't designed at the video/av1 stage - a possible fix is stuck in the standardization step with people that have no interest in helping out a non-mpeg/jpeg design. Webp works great, is adopted everywhere - and is still being worked on, probably to add insult to injury to avif... but it's limited to 8bpp. That's one of the main gaps that jpeg-xl would be able to fill, if Google wouldn't block it with the removal from Chrome. So tl;dr for this ticket - don't be surprised if 'lossless' avif doesn't deliver vs. a lot of older solutions. Lossless avif might be your only way to get more than 8bpp into most current web browsers. |
Are you talking about YCgCo-R?
What about PNG? |
I'd have to look it up :-) - I was asking about "real" rgb-lossless avif quite a while ago in avifenc and the answer was that better performance would depend on a significant change. After that, I didn't bother with lossless avif anymore - but I'd be happy to hear about a fix.
Sure, that works - but unless it happens to be very compressible it's huge file size for web, that's why I didn't think of it. |
I noticed that lossless libavif gets beaten by PNGs and regularly even by BMPs inside a zip file.
Like here is a screenshot of this repository, once as BMP in a ZIP file, and once as AVIF.
Everything with default settings, only the lossless switch on avifenc.
The zipped BMP has 406 kB, the AVIF has 412 kB.
libavif.bmp.zip
libavif.avif.zip
(Note that the only reason why i zipped the AVIF as well, is because github doesn't allow AVIF upload. You have to extract it.)
Meanwhile both WEBP and JXL get the file down to below 250 kB in lossless mode. So i don't think that this is intentional.
The text was updated successfully, but these errors were encountered: