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

From: Nicolas Dufresne

Date: Thu Sep 24 2026 - 16:46:58 EST


Hi Paul

[...]
> By the way if you have ideas about specific problems with the stateful
> API that should not be reproduced in the stateless one, feel free to
> mention them.

Few things:

- Drain flow should be as simple as for stateless decoder, there is no
reordering, and so no holding on frames.

- Capability query should mimic the stateless decoders (but up-side down).
Basically, we don't add a pseudo unset state, that was bogus.
V4L2_FMTDESC_FLAG_ENUM_ALL could be made mandatory, this is only partially
implemented decoders today :-S

- Capture/Output S_PARM, maybe review/revisit, but likely still needed,
otherwise the rate controller can't know the rate.

- S_SELECTION, maybe make it mandatory for codec with a conformance window ?

- Of course, encoding process requires a request

- Anything about keyframe insertion can be dropped, since frame type is explicit
and per codec.

One ambiguity we have in all decoders at least is weather or not the enumerate
sized are coded or display resolution. I believe technically, all stateless
decoder exposes constraints in coded resolutions, and display resolutions are
not easily enumerated. Not a blocker, just a remark.

Hope this is helpful,
Nicolas

>
> > 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.
>
> All the best,
>
> Paul

Attachment: signature.asc
Description: This is a digitally signed message part