many linux distro shipped chromium with v4l2 decoder enabled. so I developed a v4l2 driver based on rockchip mpp library, to enable hardware accelerated video decoding.
the idea is, rockchip only maintaining a rockchip mpp library for video decoding, without a v4l2 driver. so we can build a v4l2 stateful driver bridging to a userspace mpp decoding service, and the service do real hardware decoding by mpp library.
this solution has 3 advantages:
mpp service can do some absent video processing in userspace by leveraging vulkan. for example, currently chromium 153 can only support 8 bit output, so I use vulkan to convert 10-bit video to 8 bit.
mpp service can update independently.
needs not re-compile the chromium, which is a really long long time job.
this is the result (tested with rk3588 on vender kernel 6.1.115): https://github.com/abadcafe/v4l2-stateful-rkmpp