VP9 Codec Code in V4L2 for Hantro, Rockchip Chips Rewritten to Rust

Daniel Almeida, a developer at Collabora, recently presented a discussion on the development of the Linux kernel to support hardware video decoders in the VP9 format within the V4L2 subsystem. The V4L2 subsystem is responsible for managing access to video capture devices like web cameras and TV tuners. Almeida’s work involves rewriting the layer code in Rust, with a focus on compatibility with the rkvdec and Hantro VP9 drivers for Rockchip and Hantro chips.

The VP9 support code for V4L2 comprises approximately 2,000 lines. The decision to create an alternative implementation in Rust stems from the desire to enhance security by leveraging the language’s tools for safe memory handling. This is particularly crucial given the complexity of the algorithms used to process data from user space through the V4L2 interface. Despite being in the experimental phase, initial tests using the fluster tool to evaluate decoder compliance with reference specifications have shown identical results between the C and Rust versions.

/Reports, release notes, official announcements.