One of the new features of Android 12 is support for the AVIF file format that provides much smaller files at the same level of quality. Jake Archibald has done a great job comparing AVIF format to JPEG, WebP, and other still picture formats, and the results are really impressive. Besides Android 12, AVIF is already supported in Chrome browser, will be enabled by default in Firefox 86, but here’s we’ll look at some of the open-source programs and libraries that allow you to manipulate AVIF pictures. With libavif library, AOMedia has published a reference implementation in C, together with avifenc and avifdec tools, that rely on various codecs, but it appears rav1e is recommended for encoding AVIF picture, while dav1d is the best choice for AVIF decoding. libavif will not automatically build the codec, and they need to be enabled in CMakeLists.txt
1 2 3 4 5 |
option(AVIF_CODEC_AOM "Use the AOM codec for encoding/decoding (see AVIF_CODEC_AOM_DECODE/AVIF_CODEC_AOM_ENCODE)" OFF) option(AVIF_CODEC_DAV1D "Use the dav1d codec for decoding" ON) option(AVIF_CODEC_LIBGAV1 "Use the libgav1 codec for decoding" OFF) option(AVIF_CODEC_RAV1E "Use the rav1e codec for encoding" ON) option(AVIF_CODEC_SVT "Use the SVT-AV1 codec for encoding" OFF) |
as well as define the path […]