AVIF Support

XnConvert Multi Platform - Windows, MacOSX, Linux
Post Reply
-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: 34089
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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: 34089
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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: 5617
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);
Post Reply