The libavif package contains a library used for encoding and decoding AVIF files.
This package is known to build and work properly using an LFS 12.4 platform.
Download (HTTP): https://github.com/AOMediaCodec/libavif/archive/v1.3.0/libavif-1.3.0.tar.gz
Download SHA256 Sum: 0a545e953cc049bf5bcf4ee467306a2f113a75110edf59e61248873101cd26c1
Download MD5 sum: e180551c0989f7e096a4440b89d6282d
Download size: 19,698.2 KB
Estimated disk space required: 21,027.1 KB
Estimated build time: less than 0.1 SBU
dav1d-1.5.2 and SVT-AV1-3.1.2 (only supports YUV420)
libaom-3.13.1 (for chroma subsampling outside YUV420)
Prepare libavif by running the following commands:
cmake -B build -G Ninja \
-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=OFFninja -C build
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:
cd build cmake -D AVIF_GTEST=LOCAL -D AVIF_BUILD_TESTS=ON ninja ninja test cd ..
Now Install the package, as the root user:
ninja -C build install
The AV1 format needs to be added to the loaders cache.
As the root user:
gdk-pixbuf-query-loaders --update-cache
-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 and 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.