]> git.baikalelectronics.ru Git - kernel.git/commit
media: videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 8 Jul 2022 16:21:40 +0000 (17:21 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 15 Jul 2022 15:17:31 +0000 (16:17 +0100)
commite5455affe6d3137f52d47396a1f896502592041c
treedd3e899b19fef36aae1029dcf6a150bee5c1c068
parent021da5bbd7a3110ec59e858976eeb8b82cbcced0
media: videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY

Add a new flag that indicates that this control is a dynamically sized
array. Also document this flag.

Currently dynamically sized arrays are limited to one dimensional arrays,
but that might change in the future if there is a need for it.

The initial use-case of dynamic arrays are stateless codecs. A frame
can be divided in many slices, so you want to provide an array containing
slice information for each slice. Typically the number of slices is small,
but the standard allow for hundreds or thousands of slices. Dynamic arrays
are a good solution since sizing the array for the worst case would waste
substantial amounts of memory.

Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Tested-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
Documentation/userspace-api/media/videodev2.h.rst.exceptions
include/uapi/linux/videodev2.h