Commit | Line | Data |
---|---|---|
5377d91f MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | ****************************** | |
4 | Multi-planar format structures | |
5 | ****************************** | |
6 | ||
fc78c7c7 | 7 | The struct :c:type:`v4l2_plane_pix_format` structures define size |
5377d91f | 8 | and layout for each of the planes in a multi-planar format. The |
fc78c7c7 | 9 | struct :c:type:`v4l2_pix_format_mplane` structure contains |
5377d91f | 10 | information common to all planes (such as image width and height) and an |
fc78c7c7 | 11 | array of struct :c:type:`v4l2_plane_pix_format` structures, |
5377d91f MH |
12 | describing all planes of that format. |
13 | ||
14 | ||
5bd4bb78 MCC |
15 | .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| |
16 | ||
e8be7e97 | 17 | .. c:type:: v4l2_plane_pix_format |
fa92b04d | 18 | |
5377d91f MH |
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 | |
e8be7e97 | 40 | lines. See struct :c:type:`v4l2_pix_format`. |
5377d91f MH |
41 | |
42 | - .. row 3 | |
43 | ||
44 | - __u16 | |
45 | ||
8968da9b | 46 | - ``reserved[6]`` |
5377d91f MH |
47 | |
48 | - Reserved for future extensions. Should be zeroed by drivers and | |
0579e6e3 | 49 | applications. |
5377d91f MH |
50 | |
51 | ||
43e4138b | 52 | .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}| |
5377d91f | 53 | |
e8be7e97 | 54 | .. c:type:: v4l2_pix_format_mplane |
5377d91f MH |
55 | |
56 | .. flat-table:: struct v4l2_pix_format_mplane | |
57 | :header-rows: 0 | |
58 | :stub-columns: 0 | |
59 | :widths: 1 1 2 | |
60 | ||
61 | ||
62 | - .. row 1 | |
63 | ||
64 | - __u32 | |
65 | ||
66 | - ``width`` | |
67 | ||
68 | - Image width in pixels. See struct | |
e8be7e97 | 69 | :c:type:`v4l2_pix_format`. |
5377d91f MH |
70 | |
71 | - .. row 2 | |
72 | ||
73 | - __u32 | |
74 | ||
75 | - ``height`` | |
76 | ||
77 | - Image height in pixels. See struct | |
e8be7e97 | 78 | :c:type:`v4l2_pix_format`. |
5377d91f MH |
79 | |
80 | - .. row 3 | |
81 | ||
82 | - __u32 | |
83 | ||
84 | - ``pixelformat`` | |
85 | ||
86 | - The pixel format. Both single- and multi-planar four character | |
0579e6e3 | 87 | codes can be used. |
5377d91f MH |
88 | |
89 | - .. row 4 | |
90 | ||
56683d7d | 91 | - enum :c:type:`v4l2_field` |
5377d91f MH |
92 | |
93 | - ``field`` | |
94 | ||
e8be7e97 | 95 | - See struct :c:type:`v4l2_pix_format`. |
5377d91f MH |
96 | |
97 | - .. row 5 | |
98 | ||
56683d7d | 99 | - enum :c:type:`v4l2_colorspace` |
5377d91f MH |
100 | |
101 | - ``colorspace`` | |
102 | ||
e8be7e97 | 103 | - See struct :c:type:`v4l2_pix_format`. |
5377d91f MH |
104 | |
105 | - .. row 6 | |
106 | ||
e8be7e97 | 107 | - struct :c:type:`v4l2_plane_pix_format` |
5377d91f MH |
108 | |
109 | - ``plane_fmt[VIDEO_MAX_PLANES]`` | |
110 | ||
111 | - An array of structures describing format of each plane this pixel | |
0579e6e3 MCC |
112 | format consists of. The number of valid entries in this array has |
113 | to be put in the ``num_planes`` field. | |
5377d91f MH |
114 | |
115 | - .. row 7 | |
116 | ||
117 | - __u8 | |
118 | ||
119 | - ``num_planes`` | |
120 | ||
121 | - Number of planes (i.e. separate memory buffers) for this format | |
0579e6e3 | 122 | and the number of valid entries in the ``plane_fmt`` array. |
5377d91f MH |
123 | |
124 | - .. row 8 | |
125 | ||
126 | - __u8 | |
127 | ||
128 | - ``flags`` | |
129 | ||
130 | - Flags set by the application or driver, see :ref:`format-flags`. | |
131 | ||
132 | - .. row 9 | |
133 | ||
56683d7d | 134 | - enum :c:type:`v4l2_ycbcr_encoding` |
5377d91f MH |
135 | |
136 | - ``ycbcr_enc`` | |
137 | ||
138 | - This information supplements the ``colorspace`` and must be set by | |
0579e6e3 MCC |
139 | the driver for capture streams and by the application for output |
140 | streams, see :ref:`colorspaces`. | |
5377d91f MH |
141 | |
142 | - .. row 10 | |
143 | ||
56683d7d | 144 | - enum :c:type:`v4l2_quantization` |
5377d91f MH |
145 | |
146 | - ``quantization`` | |
147 | ||
148 | - This information supplements the ``colorspace`` and must be set by | |
0579e6e3 MCC |
149 | the driver for capture streams and by the application for output |
150 | streams, see :ref:`colorspaces`. | |
5377d91f MH |
151 | |
152 | - .. row 11 | |
153 | ||
56683d7d | 154 | - enum :c:type:`v4l2_xfer_func` |
5377d91f MH |
155 | |
156 | - ``xfer_func`` | |
157 | ||
158 | - This information supplements the ``colorspace`` and must be set by | |
0579e6e3 MCC |
159 | the driver for capture streams and by the application for output |
160 | streams, see :ref:`colorspaces`. | |
5377d91f MH |
161 | |
162 | - .. row 12 | |
163 | ||
164 | - __u8 | |
165 | ||
8968da9b | 166 | - ``reserved[7]`` |
5377d91f MH |
167 | |
168 | - Reserved for future extensions. Should be zeroed by drivers and | |
0579e6e3 | 169 | applications. |