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/media/uapi/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.
22 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
24 .. c:type:: v4l2_plane_pix_format
26 .. flat-table:: struct v4l2_plane_pix_format
33 - Maximum size in bytes required for image data in this plane.
36 - Distance in bytes between the leftmost pixels in two adjacent
37 lines. See struct :c:type:`v4l2_pix_format`.
40 - Reserved for future extensions. Should be zeroed by drivers and
44 .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
46 .. c:type:: v4l2_pix_format_mplane
48 .. flat-table:: struct v4l2_pix_format_mplane
55 - Image width in pixels. See struct
56 :c:type:`v4l2_pix_format`.
59 - Image height in pixels. See struct
60 :c:type:`v4l2_pix_format`.
63 - The pixel format. Both single- and multi-planar four character
67 - Field order, from enum :c:type:`v4l2_field`.
68 See struct :c:type:`v4l2_pix_format`.
71 - Colorspace encoding, from enum :c:type:`v4l2_colorspace`.
72 See struct :c:type:`v4l2_pix_format`.
73 * - struct :c:type:`v4l2_plane_pix_format`
74 - ``plane_fmt[VIDEO_MAX_PLANES]``
75 - An array of structures describing format of each plane this pixel
76 format consists of. The number of valid entries in this array has
77 to be put in the ``num_planes`` field.
80 - Number of planes (i.e. separate memory buffers) for this format
81 and the number of valid entries in the ``plane_fmt`` array.
84 - Flags set by the application or driver, see :ref:`format-flags`.
90 - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
91 This information supplements the ``colorspace`` and must be set by
92 the driver for capture streams and by the application for output
93 streams, see :ref:`colorspaces`.
96 - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
97 This information supplements the ``colorspace`` and must be set by
98 the driver for capture streams and by the application for output
99 streams, see :ref:`colorspaces`.
105 - Quantization range, from enum :c:type:`v4l2_quantization`.
106 This information supplements the ``colorspace`` and must be set by
107 the driver for capture streams and by the application for output
108 streams, see :ref:`colorspaces`.
111 - Transfer function, from enum :c:type:`v4l2_xfer_func`.
112 This information supplements the ``colorspace`` and must be set by
113 the driver for capture streams and by the application for output
114 streams, see :ref:`colorspaces`.
117 - Reserved for future extensions. Should be zeroed by drivers and