1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __LINUX_V4L2_CONTROLS_H
8 #define __LINUX_V4L2_CONTROLS_H
9 #include <linux/const.h>
10 #include <linux/types.h>
11 #define V4L2_CTRL_CLASS_USER 0x00980000
12 #define V4L2_CTRL_CLASS_CODEC 0x00990000
13 #define V4L2_CTRL_CLASS_CAMERA 0x009a0000
14 #define V4L2_CTRL_CLASS_FM_TX 0x009b0000
15 #define V4L2_CTRL_CLASS_FLASH 0x009c0000
16 #define V4L2_CTRL_CLASS_JPEG 0x009d0000
17 #define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000
18 #define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000
19 #define V4L2_CTRL_CLASS_DV 0x00a00000
20 #define V4L2_CTRL_CLASS_FM_RX 0x00a10000
21 #define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000
22 #define V4L2_CTRL_CLASS_DETECT 0x00a30000
23 #define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000
24 #define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000
25 #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
26 #define V4L2_CID_USER_BASE V4L2_CID_BASE
27 #define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
28 #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE + 0)
29 #define V4L2_CID_CONTRAST (V4L2_CID_BASE + 1)
30 #define V4L2_CID_SATURATION (V4L2_CID_BASE + 2)
31 #define V4L2_CID_HUE (V4L2_CID_BASE + 3)
32 #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE + 5)
33 #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE + 6)
34 #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE + 7)
35 #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE + 8)
36 #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE + 9)
37 #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE + 10)
38 #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE + 11)
39 #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE + 12)
40 #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE + 13)
41 #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE + 14)
42 #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE + 15)
43 #define V4L2_CID_GAMMA (V4L2_CID_BASE + 16)
44 #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)
45 #define V4L2_CID_EXPOSURE (V4L2_CID_BASE + 17)
46 #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE + 18)
47 #define V4L2_CID_GAIN (V4L2_CID_BASE + 19)
48 #define V4L2_CID_HFLIP (V4L2_CID_BASE + 20)
49 #define V4L2_CID_VFLIP (V4L2_CID_BASE + 21)
50 #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE + 24)
51 enum v4l2_power_line_frequency {
52   V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
53   V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
54   V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
55   V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
56 };
57 #define V4L2_CID_HUE_AUTO (V4L2_CID_BASE + 25)
58 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE + 26)
59 #define V4L2_CID_SHARPNESS (V4L2_CID_BASE + 27)
60 #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE + 28)
61 #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE + 29)
62 #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE + 30)
63 #define V4L2_CID_COLORFX (V4L2_CID_BASE + 31)
64 enum v4l2_colorfx {
65   V4L2_COLORFX_NONE = 0,
66   V4L2_COLORFX_BW = 1,
67   V4L2_COLORFX_SEPIA = 2,
68   V4L2_COLORFX_NEGATIVE = 3,
69   V4L2_COLORFX_EMBOSS = 4,
70   V4L2_COLORFX_SKETCH = 5,
71   V4L2_COLORFX_SKY_BLUE = 6,
72   V4L2_COLORFX_GRASS_GREEN = 7,
73   V4L2_COLORFX_SKIN_WHITEN = 8,
74   V4L2_COLORFX_VIVID = 9,
75   V4L2_COLORFX_AQUA = 10,
76   V4L2_COLORFX_ART_FREEZE = 11,
77   V4L2_COLORFX_SILHOUETTE = 12,
78   V4L2_COLORFX_SOLARIZATION = 13,
79   V4L2_COLORFX_ANTIQUE = 14,
80   V4L2_COLORFX_SET_CBCR = 15,
81   V4L2_COLORFX_SET_RGB = 16,
82 };
83 #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE + 32)
84 #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE + 33)
85 #define V4L2_CID_ROTATE (V4L2_CID_BASE + 34)
86 #define V4L2_CID_BG_COLOR (V4L2_CID_BASE + 35)
87 #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE + 36)
88 #define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE + 37)
89 #define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE + 38)
90 #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE + 39)
91 #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE + 40)
92 #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE + 41)
93 #define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE + 42)
94 #define V4L2_CID_COLORFX_RGB (V4L2_CID_BASE + 43)
95 #define V4L2_CID_LASTP1 (V4L2_CID_BASE + 44)
96 #define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000)
97 #define V4L2_CID_USER_BTTV_BASE (V4L2_CID_USER_BASE + 0x1010)
98 #define V4L2_CID_USER_S2255_BASE (V4L2_CID_USER_BASE + 0x1030)
99 #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040)
100 #define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050)
101 #define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060)
102 #define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070)
103 #define V4L2_CID_USER_TC358743_BASE (V4L2_CID_USER_BASE + 0x1080)
104 #define V4L2_CID_USER_MAX217X_BASE (V4L2_CID_USER_BASE + 0x1090)
105 #define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0)
106 #define V4L2_CID_USER_ATMEL_ISC_BASE (V4L2_CID_USER_BASE + 0x10c0)
107 #define V4L2_CID_USER_CODA_BASE (V4L2_CID_USER_BASE + 0x10e0)
108 #define V4L2_CID_USER_CCS_BASE (V4L2_CID_USER_BASE + 0x10f0)
109 #define V4L2_CID_USER_ALLEGRO_BASE (V4L2_CID_USER_BASE + 0x1170)
110 #define V4L2_CID_USER_ISL7998X_BASE (V4L2_CID_USER_BASE + 0x1180)
111 #define V4L2_CID_USER_DW100_BASE (V4L2_CID_USER_BASE + 0x1190)
112 #define V4L2_CID_USER_ASPEED_BASE (V4L2_CID_USER_BASE + 0x11a0)
113 #define V4L2_CID_USER_NPCM_BASE (V4L2_CID_USER_BASE + 0x11b0)
114 #define V4L2_CID_USER_THP7312_BASE (V4L2_CID_USER_BASE + 0x11c0)
115 #define V4L2_CID_CODEC_BASE (V4L2_CTRL_CLASS_CODEC | 0x900)
116 #define V4L2_CID_CODEC_CLASS (V4L2_CTRL_CLASS_CODEC | 1)
117 #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_CODEC_BASE + 0)
118 enum v4l2_mpeg_stream_type {
119   V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0,
120   V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1,
121   V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2,
122   V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3,
123   V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4,
124   V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5,
125 };
126 #define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_CODEC_BASE + 1)
127 #define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_CODEC_BASE + 2)
128 #define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_CODEC_BASE + 3)
129 #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_CODEC_BASE + 4)
130 #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_CODEC_BASE + 5)
131 #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_CODEC_BASE + 6)
132 #define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_CODEC_BASE + 7)
133 enum v4l2_mpeg_stream_vbi_fmt {
134   V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,
135   V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,
136 };
137 #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_CODEC_BASE + 100)
138 enum v4l2_mpeg_audio_sampling_freq {
139   V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
140   V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
141   V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
142 };
143 #define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_CODEC_BASE + 101)
144 enum v4l2_mpeg_audio_encoding {
145   V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
146   V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
147   V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
148   V4L2_MPEG_AUDIO_ENCODING_AAC = 3,
149   V4L2_MPEG_AUDIO_ENCODING_AC3 = 4,
150 };
151 #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_CODEC_BASE + 102)
152 enum v4l2_mpeg_audio_l1_bitrate {
153   V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
154   V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
155   V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
156   V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
157   V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
158   V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
159   V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
160   V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
161   V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
162   V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
163   V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
164   V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
165   V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
166   V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
167 };
168 #define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_CODEC_BASE + 103)
169 enum v4l2_mpeg_audio_l2_bitrate {
170   V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
171   V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
172   V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
173   V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
174   V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
175   V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
176   V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
177   V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
178   V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
179   V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
180   V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
181   V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
182   V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
183   V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
184 };
185 #define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_CODEC_BASE + 104)
186 enum v4l2_mpeg_audio_l3_bitrate {
187   V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
188   V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
189   V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
190   V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
191   V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
192   V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
193   V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
194   V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
195   V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
196   V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
197   V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
198   V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
199   V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
200   V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
201 };
202 #define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_CODEC_BASE + 105)
203 enum v4l2_mpeg_audio_mode {
204   V4L2_MPEG_AUDIO_MODE_STEREO = 0,
205   V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
206   V4L2_MPEG_AUDIO_MODE_DUAL = 2,
207   V4L2_MPEG_AUDIO_MODE_MONO = 3,
208 };
209 #define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_CODEC_BASE + 106)
210 enum v4l2_mpeg_audio_mode_extension {
211   V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
212   V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
213   V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
214   V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
215 };
216 #define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_CODEC_BASE + 107)
217 enum v4l2_mpeg_audio_emphasis {
218   V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
219   V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
220   V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
221 };
222 #define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_CODEC_BASE + 108)
223 enum v4l2_mpeg_audio_crc {
224   V4L2_MPEG_AUDIO_CRC_NONE = 0,
225   V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
226 };
227 #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_CODEC_BASE + 109)
228 #define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_CODEC_BASE + 110)
229 #define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_CODEC_BASE + 111)
230 enum v4l2_mpeg_audio_ac3_bitrate {
231   V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
232   V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,
233   V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2,
234   V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3,
235   V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4,
236   V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5,
237   V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6,
238   V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
239   V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
240   V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
241   V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
242   V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
243   V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
244   V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
245   V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
246   V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
247   V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
248   V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
249   V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
250 };
251 #define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_CODEC_BASE + 112)
252 enum v4l2_mpeg_audio_dec_playback {
253   V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0,
254   V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1,
255   V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2,
256   V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3,
257   V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4,
258   V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
259 };
260 #define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_CODEC_BASE + 113)
261 #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_CODEC_BASE + 200)
262 enum v4l2_mpeg_video_encoding {
263   V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
264   V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
265   V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
266 };
267 #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_CODEC_BASE + 201)
268 enum v4l2_mpeg_video_aspect {
269   V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
270   V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
271   V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
272   V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
273 };
274 #define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_CODEC_BASE + 202)
275 #define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_CODEC_BASE + 203)
276 #define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_CODEC_BASE + 204)
277 #define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_CODEC_BASE + 205)
278 #define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_CODEC_BASE + 206)
279 enum v4l2_mpeg_video_bitrate_mode {
280   V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
281   V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
282   V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2,
283 };
284 #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_CODEC_BASE + 207)
285 #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_CODEC_BASE + 208)
286 #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_CODEC_BASE + 209)
287 #define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_CODEC_BASE + 210)
288 #define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_CODEC_BASE + 211)
289 #define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_CODEC_BASE + 212)
290 #define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_CODEC_BASE + 213)
291 #define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_CODEC_BASE + 214)
292 #define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_CODEC_BASE + 215)
293 #define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_CODEC_BASE + 216)
294 enum v4l2_mpeg_video_header_mode {
295   V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
296   V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
297 };
298 #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_CODEC_BASE + 217)
299 #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_CODEC_BASE + 218)
300 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_CODEC_BASE + 219)
301 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_CODEC_BASE + 220)
302 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_CODEC_BASE + 221)
303 enum v4l2_mpeg_video_multi_slice_mode {
304   V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
305   V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB = 1,
306   V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES = 2,
307   V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
308   V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
309 };
310 #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_CODEC_BASE + 222)
311 #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_CODEC_BASE + 223)
312 #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_CODEC_BASE + 224)
313 #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_CODEC_BASE + 225)
314 #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_CODEC_BASE + 226)
315 #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 227)
316 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE + 228)
317 #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE + 229)
318 #define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE + 230)
319 #define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE + 231)
320 #define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE + 232)
321 #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE + 233)
322 #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE + 234)
323 #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE + 235)
324 #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 236)
325 #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (V4L2_CID_CODEC_BASE + 237)
326 enum v4l2_mpeg_video_intra_refresh_period_type {
327   V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM = 0,
328   V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC = 1,
329 };
330 #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE + 270)
331 enum v4l2_mpeg_video_mpeg2_level {
332   V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW = 0,
333   V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN = 1,
334   V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440 = 2,
335   V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH = 3,
336 };
337 #define V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE (V4L2_CID_CODEC_BASE + 271)
338 enum v4l2_mpeg_video_mpeg2_profile {
339   V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE = 0,
340   V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN = 1,
341   V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE = 2,
342   V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE = 3,
343   V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH = 4,
344   V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW = 5,
345 };
346 #define V4L2_CID_FWHT_I_FRAME_QP (V4L2_CID_CODEC_BASE + 290)
347 #define V4L2_CID_FWHT_P_FRAME_QP (V4L2_CID_CODEC_BASE + 291)
348 #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_CODEC_BASE + 300)
349 #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_CODEC_BASE + 301)
350 #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_CODEC_BASE + 302)
351 #define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_CODEC_BASE + 303)
352 #define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_CODEC_BASE + 304)
353 #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_CODEC_BASE + 350)
354 #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_CODEC_BASE + 351)
355 #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_CODEC_BASE + 352)
356 #define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_CODEC_BASE + 353)
357 #define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_CODEC_BASE + 354)
358 #define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_CODEC_BASE + 355)
359 #define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_CODEC_BASE + 356)
360 #define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_CODEC_BASE + 357)
361 enum v4l2_mpeg_video_h264_entropy_mode {
362   V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
363   V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
364 };
365 #define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_CODEC_BASE + 358)
366 #define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_CODEC_BASE + 359)
367 enum v4l2_mpeg_video_h264_level {
368   V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0,
369   V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1,
370   V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2,
371   V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3,
372   V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4,
373   V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5,
374   V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6,
375   V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7,
376   V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8,
377   V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9,
378   V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10,
379   V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11,
380   V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12,
381   V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13,
382   V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14,
383   V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15,
384   V4L2_MPEG_VIDEO_H264_LEVEL_5_2 = 16,
385   V4L2_MPEG_VIDEO_H264_LEVEL_6_0 = 17,
386   V4L2_MPEG_VIDEO_H264_LEVEL_6_1 = 18,
387   V4L2_MPEG_VIDEO_H264_LEVEL_6_2 = 19,
388 };
389 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_CODEC_BASE + 360)
390 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_CODEC_BASE + 361)
391 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_CODEC_BASE + 362)
392 enum v4l2_mpeg_video_h264_loop_filter_mode {
393   V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0,
394   V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1,
395   V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
396 };
397 #define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_CODEC_BASE + 363)
398 enum v4l2_mpeg_video_h264_profile {
399   V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0,
400   V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1,
401   V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2,
402   V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3,
403   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4,
404   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5,
405   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6,
406   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7,
407   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8,
408   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9,
409   V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10,
410   V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11,
411   V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12,
412   V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13,
413   V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14,
414   V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15,
415   V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16,
416   V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH = 17,
417 };
418 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_CODEC_BASE + 364)
419 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_CODEC_BASE + 365)
420 #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_CODEC_BASE + 366)
421 #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_CODEC_BASE + 367)
422 enum v4l2_mpeg_video_h264_vui_sar_idc {
423   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0,
424   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1,
425   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2,
426   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3,
427   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4,
428   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5,
429   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6,
430   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7,
431   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8,
432   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9,
433   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10,
434   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11,
435   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12,
436   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13,
437   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14,
438   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15,
439   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
440   V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
441 };
442 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_CODEC_BASE + 368)
443 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_CODEC_BASE + 369)
444 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_CODEC_BASE + 370)
445 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
446   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD = 0,
447   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1,
448   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2,
449   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3,
450   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4,
451   V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5,
452 };
453 #define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_CODEC_BASE + 371)
454 #define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_CODEC_BASE + 372)
455 enum v4l2_mpeg_video_h264_fmo_map_type {
456   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0,
457   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1,
458   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2,
459   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3,
460   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4,
461   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5,
462   V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6,
463 };
464 #define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_CODEC_BASE + 373)
465 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_CODEC_BASE + 374)
466 enum v4l2_mpeg_video_h264_fmo_change_dir {
467   V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0,
468   V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1,
469 };
470 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_CODEC_BASE + 375)
471 #define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_CODEC_BASE + 376)
472 #define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_CODEC_BASE + 377)
473 #define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_CODEC_BASE + 378)
474 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_CODEC_BASE + 379)
475 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_CODEC_BASE + 380)
476 enum v4l2_mpeg_video_h264_hierarchical_coding_type {
477   V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0,
478   V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1,
479 };
480 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_CODEC_BASE + 381)
481 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_CODEC_BASE + 382)
482 #define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_CODEC_BASE + 383)
483 #define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_CODEC_BASE + 384)
484 #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 385)
485 #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 386)
486 #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 387)
487 #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 388)
488 #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 389)
489 #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 390)
490 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE + 391)
491 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE + 392)
492 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE + 393)
493 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE + 394)
494 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE + 395)
495 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE + 396)
496 #define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE + 397)
497 #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_CODEC_BASE + 400)
498 #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_CODEC_BASE + 401)
499 #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_CODEC_BASE + 402)
500 #define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_CODEC_BASE + 403)
501 #define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_CODEC_BASE + 404)
502 #define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_CODEC_BASE + 405)
503 enum v4l2_mpeg_video_mpeg4_level {
504   V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
505   V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,
506   V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2,
507   V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3,
508   V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4,
509   V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5,
510   V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6,
511   V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7,
512 };
513 #define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_CODEC_BASE + 406)
514 enum v4l2_mpeg_video_mpeg4_profile {
515   V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0,
516   V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1,
517   V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2,
518   V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3,
519   V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4,
520 };
521 #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_CODEC_BASE + 407)
522 #define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (V4L2_CID_CODEC_BASE + 500)
523 enum v4l2_vp8_num_partitions {
524   V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION = 0,
525   V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS = 1,
526   V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS = 2,
527   V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS = 3,
528 };
529 #define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (V4L2_CID_CODEC_BASE + 501)
530 #define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (V4L2_CID_CODEC_BASE + 502)
531 enum v4l2_vp8_num_ref_frames {
532   V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME = 0,
533   V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1,
534   V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2,
535 };
536 #define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_CODEC_BASE + 503)
537 #define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_CODEC_BASE + 504)
538 #define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_CODEC_BASE + 505)
539 #define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_CODEC_BASE + 506)
540 enum v4l2_vp8_golden_frame_sel {
541   V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0,
542   V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1,
543 };
544 #define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (V4L2_CID_CODEC_BASE + 507)
545 #define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_CODEC_BASE + 508)
546 #define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_CODEC_BASE + 509)
547 #define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_CODEC_BASE + 510)
548 #define V4L2_CID_MPEG_VIDEO_VP8_PROFILE (V4L2_CID_CODEC_BASE + 511)
549 enum v4l2_mpeg_video_vp8_profile {
550   V4L2_MPEG_VIDEO_VP8_PROFILE_0 = 0,
551   V4L2_MPEG_VIDEO_VP8_PROFILE_1 = 1,
552   V4L2_MPEG_VIDEO_VP8_PROFILE_2 = 2,
553   V4L2_MPEG_VIDEO_VP8_PROFILE_3 = 3,
554 };
555 #define V4L2_CID_MPEG_VIDEO_VPX_PROFILE V4L2_CID_MPEG_VIDEO_VP8_PROFILE
556 #define V4L2_CID_MPEG_VIDEO_VP9_PROFILE (V4L2_CID_CODEC_BASE + 512)
557 enum v4l2_mpeg_video_vp9_profile {
558   V4L2_MPEG_VIDEO_VP9_PROFILE_0 = 0,
559   V4L2_MPEG_VIDEO_VP9_PROFILE_1 = 1,
560   V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,
561   V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,
562 };
563 #define V4L2_CID_MPEG_VIDEO_VP9_LEVEL (V4L2_CID_CODEC_BASE + 513)
564 enum v4l2_mpeg_video_vp9_level {
565   V4L2_MPEG_VIDEO_VP9_LEVEL_1_0 = 0,
566   V4L2_MPEG_VIDEO_VP9_LEVEL_1_1 = 1,
567   V4L2_MPEG_VIDEO_VP9_LEVEL_2_0 = 2,
568   V4L2_MPEG_VIDEO_VP9_LEVEL_2_1 = 3,
569   V4L2_MPEG_VIDEO_VP9_LEVEL_3_0 = 4,
570   V4L2_MPEG_VIDEO_VP9_LEVEL_3_1 = 5,
571   V4L2_MPEG_VIDEO_VP9_LEVEL_4_0 = 6,
572   V4L2_MPEG_VIDEO_VP9_LEVEL_4_1 = 7,
573   V4L2_MPEG_VIDEO_VP9_LEVEL_5_0 = 8,
574   V4L2_MPEG_VIDEO_VP9_LEVEL_5_1 = 9,
575   V4L2_MPEG_VIDEO_VP9_LEVEL_5_2 = 10,
576   V4L2_MPEG_VIDEO_VP9_LEVEL_6_0 = 11,
577   V4L2_MPEG_VIDEO_VP9_LEVEL_6_1 = 12,
578   V4L2_MPEG_VIDEO_VP9_LEVEL_6_2 = 13,
579 };
580 #define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (V4L2_CID_CODEC_BASE + 600)
581 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (V4L2_CID_CODEC_BASE + 601)
582 #define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (V4L2_CID_CODEC_BASE + 602)
583 #define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (V4L2_CID_CODEC_BASE + 603)
584 #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (V4L2_CID_CODEC_BASE + 604)
585 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (V4L2_CID_CODEC_BASE + 605)
586 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_CODEC_BASE + 606)
587 enum v4l2_mpeg_video_hevc_hier_coding_type {
588   V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B = 0,
589   V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P = 1,
590 };
591 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (V4L2_CID_CODEC_BASE + 607)
592 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (V4L2_CID_CODEC_BASE + 608)
593 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (V4L2_CID_CODEC_BASE + 609)
594 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (V4L2_CID_CODEC_BASE + 610)
595 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (V4L2_CID_CODEC_BASE + 611)
596 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (V4L2_CID_CODEC_BASE + 612)
597 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (V4L2_CID_CODEC_BASE + 613)
598 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (V4L2_CID_CODEC_BASE + 614)
599 #define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE (V4L2_CID_CODEC_BASE + 615)
600 enum v4l2_mpeg_video_hevc_profile {
601   V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0,
602   V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1,
603   V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2,
604 };
605 #define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL (V4L2_CID_CODEC_BASE + 616)
606 enum v4l2_mpeg_video_hevc_level {
607   V4L2_MPEG_VIDEO_HEVC_LEVEL_1 = 0,
608   V4L2_MPEG_VIDEO_HEVC_LEVEL_2 = 1,
609   V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1 = 2,
610   V4L2_MPEG_VIDEO_HEVC_LEVEL_3 = 3,
611   V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1 = 4,
612   V4L2_MPEG_VIDEO_HEVC_LEVEL_4 = 5,
613   V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1 = 6,
614   V4L2_MPEG_VIDEO_HEVC_LEVEL_5 = 7,
615   V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1 = 8,
616   V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2 = 9,
617   V4L2_MPEG_VIDEO_HEVC_LEVEL_6 = 10,
618   V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11,
619   V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12,
620 };
621 #define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_CODEC_BASE + 617)
622 #define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_CODEC_BASE + 618)
623 enum v4l2_mpeg_video_hevc_tier {
624   V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0,
625   V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1,
626 };
627 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (V4L2_CID_CODEC_BASE + 619)
628 #define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE (V4L2_CID_CODEC_BASE + 620)
629 enum v4l2_cid_mpeg_video_hevc_loop_filter_mode {
630   V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED = 0,
631   V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED = 1,
632   V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
633 };
634 #define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (V4L2_CID_CODEC_BASE + 621)
635 #define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (V4L2_CID_CODEC_BASE + 622)
636 #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE (V4L2_CID_CODEC_BASE + 623)
637 enum v4l2_cid_mpeg_video_hevc_refresh_type {
638   V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE = 0,
639   V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1,
640   V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2,
641 };
642 #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 624)
643 #define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_CODEC_BASE + 625)
644 #define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_CODEC_BASE + 626)
645 #define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_CODEC_BASE + 627)
646 #define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_CODEC_BASE + 628)
647 #define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_CODEC_BASE + 629)
648 #define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_CODEC_BASE + 630)
649 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_CODEC_BASE + 631)
650 #define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_CODEC_BASE + 632)
651 #define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_CODEC_BASE + 633)
652 #define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_CODEC_BASE + 634)
653 #define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_CODEC_BASE + 635)
654 enum v4l2_cid_mpeg_video_hevc_size_of_length_field {
655   V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0,
656   V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1,
657   V4L2_MPEG_VIDEO_HEVC_SIZE_2 = 2,
658   V4L2_MPEG_VIDEO_HEVC_SIZE_4 = 3,
659 };
660 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE + 636)
661 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE + 637)
662 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE + 638)
663 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE + 639)
664 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE + 640)
665 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE + 641)
666 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE + 642)
667 #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_CODEC_BASE + 643)
668 #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_CODEC_BASE + 644)
669 #define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_CODEC_BASE + 645)
670 #define V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (V4L2_CID_CODEC_BASE + 646)
671 enum v4l2_mpeg_video_frame_skip_mode {
672   V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
673   V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
674   V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
675 };
676 #define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 647)
677 #define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 648)
678 #define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 649)
679 #define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 650)
680 #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651)
681 #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652)
682 #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (V4L2_CID_CODEC_BASE + 653)
683 #define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_BASE + 654)
684 #define V4L2_CID_MPEG_VIDEO_AV1_PROFILE (V4L2_CID_CODEC_BASE + 655)
685 enum v4l2_mpeg_video_av1_profile {
686   V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN = 0,
687   V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH = 1,
688   V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL = 2,
689 };
690 #define V4L2_CID_MPEG_VIDEO_AV1_LEVEL (V4L2_CID_CODEC_BASE + 656)
691 enum v4l2_mpeg_video_av1_level {
692   V4L2_MPEG_VIDEO_AV1_LEVEL_2_0 = 0,
693   V4L2_MPEG_VIDEO_AV1_LEVEL_2_1 = 1,
694   V4L2_MPEG_VIDEO_AV1_LEVEL_2_2 = 2,
695   V4L2_MPEG_VIDEO_AV1_LEVEL_2_3 = 3,
696   V4L2_MPEG_VIDEO_AV1_LEVEL_3_0 = 4,
697   V4L2_MPEG_VIDEO_AV1_LEVEL_3_1 = 5,
698   V4L2_MPEG_VIDEO_AV1_LEVEL_3_2 = 6,
699   V4L2_MPEG_VIDEO_AV1_LEVEL_3_3 = 7,
700   V4L2_MPEG_VIDEO_AV1_LEVEL_4_0 = 8,
701   V4L2_MPEG_VIDEO_AV1_LEVEL_4_1 = 9,
702   V4L2_MPEG_VIDEO_AV1_LEVEL_4_2 = 10,
703   V4L2_MPEG_VIDEO_AV1_LEVEL_4_3 = 11,
704   V4L2_MPEG_VIDEO_AV1_LEVEL_5_0 = 12,
705   V4L2_MPEG_VIDEO_AV1_LEVEL_5_1 = 13,
706   V4L2_MPEG_VIDEO_AV1_LEVEL_5_2 = 14,
707   V4L2_MPEG_VIDEO_AV1_LEVEL_5_3 = 15,
708   V4L2_MPEG_VIDEO_AV1_LEVEL_6_0 = 16,
709   V4L2_MPEG_VIDEO_AV1_LEVEL_6_1 = 17,
710   V4L2_MPEG_VIDEO_AV1_LEVEL_6_2 = 18,
711   V4L2_MPEG_VIDEO_AV1_LEVEL_6_3 = 19,
712   V4L2_MPEG_VIDEO_AV1_LEVEL_7_0 = 20,
713   V4L2_MPEG_VIDEO_AV1_LEVEL_7_1 = 21,
714   V4L2_MPEG_VIDEO_AV1_LEVEL_7_2 = 22,
715   V4L2_MPEG_VIDEO_AV1_LEVEL_7_3 = 23
716 };
717 #define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000)
718 #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE + 0)
719 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
720   V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
721   V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
722 };
723 #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE + 1)
724 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE + 2)
725 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
726   V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
727   V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
728   V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
729   V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
730   V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
731 };
732 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE + 3)
733 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
734   V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
735   V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
736 };
737 #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE + 4)
738 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
739   V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
740   V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
741 };
742 #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE + 5)
743 #define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE + 6)
744 enum v4l2_mpeg_cx2341x_video_median_filter_type {
745   V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
746   V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
747   V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
748   V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
749   V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
750 };
751 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE + 7)
752 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE + 8)
753 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE + 9)
754 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE + 10)
755 #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_CODEC_CX2341X_BASE + 11)
756 #define V4L2_CID_CODEC_MFC51_BASE (V4L2_CTRL_CLASS_CODEC | 0x1100)
757 #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_CODEC_MFC51_BASE + 0)
758 #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_MFC51_BASE + 1)
759 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_CODEC_MFC51_BASE + 2)
760 enum v4l2_mpeg_mfc51_video_frame_skip_mode {
761   V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
762   V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
763   V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
764 };
765 #define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_CODEC_MFC51_BASE + 3)
766 enum v4l2_mpeg_mfc51_video_force_frame_type {
767   V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0,
768   V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1,
769   V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2,
770 };
771 #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_CODEC_MFC51_BASE + 4)
772 #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_CODEC_MFC51_BASE + 5)
773 #define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_CODEC_MFC51_BASE + 6)
774 #define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_CODEC_MFC51_BASE + 7)
775 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_CODEC_MFC51_BASE + 50)
776 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_CODEC_MFC51_BASE + 51)
777 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_CODEC_MFC51_BASE + 52)
778 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_CODEC_MFC51_BASE + 53)
779 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_CODEC_MFC51_BASE + 54)
780 #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
781 #define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
782 #define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE + 1)
783 enum v4l2_exposure_auto_type {
784   V4L2_EXPOSURE_AUTO = 0,
785   V4L2_EXPOSURE_MANUAL = 1,
786   V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
787   V4L2_EXPOSURE_APERTURE_PRIORITY = 3
788 };
789 #define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 2)
790 #define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE + 3)
791 #define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE + 4)
792 #define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE + 5)
793 #define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE + 6)
794 #define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE + 7)
795 #define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 8)
796 #define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 9)
797 #define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 10)
798 #define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE + 11)
799 #define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE + 12)
800 #define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 13)
801 #define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE + 14)
802 #define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE + 15)
803 #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE + 16)
804 #define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE + 17)
805 #define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE + 18)
806 #define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE + 19)
807 #define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE + 20)
808 enum v4l2_auto_n_preset_white_balance {
809   V4L2_WHITE_BALANCE_MANUAL = 0,
810   V4L2_WHITE_BALANCE_AUTO = 1,
811   V4L2_WHITE_BALANCE_INCANDESCENT = 2,
812   V4L2_WHITE_BALANCE_FLUORESCENT = 3,
813   V4L2_WHITE_BALANCE_FLUORESCENT_H = 4,
814   V4L2_WHITE_BALANCE_HORIZON = 5,
815   V4L2_WHITE_BALANCE_DAYLIGHT = 6,
816   V4L2_WHITE_BALANCE_FLASH = 7,
817   V4L2_WHITE_BALANCE_CLOUDY = 8,
818   V4L2_WHITE_BALANCE_SHADE = 9,
819 };
820 #define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE + 21)
821 #define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE + 22)
822 #define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE + 23)
823 #define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE + 24)
824 enum v4l2_iso_sensitivity_auto_type {
825   V4L2_ISO_SENSITIVITY_MANUAL = 0,
826   V4L2_ISO_SENSITIVITY_AUTO = 1,
827 };
828 #define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE + 25)
829 enum v4l2_exposure_metering {
830   V4L2_EXPOSURE_METERING_AVERAGE = 0,
831   V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1,
832   V4L2_EXPOSURE_METERING_SPOT = 2,
833   V4L2_EXPOSURE_METERING_MATRIX = 3,
834 };
835 #define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE + 26)
836 enum v4l2_scene_mode {
837   V4L2_SCENE_MODE_NONE = 0,
838   V4L2_SCENE_MODE_BACKLIGHT = 1,
839   V4L2_SCENE_MODE_BEACH_SNOW = 2,
840   V4L2_SCENE_MODE_CANDLE_LIGHT = 3,
841   V4L2_SCENE_MODE_DAWN_DUSK = 4,
842   V4L2_SCENE_MODE_FALL_COLORS = 5,
843   V4L2_SCENE_MODE_FIREWORKS = 6,
844   V4L2_SCENE_MODE_LANDSCAPE = 7,
845   V4L2_SCENE_MODE_NIGHT = 8,
846   V4L2_SCENE_MODE_PARTY_INDOOR = 9,
847   V4L2_SCENE_MODE_PORTRAIT = 10,
848   V4L2_SCENE_MODE_SPORTS = 11,
849   V4L2_SCENE_MODE_SUNSET = 12,
850   V4L2_SCENE_MODE_TEXT = 13,
851 };
852 #define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE + 27)
853 #define V4L2_LOCK_EXPOSURE (1 << 0)
854 #define V4L2_LOCK_WHITE_BALANCE (1 << 1)
855 #define V4L2_LOCK_FOCUS (1 << 2)
856 #define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE + 28)
857 #define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE + 29)
858 #define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE + 30)
859 #define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0)
860 #define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0)
861 #define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1)
862 #define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2)
863 #define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE + 31)
864 enum v4l2_auto_focus_range {
865   V4L2_AUTO_FOCUS_RANGE_AUTO = 0,
866   V4L2_AUTO_FOCUS_RANGE_NORMAL = 1,
867   V4L2_AUTO_FOCUS_RANGE_MACRO = 2,
868   V4L2_AUTO_FOCUS_RANGE_INFINITY = 3,
869 };
870 #define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 32)
871 #define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 33)
872 #define V4L2_CID_CAMERA_ORIENTATION (V4L2_CID_CAMERA_CLASS_BASE + 34)
873 #define V4L2_CAMERA_ORIENTATION_FRONT 0
874 #define V4L2_CAMERA_ORIENTATION_BACK 1
875 #define V4L2_CAMERA_ORIENTATION_EXTERNAL 2
876 #define V4L2_CID_CAMERA_SENSOR_ROTATION (V4L2_CID_CAMERA_CLASS_BASE + 35)
877 #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE + 36)
878 #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
879 #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
880 #define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
881 #define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
882 #define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
883 #define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
884 #define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
885 #define V4L2_CID_RDS_TX_MONO_STEREO (V4L2_CID_FM_TX_CLASS_BASE + 7)
886 #define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (V4L2_CID_FM_TX_CLASS_BASE + 8)
887 #define V4L2_CID_RDS_TX_COMPRESSED (V4L2_CID_FM_TX_CLASS_BASE + 9)
888 #define V4L2_CID_RDS_TX_DYNAMIC_PTY (V4L2_CID_FM_TX_CLASS_BASE + 10)
889 #define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_TX_CLASS_BASE + 11)
890 #define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (V4L2_CID_FM_TX_CLASS_BASE + 12)
891 #define V4L2_CID_RDS_TX_MUSIC_SPEECH (V4L2_CID_FM_TX_CLASS_BASE + 13)
892 #define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (V4L2_CID_FM_TX_CLASS_BASE + 14)
893 #define V4L2_CID_RDS_TX_ALT_FREQS (V4L2_CID_FM_TX_CLASS_BASE + 15)
894 #define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
895 #define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
896 #define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
897 #define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
898 #define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
899 #define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
900 #define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
901 #define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
902 #define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
903 #define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
904 #define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
905 #define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
906 enum v4l2_preemphasis {
907   V4L2_PREEMPHASIS_DISABLED = 0,
908   V4L2_PREEMPHASIS_50_uS = 1,
909   V4L2_PREEMPHASIS_75_uS = 2,
910 };
911 #define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
912 #define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
913 #define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900)
914 #define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1)
915 #define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1)
916 enum v4l2_flash_led_mode {
917   V4L2_FLASH_LED_MODE_NONE,
918   V4L2_FLASH_LED_MODE_FLASH,
919   V4L2_FLASH_LED_MODE_TORCH,
920 };
921 #define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2)
922 enum v4l2_flash_strobe_source {
923   V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
924   V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
925 };
926 #define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3)
927 #define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4)
928 #define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5)
929 #define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6)
930 #define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7)
931 #define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8)
932 #define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9)
933 #define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10)
934 #define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0)
935 #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
936 #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
937 #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
938 #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4)
939 #define V4L2_FLASH_FAULT_INDICATOR (1 << 5)
940 #define V4L2_FLASH_FAULT_UNDER_VOLTAGE (1 << 6)
941 #define V4L2_FLASH_FAULT_INPUT_VOLTAGE (1 << 7)
942 #define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE (1 << 8)
943 #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
944 #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
945 #define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
946 #define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
947 #define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
948 enum v4l2_jpeg_chroma_subsampling {
949   V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
950   V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
951   V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2,
952   V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3,
953   V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
954   V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
955 };
956 #define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
957 #define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
958 #define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
959 #define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
960 #define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
961 #define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
962 #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
963 #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
964 #define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
965 #define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1)
966 #define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
967 #define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
968 #define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
969 #define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4)
970 #define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
971 #define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
972 #define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
973 #define V4L2_CID_UNIT_CELL_SIZE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
974 #define V4L2_CID_NOTIFY_GAINS (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)
975 #define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900)
976 #define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1)
977 #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
978 #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
979 #define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3)
980 #define V4L2_CID_DEINTERLACING_MODE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 4)
981 #define V4L2_CID_DIGITAL_GAIN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 5)
982 #define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900)
983 #define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1)
984 #define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)
985 #define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)
986 #define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)
987 #define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)
988 enum v4l2_dv_tx_mode {
989   V4L2_DV_TX_MODE_DVI_D = 0,
990   V4L2_DV_TX_MODE_HDMI = 1,
991 };
992 #define V4L2_CID_DV_TX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 5)
993 enum v4l2_dv_rgb_range {
994   V4L2_DV_RGB_RANGE_AUTO = 0,
995   V4L2_DV_RGB_RANGE_LIMITED = 1,
996   V4L2_DV_RGB_RANGE_FULL = 2,
997 };
998 #define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6)
999 enum v4l2_dv_it_content_type {
1000   V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0,
1001   V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1,
1002   V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2,
1003   V4L2_DV_IT_CONTENT_TYPE_GAME = 3,
1004   V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
1005 };
1006 #define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
1007 #define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
1008 #define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
1009 #define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
1010 #define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)
1011 #define V4L2_CID_TUNE_DEEMPHASIS (V4L2_CID_FM_RX_CLASS_BASE + 1)
1012 enum v4l2_deemphasis {
1013   V4L2_DEEMPHASIS_DISABLED = V4L2_PREEMPHASIS_DISABLED,
1014   V4L2_DEEMPHASIS_50_uS = V4L2_PREEMPHASIS_50_uS,
1015   V4L2_DEEMPHASIS_75_uS = V4L2_PREEMPHASIS_75_uS,
1016 };
1017 #define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2)
1018 #define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3)
1019 #define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4)
1020 #define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5)
1021 #define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6)
1022 #define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7)
1023 #define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8)
1024 #define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900)
1025 #define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1)
1026 #define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11)
1027 #define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12)
1028 #define V4L2_CID_RF_TUNER_RF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 32)
1029 #define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41)
1030 #define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42)
1031 #define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51)
1032 #define V4L2_CID_RF_TUNER_MIXER_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 52)
1033 #define V4L2_CID_RF_TUNER_IF_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 61)
1034 #define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62)
1035 #define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91)
1036 #define V4L2_CID_DETECT_CLASS_BASE (V4L2_CTRL_CLASS_DETECT | 0x900)
1037 #define V4L2_CID_DETECT_CLASS (V4L2_CTRL_CLASS_DETECT | 1)
1038 #define V4L2_CID_DETECT_MD_MODE (V4L2_CID_DETECT_CLASS_BASE + 1)
1039 enum v4l2_detect_md_mode {
1040   V4L2_DETECT_MD_MODE_DISABLED = 0,
1041   V4L2_DETECT_MD_MODE_GLOBAL = 1,
1042   V4L2_DETECT_MD_MODE_THRESHOLD_GRID = 2,
1043   V4L2_DETECT_MD_MODE_REGION_GRID = 3,
1044 };
1045 #define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (V4L2_CID_DETECT_CLASS_BASE + 2)
1046 #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3)
1047 #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4)
1048 #define V4L2_CID_CODEC_STATELESS_BASE (V4L2_CTRL_CLASS_CODEC_STATELESS | 0x900)
1049 #define V4L2_CID_CODEC_STATELESS_CLASS (V4L2_CTRL_CLASS_CODEC_STATELESS | 1)
1050 #define V4L2_CID_STATELESS_H264_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 0)
1051 enum v4l2_stateless_h264_decode_mode {
1052   V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED,
1053   V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED,
1054 };
1055 #define V4L2_CID_STATELESS_H264_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 1)
1056 enum v4l2_stateless_h264_start_code {
1057   V4L2_STATELESS_H264_START_CODE_NONE,
1058   V4L2_STATELESS_H264_START_CODE_ANNEX_B,
1059 };
1060 #define V4L2_H264_SPS_CONSTRAINT_SET0_FLAG 0x01
1061 #define V4L2_H264_SPS_CONSTRAINT_SET1_FLAG 0x02
1062 #define V4L2_H264_SPS_CONSTRAINT_SET2_FLAG 0x04
1063 #define V4L2_H264_SPS_CONSTRAINT_SET3_FLAG 0x08
1064 #define V4L2_H264_SPS_CONSTRAINT_SET4_FLAG 0x10
1065 #define V4L2_H264_SPS_CONSTRAINT_SET5_FLAG 0x20
1066 #define V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE 0x01
1067 #define V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS 0x02
1068 #define V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO 0x04
1069 #define V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED 0x08
1070 #define V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY 0x10
1071 #define V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD 0x20
1072 #define V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE 0x40
1073 #define V4L2_H264_SPS_HAS_CHROMA_FORMAT(sps) ((sps)->profile_idc == 100 || (sps)->profile_idc == 110 || (sps)->profile_idc == 122 || (sps)->profile_idc == 244 || (sps)->profile_idc == 44 || (sps)->profile_idc == 83 || (sps)->profile_idc == 86 || (sps)->profile_idc == 118 || (sps)->profile_idc == 128 || (sps)->profile_idc == 138 || (sps)->profile_idc == 139 || (sps)->profile_idc == 134 || (sps)->profile_idc == 135)
1074 #define V4L2_CID_STATELESS_H264_SPS (V4L2_CID_CODEC_STATELESS_BASE + 2)
1075 struct v4l2_ctrl_h264_sps {
1076   __u8 profile_idc;
1077   __u8 constraint_set_flags;
1078   __u8 level_idc;
1079   __u8 seq_parameter_set_id;
1080   __u8 chroma_format_idc;
1081   __u8 bit_depth_luma_minus8;
1082   __u8 bit_depth_chroma_minus8;
1083   __u8 log2_max_frame_num_minus4;
1084   __u8 pic_order_cnt_type;
1085   __u8 log2_max_pic_order_cnt_lsb_minus4;
1086   __u8 max_num_ref_frames;
1087   __u8 num_ref_frames_in_pic_order_cnt_cycle;
1088   __s32 offset_for_ref_frame[255];
1089   __s32 offset_for_non_ref_pic;
1090   __s32 offset_for_top_to_bottom_field;
1091   __u16 pic_width_in_mbs_minus1;
1092   __u16 pic_height_in_map_units_minus1;
1093   __u32 flags;
1094 };
1095 #define V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE 0x0001
1096 #define V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT 0x0002
1097 #define V4L2_H264_PPS_FLAG_WEIGHTED_PRED 0x0004
1098 #define V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT 0x0008
1099 #define V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED 0x0010
1100 #define V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT 0x0020
1101 #define V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE 0x0040
1102 #define V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT 0x0080
1103 #define V4L2_CID_STATELESS_H264_PPS (V4L2_CID_CODEC_STATELESS_BASE + 3)
1104 struct v4l2_ctrl_h264_pps {
1105   __u8 pic_parameter_set_id;
1106   __u8 seq_parameter_set_id;
1107   __u8 num_slice_groups_minus1;
1108   __u8 num_ref_idx_l0_default_active_minus1;
1109   __u8 num_ref_idx_l1_default_active_minus1;
1110   __u8 weighted_bipred_idc;
1111   __s8 pic_init_qp_minus26;
1112   __s8 pic_init_qs_minus26;
1113   __s8 chroma_qp_index_offset;
1114   __s8 second_chroma_qp_index_offset;
1115   __u16 flags;
1116 };
1117 #define V4L2_CID_STATELESS_H264_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 4)
1118 struct v4l2_ctrl_h264_scaling_matrix {
1119   __u8 scaling_list_4x4[6][16];
1120   __u8 scaling_list_8x8[6][64];
1121 };
1122 struct v4l2_h264_weight_factors {
1123   __s16 luma_weight[32];
1124   __s16 luma_offset[32];
1125   __s16 chroma_weight[32][2];
1126   __s16 chroma_offset[32][2];
1127 };
1128 #define V4L2_H264_CTRL_PRED_WEIGHTS_REQUIRED(pps,slice) ((((pps)->flags & V4L2_H264_PPS_FLAG_WEIGHTED_PRED) && ((slice)->slice_type == V4L2_H264_SLICE_TYPE_P || (slice)->slice_type == V4L2_H264_SLICE_TYPE_SP)) || ((pps)->weighted_bipred_idc == 1 && (slice)->slice_type == V4L2_H264_SLICE_TYPE_B))
1129 #define V4L2_CID_STATELESS_H264_PRED_WEIGHTS (V4L2_CID_CODEC_STATELESS_BASE + 5)
1130 struct v4l2_ctrl_h264_pred_weights {
1131   __u16 luma_log2_weight_denom;
1132   __u16 chroma_log2_weight_denom;
1133   struct v4l2_h264_weight_factors weight_factors[2];
1134 };
1135 #define V4L2_H264_SLICE_TYPE_P 0
1136 #define V4L2_H264_SLICE_TYPE_B 1
1137 #define V4L2_H264_SLICE_TYPE_I 2
1138 #define V4L2_H264_SLICE_TYPE_SP 3
1139 #define V4L2_H264_SLICE_TYPE_SI 4
1140 #define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01
1141 #define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02
1142 #define V4L2_H264_TOP_FIELD_REF 0x1
1143 #define V4L2_H264_BOTTOM_FIELD_REF 0x2
1144 #define V4L2_H264_FRAME_REF 0x3
1145 struct v4l2_h264_reference {
1146   __u8 fields;
1147   __u8 index;
1148 };
1149 #define V4L2_H264_NUM_DPB_ENTRIES 16
1150 #define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
1151 #define V4L2_CID_STATELESS_H264_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 6)
1152 struct v4l2_ctrl_h264_slice_params {
1153   __u32 header_bit_size;
1154   __u32 first_mb_in_slice;
1155   __u8 slice_type;
1156   __u8 colour_plane_id;
1157   __u8 redundant_pic_cnt;
1158   __u8 cabac_init_idc;
1159   __s8 slice_qp_delta;
1160   __s8 slice_qs_delta;
1161   __u8 disable_deblocking_filter_idc;
1162   __s8 slice_alpha_c0_offset_div2;
1163   __s8 slice_beta_offset_div2;
1164   __u8 num_ref_idx_l0_active_minus1;
1165   __u8 num_ref_idx_l1_active_minus1;
1166   __u8 reserved;
1167   struct v4l2_h264_reference ref_pic_list0[V4L2_H264_REF_LIST_LEN];
1168   struct v4l2_h264_reference ref_pic_list1[V4L2_H264_REF_LIST_LEN];
1169   __u32 flags;
1170 };
1171 #define V4L2_H264_DPB_ENTRY_FLAG_VALID 0x01
1172 #define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x02
1173 #define V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM 0x04
1174 #define V4L2_H264_DPB_ENTRY_FLAG_FIELD 0x08
1175 struct v4l2_h264_dpb_entry {
1176   __u64 reference_ts;
1177   __u32 pic_num;
1178   __u16 frame_num;
1179   __u8 fields;
1180   __u8 reserved[5];
1181   __s32 top_field_order_cnt;
1182   __s32 bottom_field_order_cnt;
1183   __u32 flags;
1184 };
1185 #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC 0x01
1186 #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC 0x02
1187 #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD 0x04
1188 #define V4L2_H264_DECODE_PARAM_FLAG_PFRAME 0x08
1189 #define V4L2_H264_DECODE_PARAM_FLAG_BFRAME 0x10
1190 #define V4L2_CID_STATELESS_H264_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 7)
1191 struct v4l2_ctrl_h264_decode_params {
1192   struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES];
1193   __u16 nal_ref_idc;
1194   __u16 frame_num;
1195   __s32 top_field_order_cnt;
1196   __s32 bottom_field_order_cnt;
1197   __u16 idr_pic_id;
1198   __u16 pic_order_cnt_lsb;
1199   __s32 delta_pic_order_cnt_bottom;
1200   __s32 delta_pic_order_cnt0;
1201   __s32 delta_pic_order_cnt1;
1202   __u32 dec_ref_pic_marking_bit_size;
1203   __u32 pic_order_cnt_bit_size;
1204   __u32 slice_group_change_cycle;
1205   __u32 reserved;
1206   __u32 flags;
1207 };
1208 #define V4L2_FWHT_VERSION 3
1209 #define V4L2_FWHT_FL_IS_INTERLACED _BITUL(0)
1210 #define V4L2_FWHT_FL_IS_BOTTOM_FIRST _BITUL(1)
1211 #define V4L2_FWHT_FL_IS_ALTERNATE _BITUL(2)
1212 #define V4L2_FWHT_FL_IS_BOTTOM_FIELD _BITUL(3)
1213 #define V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED _BITUL(4)
1214 #define V4L2_FWHT_FL_CB_IS_UNCOMPRESSED _BITUL(5)
1215 #define V4L2_FWHT_FL_CR_IS_UNCOMPRESSED _BITUL(6)
1216 #define V4L2_FWHT_FL_CHROMA_FULL_HEIGHT _BITUL(7)
1217 #define V4L2_FWHT_FL_CHROMA_FULL_WIDTH _BITUL(8)
1218 #define V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED _BITUL(9)
1219 #define V4L2_FWHT_FL_I_FRAME _BITUL(10)
1220 #define V4L2_FWHT_FL_COMPONENTS_NUM_MSK GENMASK(18, 16)
1221 #define V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET 16
1222 #define V4L2_FWHT_FL_PIXENC_MSK GENMASK(20, 19)
1223 #define V4L2_FWHT_FL_PIXENC_OFFSET 19
1224 #define V4L2_FWHT_FL_PIXENC_YUV (1 << V4L2_FWHT_FL_PIXENC_OFFSET)
1225 #define V4L2_FWHT_FL_PIXENC_RGB (2 << V4L2_FWHT_FL_PIXENC_OFFSET)
1226 #define V4L2_FWHT_FL_PIXENC_HSV (3 << V4L2_FWHT_FL_PIXENC_OFFSET)
1227 #define V4L2_CID_STATELESS_FWHT_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 100)
1228 struct v4l2_ctrl_fwht_params {
1229   __u64 backward_ref_ts;
1230   __u32 version;
1231   __u32 width;
1232   __u32 height;
1233   __u32 flags;
1234   __u32 colorspace;
1235   __u32 xfer_func;
1236   __u32 ycbcr_enc;
1237   __u32 quantization;
1238 };
1239 #define V4L2_VP8_SEGMENT_FLAG_ENABLED 0x01
1240 #define V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP 0x02
1241 #define V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA 0x04
1242 #define V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE 0x08
1243 struct v4l2_vp8_segment {
1244   __s8 quant_update[4];
1245   __s8 lf_update[4];
1246   __u8 segment_probs[3];
1247   __u8 padding;
1248   __u32 flags;
1249 };
1250 #define V4L2_VP8_LF_ADJ_ENABLE 0x01
1251 #define V4L2_VP8_LF_DELTA_UPDATE 0x02
1252 #define V4L2_VP8_LF_FILTER_TYPE_SIMPLE 0x04
1253 struct v4l2_vp8_loop_filter {
1254   __s8 ref_frm_delta[4];
1255   __s8 mb_mode_delta[4];
1256   __u8 sharpness_level;
1257   __u8 level;
1258   __u16 padding;
1259   __u32 flags;
1260 };
1261 struct v4l2_vp8_quantization {
1262   __u8 y_ac_qi;
1263   __s8 y_dc_delta;
1264   __s8 y2_dc_delta;
1265   __s8 y2_ac_delta;
1266   __s8 uv_dc_delta;
1267   __s8 uv_ac_delta;
1268   __u16 padding;
1269 };
1270 #define V4L2_VP8_COEFF_PROB_CNT 11
1271 #define V4L2_VP8_MV_PROB_CNT 19
1272 struct v4l2_vp8_entropy {
1273   __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT];
1274   __u8 y_mode_probs[4];
1275   __u8 uv_mode_probs[3];
1276   __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT];
1277   __u8 padding[3];
1278 };
1279 struct v4l2_vp8_entropy_coder_state {
1280   __u8 range;
1281   __u8 value;
1282   __u8 bit_count;
1283   __u8 padding;
1284 };
1285 #define V4L2_VP8_FRAME_FLAG_KEY_FRAME 0x01
1286 #define V4L2_VP8_FRAME_FLAG_EXPERIMENTAL 0x02
1287 #define V4L2_VP8_FRAME_FLAG_SHOW_FRAME 0x04
1288 #define V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF 0x08
1289 #define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN 0x10
1290 #define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT 0x20
1291 #define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) (! ! ((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME))
1292 #define V4L2_CID_STATELESS_VP8_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 200)
1293 struct v4l2_ctrl_vp8_frame {
1294   struct v4l2_vp8_segment segment;
1295   struct v4l2_vp8_loop_filter lf;
1296   struct v4l2_vp8_quantization quant;
1297   struct v4l2_vp8_entropy entropy;
1298   struct v4l2_vp8_entropy_coder_state coder_state;
1299   __u16 width;
1300   __u16 height;
1301   __u8 horizontal_scale;
1302   __u8 vertical_scale;
1303   __u8 version;
1304   __u8 prob_skip_false;
1305   __u8 prob_intra;
1306   __u8 prob_last;
1307   __u8 prob_gf;
1308   __u8 num_dct_parts;
1309   __u32 first_part_size;
1310   __u32 first_part_header_bits;
1311   __u32 dct_part_sizes[8];
1312   __u64 last_frame_ts;
1313   __u64 golden_frame_ts;
1314   __u64 alt_frame_ts;
1315   __u64 flags;
1316 };
1317 #define V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE 0x01
1318 #define V4L2_CID_STATELESS_MPEG2_SEQUENCE (V4L2_CID_CODEC_STATELESS_BASE + 220)
1319 struct v4l2_ctrl_mpeg2_sequence {
1320   __u16 horizontal_size;
1321   __u16 vertical_size;
1322   __u32 vbv_buffer_size;
1323   __u16 profile_and_level_indication;
1324   __u8 chroma_format;
1325   __u8 flags;
1326 };
1327 #define V4L2_MPEG2_PIC_CODING_TYPE_I 1
1328 #define V4L2_MPEG2_PIC_CODING_TYPE_P 2
1329 #define V4L2_MPEG2_PIC_CODING_TYPE_B 3
1330 #define V4L2_MPEG2_PIC_CODING_TYPE_D 4
1331 #define V4L2_MPEG2_PIC_TOP_FIELD 0x1
1332 #define V4L2_MPEG2_PIC_BOTTOM_FIELD 0x2
1333 #define V4L2_MPEG2_PIC_FRAME 0x3
1334 #define V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST 0x0001
1335 #define V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT 0x0002
1336 #define V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV 0x0004
1337 #define V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE 0x0008
1338 #define V4L2_MPEG2_PIC_FLAG_INTRA_VLC 0x0010
1339 #define V4L2_MPEG2_PIC_FLAG_ALT_SCAN 0x0020
1340 #define V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST 0x0040
1341 #define V4L2_MPEG2_PIC_FLAG_PROGRESSIVE 0x0080
1342 #define V4L2_CID_STATELESS_MPEG2_PICTURE (V4L2_CID_CODEC_STATELESS_BASE + 221)
1343 struct v4l2_ctrl_mpeg2_picture {
1344   __u64 backward_ref_ts;
1345   __u64 forward_ref_ts;
1346   __u32 flags;
1347   __u8 f_code[2][2];
1348   __u8 picture_coding_type;
1349   __u8 picture_structure;
1350   __u8 intra_dc_precision;
1351   __u8 reserved[5];
1352 };
1353 #define V4L2_CID_STATELESS_MPEG2_QUANTISATION (V4L2_CID_CODEC_STATELESS_BASE + 222)
1354 struct v4l2_ctrl_mpeg2_quantisation {
1355   __u8 intra_quantiser_matrix[64];
1356   __u8 non_intra_quantiser_matrix[64];
1357   __u8 chroma_intra_quantiser_matrix[64];
1358   __u8 chroma_non_intra_quantiser_matrix[64];
1359 };
1360 #define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400)
1361 #define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401)
1362 #define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 402)
1363 #define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 403)
1364 #define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 404)
1365 #define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405)
1366 #define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406)
1367 #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)
1368 enum v4l2_stateless_hevc_decode_mode {
1369   V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
1370   V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,
1371 };
1372 enum v4l2_stateless_hevc_start_code {
1373   V4L2_STATELESS_HEVC_START_CODE_NONE,
1374   V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,
1375 };
1376 #define V4L2_HEVC_SLICE_TYPE_B 0
1377 #define V4L2_HEVC_SLICE_TYPE_P 1
1378 #define V4L2_HEVC_SLICE_TYPE_I 2
1379 #define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0)
1380 #define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1)
1381 #define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2)
1382 #define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3)
1383 #define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4)
1384 #define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5)
1385 #define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6)
1386 #define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7)
1387 #define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8)
1388 struct v4l2_ctrl_hevc_sps {
1389   __u8 video_parameter_set_id;
1390   __u8 seq_parameter_set_id;
1391   __u16 pic_width_in_luma_samples;
1392   __u16 pic_height_in_luma_samples;
1393   __u8 bit_depth_luma_minus8;
1394   __u8 bit_depth_chroma_minus8;
1395   __u8 log2_max_pic_order_cnt_lsb_minus4;
1396   __u8 sps_max_dec_pic_buffering_minus1;
1397   __u8 sps_max_num_reorder_pics;
1398   __u8 sps_max_latency_increase_plus1;
1399   __u8 log2_min_luma_coding_block_size_minus3;
1400   __u8 log2_diff_max_min_luma_coding_block_size;
1401   __u8 log2_min_luma_transform_block_size_minus2;
1402   __u8 log2_diff_max_min_luma_transform_block_size;
1403   __u8 max_transform_hierarchy_depth_inter;
1404   __u8 max_transform_hierarchy_depth_intra;
1405   __u8 pcm_sample_bit_depth_luma_minus1;
1406   __u8 pcm_sample_bit_depth_chroma_minus1;
1407   __u8 log2_min_pcm_luma_coding_block_size_minus3;
1408   __u8 log2_diff_max_min_pcm_luma_coding_block_size;
1409   __u8 num_short_term_ref_pic_sets;
1410   __u8 num_long_term_ref_pics_sps;
1411   __u8 chroma_format_idc;
1412   __u8 sps_max_sub_layers_minus1;
1413   __u8 reserved[6];
1414   __u64 flags;
1415 };
1416 #define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0)
1417 #define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1)
1418 #define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2)
1419 #define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3)
1420 #define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4)
1421 #define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5)
1422 #define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6)
1423 #define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7)
1424 #define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8)
1425 #define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9)
1426 #define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10)
1427 #define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11)
1428 #define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12)
1429 #define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13)
1430 #define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)
1431 #define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15)
1432 #define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16)
1433 #define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17)
1434 #define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)
1435 #define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19)
1436 #define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20)
1437 struct v4l2_ctrl_hevc_pps {
1438   __u8 pic_parameter_set_id;
1439   __u8 num_extra_slice_header_bits;
1440   __u8 num_ref_idx_l0_default_active_minus1;
1441   __u8 num_ref_idx_l1_default_active_minus1;
1442   __s8 init_qp_minus26;
1443   __u8 diff_cu_qp_delta_depth;
1444   __s8 pps_cb_qp_offset;
1445   __s8 pps_cr_qp_offset;
1446   __u8 num_tile_columns_minus1;
1447   __u8 num_tile_rows_minus1;
1448   __u8 column_width_minus1[20];
1449   __u8 row_height_minus1[22];
1450   __s8 pps_beta_offset_div2;
1451   __s8 pps_tc_offset_div2;
1452   __u8 log2_parallel_merge_level_minus2;
1453   __u8 reserved;
1454   __u64 flags;
1455 };
1456 #define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01
1457 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0
1458 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1
1459 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2
1460 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3
1461 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4
1462 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5
1463 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6
1464 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7
1465 #define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8
1466 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9
1467 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10
1468 #define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11
1469 #define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12
1470 #define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16
1471 struct v4l2_hevc_dpb_entry {
1472   __u64 timestamp;
1473   __u8 flags;
1474   __u8 field_pic;
1475   __u16 reserved;
1476   __s32 pic_order_cnt_val;
1477 };
1478 struct v4l2_hevc_pred_weight_table {
1479   __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1480   __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1481   __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
1482   __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
1483   __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1484   __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1485   __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
1486   __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];
1487   __u8 luma_log2_weight_denom;
1488   __s8 delta_chroma_log2_weight_denom;
1489 };
1490 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0)
1491 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1)
1492 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2)
1493 #define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3)
1494 #define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4)
1495 #define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5)
1496 #define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6)
1497 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)
1498 #define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)
1499 #define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9)
1500 struct v4l2_ctrl_hevc_slice_params {
1501   __u32 bit_size;
1502   __u32 data_byte_offset;
1503   __u32 num_entry_point_offsets;
1504   __u8 nal_unit_type;
1505   __u8 nuh_temporal_id_plus1;
1506   __u8 slice_type;
1507   __u8 colour_plane_id;
1508   __s32 slice_pic_order_cnt;
1509   __u8 num_ref_idx_l0_active_minus1;
1510   __u8 num_ref_idx_l1_active_minus1;
1511   __u8 collocated_ref_idx;
1512   __u8 five_minus_max_num_merge_cand;
1513   __s8 slice_qp_delta;
1514   __s8 slice_cb_qp_offset;
1515   __s8 slice_cr_qp_offset;
1516   __s8 slice_act_y_qp_offset;
1517   __s8 slice_act_cb_qp_offset;
1518   __s8 slice_act_cr_qp_offset;
1519   __s8 slice_beta_offset_div2;
1520   __s8 slice_tc_offset_div2;
1521   __u8 pic_struct;
1522   __u8 reserved0[3];
1523   __u32 slice_segment_addr;
1524   __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1525   __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1526   __u16 short_term_ref_pic_set_size;
1527   __u16 long_term_ref_pic_set_size;
1528   struct v4l2_hevc_pred_weight_table pred_weight_table;
1529   __u8 reserved1[2];
1530   __u64 flags;
1531 };
1532 #define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1
1533 #define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2
1534 #define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4
1535 struct v4l2_ctrl_hevc_decode_params {
1536   __s32 pic_order_cnt_val;
1537   __u16 short_term_ref_pic_set_size;
1538   __u16 long_term_ref_pic_set_size;
1539   __u8 num_active_dpb_entries;
1540   __u8 num_poc_st_curr_before;
1541   __u8 num_poc_st_curr_after;
1542   __u8 num_poc_lt_curr;
1543   __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1544   __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1545   __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1546   __u8 num_delta_pocs_of_ref_rps_idx;
1547   __u8 reserved[3];
1548   struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
1549   __u64 flags;
1550 };
1551 struct v4l2_ctrl_hevc_scaling_matrix {
1552   __u8 scaling_list_4x4[6][16];
1553   __u8 scaling_list_8x8[6][64];
1554   __u8 scaling_list_16x16[6][64];
1555   __u8 scaling_list_32x32[2][64];
1556   __u8 scaling_list_dc_coef_16x16[6];
1557   __u8 scaling_list_dc_coef_32x32[2];
1558 };
1559 #define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
1560 #define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
1561 #define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
1562 struct v4l2_ctrl_hdr10_cll_info {
1563   __u16 max_content_light_level;
1564   __u16 max_pic_average_light_level;
1565 };
1566 #define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
1567 #define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5
1568 #define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000
1569 #define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5
1570 #define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000
1571 #define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
1572 #define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000
1573 #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
1574 #define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000
1575 #define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000
1576 #define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000
1577 #define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1
1578 #define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000
1579 struct v4l2_ctrl_hdr10_mastering_display {
1580   __u16 display_primaries_x[3];
1581   __u16 display_primaries_y[3];
1582   __u16 white_point_x;
1583   __u16 white_point_y;
1584   __u32 max_display_mastering_luminance;
1585   __u32 min_display_mastering_luminance;
1586 };
1587 #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
1588 #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
1589 struct v4l2_vp9_loop_filter {
1590   __s8 ref_deltas[4];
1591   __s8 mode_deltas[2];
1592   __u8 level;
1593   __u8 sharpness;
1594   __u8 flags;
1595   __u8 reserved[7];
1596 };
1597 struct v4l2_vp9_quantization {
1598   __u8 base_q_idx;
1599   __s8 delta_q_y_dc;
1600   __s8 delta_q_uv_dc;
1601   __s8 delta_q_uv_ac;
1602   __u8 reserved[4];
1603 };
1604 #define V4L2_VP9_SEGMENTATION_FLAG_ENABLED 0x01
1605 #define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP 0x02
1606 #define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE 0x04
1607 #define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA 0x08
1608 #define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE 0x10
1609 #define V4L2_VP9_SEG_LVL_ALT_Q 0
1610 #define V4L2_VP9_SEG_LVL_ALT_L 1
1611 #define V4L2_VP9_SEG_LVL_REF_FRAME 2
1612 #define V4L2_VP9_SEG_LVL_SKIP 3
1613 #define V4L2_VP9_SEG_LVL_MAX 4
1614 #define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) (1 << (id))
1615 #define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK 0xf
1616 struct v4l2_vp9_segmentation {
1617   __s16 feature_data[8][4];
1618   __u8 feature_enabled[8];
1619   __u8 tree_probs[7];
1620   __u8 pred_probs[3];
1621   __u8 flags;
1622   __u8 reserved[5];
1623 };
1624 #define V4L2_VP9_FRAME_FLAG_KEY_FRAME 0x001
1625 #define V4L2_VP9_FRAME_FLAG_SHOW_FRAME 0x002
1626 #define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT 0x004
1627 #define V4L2_VP9_FRAME_FLAG_INTRA_ONLY 0x008
1628 #define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV 0x010
1629 #define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX 0x020
1630 #define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE 0x040
1631 #define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING 0x080
1632 #define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING 0x100
1633 #define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING 0x200
1634 #define V4L2_VP9_SIGN_BIAS_LAST 0x1
1635 #define V4L2_VP9_SIGN_BIAS_GOLDEN 0x2
1636 #define V4L2_VP9_SIGN_BIAS_ALT 0x4
1637 #define V4L2_VP9_RESET_FRAME_CTX_NONE 0
1638 #define V4L2_VP9_RESET_FRAME_CTX_SPEC 1
1639 #define V4L2_VP9_RESET_FRAME_CTX_ALL 2
1640 #define V4L2_VP9_INTERP_FILTER_EIGHTTAP 0
1641 #define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH 1
1642 #define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP 2
1643 #define V4L2_VP9_INTERP_FILTER_BILINEAR 3
1644 #define V4L2_VP9_INTERP_FILTER_SWITCHABLE 4
1645 #define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE 0
1646 #define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE 1
1647 #define V4L2_VP9_REFERENCE_MODE_SELECT 2
1648 #define V4L2_VP9_PROFILE_MAX 3
1649 #define V4L2_CID_STATELESS_VP9_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 300)
1650 struct v4l2_ctrl_vp9_frame {
1651   struct v4l2_vp9_loop_filter lf;
1652   struct v4l2_vp9_quantization quant;
1653   struct v4l2_vp9_segmentation seg;
1654   __u32 flags;
1655   __u16 compressed_header_size;
1656   __u16 uncompressed_header_size;
1657   __u16 frame_width_minus_1;
1658   __u16 frame_height_minus_1;
1659   __u16 render_width_minus_1;
1660   __u16 render_height_minus_1;
1661   __u64 last_frame_ts;
1662   __u64 golden_frame_ts;
1663   __u64 alt_frame_ts;
1664   __u8 ref_frame_sign_bias;
1665   __u8 reset_frame_context;
1666   __u8 frame_context_idx;
1667   __u8 profile;
1668   __u8 bit_depth;
1669   __u8 interpolation_filter;
1670   __u8 tile_cols_log2;
1671   __u8 tile_rows_log2;
1672   __u8 reference_mode;
1673   __u8 reserved[7];
1674 };
1675 #define V4L2_VP9_NUM_FRAME_CTX 4
1676 struct v4l2_vp9_mv_probs {
1677   __u8 joint[3];
1678   __u8 sign[2];
1679   __u8 classes[2][10];
1680   __u8 class0_bit[2];
1681   __u8 bits[2][10];
1682   __u8 class0_fr[2][2][3];
1683   __u8 fr[2][3];
1684   __u8 class0_hp[2];
1685   __u8 hp[2];
1686 };
1687 #define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (V4L2_CID_CODEC_STATELESS_BASE + 301)
1688 #define V4L2_VP9_TX_MODE_ONLY_4X4 0
1689 #define V4L2_VP9_TX_MODE_ALLOW_8X8 1
1690 #define V4L2_VP9_TX_MODE_ALLOW_16X16 2
1691 #define V4L2_VP9_TX_MODE_ALLOW_32X32 3
1692 #define V4L2_VP9_TX_MODE_SELECT 4
1693 struct v4l2_ctrl_vp9_compressed_hdr {
1694   __u8 tx_mode;
1695   __u8 tx8[2][1];
1696   __u8 tx16[2][2];
1697   __u8 tx32[2][3];
1698   __u8 coef[4][2][2][6][6][3];
1699   __u8 skip[3];
1700   __u8 inter_mode[7][3];
1701   __u8 interp_filter[4][2];
1702   __u8 is_inter[4];
1703   __u8 comp_mode[5];
1704   __u8 single_ref[5][2];
1705   __u8 comp_ref[5];
1706   __u8 y_mode[4][9];
1707   __u8 uv_mode[10][9];
1708   __u8 partition[16][3];
1709   struct v4l2_vp9_mv_probs mv;
1710 };
1711 #define V4L2_AV1_TOTAL_REFS_PER_FRAME 8
1712 #define V4L2_AV1_CDEF_MAX 8
1713 #define V4L2_AV1_NUM_PLANES_MAX 3
1714 #define V4L2_AV1_MAX_SEGMENTS 8
1715 #define V4L2_AV1_MAX_OPERATING_POINTS (1 << 5)
1716 #define V4L2_AV1_REFS_PER_FRAME 7
1717 #define V4L2_AV1_MAX_NUM_Y_POINTS (1 << 4)
1718 #define V4L2_AV1_MAX_NUM_CB_POINTS (1 << 4)
1719 #define V4L2_AV1_MAX_NUM_CR_POINTS (1 << 4)
1720 #define V4L2_AV1_AR_COEFFS_SIZE 25
1721 #define V4L2_AV1_MAX_NUM_PLANES 3
1722 #define V4L2_AV1_MAX_TILE_COLS 64
1723 #define V4L2_AV1_MAX_TILE_ROWS 64
1724 #define V4L2_AV1_MAX_TILE_COUNT 512
1725 #define V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE 0x00000001
1726 #define V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK 0x00000002
1727 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA 0x00000004
1728 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER 0x00000008
1729 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND 0x00000010
1730 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND 0x00000020
1731 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION 0x00000040
1732 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER 0x00000080
1733 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT 0x00000100
1734 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP 0x00000200
1735 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS 0x00000400
1736 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES 0x00000800
1737 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF 0x00001000
1738 #define V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION 0x00002000
1739 #define V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME 0x00004000
1740 #define V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE 0x00008000
1741 #define V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X 0x00010000
1742 #define V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y 0x00020000
1743 #define V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT 0x00040000
1744 #define V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q 0x00080000
1745 #define V4L2_CID_STATELESS_AV1_SEQUENCE (V4L2_CID_CODEC_STATELESS_BASE + 500)
1746 struct v4l2_ctrl_av1_sequence {
1747   __u32 flags;
1748   __u8 seq_profile;
1749   __u8 order_hint_bits;
1750   __u8 bit_depth;
1751   __u8 reserved;
1752   __u16 max_frame_width_minus_1;
1753   __u16 max_frame_height_minus_1;
1754 };
1755 #define V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (V4L2_CID_CODEC_STATELESS_BASE + 501)
1756 struct v4l2_ctrl_av1_tile_group_entry {
1757   __u32 tile_offset;
1758   __u32 tile_size;
1759   __u32 tile_row;
1760   __u32 tile_col;
1761 };
1762 enum v4l2_av1_warp_model {
1763   V4L2_AV1_WARP_MODEL_IDENTITY = 0,
1764   V4L2_AV1_WARP_MODEL_TRANSLATION = 1,
1765   V4L2_AV1_WARP_MODEL_ROTZOOM = 2,
1766   V4L2_AV1_WARP_MODEL_AFFINE = 3,
1767 };
1768 enum v4l2_av1_reference_frame {
1769   V4L2_AV1_REF_INTRA_FRAME = 0,
1770   V4L2_AV1_REF_LAST_FRAME = 1,
1771   V4L2_AV1_REF_LAST2_FRAME = 2,
1772   V4L2_AV1_REF_LAST3_FRAME = 3,
1773   V4L2_AV1_REF_GOLDEN_FRAME = 4,
1774   V4L2_AV1_REF_BWDREF_FRAME = 5,
1775   V4L2_AV1_REF_ALTREF2_FRAME = 6,
1776   V4L2_AV1_REF_ALTREF_FRAME = 7,
1777 };
1778 #define V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) (1 << (ref))
1779 #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL 0x1
1780 #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM 0x2
1781 #define V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION 0x4
1782 struct v4l2_av1_global_motion {
1783   __u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME];
1784   enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME];
1785   __s32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6];
1786   __u8 invalid;
1787   __u8 reserved[3];
1788 };
1789 enum v4l2_av1_frame_restoration_type {
1790   V4L2_AV1_FRAME_RESTORE_NONE = 0,
1791   V4L2_AV1_FRAME_RESTORE_WIENER = 1,
1792   V4L2_AV1_FRAME_RESTORE_SGRPROJ = 2,
1793   V4L2_AV1_FRAME_RESTORE_SWITCHABLE = 3,
1794 };
1795 #define V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR 0x1
1796 #define V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR 0x2
1797 struct v4l2_av1_loop_restoration {
1798   __u8 flags;
1799   __u8 lr_unit_shift;
1800   __u8 lr_uv_shift;
1801   __u8 reserved;
1802   enum v4l2_av1_frame_restoration_type frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX];
1803   __u32 loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES];
1804 };
1805 struct v4l2_av1_cdef {
1806   __u8 damping_minus_3;
1807   __u8 bits;
1808   __u8 y_pri_strength[V4L2_AV1_CDEF_MAX];
1809   __u8 y_sec_strength[V4L2_AV1_CDEF_MAX];
1810   __u8 uv_pri_strength[V4L2_AV1_CDEF_MAX];
1811   __u8 uv_sec_strength[V4L2_AV1_CDEF_MAX];
1812 };
1813 #define V4L2_AV1_SEGMENTATION_FLAG_ENABLED 0x1
1814 #define V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP 0x2
1815 #define V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE 0x4
1816 #define V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA 0x8
1817 #define V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP 0x10
1818 enum v4l2_av1_segment_feature {
1819   V4L2_AV1_SEG_LVL_ALT_Q = 0,
1820   V4L2_AV1_SEG_LVL_ALT_LF_Y_V = 1,
1821   V4L2_AV1_SEG_LVL_REF_FRAME = 5,
1822   V4L2_AV1_SEG_LVL_REF_SKIP = 6,
1823   V4L2_AV1_SEG_LVL_REF_GLOBALMV = 7,
1824   V4L2_AV1_SEG_LVL_MAX = 8
1825 };
1826 #define V4L2_AV1_SEGMENT_FEATURE_ENABLED(id) (1 << (id))
1827 struct v4l2_av1_segmentation {
1828   __u8 flags;
1829   __u8 last_active_seg_id;
1830   __u8 feature_enabled[V4L2_AV1_MAX_SEGMENTS];
1831   __s16 feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX];
1832 };
1833 #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
1834 #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
1835 #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT 0x4
1836 #define V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI 0x8
1837 struct v4l2_av1_loop_filter {
1838   __u8 flags;
1839   __u8 level[4];
1840   __u8 sharpness;
1841   __s8 ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME];
1842   __s8 mode_deltas[2];
1843   __u8 delta_lf_res;
1844 };
1845 #define V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA 0x1
1846 #define V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX 0x2
1847 #define V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT 0x4
1848 struct v4l2_av1_quantization {
1849   __u8 flags;
1850   __u8 base_q_idx;
1851   __s8 delta_q_y_dc;
1852   __s8 delta_q_u_dc;
1853   __s8 delta_q_u_ac;
1854   __s8 delta_q_v_dc;
1855   __s8 delta_q_v_ac;
1856   __u8 qm_y;
1857   __u8 qm_u;
1858   __u8 qm_v;
1859   __u8 delta_q_res;
1860 };
1861 #define V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING 0x1
1862 struct v4l2_av1_tile_info {
1863   __u8 flags;
1864   __u8 context_update_tile_id;
1865   __u8 tile_cols;
1866   __u8 tile_rows;
1867   __u32 mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1];
1868   __u32 mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1];
1869   __u32 width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS];
1870   __u32 height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS];
1871   __u8 tile_size_bytes;
1872   __u8 reserved[3];
1873 };
1874 enum v4l2_av1_frame_type {
1875   V4L2_AV1_KEY_FRAME = 0,
1876   V4L2_AV1_INTER_FRAME = 1,
1877   V4L2_AV1_INTRA_ONLY_FRAME = 2,
1878   V4L2_AV1_SWITCH_FRAME = 3
1879 };
1880 enum v4l2_av1_interpolation_filter {
1881   V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0,
1882   V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1,
1883   V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2,
1884   V4L2_AV1_INTERPOLATION_FILTER_BILINEAR = 3,
1885   V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4,
1886 };
1887 enum v4l2_av1_tx_mode {
1888   V4L2_AV1_TX_MODE_ONLY_4X4 = 0,
1889   V4L2_AV1_TX_MODE_LARGEST = 1,
1890   V4L2_AV1_TX_MODE_SELECT = 2
1891 };
1892 #define V4L2_AV1_FRAME_FLAG_SHOW_FRAME 0x00000001
1893 #define V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME 0x00000002
1894 #define V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE 0x00000004
1895 #define V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE 0x00000008
1896 #define V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS 0x00000010
1897 #define V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV 0x00000020
1898 #define V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC 0x00000040
1899 #define V4L2_AV1_FRAME_FLAG_USE_SUPERRES 0x00000080
1900 #define V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV 0x00000100
1901 #define V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE 0x00000200
1902 #define V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS 0x00000400
1903 #define V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF 0x00000800
1904 #define V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION 0x00001000
1905 #define V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT 0x00002000
1906 #define V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET 0x00004000
1907 #define V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED 0x00008000
1908 #define V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT 0x00010000
1909 #define V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE 0x00020000
1910 #define V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT 0x00040000
1911 #define V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING 0x00080000
1912 #define V4L2_CID_STATELESS_AV1_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 502)
1913 struct v4l2_ctrl_av1_frame {
1914   struct v4l2_av1_tile_info tile_info;
1915   struct v4l2_av1_quantization quantization;
1916   __u8 superres_denom;
1917   struct v4l2_av1_segmentation segmentation;
1918   struct v4l2_av1_loop_filter loop_filter;
1919   struct v4l2_av1_cdef cdef;
1920   __u8 skip_mode_frame[2];
1921   __u8 primary_ref_frame;
1922   struct v4l2_av1_loop_restoration loop_restoration;
1923   struct v4l2_av1_global_motion global_motion;
1924   __u32 flags;
1925   enum v4l2_av1_frame_type frame_type;
1926   __u32 order_hint;
1927   __u32 upscaled_width;
1928   enum v4l2_av1_interpolation_filter interpolation_filter;
1929   enum v4l2_av1_tx_mode tx_mode;
1930   __u32 frame_width_minus_1;
1931   __u32 frame_height_minus_1;
1932   __u16 render_width_minus_1;
1933   __u16 render_height_minus_1;
1934   __u32 current_frame_id;
1935   __u32 buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS];
1936   __u8 reserved[4];
1937   __u32 order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME];
1938   __u64 reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME];
1939   __s8 ref_frame_idx[V4L2_AV1_REFS_PER_FRAME];
1940   __u8 refresh_frame_flags;
1941 };
1942 #define V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN 0x1
1943 #define V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN 0x2
1944 #define V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA 0x4
1945 #define V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP 0x8
1946 #define V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE 0x10
1947 #define V4L2_CID_STATELESS_AV1_FILM_GRAIN (V4L2_CID_CODEC_STATELESS_BASE + 505)
1948 struct v4l2_ctrl_av1_film_grain {
1949   __u8 flags;
1950   __u8 cr_mult;
1951   __u16 grain_seed;
1952   __u8 film_grain_params_ref_idx;
1953   __u8 num_y_points;
1954   __u8 point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS];
1955   __u8 point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS];
1956   __u8 num_cb_points;
1957   __u8 point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS];
1958   __u8 point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS];
1959   __u8 num_cr_points;
1960   __u8 point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS];
1961   __u8 point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS];
1962   __u8 grain_scaling_minus_8;
1963   __u8 ar_coeff_lag;
1964   __u8 ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE];
1965   __u8 ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE];
1966   __u8 ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE];
1967   __u8 ar_coeff_shift_minus_6;
1968   __u8 grain_scale_shift;
1969   __u8 cb_mult;
1970   __u8 cb_luma_mult;
1971   __u8 cr_luma_mult;
1972   __u16 cb_offset;
1973   __u16 cr_offset;
1974   __u8 reserved[4];
1975 };
1976 #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC
1977 #define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS
1978 #define V4L2_CID_MPEG_BASE V4L2_CID_CODEC_BASE
1979 #define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE
1980 #define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE
1981 #endif
1982