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

Configure Feed

Select the types of activity you want to include in your feed.

media: uapi: Document which mbus format fields are valid for metadata

Now that metadata mbus formats have been added, it is necessary to define
which fields in struct v4l2_mbus_format are applicable to them (not many).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Sakari Ailus and committed by
Hans Verkuil
ac5214a4 f28bdda2

+20 -13
+8 -7
Documentation/userspace-api/media/v4l/subdev-formats.rst
··· 33 33 * - __u32 34 34 - ``field`` 35 35 - Field order, from enum :c:type:`v4l2_field`. See 36 - :ref:`field-order` for details. 36 + :ref:`field-order` for details. Zero for metadata mbus codes. 37 37 * - __u32 38 38 - ``colorspace`` 39 39 - Image colorspace, from enum :c:type:`v4l2_colorspace`. ··· 45 45 conversion is supported by setting the flag 46 46 V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE in the corresponding struct 47 47 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration. 48 - See :ref:`v4l2-subdev-mbus-code-flags`. 48 + See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes. 49 49 * - union { 50 50 - (anonymous) 51 51 * - __u16 ··· 61 61 that ycbcr_enc conversion is supported by setting the flag 62 62 V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC in the corresponding struct 63 63 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration. 64 - See :ref:`v4l2-subdev-mbus-code-flags`. 64 + See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes. 65 65 * - __u16 66 66 - ``hsv_enc`` 67 67 - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`. ··· 75 75 that hsv_enc conversion is supported by setting the flag 76 76 V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC in the corresponding struct 77 77 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration. 78 - See :ref:`v4l2-subdev-mbus-code-flags` 78 + See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes. 79 79 * - } 80 80 - 81 81 * - __u16 ··· 90 90 The driver indicates that quantization conversion is supported by 91 91 setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION in the 92 92 corresponding struct :c:type:`v4l2_subdev_mbus_code_enum` 93 - during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. 94 - 93 + during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. Zero for 94 + metadata mbus codes. 95 95 * - __u16 96 96 - ``xfer_func`` 97 97 - Transfer function, from enum :c:type:`v4l2_xfer_func`. ··· 104 104 The driver indicates that the transfer function conversion is supported by 105 105 setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC in the 106 106 corresponding struct :c:type:`v4l2_subdev_mbus_code_enum` 107 - during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. 107 + during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. Zero for 108 + metadata mbus codes. 108 109 * - __u16 109 110 - ``flags`` 110 111 - flags See: :ref:v4l2-mbus-framefmt-flags
+12 -6
include/uapi/linux/v4l2-mediabus.h
··· 19 19 * @width: image width 20 20 * @height: image height 21 21 * @code: data format code (from enum v4l2_mbus_pixelcode) 22 - * @field: used interlacing type (from enum v4l2_field) 23 - * @colorspace: colorspace of the data (from enum v4l2_colorspace) 24 - * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding) 25 - * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding) 26 - * @quantization: quantization of the data (from enum v4l2_quantization) 27 - * @xfer_func: transfer function of the data (from enum v4l2_xfer_func) 22 + * @field: used interlacing type (from enum v4l2_field), zero for metadata 23 + * mbus codes 24 + * @colorspace: colorspace of the data (from enum v4l2_colorspace), zero on 25 + * metadata mbus codes 26 + * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding), zero 27 + * for metadata mbus codes 28 + * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding), zero for 29 + * metadata mbus codes 30 + * @quantization: quantization of the data (from enum v4l2_quantization), zero 31 + * for metadata mbus codes 32 + * @xfer_func: transfer function of the data (from enum v4l2_xfer_func), zero 33 + * for metadata mbus codes 28 34 * @flags: flags (V4L2_MBUS_FRAMEFMT_*) 29 35 * @reserved: reserved bytes that can be later used 30 36 */