]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: uapi: Add a control for HANTRO driver
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Thu, 3 Jun 2021 11:50:01 +0000 (13:50 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 8 Jun 2021 14:08:59 +0000 (16:08 +0200)
The HEVC HANTRO driver needs to know the number of bits to skip at
the beginning of the slice header.
That is a hardware specific requirement so create a dedicated control
for this purpose.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/userspace-api/media/drivers/hantro.rst [new file with mode: 0644]
Documentation/userspace-api/media/drivers/index.rst
include/media/hevc-ctrls.h

diff --git a/Documentation/userspace-api/media/drivers/hantro.rst b/Documentation/userspace-api/media/drivers/hantro.rst
new file mode 100644 (file)
index 0000000..cd9754b
--- /dev/null
@@ -0,0 +1,19 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Hantro video decoder driver
+===========================
+
+The Hantro video decoder driver implements the following driver-specific controls:
+
+``V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (integer)``
+    Specifies to Hantro HEVC video decoder driver the number of data (in bits) to
+    skip in the slice segment header.
+    If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
+    to before syntax element "slice_temporal_mvp_enabled_flag".
+    If IDR, the skipped bits are just "pic_output_flag"
+    (separate_colour_plane_flag is not supported).
+
+.. note::
+
+        This control is not yet part of the public kernel API and
+        it is expected to change.
index 1a9038f5f9fae8e708c2525ec3a9e35a481274d0..12e3c512d7185fec5602d5a36b96a3da03b836c9 100644 (file)
@@ -33,6 +33,7 @@ For more details see the file COPYING in the source distribution of Linux.
 
        ccs
        cx2341x-uapi
+        hantro
        imx-uapi
        max2175
        meye-uapi
index 1b702c3230fbd3e8e1c6d5731141af70016bd1cc..53c0038c792bc94cd316624eea5595ef0ed67cfc 100644 (file)
@@ -224,4 +224,17 @@ struct v4l2_ctrl_hevc_decode_params {
        __u64   flags;
 };
 
+/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */
+#define V4L2_CID_CODEC_HANTRO_BASE                             (V4L2_CTRL_CLASS_CODEC | 0x1200)
+/*
+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -
+ * the number of data (in bits) to skip in the
+ * slice segment header.
+ * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag"
+ * to before syntax element "slice_temporal_mvp_enabled_flag".
+ * If IDR, the skipped bits are just "pic_output_flag"
+ * (separate_colour_plane_flag is not supported).
+ */
+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0)
+
 #endif