1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
********************************************************************************************************************************************************************************************************************************************************************************
V4L2_META_FMT_GENERIC_8 ('MET8'), V4L2_META_FMT_GENERIC_CSI2_10 ('MC1A'), V4L2_META_FMT_GENERIC_CSI2_12 ('MC1C'), V4L2_META_FMT_GENERIC_CSI2_14 ('MC1E'), V4L2_META_FMT_GENERIC_CSI2_16 ('MC1G'), V4L2_META_FMT_GENERIC_CSI2_20 ('MC1K'), V4L2_META_FMT_GENERIC_CSI2_24 ('MC1O')
********************************************************************************************************************************************************************************************************************************************************************************
Generic line-based metadata formats
Description
===========
These generic line-based metadata formats define the memory layout of the data
without defining the format or meaning of the metadata itself.
.. _v4l2-meta-fmt-generic-8:
V4L2_META_FMT_GENERIC_8
-----------------------
The V4L2_META_FMT_GENERIC_8 format is a plain 8-bit metadata format. This format
is used on CSI-2 for 8 bits per :term:`Data Unit`.
Additionally it is used for 16 bits per Data Unit when two bytes of metadata are
packed into one 16-bit Data Unit. Otherwise the 16 bits per pixel dataformat is
:ref:`V4L2_META_FMT_GENERIC_CSI2_16 <v4l2-meta-fmt-generic-csi2-16>`.
**Byte Order Of V4L2_META_FMT_GENERIC_8.**
Each cell is one byte. "M" denotes a byte of metadata.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- M\ :sub:`10`
- M\ :sub:`20`
- M\ :sub:`30`
* - start + 4:
- M\ :sub:`01`
- M\ :sub:`11`
- M\ :sub:`21`
- M\ :sub:`31`
.. _v4l2-meta-fmt-generic-csi2-10:
V4L2_META_FMT_GENERIC_CSI2_10
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_10 contains 8-bit generic metadata packed in 10-bit
Data Units, with one padding byte after every four bytes of metadata. This
format is typically used by CSI-2 receivers with a source that transmits
MEDIA_BUS_FMT_META_10 and the CSI-2 receiver writes the received data to memory
as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
This format is also used in conjunction with 20 bits per :term:`Data Unit`
formats that pack two bytes of metadata into one Data Unit. Otherwise the
20 bits per pixel dataformat is :ref:`V4L2_META_FMT_GENERIC_CSI2_20
<v4l2-meta-fmt-generic-csi2-20>`.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_10.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- M\ :sub:`10`
- M\ :sub:`20`
- M\ :sub:`30`
- x
* - start + 5:
- M\ :sub:`01`
- M\ :sub:`11`
- M\ :sub:`21`
- M\ :sub:`31`
- x
.. _v4l2-meta-fmt-generic-csi2-12:
V4L2_META_FMT_GENERIC_CSI2_12
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_12 contains 8-bit generic metadata packed in 12-bit
Data Units, with one padding byte after every two bytes of metadata. This format
is typically used by CSI-2 receivers with a source that transmits
MEDIA_BUS_FMT_META_12 and the CSI-2 receiver writes the received data to memory
as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
This format is also used in conjunction with 24 bits per :term:`Data Unit`
formats that pack two bytes of metadata into one Data Unit. Otherwise the
24 bits per pixel dataformat is :ref:`V4L2_META_FMT_GENERIC_CSI2_24
<v4l2-meta-fmt-generic-csi2-24>`.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_12.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{.8cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- M\ :sub:`10`
- x
- M\ :sub:`20`
- M\ :sub:`30`
- x
* - start + 6:
- M\ :sub:`01`
- M\ :sub:`11`
- x
- M\ :sub:`21`
- M\ :sub:`31`
- x
.. _v4l2-meta-fmt-generic-csi2-14:
V4L2_META_FMT_GENERIC_CSI2_14
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_14 contains 8-bit generic metadata packed in 14-bit
Data Units, with three padding bytes after every four bytes of metadata. This
format is typically used by CSI-2 receivers with a source that transmits
MEDIA_BUS_FMT_META_14 and the CSI-2 receiver writes the received data to memory
as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_14.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- M\ :sub:`10`
- M\ :sub:`20`
- M\ :sub:`30`
- x
- x
- x
* - start + 7:
- M\ :sub:`01`
- M\ :sub:`11`
- M\ :sub:`21`
- M\ :sub:`31`
- x
- x
- x
.. _v4l2-meta-fmt-generic-csi2-16:
V4L2_META_FMT_GENERIC_CSI2_16
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_16 contains 8-bit generic metadata packed in 16-bit
Data Units, with one padding byte after every byte of metadata. This format is
typically used by CSI-2 receivers with a source that transmits
MEDIA_BUS_FMT_META_16 and the CSI-2 receiver writes the received data to memory
as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
Some devices support more efficient packing of metadata in conjunction with
16-bit image data. In that case the dataformat is
:ref:`V4L2_META_FMT_GENERIC_8 <v4l2-meta-fmt-generic-8>`.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_16.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- x
- M\ :sub:`10`
- x
- M\ :sub:`20`
- x
- M\ :sub:`30`
- x
* - start + 8:
- M\ :sub:`01`
- x
- M\ :sub:`11`
- x
- M\ :sub:`21`
- x
- M\ :sub:`31`
- x
.. _v4l2-meta-fmt-generic-csi2-20:
V4L2_META_FMT_GENERIC_CSI2_20
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_20 contains 8-bit generic metadata packed in 20-bit
Data Units, with alternating one or two padding bytes after every byte of
metadata. This format is typically used by CSI-2 receivers with a source that
transmits MEDIA_BUS_FMT_META_20 and the CSI-2 receiver writes the received data
to memory as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
Some devices support more efficient packing of metadata in conjunction with
16-bit image data. In that case the dataformat is
:ref:`V4L2_META_FMT_GENERIC_CSI2_10 <v4l2-meta-fmt-generic-csi2-10>`.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_20.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- x
- M\ :sub:`10`
- x
- x
- M\ :sub:`20`
- x
- M\ :sub:`30`
- x
- x
* - start + 10:
- M\ :sub:`01`
- x
- M\ :sub:`11`
- x
- x
- M\ :sub:`21`
- x
- M\ :sub:`31`
- x
- x
.. _v4l2-meta-fmt-generic-csi2-24:
V4L2_META_FMT_GENERIC_CSI2_24
-----------------------------
V4L2_META_FMT_GENERIC_CSI2_24 contains 8-bit generic metadata packed in 24-bit
Data Units, with two padding bytes after every byte of metadata. This format is
typically used by CSI-2 receivers with a source that transmits
MEDIA_BUS_FMT_META_24 and the CSI-2 receiver writes the received data to memory
as-is.
The packing of the data follows the MIPI CSI-2 specification and the padding of
the data is defined in the MIPI CCS specification.
Some devices support more efficient packing of metadata in conjunction with
16-bit image data. In that case the dataformat is
:ref:`V4L2_META_FMT_GENERIC_CSI2_12 <v4l2-meta-fmt-generic-csi2-12>`.
This format is little endian.
**Byte Order Of V4L2_META_FMT_GENERIC_CSI2_24.**
Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
.. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|
.. flat-table:: Sample 4x2 Metadata Frame
:header-rows: 0
:stub-columns: 0
:widths: 12 8 8 8 8 8 8 8 8 8 8 8 8
* - start + 0:
- M\ :sub:`00`
- x
- x
- M\ :sub:`10`
- x
- x
- M\ :sub:`20`
- x
- x
- M\ :sub:`30`
- x
- x
* - start + 12:
- M\ :sub:`01`
- x
- x
- M\ :sub:`11`
- x
- x
- M\ :sub:`21`
- x
- x
- M\ :sub:`31`
- x
- x
|