Merge tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-v4l2-mplane.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 ******************************
4 Multi-planar format structures
5 ******************************
6
7 The struct :c:type:`v4l2_plane_pix_format` structures define size
8 and layout for each of the planes in a multi-planar format. The
9 struct :c:type:`v4l2_pix_format_mplane` structure contains
10 information common to all planes (such as image width and height) and an
11 array of struct :c:type:`v4l2_plane_pix_format` structures,
12 describing all planes of that format.
13
14
15 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
16
17 .. c:type:: v4l2_plane_pix_format
18
19 .. flat-table:: struct v4l2_plane_pix_format
20     :header-rows:  0
21     :stub-columns: 0
22     :widths:       1 1 2
23
24     * - __u32
25       - ``sizeimage``
26       - Maximum size in bytes required for image data in this plane.
27     * - __u32
28       - ``bytesperline``
29       - Distance in bytes between the leftmost pixels in two adjacent
30         lines. See struct :c:type:`v4l2_pix_format`.
31     * - __u16
32       - ``reserved[6]``
33       - Reserved for future extensions. Should be zeroed by drivers and
34         applications.
35
36
37 .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
38
39 .. c:type:: v4l2_pix_format_mplane
40
41 .. flat-table:: struct v4l2_pix_format_mplane
42     :header-rows:  0
43     :stub-columns: 0
44     :widths:       1 1 2
45
46     * - __u32
47       - ``width``
48       - Image width in pixels. See struct
49         :c:type:`v4l2_pix_format`.
50     * - __u32
51       - ``height``
52       - Image height in pixels. See struct
53         :c:type:`v4l2_pix_format`.
54     * - __u32
55       - ``pixelformat``
56       - The pixel format. Both single- and multi-planar four character
57         codes can be used.
58     * - enum :c:type:`v4l2_field`
59       - ``field``
60       - See struct :c:type:`v4l2_pix_format`.
61     * - enum :c:type:`v4l2_colorspace`
62       - ``colorspace``
63       - See struct :c:type:`v4l2_pix_format`.
64     * - struct :c:type:`v4l2_plane_pix_format`
65       - ``plane_fmt[VIDEO_MAX_PLANES]``
66       - An array of structures describing format of each plane this pixel
67         format consists of. The number of valid entries in this array has
68         to be put in the ``num_planes`` field.
69     * - __u8
70       - ``num_planes``
71       - Number of planes (i.e. separate memory buffers) for this format
72         and the number of valid entries in the ``plane_fmt`` array.
73     * - __u8
74       - ``flags``
75       - Flags set by the application or driver, see :ref:`format-flags`.
76     * - enum :c:type:`v4l2_ycbcr_encoding`
77       - ``ycbcr_enc``
78       - This information supplements the ``colorspace`` and must be set by
79         the driver for capture streams and by the application for output
80         streams, see :ref:`colorspaces`.
81     * - enum :c:type:`v4l2_hsv_encoding`
82       - ``hsv_enc``
83       - This information supplements the ``colorspace`` and must be set by
84         the driver for capture streams and by the application for output
85         streams, see :ref:`colorspaces`.
86     * - enum :c:type:`v4l2_quantization`
87       - ``quantization``
88       - This information supplements the ``colorspace`` and must be set by
89         the driver for capture streams and by the application for output
90         streams, see :ref:`colorspaces`.
91     * - enum :c:type:`v4l2_xfer_func`
92       - ``xfer_func``
93       - This information supplements the ``colorspace`` and must be set by
94         the driver for capture streams and by the application for output
95         streams, see :ref:`colorspaces`.
96     * - __u8
97       - ``reserved[7]``
98       - Reserved for future extensions. Should be zeroed by drivers and
99         applications.