Re: [PATCH 00/14] media: Add V4L2 H.264 stateless encode and VC8000E support

From: Daniel Golle

Date: Tue Dec 01 2026 - 09:33:43 EST


Hi Paul,

On Thu, Sep 24, 2026 at 10:30:42PM +0200, Paul Kocialkowski wrote:
> > A second implementation, not just a variant of the same brand would
> > also be nice.
>
> I still have it in mind to add support for the Allwinner encoder based
> on my earlier stateful-ish attempt. Hopefully that work can be funded.

I can offer one: the Rockchip RKVENC v1 encoder of the RV1109/RV1126
("vepu541") and RK3566/RK3568 ("vepu540"). It is Rockchip's own IP,
not a Hantro derivative, and it encodes both H.264 and HEVC. I posted
a stateful RFC driver for it two weeks ago [1]. Its hardware back end
already takes a per-picture description without V4L2 types (struct
rkvenc_frame), and the GOP, picture numbering, parameter set writer
and rate control sit in separate files, so a stateless front end on
your core replaces those and keeps the back end. I have RV1126
cameras and an RK3568 board to test on.

Since you said the core and helpers change in v2, I would rather port
to v2 than to v1. Could you share your work-in-progress branch, or let
me know when it has settled enough to build a second driver on?

Two questions to plan around:

- HEVC. RKVENC v1 is used for HEVC at least as much as for H.264 on
these cameras. Is an HEVC part on your roadmap for the series, or
would you welcome a proposal on top of it once the H.264 part and
the spec are settled?
- Rate control. My driver's frame-level rate control went through a
few rounds on real camera streams; I summarised the lessons in my
reply to Nicolas's review of 02/14 [2]. I would like to feed those
into your helper instead of carrying a driver-local model.

One open point outside our two series: in the VEPU510 thread Nicolas
explained that encoders which can protect memory through an IOMMU,
like this one, are meant for the DRM-style driver with Vulkan Video
in userspace. I am asking him and Detlev in my RFC thread [1] whether
RKVENC v1 is in scope for that work. If it is not, the V4L2 stateless
driver would be the interface for this block, and the port is worth
starting.


Cheers,


Daniel


[1] https://lore.kernel.org/all/cover.1794666330.git.daniel@xxxxxxxxxxxxxx/
[2] https://lore.kernel.org/all/aw7Y5HKZhk6F7iKy@xxxxxxxxxxxxxx/