Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
v4l2-mediabus.h
Go to the documentation of this file.
1 /*
2  * Media Bus API header
3  *
4  * Copyright (C) 2009, Guennadi Liakhovetski <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 
11 #ifndef __LINUX_V4L2_MEDIABUS_H
12 #define __LINUX_V4L2_MEDIABUS_H
13 
14 #include <linux/types.h>
15 #include <linux/videodev2.h>
16 
17 /*
18  * These pixel codes uniquely identify data formats on the media bus. Mostly
19  * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is
20  * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the
21  * data format is fixed. Additionally, "2X8" means that one pixel is transferred
22  * in two 8-bit samples, "BE" or "LE" specify in which order those samples are
23  * transferred over the bus: "LE" means that the least significant bits are
24  * transferred first, "BE" means that the most significant bits are transferred
25  * first, and "PADHI" and "PADLO" define which bits - low or high, in the
26  * incomplete high byte, are filled with padding bits.
27  *
28  * The pixel codes are grouped by type, bus_width, bits per component, samples
29  * per pixel and order of subsamples. Numerical values are sorted using generic
30  * numerical sort order (8 thus comes before 10).
31  *
32  * As their value can't change when a new pixel code is inserted in the
33  * enumeration, the pixel codes are explicitly given a numerical value. The next
34  * free values for each category are listed below, update them when inserting
35  * new pixel codes.
36  */
39 
40  /* RGB - next is 0x1009 */
49 
50  /* YUV (including grey) - next is 0x2014 */
70 
71  /* Bayer - next is 0x3015 */
92 
93  /* JPEG compressed formats - next is 0x4002 */
95 
96  /* Vendor specific formats - next is 0x5002 */
97 
98  /* S5C73M3 sensor specific interleaved UYVY and JPEG */
100 };
101 
110 struct v4l2_mbus_framefmt {
111  __u32 width;
112  __u32 height;
113  __u32 code;
114  __u32 field;
116  __u32 reserved[7];
117 };
118 
119 #endif