commit | 906d9a6d2701a7f766c1c12e06e4e6692ac889e2 | [log] [tgz] |
---|---|---|
author | Vignesh Venkatasubramanian <[email protected]> | Tue Mar 18 21:04:01 2025 +0000 |
committer | Vignesh Venkatasubramanian <[email protected]> | Tue Mar 18 21:04:02 2025 +0000 |
tree | 1b7082cb4f8166b5b863edd6ac9d598f1d354341 | |
parent | 221f23e05fe577beac1d174e5541168d6b916704 [diff] | |
parent | 963898a53d056da5ab97193fb3087e208c88dc34 [diff] |
Upgrade crabbyavif to 963898a53d056da5ab97193fb3087e208c88dc34 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crabbyavif For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I9c08ceb6216151c874236455753bb3bff230ad7c
Avif parser/decoder implementation in Rust.
Feel free to file an issue for any question, suggestion or bug report. Contributions are also welcome, see CONTRIBUTING.
git clone https://github.com/webmproject/CrabbyAvif.git # If dav1d system library can be found with pkg-config, this step can be skipped. cd CrabbyAvif/sys/dav1d-sys ./dav1d.cmd # If libyuv system library can be found with pkg-config, this step can be skipped. cd ../libyuv-sys ./libyuv.cmd cd ../.. cargo build
cargo test -- --skip test_conformance
git clone https://github.com/AOMediaCodec/av1-avif.git external/av1-avif git clone https://github.com/AOMediaCodec/libavif.git external/libavif cd external/libavif/ext ./dav1d.cmd cd .. cmake -S . -B build -DAVIF_CODEC_DAV1D=LOCAL -DAVIF_LIBYUV=OFF -DAVIF_BUILD_APPS=ON cmake --build build --parallel -t avifdec cd ../.. cargo test -- test_conformance
If you already have the av1-avif
repository checked out and the avifdec
binary available, you can point to those by setting the following environment variables:
sh CRABBYAVIF_CONFORMANCE_TEST_DATA_DIR=<path> CRABBYAVIF_CONFORMANCE_TEST_AVIFDEC=<avifdec_binary> cargo test -- test_conformance
# Build google test cd external ./googletest.cmd cd .. # Build the library with C API enabled cargo build --features capi --release # Build and run the C/C++ Tests mkdir c_build cd c_build cmake ../c_api_tests/ make make test
The decoder tests can be run on Android using dinghy.
# One time set up cargo install cargo-dinghy # Set path to NDK export ANDROID_NDK_HOME=<path_to_ndk> # Install rust toolchain for target rustup target add aarch64-linux-android # End of One time set up # Make sure the device/emulator is available via adb. cargo dinghy -d android test --no-default-features --features android_mediacodec,libyuv --target aarch64-linux-android --test decoder_tests
See the Apache v2.0 license file.