Re: [PATCH 04/14] media: h264: Add stateless encode core
From: Nicolas Dufresne
Date: Tue Nov 17 2026 - 16:37:43 EST
Hi,
Le vendredi 22 mai 2026 à 12:16 +0200, Paul Kocialkowski a écrit :
> The H.264 stateless encode core is the common implementation called by
> drivers to coordinate stateless encoding. It provides all the relevant
> configuration parameters to drivers, through a state mechanism.
>
> States are built from controls (some of which are optional) with various
> inter-control checks along the way. A state can be constrained by the
> driver through a dedicated operation callback in order to disable
> unsupported features that may have been requested by userspace.
> The general philosophy is to adapt parameters provided by userspace to
> reach a state that can be handled by the hardware and bail out if no
> such accommodation can be made.
>
> Adapted parameters are returned to userspace by updating the controls.
> This is currently not attached to the inbound media request but should
> be when support for it becomes available.
>
> Signed-off-by: Paul Kocialkowski <paulk@xxxxxxxxxxx>
>
Nice idea.
> +
> +static void state_debug(struct v4l2_h264_enc *enc)
> +{
> + struct v4l2_h264_enc_state *state = &enc->state_active;
> + struct v4l2_ctrl_h264_sps *sps = &state->sps;
> + struct v4l2_ctrl_h264_pps *pps = &state->pps;
> + struct v4l2_ctrl_h264_encode_params *encode = &state->encode;
> +
> + pr_debug("+ v4l2-h264-enc: state");
Imagine you get two of these concurrently tracing, it will be hard to see what
is what, consider combining like we do for ref list.
Nicolas
Attachment:
signature.asc
Description: This is a digitally signed message part