Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: uapi: Add a control for HANTRO driver

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>

authored by

Benjamin Gaignard and committed by
Mauro Carvalho Chehab
35f51f60 31ad15e6

+33
+19
Documentation/userspace-api/media/drivers/hantro.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + Hantro video decoder driver 4 + =========================== 5 + 6 + The Hantro video decoder driver implements the following driver-specific controls: 7 + 8 + ``V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (integer)`` 9 + Specifies to Hantro HEVC video decoder driver the number of data (in bits) to 10 + skip in the slice segment header. 11 + If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" 12 + to before syntax element "slice_temporal_mvp_enabled_flag". 13 + If IDR, the skipped bits are just "pic_output_flag" 14 + (separate_colour_plane_flag is not supported). 15 + 16 + .. note:: 17 + 18 + This control is not yet part of the public kernel API and 19 + it is expected to change.
+1
Documentation/userspace-api/media/drivers/index.rst
··· 33 33 34 34 ccs 35 35 cx2341x-uapi 36 + hantro 36 37 imx-uapi 37 38 max2175 38 39 meye-uapi
+13
include/media/hevc-ctrls.h
··· 224 224 __u64 flags; 225 225 }; 226 226 227 + /* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ 228 + #define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) 229 + /* 230 + * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - 231 + * the number of data (in bits) to skip in the 232 + * slice segment header. 233 + * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" 234 + * to before syntax element "slice_temporal_mvp_enabled_flag". 235 + * If IDR, the skipped bits are just "pic_output_flag" 236 + * (separate_colour_plane_flag is not supported). 237 + */ 238 + #define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) 239 + 227 240 #endif