19 releases (breaking)

0.17.0+libavif.1.0.4 Jul 5, 2024
0.16.0+libavif.1.0.4 Feb 18, 2024
0.15.0 Oct 31, 2023
0.14.3 Apr 10, 2023
0.4.2 Mar 17, 2020

#996 in Images

Download history 213/week @ 2024-07-27 192/week @ 2024-08-03 357/week @ 2024-08-10 193/week @ 2024-08-17 213/week @ 2024-08-24 269/week @ 2024-08-31 229/week @ 2024-09-07 294/week @ 2024-09-14 526/week @ 2024-09-21 291/week @ 2024-09-28 181/week @ 2024-10-05 519/week @ 2024-10-12 456/week @ 2024-10-19 262/week @ 2024-10-26 295/week @ 2024-11-02 231/week @ 2024-11-09

1,302 downloads per month
Used in 8 crates (2 directly)

BSD-2-Clause

9MB
184K SLoC

C 104K SLoC // 0.1% comments Assembly 41K SLoC // 0.0% comments GNU Style Assembly 19K SLoC // 0.1% comments C++ 16K SLoC // 0.1% comments Rust 2K SLoC // 0.0% comments Bitbake 586 SLoC // 0.0% comments Perl 582 SLoC // 0.1% comments Shell 442 SLoC // 0.2% comments Java 273 SLoC // 0.4% comments CoffeeScript 141 SLoC // 0.2% comments Batch 68 SLoC BASH 40 SLoC Prolog 21 SLoC Forge Config 8 SLoC JavaScript 7 SLoC

Contains (JAR file, 60KB) gradle-wrapper.jar

libavif-sys

crates.io Documentation BSD-2-Clause licensed Rustc Version 1.62+ CI

AVIF is an image codec based on the next-generation open, royalty-free video coding format AV1.

AVIF gets compression ratios considerably better than JPEG for similar quality levels.

This crate wraps the Alliance for Open Media's libavif into an unsafe rust crate.

Minimal safe wrappers are provided by libavif and a image-compatible libavif-image.

Codec Features

This crate, by default, uses codec-dav1d for decoding and codec-rav1e for encoding, because they have the best (speed) performance. You can disable those features and instead use codec-aom.

Compiling

  • cmake is required for compiling the crate.
  • dav1d requires ninja/meson and nasm
  • rav1e is implemented in Rust and has no other dependencies (though note that libavif itself uses it via rav1e's C-API).

Platform support

This crate is tested on Linux, MacOS, and Windows.

License

This crate is released under the BSD-2-Clause license. The dependant C-libraries are released under similarly permissive licenses. Patent licenses are also provided.

Dependencies