libavif-1.0.2

Introduction to libavif

The libavif package contains a library used for encoding and decoding AVIF files.

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

libavif Dependencies

Required

libaom-3.7.1

Recommended

Optional

gtest, libdav1d, libyuv, rav1e, and svt-av1

Installation of libavif

Install libavif by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      -DAVIF_CODEC_AOM=ON         \
      -DAVIF_BUILD_GDK_PIXBUF=ON  \
      -G Ninja .. &&
ninja

This package does come with a test suite, but it requires gtest, which is not part of BLFS.

Now, as the root user:

ninja install

The AV1 format needs to be added to the loaders cache. As the root user:

gdk-pixbuf-query-loaders --update-cache

Command Explanations

-DAVIF_CODEC_AOM=ON: This switch enables using the AOM codec. This package is useless without at least one codec built in.

-DAVIF_BUILD_GDK_PIXBUF=ON: This switch builds the AVIF loader for applications which use gdk-pixbuf. Remove it if you have not installed gdk-pixbuf-2.42.10.

-DAVIF_CODEC_DAV1D=ON: Use this switch if you have installed libdav1d and wish to use it as a codec.

-DAVIF_CODEC_RAV1E=ON: Use this switch if you have installed rav1e and wish to use it as a codec.

-DAVIF_CODEC_SVT=ON: Use this switch if you have installed svt-av1 and wish to use it as a codec.

Contents

Installed Programs: None
Installed Libraries: libavif.so and libpixbbufloader-avif.so (in /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders)
Installed Directories: /usr/include/avif and /usr/lib/cmake/libavif

Short Descriptions

libavif.so

contains functions that provide a portable C implementation of the AV1 Image Format

libpixbufloader-avif.so

allows applications which use gdk-pixbuf to read AVIF images