From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Detlev Casanova <detlev.casanova@collabora.com>,
linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Heiko Stuebner <heiko@sntech.de>,
Ricardo Ribalda <ribalda@chromium.org>,
Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <hansg@kernel.org>, Yunke Cao <yunkec@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
James Cowgill <james.cowgill@blaize.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, kernel@collabora.com,
Jonas Karlman <jonas@kwiboo.se>,
Diederik de Haas <didi.debian@cknow.org>
Subject: Re: [PATCH v8 01/17] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_[ls]t_rps controls
Date: Sun, 18 Jan 2026 16:48:48 -0500 [thread overview]
Message-ID: <7b8e631d6d0dcbd7c91a6a6e64253e86697938e3.camel@collabora.com> (raw)
In-Reply-To: <20260109161538.1294449-2-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 9262 bytes --]
Le vendredi 09 janvier 2026 à 11:15 -0500, Detlev Casanova a écrit :
> Some hardware (e.g.: Rockchip's rk3588 hevc decoder) need to fully parse
> the slice header, which cannot be passed with the current controls.
> There is also no skip method similar as to what can be found in
> verisilicon HW.
>
> The SPS is therefore extended through these 2 new controls, providing the
> long and short term reference information from the slice header for HEVC
> decoding.
>
> These now controls are similar as what is passed in the Vulkan Video API
> with the StdVideoH265ShortTermRefPicSet and StdVideoH265LongTermRefPicsSps
> structures embedded in the SPS struct.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> .../media/v4l/ext-ctrls-codec-stateless.rst | 120 ++++++++++++++++++
> .../media/v4l/videodev2.h.rst.exceptions | 2 +
> .../media/v4l/vidioc-queryctrl.rst | 12 ++
> 3 files changed, 134 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> index 497ae74379f6..3b1e05c6eb13 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> @@ -2959,6 +2959,126 @@ This structure contains all loop filter related parameters. See sections
> - 0x00000004
> -
>
> +``V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (struct)``
> + Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
> + It extends it with the list of Long-term reference sets parameters.
> + These parameters are defined according to :ref:`hevc`.
> + They are described in section 7.4.3.2.1 "General sequence parameter set
> + RBSP semantics" of the specification.
> + This control is a dynamically sized 1-dimensional array.
> + The values in the array should be ignored when either
> + num_long_term_ref_pics_sps is 0 or the
> + V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT flag is not set in
> + :c:type:`v4l2_ctrl_hevc_sps`.
> +
> +.. c:type:: v4l2_ctrl_hevc_ext_sps_lt_rps
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_lt_rps
> + :header-rows: 0
> + :stub-columns: 0
> + :widths: 1 1 2
> +
> + * - __u16
> + - ``lt_ref_pic_poc_lsb_sps``
> + - Long term reference picture order count as described in section 7.4.3.2.1
> + "General sequence parameter set RBSP semantics" of the specification.
> + * - __u16
> + - ``flags``
> + - See :ref:`Extended Long-Term RPS Flags <hevc_ext_sps_lt_rps_flags>`
> +
> +.. _hevc_ext_sps_lt_rps_flags:
> +
> +``Extended SPS Long-Term RPS Flags``
> +
> +.. cssclass:: longtable
> +
> +.. flat-table::
> + :header-rows: 0
> + :stub-columns: 0
> + :widths: 1 1 2
> +
> + * - ``V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT``
> + - 0x00000001
> + - Specifies if the long-term reference picture is used 7.4.3.2.1 "General sequence parameter
> + set RBSP semantics" of the specification.
> +
> +``V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (struct)``
> + Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
> + It extends it with the list of Short-term reference sets parameters.
> + These parameters are defined according to :ref:`hevc`.
> + They are described in section 7.4.8 "Short-term reference picture set
> + semantics" of the specification.
> + This control is a dynamically sized 1-dimensional array.
> + The values in the array should be ignored when
> + num_short_term_ref_pic_sets is 0.
> +
> +.. c:type:: v4l2_ctrl_hevc_ext_sps_st_rps
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_st_rps
> + :header-rows: 0
> + :stub-columns: 0
> + :widths: 1 1 2
> +
> + * - __u8
> + - ``delta_idx_minus1``
> + - Specifies the delta compare to the index. See details in section 7.4.8 "Short-term
> + reference picture set semantics" of the specification.
> + * - __u8
> + - ``delta_rps_sign``
> + - Sign of the delta as specified in section 7.4.8 "Short-term reference picture set
> + semantics" of the specification.
> + * - __u8
> + - ``num_negative_pics``
> + - Number of short-term RPS entries that have picture order count values less than the
> + picture order count value of the current picture.
> + * - __u8
> + - ``num_positive_pics``
> + - Number of short-term RPS entries that have picture order count values greater than the
> + picture order count value of the current picture.
> + * - __u32
> + - ``used_by_curr_pic``
> + - Bit i specifies if short-term RPS i is used by the current picture.
> + * - __u32
> + - ``use_delta_flag``
> + - Bit i specifies if short-term RPS i is included in the short-term RPS entries.
> + * - __u16
> + - ``abs_delta_rps_minus1``
> + - Absolute delta RPS as specified in section 7.4.8 "Short-term reference picture set
> + semantics" of the specification.
> + * - __u16
> + - ``delta_poc_s0_minus1[16]``
> + - Specifies the negative picture order count delta for the i-th entry in the short-term RPS.
> + See details in section 7.4.8 "Short-term reference picture set semantics" of the
> + specification.
> + * - __u16
> + - ``delta_poc_s1_minus1[16]``
> + - Specifies the positive picture order count delta for the i-th entry in the short-term RPS.
> + See details in section 7.4.8 "Short-term reference picture set semantics" of the
> + specification.
> + * - __u16
> + - ``flags``
> + - See :ref:`Extended Short-Term RPS Flags <hevc_ext_sps_st_rps_flags>`
> +
> +.. _hevc_ext_sps_st_rps_flags:
> +
> +``Extended SPS Short-Term RPS Flags``
> +
> +.. cssclass:: longtable
> +
> +.. flat-table::
> + :header-rows: 0
> + :stub-columns: 0
> + :widths: 1 1 2
> +
> + * - ``V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED``
> + - 0x00000001
> + - Specifies if the short-term RPS is predicted from another short term RPS. See details in
> + section 7.4.8 "Short-term reference picture set semantics" of the specification.
> +
> .. _v4l2-codec-stateless-av1:
>
> ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
> diff --git a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
> index c41693115db6..6182b4e2d2ee 100644
> --- a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
> +++ b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
> @@ -150,6 +150,8 @@ replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_H264_PRED_WEIGHTS :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_H264_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_H264_DECODE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
> +replace symbol V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS :c:type:`V4L.v4l2_ctrl_type`
> +replace symbol V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`V4L.v4l2_ctrl_type`
> replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> index c8baa9430c14..82c8b52e771c 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> @@ -531,6 +531,18 @@ See also the examples in :ref:`control`.
> - n/a
> - A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
> decoding parameters for stateless video decoders.
> + * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS``
> + - n/a
> + - n/a
> + - n/a
> + - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_lt_rps`, containing HEVC
> + extended Long-Term RPS for stateless video decoders.
> + * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS``
> + - n/a
> + - n/a
> + - n/a
> + - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_st_rps`, containing HEVC
> + extended Short-Term RPS for stateless video decoders.
> * - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``
> - n/a
> - n/a
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-01-18 21:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 16:15 [PATCH v8 00/17] media: rkvdec: Add support for VDPU381 and VDPU383 Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 01/17] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2026-01-18 21:48 ` Nicolas Dufresne [this message]
2026-01-09 16:15 ` [PATCH v8 02/17] media: v4l2-ctrls: Add hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2026-01-18 21:52 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 03/17] media: visl: Add HEVC short and long term RPS sets Detlev Casanova
2026-01-18 21:57 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 04/17] media: rkvdec: Switch to using structs instead of writel Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 05/17] media: rkvdec: Move cabac tables to their own source file Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 06/17] media: rkvdec: Use structs to represent the HW RPS Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 07/17] media: rkvdec: Move h264 functions to common file Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 08/17] media: rkvdec: Move hevc " Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 09/17] media: rkvdec: Add variant specific coded formats list Detlev Casanova
2026-01-18 22:02 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 10/17] media: rkvdec: Add RCB and SRAM support Detlev Casanova
2026-01-18 22:08 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 11/17] media: rkvdec: Support per-variant interrupt handler Detlev Casanova
2026-01-18 22:10 ` Nicolas Dufresne
2026-01-18 22:12 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 12/17] media: rkvdec: Enable all clocks without naming them Detlev Casanova
2026-01-09 16:15 ` [PATCH v8 13/17] media: rkvdec: Disable multicore support Detlev Casanova
2026-01-18 22:13 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 14/17] media: rkvdec: Add H264 support for the VDPU381 variant Detlev Casanova
2026-01-09 20:37 ` Diederik de Haas
2026-01-18 22:18 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 15/17] media: rkvdec: Add H264 support for the VDPU383 variant Detlev Casanova
2026-01-18 22:20 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 16/17] media: rkvdec: Add HEVC support for the VDPU381 variant Detlev Casanova
2026-01-18 22:25 ` Nicolas Dufresne
2026-01-09 16:15 ` [PATCH v8 17/17] media: rkvdec: Add HEVC support for the VDPU383 variant Detlev Casanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b8e631d6d0dcbd7c91a6a6e64253e86697938e3.camel@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=corbet@lwn.net \
--cc=detlev.casanova@collabora.com \
--cc=didi.debian@cknow.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=hansg@kernel.org \
--cc=heiko@sntech.de \
--cc=hverkuil@kernel.org \
--cc=james.cowgill@blaize.com \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®