blob: b585bb32d25e85740710ff00ce69e01bcde3bf54 [file] [log] [blame]
Boris BREZILLONedcf58b2014-11-10 14:28:26 -03001/*
2 * Media Bus API header
3 *
4 * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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_MEDIA_BUS_FORMAT_H
12#define __LINUX_MEDIA_BUS_FORMAT_H
13
14/*
15 * These bus formats uniquely identify data formats on the data bus. Format 0
16 * is reserved, MEDIA_BUS_FMT_FIXED shall be used by host-client pairs, where
17 * the data format is fixed. Additionally, "2X8" means that one pixel is
18 * transferred in two 8-bit samples, "BE" or "LE" specify in which order those
19 * samples are transferred over the bus: "LE" means that the least significant
20 * bits are transferred first, "BE" means that the most significant bits are
21 * transferred first, and "PADHI" and "PADLO" define which bits - low or high,
22 * in the incomplete high byte, are filled with padding bits.
23 *
24 * The bus formats are grouped by type, bus_width, bits per component, samples
25 * per pixel and order of subsamples. Numerical values are sorted using generic
26 * numerical sort order (8 thus comes before 10).
27 *
28 * As their value can't change when a new bus format is inserted in the
29 * enumeration, the bus formats are explicitly given a numerical value. The next
30 * free values for each category are listed below, update them when inserting
31 * new pixel codes.
32 */
33
34#define MEDIA_BUS_FMT_FIXED 0x0001
35
Laurent Pinchart7b0fd452013-05-15 11:34:26 -030036/* RGB - next is 0x1010 */
Boris BREZILLONedcf58b2014-11-10 14:28:26 -030037#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
38#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
39#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
40#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
41#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
42#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
43#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
44#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
45#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
Laurent Pinchart7b0fd452013-05-15 11:34:26 -030046#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
Boris BREZILLONedcf58b2014-11-10 14:28:26 -030047#define MEDIA_BUS_FMT_RGB888_1X24 0x100a
48#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b
49#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c
50#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d
Laurent Pinchart7b0fd452013-05-15 11:34:26 -030051#define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f
Boris BREZILLONedcf58b2014-11-10 14:28:26 -030052
53/* YUV (including grey) - next is 0x2024 */
54#define MEDIA_BUS_FMT_Y8_1X8 0x2001
55#define MEDIA_BUS_FMT_UV8_1X8 0x2015
56#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002
57#define MEDIA_BUS_FMT_VYUY8_1_5X8 0x2003
58#define MEDIA_BUS_FMT_YUYV8_1_5X8 0x2004
59#define MEDIA_BUS_FMT_YVYU8_1_5X8 0x2005
60#define MEDIA_BUS_FMT_UYVY8_2X8 0x2006
61#define MEDIA_BUS_FMT_VYUY8_2X8 0x2007
62#define MEDIA_BUS_FMT_YUYV8_2X8 0x2008
63#define MEDIA_BUS_FMT_YVYU8_2X8 0x2009
64#define MEDIA_BUS_FMT_Y10_1X10 0x200a
65#define MEDIA_BUS_FMT_UYVY10_2X10 0x2018
66#define MEDIA_BUS_FMT_VYUY10_2X10 0x2019
67#define MEDIA_BUS_FMT_YUYV10_2X10 0x200b
68#define MEDIA_BUS_FMT_YVYU10_2X10 0x200c
69#define MEDIA_BUS_FMT_Y12_1X12 0x2013
70#define MEDIA_BUS_FMT_UYVY8_1X16 0x200f
71#define MEDIA_BUS_FMT_VYUY8_1X16 0x2010
72#define MEDIA_BUS_FMT_YUYV8_1X16 0x2011
73#define MEDIA_BUS_FMT_YVYU8_1X16 0x2012
74#define MEDIA_BUS_FMT_YDYUYDYV8_1X16 0x2014
75#define MEDIA_BUS_FMT_UYVY10_1X20 0x201a
76#define MEDIA_BUS_FMT_VYUY10_1X20 0x201b
77#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d
78#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e
79#define MEDIA_BUS_FMT_YUV10_1X30 0x2016
80#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017
81#define MEDIA_BUS_FMT_UYVY12_2X12 0x201c
82#define MEDIA_BUS_FMT_VYUY12_2X12 0x201d
83#define MEDIA_BUS_FMT_YUYV12_2X12 0x201e
84#define MEDIA_BUS_FMT_YVYU12_2X12 0x201f
85#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020
86#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021
87#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022
88#define MEDIA_BUS_FMT_YVYU12_1X24 0x2023
89
90/* Bayer - next is 0x3019 */
91#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
92#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
93#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
94#define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014
95#define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015
96#define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016
97#define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 0x3017
98#define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 0x3018
99#define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 0x300b
100#define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 0x300c
101#define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 0x3009
102#define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 0x300d
103#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE 0x3003
104#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE 0x3004
105#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE 0x3005
106#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE 0x3006
107#define MEDIA_BUS_FMT_SBGGR10_1X10 0x3007
108#define MEDIA_BUS_FMT_SGBRG10_1X10 0x300e
109#define MEDIA_BUS_FMT_SGRBG10_1X10 0x300a
110#define MEDIA_BUS_FMT_SRGGB10_1X10 0x300f
111#define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008
112#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010
113#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011
114#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012
115
116/* JPEG compressed formats - next is 0x4002 */
117#define MEDIA_BUS_FMT_JPEG_1X8 0x4001
118
119/* Vendor specific formats - next is 0x5002 */
120
121/* S5C73M3 sensor specific interleaved UYVY and JPEG */
122#define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 0x5001
123
124/* HSV - next is 0x6002 */
125#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
126
127#endif /* __LINUX_MEDIA_BUS_FORMAT_H */