• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Video for Linux Two header file for Exynos
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5  *		http://www.samsung.com
6  *
7  * This header file contains several v4l2 APIs to be proposed to v4l2
8  * community and until being accepted, will be used restrictly for Exynos.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  */
14 
15 #ifndef __LINUX_VIDEODEV2_EXYNOS_MEDIA_H
16 #define __LINUX_VIDEODEV2_EXYNOS_MEDIA_H
17 
18 /*      Pixel format          FOURCC                     depth  Description  */
19 
20 /* two planes -- one Y, one Cr + Cb interleaved  */
21 #define V4L2_PIX_FMT_YUV444_2P v4l2_fourcc('Y', 'U', '2', 'P') /* 24  Y/CbCr */
22 #define V4L2_PIX_FMT_YVU444_2P v4l2_fourcc('Y', 'V', '2', 'P') /* 24  Y/CrCb */
23 
24 /* three planes -- one Y, one Cr, one Cb */
25 #define V4L2_PIX_FMT_YUV444_3P v4l2_fourcc('Y', 'U', '3', 'P') /* 24  Y/Cb/Cr */
26 
27 /* two non contiguous planes - one Y, one Cr + Cb interleaved  */
28 /* 21  Y/CrCb 4:2:0  */
29 #define V4L2_PIX_FMT_NV21M    v4l2_fourcc('N', 'M', '2', '1')
30 /* 12  Y/CbCr 4:2:0 16x16 macroblocks */
31 #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2')
32 
33 /* three non contiguous planes - Y, Cb, Cr */
34 /* 12  YVU420 planar */
35 #define V4L2_PIX_FMT_YVU420M  v4l2_fourcc('Y', 'V', 'U', 'M')
36 
37 /* compressed formats */
38 #define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
39 #define V4L2_PIX_FMT_FIMV     v4l2_fourcc('F', 'I', 'M', 'V') /* FIMV  */
40 #define V4L2_PIX_FMT_FIMV1    v4l2_fourcc('F', 'I', 'M', '1') /* FIMV1 */
41 #define V4L2_PIX_FMT_FIMV2    v4l2_fourcc('F', 'I', 'M', '2') /* FIMV2 */
42 #define V4L2_PIX_FMT_FIMV3    v4l2_fourcc('F', 'I', 'M', '3') /* FIMV3 */
43 #define V4L2_PIX_FMT_FIMV4    v4l2_fourcc('F', 'I', 'M', '4') /* FIMV4 */
44 #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
45 
46 /* yuv444 of JFIF JPEG */
47 #define V4L2_PIX_FMT_JPEG_444 v4l2_fourcc('J', 'P', 'G', '4')
48 /* yuv422 of JFIF JPEG */
49 #define V4L2_PIX_FMT_JPEG_422 v4l2_fourcc('J', 'P', 'G', '2')
50 /* yuv420 of JFIF JPEG */
51 #define V4L2_PIX_FMT_JPEG_420 v4l2_fourcc('J', 'P', 'G', '0')
52 /* grey of JFIF JPEG */
53 #define V4L2_PIX_FMT_JPEG_GRAY v4l2_fourcc('J', 'P', 'G', 'G')
54 
55 /*
56  *	C O N T R O L S
57  */
58 /* CID base for Exynos controls (USER_CLASS) */
59 #define V4L2_CID_EXYNOS_BASE		(V4L2_CTRL_CLASS_USER | 0x2000)
60 
61 /* for rgb alpha function */
62 #define V4L2_CID_GLOBAL_ALPHA		(V4L2_CID_EXYNOS_BASE + 1)
63 
64 /* cacheable configuration */
65 #define V4L2_CID_CACHEABLE		(V4L2_CID_EXYNOS_BASE + 10)
66 
67 /* jpeg captured size */
68 #define V4L2_CID_CAM_JPEG_MEMSIZE	(V4L2_CID_EXYNOS_BASE + 20)
69 #define V4L2_CID_CAM_JPEG_ENCODEDSIZE	(V4L2_CID_EXYNOS_BASE + 21)
70 
71 #define V4L2_CID_SET_SHAREABLE		(V4L2_CID_EXYNOS_BASE + 40)
72 
73 /* TV configuration */
74 #define V4L2_CID_TV_LAYER_BLEND_ENABLE	(V4L2_CID_EXYNOS_BASE + 50)
75 #define V4L2_CID_TV_LAYER_BLEND_ALPHA	(V4L2_CID_EXYNOS_BASE + 51)
76 #define V4L2_CID_TV_PIXEL_BLEND_ENABLE	(V4L2_CID_EXYNOS_BASE + 52)
77 #define V4L2_CID_TV_CHROMA_ENABLE	(V4L2_CID_EXYNOS_BASE + 53)
78 #define V4L2_CID_TV_CHROMA_VALUE	(V4L2_CID_EXYNOS_BASE + 54)
79 #define V4L2_CID_TV_HPD_STATUS		(V4L2_CID_EXYNOS_BASE + 55)
80 #define V4L2_CID_TV_LAYER_PRIO		(V4L2_CID_EXYNOS_BASE + 56)
81 #define V4L2_CID_TV_SET_DVI_MODE	(V4L2_CID_EXYNOS_BASE + 57)
82 #define V4L2_CID_TV_GET_DVI_MODE	(V4L2_CID_EXYNOS_BASE + 58)
83 #define V4L2_CID_TV_SET_ASPECT_RATIO	(V4L2_CID_EXYNOS_BASE + 59)
84 #define V4L2_CID_TV_MAX_AUDIO_CHANNELS	(V4L2_CID_EXYNOS_BASE + 60)
85 #define V4L2_CID_TV_ENABLE_HDMI_AUDIO	(V4L2_CID_EXYNOS_BASE + 61)
86 #define V4L2_CID_TV_SET_NUM_CHANNELS	(V4L2_CID_EXYNOS_BASE + 62)
87 #define V4L2_CID_TV_UPDATE		(V4L2_CID_EXYNOS_BASE + 63)
88 #define V4L2_CID_TV_SET_COLOR_RANGE	(V4L2_CID_EXYNOS_BASE + 64)
89 #define V4L2_CID_TV_HDCP_ENABLE		(V4L2_CID_EXYNOS_BASE + 65)
90 
91 /* for color space conversion equation selection */
92 #define V4L2_CID_CSC_EQ_MODE		(V4L2_CID_EXYNOS_BASE + 100)
93 #define V4L2_CID_CSC_EQ			(V4L2_CID_EXYNOS_BASE + 101)
94 #define V4L2_CID_CSC_RANGE		(V4L2_CID_EXYNOS_BASE + 102)
95 
96 #define V4L2_CID_CONTENT_PROTECTION	(V4L2_CID_EXYNOS_BASE + 201)
97 
98 /* CID base for MFC controls (MPEG_CLASS) */
99 #define V4L2_CID_MPEG_MFC_BASE		(V4L2_CTRL_CLASS_MPEG | 0x2000)
100 
101 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_AVAIL		\
102 					(V4L2_CID_MPEG_MFC_BASE + 1)
103 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRGMENT_ID	\
104 					(V4L2_CID_MPEG_MFC_BASE + 2)
105 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_INFO		\
106 					(V4L2_CID_MPEG_MFC_BASE + 3)
107 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_GRID_POS	\
108 					(V4L2_CID_MPEG_MFC_BASE + 4)
109 
110 #define V4L2_CID_MPEG_MFC51_VIDEO_PACKED_PB		\
111 					(V4L2_CID_MPEG_MFC_BASE + 5)
112 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TAG		\
113 					(V4L2_CID_MPEG_MFC_BASE + 6)
114 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_ENABLE		\
115 					(V4L2_CID_MPEG_MFC_BASE + 7)
116 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_LUMA		\
117 					(V4L2_CID_MPEG_MFC_BASE + 8)
118 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_CHROMA	\
119 					(V4L2_CID_MPEG_MFC_BASE + 9)
120 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_LUMA_BOT	\
121 					(V4L2_CID_MPEG_MFC_BASE + 10)
122 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_CHROMA_BOT	\
123 					(V4L2_CID_MPEG_MFC_BASE + 11)
124 #define V4L2_CID_MPEG_MFC51_VIDEO_CRC_GENERATED		\
125 					(V4L2_CID_MPEG_MFC_BASE + 12)
126 #define V4L2_CID_MPEG_MFC51_VIDEO_CHECK_STATE		\
127 					(V4L2_CID_MPEG_MFC_BASE + 13)
128 #define V4L2_CID_MPEG_MFC51_VIDEO_DISPLAY_STATUS	\
129 					(V4L2_CID_MPEG_MFC_BASE + 14)
130 
131 #define V4L2_CID_MPEG_MFC51_VIDEO_LUMA_ADDR	\
132 					(V4L2_CID_MPEG_MFC_BASE + 15)
133 #define V4L2_CID_MPEG_MFC51_VIDEO_CHROMA_ADDR	\
134 					(V4L2_CID_MPEG_MFC_BASE + 16)
135 
136 #define V4L2_CID_MPEG_MFC51_VIDEO_STREAM_SIZE		\
137 					(V4L2_CID_MPEG_MFC_BASE + 17)
138 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_COUNT		\
139 					(V4L2_CID_MPEG_MFC_BASE + 18)
140 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TYPE		\
141 					(V4L2_CID_MPEG_MFC_BASE + 19)
142 enum v4l2_mpeg_mfc51_video_frame_type {
143 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_NOT_CODED	= 0,
144 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_I_FRAME	= 1,
145 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_P_FRAME	= 2,
146 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_B_FRAME	= 3,
147 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_SKIPPED	= 4,
148 	V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_OTHERS		= 5,
149 };
150 
151 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_INTERLACE	\
152 					(V4L2_CID_MPEG_MFC_BASE + 20)
153 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_RC_FRAME_RATE	\
154 					(V4L2_CID_MPEG_MFC_BASE + 21)
155 #define V4L2_CID_MPEG_MFC51_VIDEO_MPEG4_VOP_TIME_RES	\
156 					(V4L2_CID_MPEG_MFC_BASE + 22)
157 #define V4L2_CID_MPEG_MFC51_VIDEO_MPEG4_VOP_FRM_DELTA	\
158 					(V4L2_CID_MPEG_MFC_BASE + 23)
159 #define V4L2_CID_MPEG_MFC51_VIDEO_H263_RC_FRAME_RATE	\
160 					(V4L2_CID_MPEG_MFC_BASE + 24)
161 
162 #define V4L2_CID_MPEG_MFC6X_VIDEO_FRAME_DELTA		\
163 					(V4L2_CID_MPEG_MFC_BASE + 25)
164 
165 #define V4L2_CID_MPEG_MFC51_VIDEO_I_PERIOD_CH	V4L2_CID_MPEG_VIDEO_GOP_SIZE
166 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_RATE_CH		\
167 				V4L2_CID_MPEG_MFC51_VIDEO_H264_RC_FRAME_RATE
168 #define V4L2_CID_MPEG_MFC51_VIDEO_BIT_RATE_CH	V4L2_CID_MPEG_VIDEO_BITRATE
169 
170 /* new entry for enum v4l2_mpeg_video_mpeg4_level */
171 #define V4L2_MPEG_VIDEO_MPEG4_LEVEL_6		8
172 
173 /* proposed CIDs, based on 3.3-rc3 */
174 #define V4L2_CID_MPEG_VIDEO_VBV_DELAY		(V4L2_CID_MPEG_MFC_BASE + 26)
175 
176 #define V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_S_B \
177 	V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY
178 
179 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING		\
180 					(V4L2_CID_MPEG_MFC_BASE + 27)
181 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0		\
182 					(V4L2_CID_MPEG_MFC_BASE + 28)
183 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE	\
184 					(V4L2_CID_MPEG_MFC_BASE + 29)
185 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
186 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_CHEKERBOARD	= 0,
187 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_COLUMN		= 1,
188 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_ROW		= 2,
189 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_SIDE_BY_SIDE	= 3,
190 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_TOP_BOTTOM	= 4,
191 	V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_TEMPORAL	= 5,
192 };
193 #define V4L2_CID_MPEG_VIDEO_H264_FMO			\
194 					(V4L2_CID_MPEG_MFC_BASE + 30)
195 #define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE		\
196 					(V4L2_CID_MPEG_MFC_BASE + 31)
197 enum v4l2_mpeg_video_h264_fmo_map_type {
198 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES		= 0,
199 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES		= 1,
200 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER	= 2,
201 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT			= 3,
202 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN			= 4,
203 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN			= 5,
204 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT			= 6,
205 };
206 #define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP	\
207 					(V4L2_CID_MPEG_MFC_BASE + 32)
208 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION	\
209 					(V4L2_CID_MPEG_MFC_BASE + 33)
210 enum v4l2_mpeg_video_h264_fmo_change_dir {
211 	V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT	= 0,
212 	V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT	= 1,
213 };
214 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE	\
215 					(V4L2_CID_MPEG_MFC_BASE + 34)
216 #define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH		\
217 					(V4L2_CID_MPEG_MFC_BASE + 35)
218 #define V4L2_CID_MPEG_VIDEO_H264_ASO			\
219 					(V4L2_CID_MPEG_MFC_BASE + 36)
220 #define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER	\
221 					(V4L2_CID_MPEG_MFC_BASE + 37)
222 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING		\
223 					(V4L2_CID_MPEG_MFC_BASE + 38)
224 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE	\
225 					(V4L2_CID_MPEG_MFC_BASE + 39)
226 enum v4l2_mpeg_video_h264_hierarchical_coding_type {
227 	V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B	= 0,
228 	V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P	= 1,
229 };
230 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER	\
231 					(V4L2_CID_MPEG_MFC_BASE + 40)
232 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP	\
233 					(V4L2_CID_MPEG_MFC_BASE + 41)
234 
235 #define V4L2_CID_MPEG_VIDEO_H264_MVC_VIEW_ID			\
236 					(V4L2_CID_MPEG_MFC_BASE + 42)
237 #endif /* __LINUX_VIDEODEV2_EXYNOS_MEDIA_H */
238