18 releases (breaking)

0.16.0+libavif.1.0.4 Feb 18, 2024
0.15.0 Oct 31, 2023
0.14.3 Apr 10, 2023
0.14.1 Jan 27, 2023
0.4.2 Mar 17, 2020

#8 in #avif

Download history 96/week @ 2023-12-22 187/week @ 2023-12-29 119/week @ 2024-01-05 299/week @ 2024-01-12 240/week @ 2024-01-19 243/week @ 2024-01-26 459/week @ 2024-02-02 167/week @ 2024-02-09 980/week @ 2024-02-16 343/week @ 2024-02-23 301/week @ 2024-03-01 159/week @ 2024-03-08 418/week @ 2024-03-15 181/week @ 2024-03-22 160/week @ 2024-03-29 168/week @ 2024-04-05

952 downloads per month
Used in 8 crates (2 directly)

BSD-2-Clause

8.5MB
180K SLoC

C 101K SLoC // 0.1% comments Assembly 40K SLoC // 0.0% comments GNU Style Assembly 19K SLoC // 0.1% comments C++ 16K SLoC // 0.1% comments Rust 2K SLoC // 0.0% comments Python 1.5K SLoC // 0.4% comments Perl 592 SLoC // 0.1% comments Shell 435 SLoC // 0.2% comments Java 273 SLoC // 0.4% comments CoffeeScript 141 SLoC // 0.2% comments Batch 68 SLoC Bitbake 56 SLoC // 0.1% comments BASH 38 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