-
Notifications
You must be signed in to change notification settings - Fork 10
How to encode and decode AVIF images
psi edited this page Apr 21, 2022
·
1 revision
You need to build cavif. See the build instruction in README.md.
In this document, it is assumed that cavif binary was built to ../cavif/build/cavif
.
You need to build davif. See the build instruction in README.md.
In this document, it is assumed that cavif binary was built to ../davif/build/davif
.
It is also recommended to build libavif's avifdec.
git clone [email protected]:AOMediaCodec/libavif.git
cd libavif
echo 'create build dir'
mkdir build
echo 'build zlib and libpng'
(cd ext && ./dav1d.cmd)
echo 'build dav1d'
(cd ext && ./zlibpng.cmd)
echo 'build avifdec'
cd build
cmake .. -G 'Ninja' \
-DAVIF_CODEC_DAV1D=ON \
-DAVIF_LOCAL_DAV1D=ON \
-DAVIF_LOCAL_ZLIBPNG=ON \
-DAVIF_BUILD_APPS=ON
ninja
In this document, it is assumed that cavif binary was built to ../libavif/build/avifdec
.
$ make all \
'CAVIF=../cavif/build/cavif'
$ make decode \
'DAVIF=../davif/build/davif'
This images are used to regression tests.
It is also recommended to decode created AVIF images using avifdec
from libavif. It also checks about compatibility to standards, thus it is very useful, but remind that avifdec does not crop/mirror/rotate images, so it can't be used to run regression tests.
$ make make decode-images-avifdec \
'AVIFDEC=../libavif/build/avifdec'