1 unstable release

0.1.0 Oct 1, 2023

#637 in Unix APIs

MPL-2.0 license

100KB
2.5K SLoC

Media

crates.io docs.rs License Join the XMPP chat at onix@muc.linkmauve.fr

This is a pure Rust userland for the V4L2 decoders. It currently only supports WebP (lossy, opaque, non-animated) but the goal is to also support other image formats like JPEG and AVIF, when the hardware and driver are available.

I have tested it exclusively on AllWinner platforms using the cedrus driver, namely on the A10 (Olimex Lime), A20 (Olimex Lime2) and A64 (Pine64 PinePhone). Additional testing on other platforms which support VP8 decoding would be very welcome!

The webp-drm example takes a single webp image and displays it for five seconds in the current TTY if no compositor is running. Future examples will include how to import into EGL, or how to display directly on Wayland.

How to use

Clone the repository:

% git clone https://git.linkmauve.fr/onix.git

Build:

% cargo build --release --example=webp-drm

Run, in a TTY:

% target/release/examples/webp-drm <image.webp>

Dependencies

~2MB
~39K SLoC