Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-v4l2-mplane.rst
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.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 ******************************
11 Multi-planar format structures
12 ******************************
13
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.
20
21
22 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
23
24 .. c:type:: v4l2_plane_pix_format
25
26 .. flat-table:: struct v4l2_plane_pix_format
27     :header-rows:  0
28     :stub-columns: 0
29     :widths:       1 1 2
30
31     * - __u32
32       - ``sizeimage``
33       - Maximum size in bytes required for image data in this plane.
34     * - __u32
35       - ``bytesperline``
36       - Distance in bytes between the leftmost pixels in two adjacent
37         lines. See struct :c:type:`v4l2_pix_format`.
38     * - __u16
39       - ``reserved[6]``
40       - Reserved for future extensions. Should be zeroed by drivers and
41         applications.
42
43
44 .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
45
46 .. c:type:: v4l2_pix_format_mplane
47
48 .. flat-table:: struct v4l2_pix_format_mplane
49     :header-rows:  0
50     :stub-columns: 0
51     :widths:       1 1 2
52
53     * - __u32
54       - ``width``
55       - Image width in pixels. See struct
56         :c:type:`v4l2_pix_format`.
57     * - __u32
58       - ``height``
59       - Image height in pixels. See struct
60         :c:type:`v4l2_pix_format`.
61     * - __u32
62       - ``pixelformat``
63       - The pixel format. Both single- and multi-planar four character
64         codes can be used.
65     * - __u32
66       - ``field``
67       - Field order, from enum :c:type:`v4l2_field`.
68         See struct :c:type:`v4l2_pix_format`.
69     * - __u32
70       - ``colorspace``
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.
78     * - __u8
79       - ``num_planes``
80       - Number of planes (i.e. separate memory buffers) for this format
81         and the number of valid entries in the ``plane_fmt`` array.
82     * - __u8
83       - ``flags``
84       - Flags set by the application or driver, see :ref:`format-flags`.
85     * - union {
86       - (anonymous)
87       -
88     * - __u8
89       - ``ycbcr_enc``
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`.
94     * - __u8
95       - ``hsv_enc``
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`.
100     * - }
101       -
102       -
103     * - __u8
104       - ``quantization``
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`.
109     * - __u8
110       - ``xfer_func``
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`.
115     * - __u8
116       - ``reserved[7]``
117       - Reserved for future extensions. Should be zeroed by drivers and
118         applications.