[media] docs-rst: add tabularcolumns to all tables
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-003.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 ******************************
4 Multi-planar format structures
5 ******************************
6
7 The :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures define size
8 and layout for each of the planes in a multi-planar format. The
9 :ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structure contains
10 information common to all planes (such as image width and height) and an
11 array of :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures,
12 describing all planes of that format.
13
14
15 .. _v4l2-plane-pix-format:
16
17 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
18
19 .. flat-table:: struct v4l2_plane_pix_format
20     :header-rows:  0
21     :stub-columns: 0
22     :widths:       1 1 2
23
24
25     -  .. row 1
26
27        -  __u32
28
29        -  ``sizeimage``
30
31        -  Maximum size in bytes required for image data in this plane.
32
33     -  .. row 2
34
35        -  __u32
36
37        -  ``bytesperline``
38
39        -  Distance in bytes between the leftmost pixels in two adjacent
40           lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
41
42     -  .. row 3
43
44        -  __u16
45
46        -  ``reserved[6]``
47
48        -  Reserved for future extensions. Should be zeroed by drivers and
49           applications.
50
51
52
53 .. _v4l2-pix-format-mplane:
54
55 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
56
57 .. flat-table:: struct v4l2_pix_format_mplane
58     :header-rows:  0
59     :stub-columns: 0
60     :widths:       1 1 2
61
62
63     -  .. row 1
64
65        -  __u32
66
67        -  ``width``
68
69        -  Image width in pixels. See struct
70           :ref:`v4l2_pix_format <v4l2-pix-format>`.
71
72     -  .. row 2
73
74        -  __u32
75
76        -  ``height``
77
78        -  Image height in pixels. See struct
79           :ref:`v4l2_pix_format <v4l2-pix-format>`.
80
81     -  .. row 3
82
83        -  __u32
84
85        -  ``pixelformat``
86
87        -  The pixel format. Both single- and multi-planar four character
88           codes can be used.
89
90     -  .. row 4
91
92        -  enum :ref:`v4l2_field <v4l2-field>`
93
94        -  ``field``
95
96        -  See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
97
98     -  .. row 5
99
100        -  enum :ref:`v4l2_colorspace <v4l2-colorspace>`
101
102        -  ``colorspace``
103
104        -  See struct :ref:`v4l2_pix_format <v4l2-pix-format>`.
105
106     -  .. row 6
107
108        -  struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`
109
110        -  ``plane_fmt[VIDEO_MAX_PLANES]``
111
112        -  An array of structures describing format of each plane this pixel
113           format consists of. The number of valid entries in this array has
114           to be put in the ``num_planes`` field.
115
116     -  .. row 7
117
118        -  __u8
119
120        -  ``num_planes``
121
122        -  Number of planes (i.e. separate memory buffers) for this format
123           and the number of valid entries in the ``plane_fmt`` array.
124
125     -  .. row 8
126
127        -  __u8
128
129        -  ``flags``
130
131        -  Flags set by the application or driver, see :ref:`format-flags`.
132
133     -  .. row 9
134
135        -  enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>`
136
137        -  ``ycbcr_enc``
138
139        -  This information supplements the ``colorspace`` and must be set by
140           the driver for capture streams and by the application for output
141           streams, see :ref:`colorspaces`.
142
143     -  .. row 10
144
145        -  enum :ref:`v4l2_quantization <v4l2-quantization>`
146
147        -  ``quantization``
148
149        -  This information supplements the ``colorspace`` and must be set by
150           the driver for capture streams and by the application for output
151           streams, see :ref:`colorspaces`.
152
153     -  .. row 11
154
155        -  enum :ref:`v4l2_xfer_func <v4l2-xfer-func>`
156
157        -  ``xfer_func``
158
159        -  This information supplements the ``colorspace`` and must be set by
160           the driver for capture streams and by the application for output
161           streams, see :ref:`colorspaces`.
162
163     -  .. row 12
164
165        -  __u8
166
167        -  ``reserved[7]``
168
169        -  Reserved for future extensions. Should be zeroed by drivers and
170           applications.