#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 10. Graphics and Font Libraries

- Prev

  Little CMS-2.19

- Next

  libexif-0.6.26

- Up
- Home

# libavif-1.4.1

## Introduction to libavif

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

### 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

- Download (HTTP): https://github.com/AOMediaCodec/libavif/archive/v1.4.1/libavif-1.4.1.tar.gz

- Download MD5 sum: 80cf307b9d7effa7cebd67423be8f5e2

- Download size: 14 MB

- Estimated disk space required: 142 MB

- Estimated build time: less than 0.1 SBU

### libavif Dependencies

#### Required

dav1d-1.5.3 and SVT-AV1-4.1.0 (only supports YUV420)

#### Recommended

libaom-3.13.3 (for chroma subsampling outside YUV420)

#### Optional

gdk-pixbuf-2.44.6, gtest, libyuv, and rav1e

### Note

An Internet connection is needed for some tests of this package. The system certificate store may need to be set up with make-ca-1.16.1 before testing this package.

## Installation of libavif

Install libavif by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr \
          -D CMAKE_BUILD_TYPE=Release  \
          -D AVIF_CODEC_AOM=SYSTEM     \
          -D AVIF_CODEC_DAV1D=SYSTEM   \
          -D AVIF_CODEC_SVT=SYSTEM     \
          -D AVIF_BUILD_GDK_PIXBUF=OFF \
          -D AVIF_LIBYUV=OFF           \
          -G Ninja .. &&
    ninja

To test the package (note that it will cause the build system to download a copy of gtest and build the test suite with the copy), issue:

    cmake .. -D AVIF_GTEST=LOCAL -D AVIF_BUILD_TESTS=ON &&
    ninja && ninja test

Now, as the `root` user:

    ninja install

## Command Explanations

`-D AVIF_CODEC_{AOM,DAV1D,SVT}=SYSTEM`: These switches enable using the AV1 codec via dav1d, libaom, and SVT-AV1. This package is useless without an AV1 encoder and decoder.

`-D AVIF_BUILD_GDK_PIXBUF=OFF`: This switch disables building the AVIF loader for applications which use gdk-pixbuf. The loader is useless when gdk-pixbuf is built with its recommended dependency glycin.

`-D AVIF_LIBYUV=OFF`: Use this switch if you have not installed libyuv.

`-D AVIF_CODEC_RAV1E=SYSTEM`: Use this switch if you have installed rav1e and wish to use it as a codec.

## Contents

Installed Programs: None
Installed Libraries: libavif.so
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

- Prev

  Little CMS-2.19

- Next

  libexif-0.6.26

- Up
- Home