18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci******************************
48c2ecf20Sopenharmony_ciMulti-planar format structures
58c2ecf20Sopenharmony_ci******************************
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThe struct :c:type:`v4l2_plane_pix_format` structures define size
88c2ecf20Sopenharmony_ciand layout for each of the planes in a multi-planar format. The
98c2ecf20Sopenharmony_cistruct :c:type:`v4l2_pix_format_mplane` structure contains
108c2ecf20Sopenharmony_ciinformation common to all planes (such as image width and height) and an
118c2ecf20Sopenharmony_ciarray of struct :c:type:`v4l2_plane_pix_format` structures,
128c2ecf20Sopenharmony_cidescribing all planes of that format.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci.. c:type:: v4l2_plane_pix_format
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci.. flat-table:: struct v4l2_plane_pix_format
218c2ecf20Sopenharmony_ci    :header-rows:  0
228c2ecf20Sopenharmony_ci    :stub-columns: 0
238c2ecf20Sopenharmony_ci    :widths:       1 1 2
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci    * - __u32
268c2ecf20Sopenharmony_ci      - ``sizeimage``
278c2ecf20Sopenharmony_ci      - Maximum size in bytes required for image data in this plane,
288c2ecf20Sopenharmony_ci	set by the driver. When the image consists of variable length
298c2ecf20Sopenharmony_ci	compressed data this is the number of bytes required by the
308c2ecf20Sopenharmony_ci	codec to support the worst-case compression scenario.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	The driver will set the value for uncompressed images.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci	Clients are allowed to set the sizeimage field for variable length
358c2ecf20Sopenharmony_ci	compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at
368c2ecf20Sopenharmony_ci	:ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the
378c2ecf20Sopenharmony_ci	value itself, or it may modify the provided value based on
388c2ecf20Sopenharmony_ci	alignment requirements or minimum/maximum size requirements.
398c2ecf20Sopenharmony_ci	If the client wants to leave this to the driver, then it should
408c2ecf20Sopenharmony_ci	set sizeimage to 0.
418c2ecf20Sopenharmony_ci    * - __u32
428c2ecf20Sopenharmony_ci      - ``bytesperline``
438c2ecf20Sopenharmony_ci      - Distance in bytes between the leftmost pixels in two adjacent
448c2ecf20Sopenharmony_ci	lines. See struct :c:type:`v4l2_pix_format`.
458c2ecf20Sopenharmony_ci    * - __u16
468c2ecf20Sopenharmony_ci      - ``reserved[6]``
478c2ecf20Sopenharmony_ci      - Reserved for future extensions. Should be zeroed by drivers and
488c2ecf20Sopenharmony_ci	applications.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci.. raw:: latex
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci    \small
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci.. c:type:: v4l2_pix_format_mplane
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci.. flat-table:: struct v4l2_pix_format_mplane
608c2ecf20Sopenharmony_ci    :header-rows:  0
618c2ecf20Sopenharmony_ci    :stub-columns: 0
628c2ecf20Sopenharmony_ci    :widths:       1 1 2
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci    * - __u32
658c2ecf20Sopenharmony_ci      - ``width``
668c2ecf20Sopenharmony_ci      - Image width in pixels. See struct
678c2ecf20Sopenharmony_ci	:c:type:`v4l2_pix_format`.
688c2ecf20Sopenharmony_ci    * - __u32
698c2ecf20Sopenharmony_ci      - ``height``
708c2ecf20Sopenharmony_ci      - Image height in pixels. See struct
718c2ecf20Sopenharmony_ci	:c:type:`v4l2_pix_format`.
728c2ecf20Sopenharmony_ci    * - __u32
738c2ecf20Sopenharmony_ci      - ``pixelformat``
748c2ecf20Sopenharmony_ci      - The pixel format. Both single- and multi-planar four character
758c2ecf20Sopenharmony_ci	codes can be used.
768c2ecf20Sopenharmony_ci    * - __u32
778c2ecf20Sopenharmony_ci      - ``field``
788c2ecf20Sopenharmony_ci      - Field order, from enum :c:type:`v4l2_field`.
798c2ecf20Sopenharmony_ci        See struct :c:type:`v4l2_pix_format`.
808c2ecf20Sopenharmony_ci    * - __u32
818c2ecf20Sopenharmony_ci      - ``colorspace``
828c2ecf20Sopenharmony_ci      - Colorspace encoding, from enum :c:type:`v4l2_colorspace`.
838c2ecf20Sopenharmony_ci        See struct :c:type:`v4l2_pix_format`.
848c2ecf20Sopenharmony_ci    * - struct :c:type:`v4l2_plane_pix_format`
858c2ecf20Sopenharmony_ci      - ``plane_fmt[VIDEO_MAX_PLANES]``
868c2ecf20Sopenharmony_ci      - An array of structures describing format of each plane this pixel
878c2ecf20Sopenharmony_ci	format consists of. The number of valid entries in this array has
888c2ecf20Sopenharmony_ci	to be put in the ``num_planes`` field.
898c2ecf20Sopenharmony_ci    * - __u8
908c2ecf20Sopenharmony_ci      - ``num_planes``
918c2ecf20Sopenharmony_ci      - Number of planes (i.e. separate memory buffers) for this format
928c2ecf20Sopenharmony_ci	and the number of valid entries in the ``plane_fmt`` array.
938c2ecf20Sopenharmony_ci    * - __u8
948c2ecf20Sopenharmony_ci      - ``flags``
958c2ecf20Sopenharmony_ci      - Flags set by the application or driver, see :ref:`format-flags`.
968c2ecf20Sopenharmony_ci    * - union {
978c2ecf20Sopenharmony_ci      - (anonymous)
988c2ecf20Sopenharmony_ci    * - __u8
998c2ecf20Sopenharmony_ci      - ``ycbcr_enc``
1008c2ecf20Sopenharmony_ci      - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
1018c2ecf20Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
1028c2ecf20Sopenharmony_ci    * - __u8
1038c2ecf20Sopenharmony_ci      - ``hsv_enc``
1048c2ecf20Sopenharmony_ci      - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
1058c2ecf20Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
1068c2ecf20Sopenharmony_ci    * - }
1078c2ecf20Sopenharmony_ci      -
1088c2ecf20Sopenharmony_ci    * - __u8
1098c2ecf20Sopenharmony_ci      - ``quantization``
1108c2ecf20Sopenharmony_ci      - Quantization range, from enum :c:type:`v4l2_quantization`.
1118c2ecf20Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
1128c2ecf20Sopenharmony_ci    * - __u8
1138c2ecf20Sopenharmony_ci      - ``xfer_func``
1148c2ecf20Sopenharmony_ci      - Transfer function, from enum :c:type:`v4l2_xfer_func`.
1158c2ecf20Sopenharmony_ci	See struct :c:type:`v4l2_pix_format`.
1168c2ecf20Sopenharmony_ci    * - __u8
1178c2ecf20Sopenharmony_ci      - ``reserved[7]``
1188c2ecf20Sopenharmony_ci      - Reserved for future extensions. Should be zeroed by drivers and
1198c2ecf20Sopenharmony_ci	applications.
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci.. raw:: latex
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci    \normalsize
124