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

#8 in #avif

Download history 270/week @ 2024-08-29 197/week @ 2024-09-05 283/week @ 2024-09-12 491/week @ 2024-09-19 326/week @ 2024-09-26 225/week @ 2024-10-03 429/week @ 2024-10-10 461/week @ 2024-10-17 339/week @ 2024-10-24 255/week @ 2024-10-31 188/week @ 2024-11-07 456/week @ 2024-11-14 373/week @ 2024-11-21 357/week @ 2024-11-28 540/week @ 2024-12-05 346/week @ 2024-12-12

1,683 downloads per month
Used in 9 crates (3 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