Page 1 of 1

AVIF: reduce number of quality levels from 64 to 32

Posted: Tue Jan 31, 2023 1:43 pm
by Stock
I've been experimenting with the new .avif format lately.

So I've taken a .jpg image and converted it to .avif using different quality levels to learn how avif ticks.
avif settings.png
avif settings.png (10.81 KiB) Viewed 1714 times
Instead of jpg's quality percentage slider that ranges from 0% (ultrabad) to 100% (overkill),
avif has a min&max quantifier for colour
and a min&max for alpha channel.*

You may input values ranging from 0 to 63.
0 is the best.
63 is the worst.
So you'd think there are 64 possible quality levels.

I started with colour quantifier min=0 & max=30, then min=0 & max=29 and so on...
Here are the results:
why 64.png
why 64.png (7.03 KiB) Viewed 1712 times
As you can see, q29 and q28 are the same, q27 and q26 are the same etc.
Every second quality setting is redundant!

Conclusion:
Why does .avif offer 64 levels of quality, if there are in fact only 32 possible outcomes?
IMHO the possible input range should be reduced from 0-63 to 0-31.

*Note: The alpha channel quantifier only applies to images that feature transparent parts. If there are none, it does nothing.

Re: AVIF: reduce number of quality levels from 64 to 32

Posted: Sat Apr 15, 2023 10:45 am
by Kadet
All is OK, because XnView not set quality 0 to 20 but set q=10.
If You set first file q from 10 to 10, and second q from11 to 11 You will have different size files.