1
2
3
4
5
6
7
8
9
10
11
12#ifndef __LINUX_V4L2_MEDIABUS_H
13#define __LINUX_V4L2_MEDIABUS_H
14
15#include <linux/media-bus-format.h>
16#include <linux/types.h>
17#include <linux/videodev2.h>
18
19
20
21
22
23
24
25
26
27
28
29
30struct v4l2_mbus_framefmt {
31 __u32 width;
32 __u32 height;
33 __u32 code;
34 __u32 field;
35 __u32 colorspace;
36 __u16 ycbcr_enc;
37 __u16 quantization;
38 __u16 xfer_func;
39 __u16 reserved[11];
40};
41
42#ifndef __KERNEL__
43
44
45
46
47
48
49
50
51
52#define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \
53 V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name
54
55enum v4l2_mbus_pixelcode {
56 V4L2_MBUS_FROM_MEDIA_BUS_FMT(FIXED),
57
58 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_BE),
59 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_LE),
60 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_BE),
61 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_LE),
62 V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_BE),
63 V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_LE),
64 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_BE),
65 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_LE),
66 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB666_1X18),
67 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_1X24),
68 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_BE),
69 V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_LE),
70 V4L2_MBUS_FROM_MEDIA_BUS_FMT(ARGB8888_1X32),
71 V4L2_MBUS_FROM_MED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US_FROM_MEDIA_BUS_FMT(YUYV10_1X20),
98 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_1X20),
99 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUV10_1X30),
100 V4L2_MBUS_FROM_MEDIA_BUS_FMT(AYUV8_1X32),
101 V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_2X12),
102 V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_2X12),
103 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_2X12),
104 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_2X12),
105 V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_1X24),
106 V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_1X24),
107 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_1X24),
108 V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_1X24),
109 V4L2_MBUS_FROM_MEDIA_BUS_FMT(VUY8_1X24),
110
111 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR8_1X8),
112 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG8_1X8),
113 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG8_1X8),
114 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB8_1X8),
115 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_ALAW8_1X8),
116 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_ALAW8_1X8),
117 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_ALAW8_1X8),
118 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_ALAW8_1X8),
119 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_DPCM8_1X8),
120 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_DPCM8_1X8),
121 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_DPCM8_1X8),
122 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_DPCM8_1X8),
123 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_BE),
124 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_LE),
125 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_BE),
126 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_LE),
127 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_1X10),
128 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_1X10),
129 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_1X10),
130 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_1X10),
131 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR12_1X12),
132 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG12_1X12),
133 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG12_1X12),
134 V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB12_1X12),
135
136 V4L2_MBUS_FROM_MEDIA_BUS_FMT(JPEG_1X8),
137
138 V4L2_MBUS_FROM_MEDIA_BUS_FMT(S5C_UYVY_JPEG_1X8),
139
140 V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32),
141};
142#endif
143
144#endif
145