forked from umlaeute/v4l2loopback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
v4l2loopback_formats.h
445 lines (440 loc) · 8.69 KB
/
v4l2loopback_formats.h
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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
static const struct v4l2l_format formats[] = {
#ifndef V4L2_PIX_FMT_VP9
#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
#endif
#ifndef V4L2_PIX_FMT_HEVC
#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C')
#endif
/* here come the packed formats */
{
.name = "32 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR32,
.depth = 32,
.flags = 0,
},
{
.name = "32 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB32,
.depth = 32,
.flags = 0,
},
{
.name = "24 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR24,
.depth = 24,
.flags = 0,
},
{
.name = "24 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB24,
.depth = 24,
.flags = 0,
},
#ifdef V4L2_PIX_FMT_ABGR32
{
.name = "32 bpp RGBA, le",
.fourcc = V4L2_PIX_FMT_ABGR32,
.depth = 32,
.flags = 0,
},
#endif
#ifdef V4L2_PIX_FMT_RGBA32
{
.name = "32 bpp RGBA",
.fourcc = V4L2_PIX_FMT_RGBA32,
.depth = 32,
.flags = 0,
},
#endif
#ifdef V4L2_PIX_FMT_RGB332
{
.name = "8 bpp RGB-3-3-2",
.fourcc = V4L2_PIX_FMT_RGB332,
.depth = 8,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB332 */
#ifdef V4L2_PIX_FMT_RGB444
{
.name = "16 bpp RGB (xxxxrrrr ggggbbbb)",
.fourcc = V4L2_PIX_FMT_RGB444,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB444 */
#ifdef V4L2_PIX_FMT_RGB555
{
.name = "16 bpp RGB-5-5-5",
.fourcc = V4L2_PIX_FMT_RGB555,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB555 */
#ifdef V4L2_PIX_FMT_RGB565
{
.name = "16 bpp RGB-5-6-5",
.fourcc = V4L2_PIX_FMT_RGB565,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB565 */
#ifdef V4L2_PIX_FMT_RGB555X
{
.name = "16 bpp RGB-5-5-5 BE",
.fourcc = V4L2_PIX_FMT_RGB555X,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB555X */
#ifdef V4L2_PIX_FMT_RGB565X
{
.name = "16 bpp RGB-5-6-5 BE",
.fourcc = V4L2_PIX_FMT_RGB565X,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_RGB565X */
#ifdef V4L2_PIX_FMT_BGR666
{
.name = "18 bpp BGR-6-6-6",
.fourcc = V4L2_PIX_FMT_BGR666,
.depth = 18,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_BGR666 */
{
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
.flags = 0,
},
{
.name = "4:2:2, packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16,
.flags = 0,
},
#ifdef V4L2_PIX_FMT_YVYU
{
.name = "4:2:2, packed YVYU",
.fourcc = V4L2_PIX_FMT_YVYU,
.depth = 16,
.flags = 0,
},
#endif
#ifdef V4L2_PIX_FMT_VYUY
{
.name = "4:2:2, packed VYUY",
.fourcc = V4L2_PIX_FMT_VYUY,
.depth = 16,
.flags = 0,
},
#endif
{
.name = "4:2:2, packed YYUV",
.fourcc = V4L2_PIX_FMT_YYUV,
.depth = 16,
.flags = 0,
},
{
.name = "YUV-8-8-8-8",
.fourcc = V4L2_PIX_FMT_YUV32,
.depth = 32,
.flags = 0,
},
{
.name = "8 bpp, Greyscale",
.fourcc = V4L2_PIX_FMT_GREY,
.depth = 8,
.flags = 0,
},
#ifdef V4L2_PIX_FMT_Y4
{
.name = "4 bpp Greyscale",
.fourcc = V4L2_PIX_FMT_Y4,
.depth = 4,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_Y4 */
#ifdef V4L2_PIX_FMT_Y6
{
.name = "6 bpp Greyscale",
.fourcc = V4L2_PIX_FMT_Y6,
.depth = 6,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_Y6 */
#ifdef V4L2_PIX_FMT_Y10
{
.name = "10 bpp Greyscale",
.fourcc = V4L2_PIX_FMT_Y10,
.depth = 10,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_Y10 */
#ifdef V4L2_PIX_FMT_Y12
{
.name = "12 bpp Greyscale",
.fourcc = V4L2_PIX_FMT_Y12,
.depth = 12,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_Y12 */
{
.name = "16 bpp, Greyscale",
.fourcc = V4L2_PIX_FMT_Y16,
.depth = 16,
.flags = 0,
},
#ifdef V4L2_PIX_FMT_YUV444
{
.name = "16 bpp xxxxyyyy uuuuvvvv",
.fourcc = V4L2_PIX_FMT_YUV444,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_YUV444 */
#ifdef V4L2_PIX_FMT_YUV555
{
.name = "16 bpp YUV-5-5-5",
.fourcc = V4L2_PIX_FMT_YUV555,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_YUV555 */
#ifdef V4L2_PIX_FMT_YUV565
{
.name = "16 bpp YUV-5-6-5",
.fourcc = V4L2_PIX_FMT_YUV565,
.depth = 16,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_YUV565 */
/* bayer formats */
#ifdef V4L2_PIX_FMT_SRGGB8
{
.name = "Bayer RGGB 8bit",
.fourcc = V4L2_PIX_FMT_SRGGB8,
.depth = 8,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_SRGGB8 */
#ifdef V4L2_PIX_FMT_SGRBG8
{
.name = "Bayer GRBG 8bit",
.fourcc = V4L2_PIX_FMT_SGRBG8,
.depth = 8,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_SGRBG8 */
#ifdef V4L2_PIX_FMT_SGBRG8
{
.name = "Bayer GBRG 8bit",
.fourcc = V4L2_PIX_FMT_SGBRG8,
.depth = 8,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_SGBRG8 */
#ifdef V4L2_PIX_FMT_SBGGR8
{
.name = "Bayer BA81 8bit",
.fourcc = V4L2_PIX_FMT_SBGGR8,
.depth = 8,
.flags = 0,
},
#endif /* V4L2_PIX_FMT_SBGGR8 */
/* here come the planar formats */
{
.name = "4:1:0, planar, Y-Cr-Cb",
.fourcc = V4L2_PIX_FMT_YVU410,
.depth = 9,
.flags = FORMAT_FLAGS_PLANAR,
},
{
.name = "4:2:0, planar, Y-Cr-Cb",
.fourcc = V4L2_PIX_FMT_YVU420,
.depth = 12,
.flags = FORMAT_FLAGS_PLANAR,
},
{
.name = "4:1:0, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV410,
.depth = 9,
.flags = FORMAT_FLAGS_PLANAR,
},
{
.name = "4:2:0, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV420,
.depth = 12,
.flags = FORMAT_FLAGS_PLANAR,
},
#ifdef V4L2_PIX_FMT_YUV422P
{
.name = "16 bpp YVU422 planar",
.fourcc = V4L2_PIX_FMT_YUV422P,
.depth = 16,
.flags = FORMAT_FLAGS_PLANAR,
},
#endif /* V4L2_PIX_FMT_YUV422P */
#ifdef V4L2_PIX_FMT_YUV411P
{
.name = "16 bpp YVU411 planar",
.fourcc = V4L2_PIX_FMT_YUV411P,
.depth = 16,
.flags = FORMAT_FLAGS_PLANAR,
},
#endif /* V4L2_PIX_FMT_YUV411P */
#ifdef V4L2_PIX_FMT_Y41P
{
.name = "12 bpp YUV 4:1:1",
.fourcc = V4L2_PIX_FMT_Y41P,
.depth = 12,
.flags = FORMAT_FLAGS_PLANAR,
},
#endif /* V4L2_PIX_FMT_Y41P */
#ifdef V4L2_PIX_FMT_NV12
{
.name = "12 bpp Y/CbCr 4:2:0 ",
.fourcc = V4L2_PIX_FMT_NV12,
.depth = 12,
.flags = FORMAT_FLAGS_PLANAR,
},
#endif /* V4L2_PIX_FMT_NV12 */
/* here come the compressed formats */
#ifdef V4L2_PIX_FMT_MJPEG
{
.name = "Motion-JPEG",
.fourcc = V4L2_PIX_FMT_MJPEG,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_MJPEG */
#ifdef V4L2_PIX_FMT_JPEG
{
.name = "JFIF JPEG",
.fourcc = V4L2_PIX_FMT_JPEG,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_JPEG */
#ifdef V4L2_PIX_FMT_DV
{
.name = "DV1394",
.fourcc = V4L2_PIX_FMT_DV,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_DV */
#ifdef V4L2_PIX_FMT_MPEG
{
.name = "MPEG-1/2/4 Multiplexed",
.fourcc = V4L2_PIX_FMT_MPEG,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_MPEG */
#ifdef V4L2_PIX_FMT_H264
{
.name = "H264 with start codes",
.fourcc = V4L2_PIX_FMT_H264,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_H264 */
#ifdef V4L2_PIX_FMT_H264_NO_SC
{
.name = "H264 without start codes",
.fourcc = V4L2_PIX_FMT_H264_NO_SC,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_H264_NO_SC */
#ifdef V4L2_PIX_FMT_H264_MVC
{
.name = "H264 MVC",
.fourcc = V4L2_PIX_FMT_H264_MVC,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_H264_MVC */
#ifdef V4L2_PIX_FMT_H263
{
.name = "H263",
.fourcc = V4L2_PIX_FMT_H263,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_H263 */
#ifdef V4L2_PIX_FMT_MPEG1
{
.name = "MPEG-1 ES",
.fourcc = V4L2_PIX_FMT_MPEG1,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_MPEG1 */
#ifdef V4L2_PIX_FMT_MPEG2
{
.name = "MPEG-2 ES",
.fourcc = V4L2_PIX_FMT_MPEG2,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_MPEG2 */
#ifdef V4L2_PIX_FMT_MPEG4
{
.name = "MPEG-4 part 2 ES",
.fourcc = V4L2_PIX_FMT_MPEG4,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_MPEG4 */
#ifdef V4L2_PIX_FMT_XVID
{
.name = "Xvid",
.fourcc = V4L2_PIX_FMT_XVID,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_XVID */
#ifdef V4L2_PIX_FMT_VC1_ANNEX_G
{
.name = "SMPTE 421M Annex G compliant stream",
.fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_VC1_ANNEX_G */
#ifdef V4L2_PIX_FMT_VC1_ANNEX_L
{
.name = "SMPTE 421M Annex L compliant stream",
.fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_VC1_ANNEX_L */
#ifdef V4L2_PIX_FMT_VP8
{
.name = "VP8",
.fourcc = V4L2_PIX_FMT_VP8,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_VP8 */
#ifdef V4L2_PIX_FMT_VP9
{
.name = "VP9",
.fourcc = V4L2_PIX_FMT_VP9,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_VP9 */
#ifdef V4L2_PIX_FMT_HEVC
{
.name = "HEVC",
.fourcc = V4L2_PIX_FMT_HEVC,
.depth = 32,
.flags = FORMAT_FLAGS_COMPRESSED,
},
#endif /* V4L2_PIX_FMT_HEVC */
};