AVIF Support

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

-oX-
Posts: 23
Joined: Fri Dec 23, 2011 7:53 am

AVIF Support

Post by -oX- »

AVIF is the imagepart of new upcoming AV1-Videoformat (free, open, replace webp)
AVIF seems to be better then HEIF (not free)

do you plan to support this WEBP-Follower?

Windows 10 2019 H1 Update adds AVIF-Support
its possible to use this via WIC (Windows Image Component)?
User avatar
xnview
Author of XnView
Posts: 44883
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: AVIF Support

Post by xnview »

yes i would like to add support, do you have AVIF samples?
Pierre.
-oX-
Posts: 23
Joined: Fri Dec 23, 2011 7:53 am

Re: AVIF Support

Post by -oX- »

https://www.reddit.com/r/AV1/comments/a ... le_format/

important to know - its use the a HEIF container
-oX-
Posts: 23
Joined: Fri Dec 23, 2011 7:53 am

Re: AVIF Support

Post by -oX- »

another way is to support the WIC (Windows Image Component)
if the AVIF-Extension is installed (Windows Store) all Programs use WIC automatically support AVIF
User avatar
xnview
Author of XnView
Posts: 44883
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: AVIF Support

Post by xnview »

-oX- wrote: Wed Jun 26, 2019 8:24 pm another way is to support the WIC (Windows Image Component)
if the AVIF-Extension is installed (Windows Store) all Programs use WIC automatically support AVIF
a WIC extension for AVIF exits?
Pierre.
hexorin378
Posts: 1
Joined: Sun Apr 12, 2020 9:14 pm

Re: AVIF Support

Post by hexorin378 »

You can simply convert using an official codec https://github.com/AOMediaCodec/libavif
User avatar
XnTriq
Moderator & Librarian
Posts: 6387
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: AVIF Support

Post by XnTriq »

xnview wrote: Mon Mar 23, 2020 10:17 am
• Quantizer for color -->
Quantization of color

• Quantizer for alpha -->
Quantization of alpha channel
I use the term of AVIF library
@Pierre:: Is Quantizer for color/alpha in XnView's DlgWriteAvif.ui responsible for the min/max Q and the minalpha/maxalpha Q parameters of the encoder?

<PS>

OK, I've found these strings in xnview.exe, …

Code: Select all

AvifColorLossless AvifColorMin AvifColorMax
AvifAlphaLossless AvifAlphaMin AvifAlphaMax

Code: Select all

cbColorLossless sbColorMin sbColorMax
cbAlphaLossless sbAlphaMin sbAlphaMax
… which kinda sorta answers my question.

</PS>
https://joedrago.github.io/colorist/docs/Usage.html wrote:

Code: Select all

-q, –quality
Choose a lossy quality (0-100) for any output file format that supports it (JPG, JP2 if not using -2, WebP). The lower the value, the lower the file size and quality. For WebP and JP2 (without -2), 100 is lossless.

See --quantizer for an explanation of how quality is mapped to AVIF encoding.

Code: Select all

–quantizer MIN,MAX
Quantizer Ranges: 0-63

The quality emitted by AVIF encoder is controlled by two quantizer values (a minimum and maximum). The higher these numbers are, the worse the image quality will be. For example, choosing [0,0] will create a lossless AVIF, and choosing [63,63] will encode something that barely looks like the original image.

If this option isn't used, colorist will map the single -q quality value to these, by slowly ramping up the maximum quantizer first as you turn down the quality from 100, until it caps out at 63 (e.g. Q=99 will have a max quantizer of 1). The min quantizer will begin to ramp up from 0 in the 60s until it hits 63 right at Q=1, making Q=1 have quantizer settings of [63,63].

Due to how the encoder uses these values, there can be a bit of a plateau in the Q30-Q50 range, but dual ramp provides a reasonable single dial for quality. Q100->Q60 has a reasonable descent in quality, and Q30->Q1 really trashes the image.

Use this option if you want to specify your own min/max quantizers instead.
https://github.com/link-u/cavif wrote:

Code: Select all

        q           Constant Quality
        cq          Constrained Quality
        --bit-rate  Bit rate of output image.
        --crf       CQ Level in CQ rate control mode
        --qmin      Minimum (Best Quality) Quantizer
        --qmax      Maximum (Worst Quality) Quantizer
        --adaptive-quantization
                    Set adaptive-quantization mode
https://github.com/AOMediaCodec/libavif/blob/master/apps/avifenc.c wrote:

Code: Select all

    printf("    --min Q                           : Set min quantizer for color (%d-%d, where %d is lossless)\n",
           AVIF_QUANTIZER_BEST_QUALITY,
           AVIF_QUANTIZER_WORST_QUALITY,
           AVIF_QUANTIZER_LOSSLESS);
    printf("    --max Q                           : Set max quantizer for color (%d-%d, where %d is lossless)\n",
           AVIF_QUANTIZER_BEST_QUALITY,
           AVIF_QUANTIZER_WORST_QUALITY,
           AVIF_QUANTIZER_LOSSLESS);
    printf("    --minalpha Q                      : Set min quantizer for alpha (%d-%d, where %d is lossless)\n",
           AVIF_QUANTIZER_BEST_QUALITY,
           AVIF_QUANTIZER_WORST_QUALITY,
           AVIF_QUANTIZER_LOSSLESS);
    printf("    --maxalpha Q                      : Set max quantizer for alpha (%d-%d, where %d is lossless)\n",
           AVIF_QUANTIZER_BEST_QUALITY,
           AVIF_QUANTIZER_WORST_QUALITY,
           AVIF_QUANTIZER_LOSSLESS);
User avatar
oakside
Posts: 14
Joined: Thu Nov 07, 2013 7:58 pm

Re: AVIF Support

Post by oakside »

Will AVIF get a "quality" setting in XnConvert (and XnView) in the near future? Currently, there is no easy way to set quality (1-100, like others). XnView only has quantization parameters (as detailed above, color, alpha), and a couple other settings (format, speed). Or perhaps I've misunderstood this topic.

Update: I've moved my interest to JPEG-XL. It's fantastic (give it a try in XnView), ready to go right now for everyone (easy to use, speedy, lossless option, etc), only needs recognition and adoption. I would characterize AV1 and AVIF as being very interesting and promising but still nowhere near ready for mass consumption (due to speed, ease of use, etc).
Last edited by oakside on Tue Jan 31, 2023 1:43 pm, edited 3 times in total.
User avatar
Stock
Posts: 36
Joined: Wed Oct 12, 2022 3:33 pm

Re: AVIF Support

Post by Stock »

oakside wrote: Wed Sep 28, 2022 3:54 pm Will AVIF get a "quality" setting [...]? Currently, there is no easy way to set quality (1-100, like others).
Well, that's how you set the quality.
I've posted about this.