Daniel Almeida, who works development video codecs from Collabora, presented for Linux kernel developers to discuss a new implementation of a layer for using hardware video decoders in the VP9 format in the V4L2 subsystem, used to provide access to video capture devices such as web cameras and TV tuners. The layer code is completely rewritten in Rust and is focused on working with drivers rkvdec And hantroproviding access to video decoding acceleration hardware available in Rockchip and Hantro chips.
The code implementing VP9 support for v4l2 takes about 2000 lines. The reason cited for creating an alternative implementation in Rust is the desire to achieve an additional level of security by using Rust's memory-safe features in code that implements fairly complex algorithms and is used to process data coming from user space through the V4L2 interface. Despite the fact that the implementation in Rust still has the status of an experimental prototype put up for discussion, when testing with the package Flusterwhich evaluates the compliance of decoders with reference specifications, the C and Rust versions showed identical results.
Thanks for reading: