Daniel Almeida, who is involved in the development of video codecs at Collabora, presented a new implementation of a layer for utilizing hardware video decoders in the VP9 format within the V4L2 subsystem for discussion among Linux kernel developers. The code for the layer has been completely rewritten in Rust and is focused on working with the rkvdec and hantro drivers, which provide access to hardware video decoding acceleration available in Rockchip and Hantro chips.
The code implementing VP9 support for v4l2 contains about 2000 lines. The motivation for creating an alternative implementation in Rust is to achieve an additional level of safety by using the memory safety features provided by Rust in code that implements fairly complex algorithms and is used for processing data coming from user space through the V4L2 interface. Although the Rust implementation is still in the status of an experimental prototype open for discussion, testing with the Fluster tool, which evaluates the compliance of decoders with reference specifications, showed identical results for both the C and Rust versions.
Source: opennet.ru
