162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci******************************
462306a36Sopenharmony_ciMulti-planar format structures
562306a36Sopenharmony_ci******************************
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciThe struct :c:type:`v4l2_plane_pix_format` structures define size
862306a36Sopenharmony_ciand layout for each of the planes in a multi-planar format. The
962306a36Sopenharmony_cistruct :c:type:`v4l2_pix_format_mplane` structure contains
1062306a36Sopenharmony_ciinformation common to all planes (such as image width and height) and an
1162306a36Sopenharmony_ciarray of struct :c:type:`v4l2_plane_pix_format` structures,
1262306a36Sopenharmony_cidescribing all planes of that format.
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci.. tabularcolumns:: |p{1.4cm}|p{4.0cm}|p{11.9cm}|
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci.. c:type:: v4l2_plane_pix_format
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci.. flat-table:: struct v4l2_plane_pix_format
2162306a36Sopenharmony_ci    :header-rows:  0
2262306a36Sopenharmony_ci    :stub-columns: 0
2362306a36Sopenharmony_ci    :widths:       1 1 2
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci    * - __u32
2662306a36Sopenharmony_ci      - ``sizeimage``
2762306a36Sopenharmony_ci      - Maximum size in bytes required for image data in this plane,
2862306a36Sopenharmony_ci	set by the driver. When the image consists of variable length
2962306a36Sopenharmony_ci	compressed data this is the number of bytes required by the
3062306a36Sopenharmony_ci	codec to support the worst-case compression scenario.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	The driver will set the value for uncompressed images.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci	Clients are allowed to set the sizeimage field for variable length
3562306a36Sopenharmony_ci	compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at
3662306a36Sopenharmony_ci	:ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the
3762306a36Sopenharmony_ci	value itself, or it may modify the provided value based on
3862306a36Sopenharmony_ci	alignment requirements or minimum/maximum size requirements.
3962306a36Sopenharmony_ci	If the client wants to leave this to the driver, then it should
4062306a36Sopenharmony_ci	set sizeimage to 0.
4162306a36Sopenharmony_ci    * - __u32
4262306a36Sopenharmony_ci      - ``bytesperline``
4362306a36Sopenharmony_ci      - Distance in bytes between the leftmost pixels in two adjacent
4462306a36Sopenharmony_ci	lines. See struct :c:type:`v4l2_pix_format`.
4562306a36Sopenharmony_ci    * - __u16
4662306a36Sopenharmony_ci      - ``reserved[6]``
4762306a36Sopenharmony_ci      - Reserved for future extensions. Should be zeroed by drivers and
4862306a36Sopenharmony_ci	applications.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci.. raw:: latex
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci    \small
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.3cm}|
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci.. c:type:: v4l2_pix_format_mplane
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci.. flat-table:: struct v4l2_pix_format_mplane
6062306a36Sopenharmony_ci    :header-rows:  0
6162306a36Sopenharmony_ci    :stub-columns: 0
6262306a36Sopenharmony_ci    :widths:       1 1 2
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci    * - __u32
6562306a36Sopenharmony_ci      - ``width``
6662306a36Sopenharmony_ci      - Image width in pixels. See struct
6762306a36Sopenharmony_ci	:c:type:`v4l2_pix_format`.
6862306a36Sopenharmony_ci    * - __u32
6962306a36Sopenharmony_ci      - ``height``
7062306a36Sopenharmony_ci      - Image height in pixels. See struct
7162306a36Sopenharmony_ci	:c:type:`v4l2_pix_format`.
7262306a36Sopenharmony_ci    * - __u32
7362306a36Sopenharmony_ci      - ``pixelformat``
7462306a36Sopenharmony_ci      - The pixel format. Both single- and multi-planar four character
7562306a36Sopenharmony_ci	codes can be used.
7662306a36Sopenharmony_ci    * - __u32
7762306a36Sopenharmony_ci      - ``field``
7862306a36Sopenharmony_ci      - Field order, from enum :c:type:`v4l2_field`.
7962306a36Sopenharmony_ci        See struct :c:type:`v4l2_pix_format`.
8062306a36Sopenharmony_ci    * - __u32
8162306a36Sopenharmony_ci      - ``colorspace``
8262306a36Sopenharmony_ci      - Colorspace encoding, from enum :c:type:`v4l2_colorspace`.
8362306a36Sopenharmony_ci        See struct :c:type:`v4l2_pix_format`.
8462306a36Sopenharmony_ci    * - struct :c:type:`v4l2_plane_pix_format`
8562306a36Sopenharmony_ci      - ``plane_fmt[VIDEO_MAX_PLANES]``
8662306a36Sopenharmony_ci      - An array of structures describing format of each plane this pixel
8762306a36Sopenharmony_ci	format consists of. The number of valid entries in this array has
8862306a36Sopenharmony_ci	to be put in the ``num_planes`` field.
8962306a36Sopenharmony_ci    * - __u8
9062306a36Sopenharmony_ci      - ``num_planes``
9162306a36Sopenharmony_ci      - Number of planes (i.e. separate memory buffers) for this format
9262306a36Sopenharmony_ci	and the number of valid entries in the ``plane_fmt`` array.
9362306a36Sopenharmony_ci    * - __u8
9462306a36Sopenharmony_ci      - ``flags``
9562306a36Sopenharmony_ci      - Flags set by the application or driver, see :ref:`format-flags`.
9662306a36Sopenharmony_ci    * - union {
9762306a36Sopenharmony_ci      - (anonymous)
9862306a36Sopenharmony_ci    * - __u8
9962306a36Sopenharmony_ci      - ``ycbcr_enc``
10062306a36Sopenharmony_ci      - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
10162306a36Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
10262306a36Sopenharmony_ci    * - __u8
10362306a36Sopenharmony_ci      - ``hsv_enc``
10462306a36Sopenharmony_ci      - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
10562306a36Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
10662306a36Sopenharmony_ci    * - }
10762306a36Sopenharmony_ci      -
10862306a36Sopenharmony_ci    * - __u8
10962306a36Sopenharmony_ci      - ``quantization``
11062306a36Sopenharmony_ci      - Quantization range, from enum :c:type:`v4l2_quantization`.
11162306a36Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
11262306a36Sopenharmony_ci    * - __u8
11362306a36Sopenharmony_ci      - ``xfer_func``
11462306a36Sopenharmony_ci      - Transfer function, from enum :c:type:`v4l2_xfer_func`.
11562306a36Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
11662306a36Sopenharmony_ci    * - __u8
11762306a36Sopenharmony_ci      - ``reserved[7]``
11862306a36Sopenharmony_ci      - Reserved for future extensions. Should be zeroed by drivers and
11962306a36Sopenharmony_ci	applications.
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci.. raw:: latex
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci    \normalsize
124