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

#1007 in Images

Download history 258/week @ 2024-07-31 219/week @ 2024-08-07 315/week @ 2024-08-14 205/week @ 2024-08-21 230/week @ 2024-08-28 234/week @ 2024-09-04 247/week @ 2024-09-11 497/week @ 2024-09-18 368/week @ 2024-09-25 220/week @ 2024-10-02 399/week @ 2024-10-09 447/week @ 2024-10-16 401/week @ 2024-10-23 162/week @ 2024-10-30 260/week @ 2024-11-06 313/week @ 2024-11-13

1,229 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