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