From nobody Wed Oct 8 23:44:11 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77CFE2C325B; Mon, 23 Jun 2025 16:08:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750694885; cv=none; b=iP0Y7R+qYlbKvJGKmt5koPsllQf6jVv8dycvnzoxeiGWbasF//pJXCae+nc+ZsUExF+CklM4Y6g4Nf+jlvyhgjflL9Ldr9FprzsxI6CkTB+mUYE7avixsHEV/lKcxy0YXFPKYoPtQiW2trwNN69+MsyzzkT3IUmxGHaKaC7SvmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750694885; c=relaxed/simple; bh=hjgMrwRTA3fWP6Sf+lK8Wy4pKEPzPfk2AxMPnEjNQQw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FRVYKQFBfkkkESYoalZm9V4Zr+k04TS+MC+nKylUI1kvvQah6l3rGYOPQNI4W03IMr6913JQPbNsxOS3QlvvRLHzTG9T1tfARw33p4APinY88fvxw/7WWh7Hx3MHGdGjSNNpcZdBHg8yuPUNIx4hO0tLTtNl7gf3AreunUf0b3w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=nlWBzUP6; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="nlWBzUP6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1750694882; bh=hjgMrwRTA3fWP6Sf+lK8Wy4pKEPzPfk2AxMPnEjNQQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlWBzUP6DB+1Jn+vVBslLMVPlFvaxyjeyK2ivVv9r1sen405X9zxDqTPyYf8g9iXl HZj0IPCvCA/TWIONlYOR8nspWIxkq+WZ0+7z3ZCHAyudMO/IJsrg1HSY8jmHqTu4q1 21U2NBUobIs+3jEU7t+3TZ2ozPqkzFVDJq/YLBchTf9nMEph/oyZ+kK5KFM8O+4EwU gv39r6MxQntnyaOhmi7eTbA5YvmKpfPGJlFhKZ6YvPPJ2xluOQcsfcnnPqaoempqsS vSR4/2nkyVQZF4r7XBfSk5oVZ0C1d2WY/x6kUmwVg/+eT8bDxiiZ7Yvl8bgBE5AF5V eQs7X6mvs39zg== Received: from trenzalore.hitronhub.home (unknown [23.233.251.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by bali.collaboradmins.com (Postfix) with ESMTPSA id AC8F717E3659; Mon, 23 Jun 2025 18:07:58 +0200 (CEST) From: Detlev Casanova To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Sebastian Reichel , Cristian Ciocaltea , Alexey Charkov , Dragan Simic , Jianfeng Liu , Nicolas Frattaroli , Kever Yang , Detlev Casanova , Andy Yan , Frank Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Ezequiel Garcia , Mauro Carvalho Chehab , Hans Verkuil , Ricardo Ribalda , Hans de Goede , Yunke Cao , linux-media@vger.kernel.org, kernel@collabora.com Subject: [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control Date: Mon, 23 Jun 2025 12:07:19 -0400 Message-ID: <20250623160722.55938-6-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623160722.55938-1-detlev.casanova@collabora.com> References: <20250623160722.55938-1-detlev.casanova@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some hardware (e.g.: Rockchip's rk3588 hevc decoder) need the parsed long and short term reference information for HEVC decoding. Signed-off-by: Detlev Casanova --- .../media/v4l/ext-ctrls-codec-stateless.rst | 73 +++++++++++++++++++ .../media/v4l/vidioc-queryctrl.rst | 6 ++ 2 files changed, 79 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateles= s.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst index 0da635691fdcb..745f38a8fe69c 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst @@ -2958,6 +2958,79 @@ This structure contains all loop filter related para= meters. See sections - 0x00000004 - =20 +.. c:type:: v4l2_ctrl_hevc_ext_sps_rps + +.. cssclass:: longtable + +.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_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 specificati= on. + * - __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 refere= nce picture set + semantics" of the specification. + * - __u16 + - ``abs_delta_rps_minus1`` + - Absolute delta RPS as specified in section 7.4.8 "Short-term refer= ence picture set + semantics" of the specification. + * - __u8 + - ``num_negative_pics`` + - Number of short-term RPS entries that have picture order count val= ues 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 val= ues greater than the + picture order count value of the current picture. + * - __u8 + - ``used_by_curr_pic_s0[16]`` + - Specifies if short-term RPS i (that has a negative POC) is used by= the current picture. + * - __u8 + - ``used_by_curr_pic_s1[16]`` + - Specifies if short-term RPS i (that has a positive POC) is used by= the current picture. + * - __s32 + - ``delta_poc_s0[16]`` + - Specifies the negative picture order count delta for the i-th entr= y in the short-term RPS. + See details in section 7.4.8 "Short-term reference picture set sem= antics" of the + specification. + * - __s32 + - ``delta_poc_s1[16]`` + - Specifies the positive picture order count delta for the i-th entr= y in the short-term RPS. + See details in section 7.4.8 "Short-term reference picture set sem= antics" of the + specification. + * - __u8 + - ``flags`` + - See :ref:`Extended RPS Flags ` + +.. _hevc_ext_sps_rps_flags: + +``Extended SPS RPS Flags`` + +.. cssclass:: longtable + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 1 1 2 + + * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_USED_LT`` + - 0x00000001 + - Specifies if the long-term reference picture is used 7.4.3.2.1 "Ge= neral sequence parameter + set RBSP semantics" of the specification. + * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_INTER_REF_PIC_SET_PRED`` + - 0x00000002 + - Specifies if the short-term RPS is predicted from another short te= rm RPS. See details in + section 7.4.8 "Short-term reference picture set semantics" of the = specification. + .. _v4l2-codec-stateless-av1: =20 ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)`` diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/D= ocumentation/userspace-api/media/v4l/vidioc-queryctrl.rst index 3549417c7febb..dc7caf4bf6208 100644 --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst @@ -523,6 +523,12 @@ 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_RPS`` + - n/a + - n/a + - n/a + - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_rps`, containing HEVC + extended RPS for stateless video decoders. * - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR`` - n/a - n/a --=20 2.50.0