aboutsummaryrefslogtreecommitdiff
path: root/msm-v4l2-controls.h
blob: 0b5639faa4c28b77ec423ef31498abf8357cfb19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
#ifndef __MSM_V4L2_CONTROLS_H__
#define __MSM_V4L2_CONTROLS_H__

#include <linux/v4l2-controls.h>

/*  MPEG-class control IDs specific to the msm_vidc driver */
#define V4L2_CID_MPEG_MSM_VIDC_BASE		(V4L2_CTRL_CLASS_MPEG | 0x2000)

#define V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_PICTURE_TYPE \
			(V4L2_CID_MPEG_MSM_VIDC_BASE+0)
#define V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO \
			(V4L2_CID_MPEG_MSM_VIDC_BASE+1)
#define V4L2_CID_MPEG_VIDC_VIDEO_POST_LOOP_DEBLOCKER_MODE \
			(V4L2_CID_MPEG_MSM_VIDC_BASE+2)
#define V4L2_CID_MPEG_VIDC_VIDEO_DIVX_FORMAT \
			(V4L2_CID_MPEG_MSM_VIDC_BASE+3)
enum v4l2_mpeg_vidc_video_divx_format_type {
	V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_4		= 0,
	V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_5		= 1,
	V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_6	    = 2,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_MB_ERROR_MAP_REPORTING	\
			(V4L2_CID_MPEG_MSM_VIDC_BASE+4)
#define V4L2_CID_MPEG_VIDC_VIDEO_CONTINUE_DATA_TRANSFER \
			(V4L2_CID_MPEG_MSM_VIDC_BASE+5)

#define V4L2_CID_MPEG_VIDC_VIDEO_STREAM_FORMAT   (V4L2_CID_MPEG_MSM_VIDC_BASE+6)
enum v4l2_mpeg_vidc_video_stream_format {
	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_STARTCODES         = 0,
	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_NAL_PER_BUFFER = 1,
	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_BYTE_LENGTH    = 2,
	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_TWO_BYTE_LENGTH    = 3,
	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_FOUR_BYTE_LENGTH   = 4,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_OUTPUT_ORDER   (V4L2_CID_MPEG_MSM_VIDC_BASE+7)
enum v4l2_mpeg_vidc_video_output_order {
	V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DISPLAY         = 0,
	V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DECODE          = 1,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE   (V4L2_CID_MPEG_MSM_VIDC_BASE+8)
#define V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD   (V4L2_CID_MPEG_MSM_VIDC_BASE+9)
#define V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+10)
#define V4L2_CID_MPEG_VIDC_VIDEO_NUM_B_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+11)
#define V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_IFRAME (V4L2_CID_MPEG_MSM_VIDC_BASE+12)

#define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL (V4L2_CID_MPEG_MSM_VIDC_BASE+13)
enum v4l2_mpeg_vidc_video_rate_control {
	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_OFF = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_VFR = 1,
	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_CFR = 2,
	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_VFR = 3,
	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_CFR = 4,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_ROTATION (V4L2_CID_MPEG_MSM_VIDC_BASE+14)
enum v4l2_mpeg_vidc_video_rotation {
	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_NONE = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_90 = 1,
	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_180 = 2,
	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_270 = 3,
};
#define MSM_VIDC_BASE V4L2_CID_MPEG_MSM_VIDC_BASE
#define V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL (MSM_VIDC_BASE+15)
enum v4l2_mpeg_vidc_h264_cabac_model {
	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_0 = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_1 = 1,
	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_2 = 2,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE (MSM_VIDC_BASE+16)
enum v4l2_mpeg_vidc_video_intra_refresh_mode {
	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_NONE = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC = 1,
	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_ADAPTIVE = 2,
	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC_ADAPTIVE = 3,
	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOM = 4,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_AIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE+17)
#define V4L2_CID_MPEG_VIDC_VIDEO_AIR_REF (V4L2_CID_MPEG_MSM_VIDC_BASE+18)
#define V4L2_CID_MPEG_VIDC_VIDEO_CIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE+19)

#define V4L2_CID_MPEG_VIDC_VIDEO_H263_PROFILE (V4L2_CID_MPEG_MSM_VIDC_BASE+20)
enum v4l2_mpeg_vidc_video_h263_profile {
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BASELINE = 0,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_H320CODING	= 1,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BACKWARDCOMPATIBLE = 2,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV2 = 3,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV3 = 4,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHCOMPRESSION = 5,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERNET = 6,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERLACE = 7,
	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHLATENCY = 8,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_H263_LEVEL (V4L2_CID_MPEG_MSM_VIDC_BASE+21)
enum v4l2_mpeg_vidc_video_h263_level {
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_1_0 = 0,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_2_0 = 1,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_3_0 = 2,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_0 = 3,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_5 = 4,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_5_0 = 5,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_6_0 = 6,
	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_7_0 = 7,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_H264_AU_DELIMITER \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 22)
enum v4l2_mpeg_vidc_video_h264_au_delimiter {
	V4L2_MPEG_VIDC_VIDEO_H264_AU_DELIMITER_DISABLED = 0,
	V4L2_MPEG_VIDC_VIDEO_H264_AU_DELIMITER_ENABLED = 1
};
#define V4L2_CID_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 23)
enum v4l2_mpeg_vidc_video_sync_frame_decode {
	V4L2_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE_DISABLE = 0,
	V4L2_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE_ENABLE = 1
};
#define V4L2_CID_MPEG_VIDC_VIDEO_SECURE (V4L2_CID_MPEG_MSM_VIDC_BASE+24)
#define V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 25)
enum v4l2_mpeg_vidc_extradata {
	V4L2_MPEG_VIDC_EXTRADATA_NONE = 0,
	V4L2_MPEG_VIDC_EXTRADATA_MB_QUANTIZATION = 1,
	V4L2_MPEG_VIDC_EXTRADATA_INTERLACE_VIDEO = 2,
	V4L2_MPEG_VIDC_EXTRADATA_VC1_FRAMEDISP = 3,
	V4L2_MPEG_VIDC_EXTRADATA_VC1_SEQDISP = 4,
	V4L2_MPEG_VIDC_EXTRADATA_TIMESTAMP = 5,
	V4L2_MPEG_VIDC_EXTRADATA_S3D_FRAME_PACKING = 6,
	V4L2_MPEG_VIDC_EXTRADATA_FRAME_RATE = 7,
	V4L2_MPEG_VIDC_EXTRADATA_PANSCAN_WINDOW = 8,
	V4L2_MPEG_VIDC_EXTRADATA_RECOVERY_POINT_SEI = 9,
	V4L2_MPEG_VIDC_EXTRADATA_MULTISLICE_INFO = 10,
	V4L2_MPEG_VIDC_EXTRADATA_NUM_CONCEALED_MB = 11,
	V4L2_MPEG_VIDC_EXTRADATA_METADATA_FILLER = 12,
	V4L2_MPEG_VIDC_EXTRADATA_INPUT_CROP = 13,
	V4L2_MPEG_VIDC_EXTRADATA_DIGITAL_ZOOM = 14,
	V4L2_MPEG_VIDC_EXTRADATA_ASPECT_RATIO = 15,
	V4L2_MPEG_VIDC_EXTRADATA_MPEG2_SEQDISP = 16,
	V4L2_MPEG_VIDC_EXTRADATA_STREAM_USERDATA = 17,
	V4L2_MPEG_VIDC_EXTRADATA_FRAME_QP = 18,
	V4L2_MPEG_VIDC_EXTRADATA_FRAME_BITS_INFO = 19,
	V4L2_MPEG_VIDC_EXTRADATA_LTR = 20,
	V4L2_MPEG_VIDC_EXTRADATA_METADATA_MBI = 21,
};

#define V4L2_CID_MPEG_VIDC_SET_PERF_LEVEL (V4L2_CID_MPEG_MSM_VIDC_BASE + 26)
enum v4l2_mpeg_vidc_perf_level {
	V4L2_CID_MPEG_VIDC_PERF_LEVEL_NOMINAL			= 0,
	V4L2_CID_MPEG_VIDC_PERF_LEVEL_PERFORMANCE		= 1,
	V4L2_CID_MPEG_VIDC_PERF_LEVEL_TURBO			= 2,
};
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_GOB		\
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 27)

#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_DELIVERY_MODE	\
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 28)

#define V4L2_CID_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 29)
enum v4l2_mpeg_vidc_video_h264_vui_timing_info {
	V4L2_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO_DISABLED = 0,
	V4L2_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO_ENABLED = 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_ALLOC_MODE_INPUT	\
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 30)
#define V4L2_CID_MPEG_VIDC_VIDEO_ALLOC_MODE_OUTPUT       \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 31)
enum v4l2_mpeg_vidc_video_alloc_mode_type {
	V4L2_MPEG_VIDC_VIDEO_STATIC	= 0,
	V4L2_MPEG_VIDC_VIDEO_RING	= 1,
	V4L2_MPEG_VIDC_VIDEO_DYNAMIC	= 2,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_ASSEMBLY	\
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 32)
enum v4l2_mpeg_vidc_video_assembly {
	V4L2_MPEG_VIDC_FRAME_ASSEMBLY_DISABLE	= 0,
	V4L2_MPEG_VIDC_FRAME_ASSEMBLY_ENABLE	= 1,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_VP8_PROFILE_LEVEL \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 33)
enum v4l2_mpeg_vidc_video_vp8_profile_level {
	V4L2_MPEG_VIDC_VIDEO_VP8_UNUSED,
	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_0,
	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_1,
	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_2,
	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_3,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 34)
enum v4l2_mpeg_vidc_video_h264_vui_bitstream_restrict {
	V4L2_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT_DISABLED = 0,
	V4L2_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT_ENABLED = 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 35)
enum v4l2_mpeg_vidc_video_preserve_text_quality {
	V4L2_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY_DISABLED = 0,
	V4L2_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY_ENABLED = 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 36)
enum v4l2_mpeg_vidc_video_deinterlace {
	V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE_DISABLED = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE_ENABLED = 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_TIME_RESOLUTION \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 37)

#define V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 38)
enum v4l2_mpeg_vidc_video_decoder_multi_stream {
	V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_PRIMARY = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_SECONDARY = 1,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_SCS_THRESHOLD \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 39)

#define V4L2_CID_MPEG_VIDC_VIDEO_MPEG2_LEVEL	(V4L2_CID_MPEG_MSM_VIDC_BASE+40)
enum v4l2_mpeg_vidc_video_mpeg2_level {
	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_0	= 0,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_1	= 1,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_2	= 2,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_3	= 3,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_MPEG2_PROFILE	(V4L2_CID_MPEG_MSM_VIDC_BASE+41)
enum v4l2_mpeg_vidc_video_mpeg2_profile {
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SIMPLE		= 0,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_MAIN			= 1,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_422			= 2,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SNR_SCALABLE		= 3,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SPATIAL_SCALABLE	= 4,
	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_HIGH			= 5,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 42)

#define V4L2_CID_MPEG_VIDC_VIDEO_MVC_BUFFER_LAYOUT \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 43)
enum v4l2_mpeg_vidc_video_mvc_layout {
	V4L2_MPEG_VIDC_VIDEO_MVC_SEQUENTIAL = 0,
	V4L2_MPEG_VIDC_VIDEO_MVC_TOP_BOTTOM = 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_VP8_MIN_QP (V4L2_CID_MPEG_MSM_VIDC_BASE + 44)
#define V4L2_CID_MPEG_VIDC_VIDEO_VP8_MAX_QP (V4L2_CID_MPEG_MSM_VIDC_BASE + 45)
#define V4L2_CID_MPEG_VIDC_VIDEO_CONCEAL_COLOR \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 46)

#define V4L2_CID_MPEG_VIDC_VIDEO_LTRMODE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 47)

enum v4l2_mpeg_vidc_video_ltrmode {
	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_DISABLE = 0,
	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_MANUAL = 1,
	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_PERIODIC = 2
};

#define V4L2_CID_MPEG_VIDC_VIDEO_LTRCOUNT \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 48)

#define V4L2_CID_MPEG_VIDC_VIDEO_USELTRFRAME \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 49)

#define V4L2_CID_MPEG_VIDC_VIDEO_MARKLTRFRAME \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 50)

#define V4L2_CID_MPEG_VIDC_VIDEO_HIER_P_NUM_LAYERS \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 51)

#define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE \
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 52)
enum v4l2_mpeg_vidc_video_rate_control_timestamp_mode {
	V4L2_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE_HONOR = 0,
	V4L2_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE_IGNORE = 1,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 53)
enum vl42_mpeg_vidc_video_enable_initial_qp {
	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_IFRAME = 0x1,
	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_PFRAME = 0x2,
	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_BFRAME = 0x4,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 54)

#define V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 55)

#define V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 56)

#define V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_X_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 57)

#define V4L2_CID_MPEG_VIDC_VIDEO_PFRAME_X_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 58)

#define V4L2_CID_MPEG_VIDC_VIDEO_BFRAME_X_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 59)

#define V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_Y_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 60)

#define V4L2_CID_MPEG_VIDC_VIDEO_PFRAME_Y_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 61)

#define V4L2_CID_MPEG_VIDC_VIDEO_BFRAME_Y_RANGE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 62)

#define V4L2_CID_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE \
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 63)

#define V4L2_CID_MPEG_VIDC_VIDEO_BUFFER_SIZE_LIMIT \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 64)

enum vl42_mpeg_vidc_video_vpx_error_resilience {
	V4L2_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE_DISABLED = 0,
	V4L2_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE_ENABLED = 1,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_HEVC_PROFILE \
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 65)
enum v4l2_mpeg_video_hevc_profile {
	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN			= 0,
	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN10		= 1,
	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN_STILL_PIC	= 2,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_HEVC_TIER_LEVEL \
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 66)
enum v4l2_mpeg_video_hevc_level {
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_1	= 0,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_1	= 1,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_2	= 2,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_2	= 3,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_2_1	= 4,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_2_1	= 5,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_3	= 6,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_3	= 7,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_3_1	= 8,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_3_1	= 9,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_4	= 10,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_4	= 11,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_4_1	= 12,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_4_1	= 13,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5	= 14,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5	= 15,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5_1	= 16,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5_1	= 17,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5_2	= 18,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5_2	= 19,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6	= 20,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6	= 21,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6_1	= 22,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6_1	= 23,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6_2	= 24,
	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6_2	= 25,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC \
	(V4L2_CID_MPEG_MSM_VIDC_BASE + 67)

enum vl42_mpeg_vidc_video_h264_svc_nal {
	V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC_DISABLED = 0,
	V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC_ENABLED = 1,
};

#define V4L2_CID_MPEG_VIDC_VIDEO_PERF_MODE	 \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 68)

enum v4l2_mpeg_vidc_video_perf_mode {
	V4L2_MPEG_VIDC_VIDEO_PERF_MAX_QUALITY = 1,
	V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE = 2
};

#define V4L2_CID_MPEG_VIDC_VIDEO_HIER_B_NUM_LAYERS \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 69)

#define V4L2_CID_MPEG_VIDC_VIDEO_SECURE_SCALING_THRESHOLD \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 70)

#define V4L2_CID_MPEG_VIDC_VIDEO_NON_SECURE_OUTPUT2 \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 71)

#define V4L2_CID_MPEG_VIDC_VIDEO_HYBRID_HIERP_MODE \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 72)

/* Vendor extensions */
#define V4L2_QCOM_BUF_FLAG_CODECCONFIG		0x10000
#define V4L2_QCOM_BUF_FLAG_EOSEQ		0x20000
#define V4L2_QCOM_BUF_TIMESTAMP_INVALID		0x40000
#define V4L2_QCOM_BUF_FLAG_IDRFRAME		0x80000	/*Image is a IDR-frame*/
#define V4L2_QCOM_BUF_FLAG_DECODEONLY		0x100000
#define V4L2_QCOM_BUF_DATA_CORRUPT		0x200000
#define V4L2_QCOM_BUF_DROP_FRAME		0x400000
#define V4L2_QCOM_BUF_INPUT_UNSUPPORTED		0x800000
#define V4L2_QCOM_BUF_FLAG_EOS			0x1000000
#define V4L2_QCOM_BUF_TS_DISCONTINUITY		0x2000000
#define V4L2_QCOM_BUF_TS_ERROR			0x4000000
#define V4L2_QCOM_BUF_FLAG_READONLY		0x8000000
#define V4L2_MSM_VIDC_BUF_START_CODE_NOT_FOUND	0x10000000
#define V4L2_MSM_BUF_FLAG_YUV_601_709_CLAMP	0x20000000
#define V4L2_MSM_BUF_FLAG_MBAFF			0x40000000

/* Capabilities */
#define V4L2_CAP_QCOM_FRAMESKIP	0x2000	/*  frame skipping is supported */

struct v4l2_qcom_frameskip {
	__u64		   maxframeinterval;
	__u8		   fpsvariance;
};

/* Encoder commands */
#define V4L2_ENC_QCOM_CMD_FLUSH  (4)

/* Decoder commands */
#define V4L2_DEC_QCOM_CMD_FLUSH  (4)

/* Flags for V4L2_DEC_QCOM_CMD_FLUSH */
#define V4L2_DEC_QCOM_CMD_FLUSH_OUTPUT  (1 << 0)
#define V4L2_DEC_QCOM_CMD_FLUSH_CAPTURE (1 << 1)

#define V4L2_QCOM_CMD_FLUSH_OUTPUT  (1 << 0)
#define V4L2_QCOM_CMD_FLUSH_CAPTURE (1 << 1)

/* Events */
#define V4L2_EVENT_MSM_VIDC_START	(V4L2_EVENT_PRIVATE_START + 0x00001000)
#define V4L2_EVENT_MSM_VIDC_FLUSH_DONE	(V4L2_EVENT_MSM_VIDC_START + 1)
#define V4L2_EVENT_MSM_VIDC_PORT_SETTINGS_CHANGED_SUFFICIENT	\
		(V4L2_EVENT_MSM_VIDC_START + 2)
#define V4L2_EVENT_MSM_VIDC_PORT_SETTINGS_CHANGED_INSUFFICIENT	\
		(V4L2_EVENT_MSM_VIDC_START + 3)
#define V4L2_EVENT_MSM_VIDC_CLOSE_DONE	(V4L2_EVENT_MSM_VIDC_START + 4)
#define V4L2_EVENT_MSM_VIDC_SYS_ERROR	(V4L2_EVENT_MSM_VIDC_START + 5)
#define V4L2_EVENT_MSM_VIDC_RELEASE_BUFFER_REFERENCE \
		(V4L2_EVENT_MSM_VIDC_START + 6)
#define V4L2_EVENT_MSM_VIDC_RELEASE_UNQUEUED_BUFFER \
		(V4L2_EVENT_MSM_VIDC_START + 7)
#define V4L2_EVENT_MSM_VIDC_HW_OVERLOAD (V4L2_EVENT_MSM_VIDC_START + 8)
#define V4L2_EVENT_MSM_VIDC_MAX_CLIENTS (V4L2_EVENT_MSM_VIDC_START + 9)
#define V4L2_EVENT_MSM_VIDC_HW_UNSUPPORTED (V4L2_EVENT_MSM_VIDC_START + 10)

#endif/* __MSM_V4L2_CONTROLS_H__ */