0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 ******************************
0004 Multi-planar format structures
0005 ******************************
0006
0007 The struct :c:type:`v4l2_plane_pix_format` structures define size
0008 and layout for each of the planes in a multi-planar format. The
0009 struct :c:type:`v4l2_pix_format_mplane` structure contains
0010 information common to all planes (such as image width and height) and an
0011 array of struct :c:type:`v4l2_plane_pix_format` structures,
0012 describing all planes of that format.
0013
0014
0015
0016 .. tabularcolumns:: |p{1.4cm}|p{4.0cm}|p{11.9cm}|
0017
0018 .. c:type:: v4l2_plane_pix_format
0019
0020 .. flat-table:: struct v4l2_plane_pix_format
0021 :header-rows: 0
0022 :stub-columns: 0
0023 :widths: 1 1 2
0024
0025 * - __u32
0026 - ``sizeimage``
0027 - Maximum size in bytes required for image data in this plane,
0028 set by the driver. When the image consists of variable length
0029 compressed data this is the number of bytes required by the
0030 codec to support the worst-case compression scenario.
0031
0032 The driver will set the value for uncompressed images.
0033
0034 Clients are allowed to set the sizeimage field for variable length
0035 compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at
0036 :ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the
0037 value itself, or it may modify the provided value based on
0038 alignment requirements or minimum/maximum size requirements.
0039 If the client wants to leave this to the driver, then it should
0040 set sizeimage to 0.
0041 * - __u32
0042 - ``bytesperline``
0043 - Distance in bytes between the leftmost pixels in two adjacent
0044 lines. See struct :c:type:`v4l2_pix_format`.
0045 * - __u16
0046 - ``reserved[6]``
0047 - Reserved for future extensions. Should be zeroed by drivers and
0048 applications.
0049
0050
0051 .. raw:: latex
0052
0053 \small
0054
0055 .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.3cm}|
0056
0057 .. c:type:: v4l2_pix_format_mplane
0058
0059 .. flat-table:: struct v4l2_pix_format_mplane
0060 :header-rows: 0
0061 :stub-columns: 0
0062 :widths: 1 1 2
0063
0064 * - __u32
0065 - ``width``
0066 - Image width in pixels. See struct
0067 :c:type:`v4l2_pix_format`.
0068 * - __u32
0069 - ``height``
0070 - Image height in pixels. See struct
0071 :c:type:`v4l2_pix_format`.
0072 * - __u32
0073 - ``pixelformat``
0074 - The pixel format. Both single- and multi-planar four character
0075 codes can be used.
0076 * - __u32
0077 - ``field``
0078 - Field order, from enum :c:type:`v4l2_field`.
0079 See struct :c:type:`v4l2_pix_format`.
0080 * - __u32
0081 - ``colorspace``
0082 - Colorspace encoding, from enum :c:type:`v4l2_colorspace`.
0083 See struct :c:type:`v4l2_pix_format`.
0084 * - struct :c:type:`v4l2_plane_pix_format`
0085 - ``plane_fmt[VIDEO_MAX_PLANES]``
0086 - An array of structures describing format of each plane this pixel
0087 format consists of. The number of valid entries in this array has
0088 to be put in the ``num_planes`` field.
0089 * - __u8
0090 - ``num_planes``
0091 - Number of planes (i.e. separate memory buffers) for this format
0092 and the number of valid entries in the ``plane_fmt`` array.
0093 * - __u8
0094 - ``flags``
0095 - Flags set by the application or driver, see :ref:`format-flags`.
0096 * - union {
0097 - (anonymous)
0098 * - __u8
0099 - ``ycbcr_enc``
0100 - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
0101 See struct :c:type:`v4l2_pix_format`.
0102 * - __u8
0103 - ``hsv_enc``
0104 - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
0105 See struct :c:type:`v4l2_pix_format`.
0106 * - }
0107 -
0108 * - __u8
0109 - ``quantization``
0110 - Quantization range, from enum :c:type:`v4l2_quantization`.
0111 See struct :c:type:`v4l2_pix_format`.
0112 * - __u8
0113 - ``xfer_func``
0114 - Transfer function, from enum :c:type:`v4l2_xfer_func`.
0115 See struct :c:type:`v4l2_pix_format`.
0116 * - __u8
0117 - ``reserved[7]``
0118 - Reserved for future extensions. Should be zeroed by drivers and
0119 applications.
0120
0121 .. raw:: latex
0122
0123 \normalsize