1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
10 ******************************
11 Multi-planar format structures
12 ******************************
14 The struct :c:type:`v4l2_plane_pix_format` structures define size
15 and layout for each of the planes in a multi-planar format. The
16 struct :c:type:`v4l2_pix_format_mplane` structure contains
17 information common to all planes (such as image width and height) and an
18 array of struct :c:type:`v4l2_plane_pix_format` structures,
19 describing all planes of that format.
23 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
25 .. c:type:: v4l2_plane_pix_format
27 .. flat-table:: struct v4l2_plane_pix_format
34 - Maximum size in bytes required for image data in this plane,
35 set by the driver. When the image consists of variable length
36 compressed data this is the number of bytes required by the
37 codec to support the worst-case compression scenario.
39 The driver will set the value for uncompressed images.
41 Clients are allowed to set the sizeimage field for variable length
42 compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at
43 :ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the
44 value itself, or it may modify the provided value based on
45 alignment requirements or minimum/maximum size requirements.
46 If the client wants to leave this to the driver, then it should
50 - Distance in bytes between the leftmost pixels in two adjacent
51 lines. See struct :c:type:`v4l2_pix_format`.
54 - Reserved for future extensions. Should be zeroed by drivers and
62 .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
64 .. c:type:: v4l2_pix_format_mplane
66 .. flat-table:: struct v4l2_pix_format_mplane
73 - Image width in pixels. See struct
74 :c:type:`v4l2_pix_format`.
77 - Image height in pixels. See struct
78 :c:type:`v4l2_pix_format`.
81 - The pixel format. Both single- and multi-planar four character
85 - Field order, from enum :c:type:`v4l2_field`.
86 See struct :c:type:`v4l2_pix_format`.
89 - Colorspace encoding, from enum :c:type:`v4l2_colorspace`.
90 See struct :c:type:`v4l2_pix_format`.
91 * - struct :c:type:`v4l2_plane_pix_format`
92 - ``plane_fmt[VIDEO_MAX_PLANES]``
93 - An array of structures describing format of each plane this pixel
94 format consists of. The number of valid entries in this array has
95 to be put in the ``num_planes`` field.
98 - Number of planes (i.e. separate memory buffers) for this format
99 and the number of valid entries in the ``plane_fmt`` array.
102 - Flags set by the application or driver, see :ref:`format-flags`.
107 - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
108 This information supplements the ``colorspace`` and must be set by
109 the driver for capture streams and by the application for output
110 streams, see :ref:`colorspaces`.
113 - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
114 This information supplements the ``colorspace`` and must be set by
115 the driver for capture streams and by the application for output
116 streams, see :ref:`colorspaces`.
121 - Quantization range, from enum :c:type:`v4l2_quantization`.
122 This information supplements the ``colorspace`` and must be set by
123 the driver for capture streams and by the application for output
124 streams, see :ref:`colorspaces`.
127 - Transfer function, from enum :c:type:`v4l2_xfer_func`.
128 This information supplements the ``colorspace`` and must be set by
129 the driver for capture streams and by the application for output
130 streams, see :ref:`colorspaces`.
133 - Reserved for future extensions. Should be zeroed by drivers and