blob: 4f7d7905939fba6e9593c58f1b93eed3a88ef9e3 [file] [log] [blame]
Chih-Wei Huang0d92eda2012-02-07 16:55:49 +08001/*
2 libcamera: An implementation of the library required by Android OS 3.2 so
3 it can access V4L2 devices as cameras.
4
Chih-Wei Huangd5590eb2019-02-26 17:48:45 +08005 (C) 2011 Eduardo José Tagle <ejtagle@tutopia.com>
Chih-Wei Huang0d92eda2012-02-07 16:55:49 +08006
7 Based on several packages:
8 - luvcview: Sdl video Usb Video Class grabber
9 (C) 2005,2006,2007 Laurent Pinchart && Michel Xhaard
10
11 - spcaview
12 (C) 2003,2004,2005,2006 Michel Xhaard
13
14 - JPEG decoder from http://www.bootsplash.org/
15 (C) August 2001 by Michael Schroeder, <mls@suse.de>
16
17 - libcamera V4L for Android 2.2
18 (C) 2009 0xlab.org - http://0xlab.org/
19 (C) 2010 SpectraCore Technologies
20 Author: Venkat Raju <codredruids@spectracoretech.com>
21 Based on a code from http://code.google.com/p/android-m912/downloads/detail?name=v4l2_camera_v2.patch
22
23 - guvcview: http://guvcview.berlios.de
24 Paulo Assis <pj.assis@gmail.com>
25 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
26
27 This program is free software: you can redistribute it and/or modify
28 it under the terms of the GNU General Public License as published by
29 the Free Software Foundation, either version 3 of the License, or
30 (at your option) any later version.
31
32 This program is distributed in the hope that it will be useful,
33 but WITHOUT ANY WARRANTY; without even the implied warranty of
34 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 GNU General Public License for more details.
36
37 You should have received a copy of the GNU General Public License
38 along with this program. If not, see <http://www.gnu.org/licenses/>.
39
40 */
41
42#ifndef V4L2_FORMATS_H
43#define V4L2_FORMATS_H
44
45#include "uvc_compat.h"
46
47/* (Patch) define all supported formats - already done in videodev2.h*/
48#ifndef V4L2_PIX_FMT_MJPEG
49#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* MJPEG stream */
50#endif
51
52#ifndef V4L2_PIX_FMT_JPEG
53#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JPEG stream */
54#endif
55
56#ifndef V4L2_PIX_FMT_YUYV
57#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* YUV 4:2:2 */
58#endif
59
60#ifndef V4L2_PIX_FMT_YVYU
61#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y','V','Y','U') /* YUV 4:2:2 */
62#endif
63
64#ifndef V4L2_PIX_FMT_UYVY
65#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* YUV 4:2:2 */
66#endif
67
68#ifndef V4L2_PIX_FMT_YYUV
69#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* YUV 4:2:2 */
70#endif
71
72#ifndef V4L2_PIX_FMT_YUV420
73#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* YUV 4:2:0 Planar */
74#endif
75
76#ifndef V4L2_PIX_FMT_YVU420
77#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* YUV 4:2:0 Planar */
78#endif
79
80#ifndef V4L2_PIX_FMT_NV12
81#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* YUV 4:2:0 Planar (u/v) interleaved */
82#endif
83
84#ifndef V4L2_PIX_FMT_NV21
85#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* YUV 4:2:0 Planar (v/u) interleaved */
86#endif
87
88#ifndef V4L2_PIX_FMT_NV16
89#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N','V','1','6') /* YUV 4:2:2 Planar (u/v) interleaved */
90#endif
91
92#ifndef V4L2_PIX_FMT_NV61
93#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N','V','6','1') /* YUV 4:2:2 Planar (v/u) interleaved */
94#endif
95
96#ifndef V4L2_PIX_FMT_Y41P
97#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* YUV 4:1:1 */
98#endif
99
100#ifndef V4L2_PIX_FMT_GREY
101#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* Y only */
102#endif
103
104#ifndef V4L2_PIX_FMT_Y16
105#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y','1','6',' ') /* Y only (16 bit) */
106#endif
107
108#ifndef V4L2_PIX_FMT_SPCA501
109#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S','5','0','1') /* YUYV - by line */
110#endif
111
112#ifndef V4L2_PIX_FMT_SPCA505
113#define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S','5','0','5') /* YYUV - by line */
114#endif
115
116#ifndef V4L2_PIX_FMT_SPCA508
117#define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S','5','0','8') /* YUVY - by line */
118#endif
119
120#ifndef V4L2_PIX_FMT_SGBRG8
121#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* GBGB.. RGRG.. */
122#endif
123
124#ifndef V4L2_PIX_FMT_SGRBG8
125#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* GRGR.. BGBG.. */
126#endif
127
128#ifndef V4L2_PIX_FMT_SBGGR8
129#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* BGBG.. GRGR.. */
130#endif
131
132#ifndef V4L2_PIX_FMT_SRGGB8
133#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* RGRG.. GBGB.. */
134#endif
135
136#ifndef V4L2_PIX_FMT_BGR24
137#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
138#endif
139
140#ifndef V4L2_PIX_FMT_RGB24
141#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
142#endif
143
144#endif