← Documents Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Codec Control Reference

V4L2 MPEG audio/video, H.264, vendor codec, VP8/VP9 및 HEVC encoder·decoder 제어를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/ext-ctrls-codec.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

ext-ctrls-codec.rst:1-2674

이 문서는 V4L2 stateful codec 장치의 stream multiplexing, MPEG audio, video format, GOP와 bitrate, H.264 도구, vendor-specific filter, VP8/VP9 및 HEVC encoding 제어를 한곳에 정리합니다. Menu 값은 장치마다 지원 범위가 다르므로 query 결과가 최종 기준입니다.

Rate-control mode와 QP, profile/level, reference 수, slice·hierarchy·buffer 모델은 서로 의존합니다. 애플리케이션은 codec 시작 전에 일관된 조합을 설정하고 read-only feedback인 PTS, frame 또는 average QP는 완료된 buffer와 함께 해석해야 합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _codec-controls:
4
5 ***********************
6 Codec Control Reference
7 ***********************
8
9 Below all controls within the Codec control class are described. First
10 the generic controls, then controls specific for certain hardware.
11
12 .. note::
13
14 These controls are applicable to all codecs and not just MPEG. The
15 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
16 were originally made for MPEG codecs and later extended to cover all
17 encoding formats.
18
19
20 Generic Codec Controls
21 ======================
22
23
24 .. _mpeg-control-id:
25
26 Codec Control IDs
27 -----------------
28
29 ``V4L2_CID_CODEC_CLASS (class)``
30 The Codec class descriptor. Calling
31 :ref:`VIDIOC_QUERYCTRL` for this control will
32 return a description of this control class. This description can be
33 used as the caption of a Tab page in a GUI, for example.
34
35 .. _v4l2-mpeg-stream-type:
36
37 ``V4L2_CID_MPEG_STREAM_TYPE``
38 (enum)
39
40 enum v4l2_mpeg_stream_type -
41 The MPEG-1, -2 or -4 output stream type. One cannot assume anything
42 here. Each hardware MPEG encoder tends to support different subsets
43 of the available MPEG stream types. This control is specific to
44 multiplexed MPEG streams. The currently defined stream types are:
45
46
47
48 .. flat-table::
49 :header-rows: 0
50 :stub-columns: 0
51
52 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
53 - MPEG-2 program stream
54 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
55 - MPEG-2 transport stream
56 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
57 - MPEG-1 system stream
58 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
59 - MPEG-2 DVD-compatible stream
60 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
61 - MPEG-1 VCD-compatible stream
62 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
63 - MPEG-2 SVCD-compatible stream
64
65
66
67 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
68 Program Map Table Packet ID for the MPEG transport stream (default
69 16)
70
71 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
72 Audio Packet ID for the MPEG transport stream (default 256)
73
74 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
75 Video Packet ID for the MPEG transport stream (default 260)
76
77 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
78 Packet ID for the MPEG transport stream carrying PCR fields (default
79 259)
80
81 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
82 Audio ID for MPEG PES
83
84 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
85 Video ID for MPEG PES
86
87 .. _v4l2-mpeg-stream-vbi-fmt:
88
89 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
90 (enum)
91
92 enum v4l2_mpeg_stream_vbi_fmt -
93 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
94 the MPEG stream. This control selects whether VBI data should be
95 embedded, and if so, what embedding method should be used. The list
96 of possible VBI formats depends on the driver. The currently defined
97 VBI format types are:
98
99
100
101 .. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|
102
103 .. flat-table::
104 :header-rows: 0
105 :stub-columns: 0
106
107 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
108 - No VBI in the MPEG stream
109 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
110 - VBI in private packets, IVTV format (documented in the kernel
111 sources in the file
112 ``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``)
113
114
115
116 .. _v4l2-mpeg-audio-sampling-freq:
117
118 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
119 (enum)
120
121 enum v4l2_mpeg_audio_sampling_freq -
122 MPEG Audio sampling frequency. Possible values are:
123
124
125
126 .. flat-table::
127 :header-rows: 0
128 :stub-columns: 0
129
130 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
131 - 44.1 kHz
132 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
133 - 48 kHz
134 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
135 - 32 kHz
136
137
138
139 .. _v4l2-mpeg-audio-encoding:
140
141 ``V4L2_CID_MPEG_AUDIO_ENCODING``
142 (enum)
143
144 enum v4l2_mpeg_audio_encoding -
145 MPEG Audio encoding. This control is specific to multiplexed MPEG
146 streams. Possible values are:
147
148
149
150 .. flat-table::
151 :header-rows: 0
152 :stub-columns: 0
153
154 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
155 - MPEG-1/2 Layer I encoding
156 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
157 - MPEG-1/2 Layer II encoding
158 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
159 - MPEG-1/2 Layer III encoding
160 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
161 - MPEG-2/4 AAC (Advanced Audio Coding)
162 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
163 - AC-3 aka ATSC A/52 encoding
164
165
166
167 .. _v4l2-mpeg-audio-l1-bitrate:
168
169 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
170 (enum)
171
172 enum v4l2_mpeg_audio_l1_bitrate -
173 MPEG-1/2 Layer I bitrate. Possible values are:
174
175
176
177 .. flat-table::
178 :header-rows: 0
179 :stub-columns: 0
180
181 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
182 - 32 kbit/s
183 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
184 - 64 kbit/s
185 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
186 - 96 kbit/s
187 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
188 - 128 kbit/s
189 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
190 - 160 kbit/s
191 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
192 - 192 kbit/s
193 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
194 - 224 kbit/s
195 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
196 - 256 kbit/s
197 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
198 - 288 kbit/s
199 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
200 - 320 kbit/s
201 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
202 - 352 kbit/s
203 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
204 - 384 kbit/s
205 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
206 - 416 kbit/s
207 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
208 - 448 kbit/s
209
210
211
212 .. _v4l2-mpeg-audio-l2-bitrate:
213
214 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
215 (enum)
216
217 enum v4l2_mpeg_audio_l2_bitrate -
218 MPEG-1/2 Layer II bitrate. Possible values are:
219
220
221
222 .. flat-table::
223 :header-rows: 0
224 :stub-columns: 0
225
226 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
227 - 32 kbit/s
228 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
229 - 48 kbit/s
230 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
231 - 56 kbit/s
232 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
233 - 64 kbit/s
234 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
235 - 80 kbit/s
236 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
237 - 96 kbit/s
238 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
239 - 112 kbit/s
240 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
241 - 128 kbit/s
242 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
243 - 160 kbit/s
244 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
245 - 192 kbit/s
246 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
247 - 224 kbit/s
248 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
249 - 256 kbit/s
250 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
251 - 320 kbit/s
252 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
253 - 384 kbit/s
254
255
256
257 .. _v4l2-mpeg-audio-l3-bitrate:
258
259 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
260 (enum)
261
262 enum v4l2_mpeg_audio_l3_bitrate -
263 MPEG-1/2 Layer III bitrate. Possible values are:
264
265
266
267 .. flat-table::
268 :header-rows: 0
269 :stub-columns: 0
270
271 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
272 - 32 kbit/s
273 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
274 - 40 kbit/s
275 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
276 - 48 kbit/s
277 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
278 - 56 kbit/s
279 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
280 - 64 kbit/s
281 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
282 - 80 kbit/s
283 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
284 - 96 kbit/s
285 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
286 - 112 kbit/s
287 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
288 - 128 kbit/s
289 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
290 - 160 kbit/s
291 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
292 - 192 kbit/s
293 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
294 - 224 kbit/s
295 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
296 - 256 kbit/s
297 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
298 - 320 kbit/s
299
300
301
302 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
303 AAC bitrate in bits per second.
304
305 .. _v4l2-mpeg-audio-ac3-bitrate:
306
307 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
308 (enum)
309
310 enum v4l2_mpeg_audio_ac3_bitrate -
311 AC-3 bitrate. Possible values are:
312
313
314
315 .. flat-table::
316 :header-rows: 0
317 :stub-columns: 0
318
319 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
320 - 32 kbit/s
321 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
322 - 40 kbit/s
323 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
324 - 48 kbit/s
325 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
326 - 56 kbit/s
327 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
328 - 64 kbit/s
329 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
330 - 80 kbit/s
331 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
332 - 96 kbit/s
333 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
334 - 112 kbit/s
335 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
336 - 128 kbit/s
337 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
338 - 160 kbit/s
339 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
340 - 192 kbit/s
341 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
342 - 224 kbit/s
343 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
344 - 256 kbit/s
345 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
346 - 320 kbit/s
347 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
348 - 384 kbit/s
349 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
350 - 448 kbit/s
351 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
352 - 512 kbit/s
353 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
354 - 576 kbit/s
355 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
356 - 640 kbit/s
357
358
359
360 .. _v4l2-mpeg-audio-mode:
361
362 ``V4L2_CID_MPEG_AUDIO_MODE``
363 (enum)
364
365 enum v4l2_mpeg_audio_mode -
366 MPEG Audio mode. Possible values are:
367
368
369
370 .. flat-table::
371 :header-rows: 0
372 :stub-columns: 0
373
374 * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
375 - Stereo
376 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
377 - Joint Stereo
378 * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
379 - Bilingual
380 * - ``V4L2_MPEG_AUDIO_MODE_MONO``
381 - Mono
382
383
384
385 .. _v4l2-mpeg-audio-mode-extension:
386
387 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
388 (enum)
389
390 enum v4l2_mpeg_audio_mode_extension -
391 Joint Stereo audio mode extension. In Layer I and II they indicate
392 which subbands are in intensity stereo. All other subbands are coded
393 in stereo. Layer III is not (yet) supported. Possible values are:
394
395 .. tabularcolumns:: |p{9.1cm}|p{8.4cm}|
396
397 .. flat-table::
398 :header-rows: 0
399 :stub-columns: 0
400
401 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
402 - Subbands 4-31 in intensity stereo
403 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
404 - Subbands 8-31 in intensity stereo
405 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
406 - Subbands 12-31 in intensity stereo
407 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
408 - Subbands 16-31 in intensity stereo
409
410
411
412 .. _v4l2-mpeg-audio-emphasis:
413
414 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
415 (enum)
416
417 enum v4l2_mpeg_audio_emphasis -
418 Audio Emphasis. Possible values are:
419
420
421
422 .. flat-table::
423 :header-rows: 0
424 :stub-columns: 0
425
426 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
427 - None
428 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
429 - 50/15 microsecond emphasis
430 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
431 - CCITT J.17
432
433
434
435 .. _v4l2-mpeg-audio-crc:
436
437 ``V4L2_CID_MPEG_AUDIO_CRC``
438 (enum)
439
440 enum v4l2_mpeg_audio_crc -
441 CRC method. Possible values are:
442
443
444
445 .. flat-table::
446 :header-rows: 0
447 :stub-columns: 0
448
449 * - ``V4L2_MPEG_AUDIO_CRC_NONE``
450 - None
451 * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
452 - 16 bit parity check
453
454
455
456 ``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
457 Mutes the audio when capturing. This is not done by muting audio
458 hardware, which can still produce a slight hiss, but in the encoder
459 itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
460 unmuted, 1 = muted.
461
462 .. _v4l2-mpeg-audio-dec-playback:
463
464 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
465 (enum)
466
467 enum v4l2_mpeg_audio_dec_playback -
468 Determines how monolingual audio should be played back. Possible
469 values are:
470
471
472
473 .. tabularcolumns:: |p{9.8cm}|p{7.7cm}|
474
475 .. flat-table::
476 :header-rows: 0
477 :stub-columns: 0
478
479 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
480 - Automatically determines the best playback mode.
481 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
482 - Stereo playback.
483 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
484 - Left channel playback.
485 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
486 - Right channel playback.
487 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
488 - Mono playback.
489 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
490 - Stereo playback with swapped left and right channels.
491
492
493
494 .. _v4l2-mpeg-audio-dec-multilingual-playback:
495
496 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
497 (enum)
498
499 enum v4l2_mpeg_audio_dec_playback -
500 Determines how multilingual audio should be played back.
501
502 .. _v4l2-mpeg-video-encoding:
503
504 ``V4L2_CID_MPEG_VIDEO_ENCODING``
505 (enum)
506
507 enum v4l2_mpeg_video_encoding -
508 MPEG Video encoding method. This control is specific to multiplexed
509 MPEG streams. Possible values are:
510
511
512
513 .. flat-table::
514 :header-rows: 0
515 :stub-columns: 0
516
517 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
518 - MPEG-1 Video encoding
519 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
520 - MPEG-2 Video encoding
521 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
522 - MPEG-4 AVC (H.264) Video encoding
523
524
525
526 .. _v4l2-mpeg-video-aspect:
527
528 ``V4L2_CID_MPEG_VIDEO_ASPECT``
529 (enum)
530
531 enum v4l2_mpeg_video_aspect -
532 Video aspect. Possible values are:
533
534
535
536 .. flat-table::
537 :header-rows: 0
538 :stub-columns: 0
539
540 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
541 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
542 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
543 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
544
545
546
547 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
548 Number of B-Frames (default 2)
549
550 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
551 GOP size (default 12)
552
553 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
554 GOP closure (default 1)
555
556 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
557 Enable 3:2 pulldown (default 0)
558
559 .. _v4l2-mpeg-video-bitrate-mode:
560
561 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
562 (enum)
563
564 enum v4l2_mpeg_video_bitrate_mode -
565 Video bitrate mode. Possible values are:
566
567
568
569 .. flat-table::
570 :header-rows: 0
571 :stub-columns: 0
572
573 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
574 - Variable bitrate
575 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
576 - Constant bitrate
577 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``
578 - Constant quality
579
580
581
582 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
583 Average video bitrate in bits per second.
584
585 ``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
586 Peak video bitrate in bits per second. Must be larger or equal to
587 the average video bitrate. It is ignored if the video bitrate mode
588 is set to constant bitrate.
589
590 ``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)``
591 Constant quality level control. This control is applicable when
592 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is
593 ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100
594 where 1 indicates lowest quality and 100 indicates highest quality.
595 Encoder will decide the appropriate quantization parameter and
596 bitrate to produce requested frame quality.
597
598
599 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)``
600
601 enum v4l2_mpeg_video_frame_skip_mode -
602 Indicates in what conditions the encoder should skip frames. If
603 encoding a frame would cause the encoded stream to be larger then a
604 chosen data limit then the frame will be skipped. Possible values
605 are:
606
607
608 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
609
610 .. raw:: latex
611
612 \small
613
614 .. flat-table::
615 :header-rows: 0
616 :stub-columns: 0
617
618 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED``
619 - Frame skip mode is disabled.
620 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``
621 - Frame skip mode enabled and buffer limit is set by the chosen
622 level and is defined by the standard.
623 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``
624 - Frame skip mode enabled and buffer limit is set by the
625 :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or
626 :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control.
627
628 .. raw:: latex
629
630 \normalsize
631
632 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
633 For every captured frame, skip this many subsequent frames (default
634 0).
635
636 ``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
637 "Mutes" the video to a fixed color when capturing. This is useful
638 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
639 muted.
640
641 ``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
642 Sets the "mute" color of the video. The supplied 32-bit integer is
643 interpreted as follows (bit 0 = least significant bit):
644
645
646
647 .. flat-table::
648 :header-rows: 0
649 :stub-columns: 0
650
651 * - Bit 0:7
652 - V chrominance information
653 * - Bit 8:15
654 - U chrominance information
655 * - Bit 16:23
656 - Y luminance information
657 * - Bit 24:31
658 - Must be zero.
659
660
661
662 .. _v4l2-mpeg-video-dec-pts:
663
664 ``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
665 This read-only control returns the 33-bit video Presentation Time
666 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
667 currently displayed frame. This is the same PTS as is used in
668 :ref:`VIDIOC_DECODER_CMD`.
669
670 .. _v4l2-mpeg-video-dec-frame:
671
672 ``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
673 This read-only control returns the frame counter of the frame that
674 is currently displayed (decoded). This value is reset to 0 whenever
675 the decoder is started.
676
677 ``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)``
678 This control sets the conceal color in YUV color space. It describes
679 the client preference of the error conceal color in case of an error
680 where the reference frame is missing. The decoder should fill the
681 reference buffer with the preferred color and use it for future
682 decoding. The control is using 16 bits per channel.
683 Applicable to decoders.
684
685 .. flat-table::
686 :header-rows: 0
687 :stub-columns: 0
688
689 * -
690 - 8bit format
691 - 10bit format
692 - 12bit format
693 * - Y luminance
694 - Bit 0:7
695 - Bit 0:9
696 - Bit 0:11
697 * - Cb chrominance
698 - Bit 16:23
699 - Bit 16:25
700 - Bit 16:27
701 * - Cr chrominance
702 - Bit 32:39
703 - Bit 32:41
704 - Bit 32:43
705 * - Must be zero
706 - Bit 48:63
707 - Bit 48:63
708 - Bit 48:63
709
710 ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
711 If enabled the decoder expects to receive a single slice per buffer,
712 otherwise the decoder expects a single frame in per buffer.
713 Applicable to the decoder, all codecs.
714
715 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)``
716 If the display delay is enabled then the decoder is forced to return
717 a CAPTURE buffer (decoded frame) after processing a certain number
718 of OUTPUT buffers. The delay can be set through
719 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This
720 feature can be used for example for generating thumbnails of videos.
721 Applicable to the decoder.
722
723 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)``
724 Display delay value for decoder. The decoder is forced to
725 return a decoded frame after the set 'display delay' number of
726 frames. If this number is low it may result in frames returned out
727 of display order, in addition the hardware may still be using the
728 returned buffer as a reference picture for subsequent frames.
729
730 ``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)``
731 If enabled then, AUD (Access Unit Delimiter) NALUs will be generated.
732 That could be useful to find the start of a frame without having to
733 fully parse each NALU. Applicable to the H264 and HEVC encoders.
734
735 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
736 Enable writing sample aspect ratio in the Video Usability
737 Information. Applicable to the H264 encoder.
738
739 .. _v4l2-mpeg-video-h264-vui-sar-idc:
740
741 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
742 (enum)
743
744 enum v4l2_mpeg_video_h264_vui_sar_idc -
745 VUI sample aspect ratio indicator for H.264 encoding. The value is
746 defined in the table E-1 in the standard. Applicable to the H264
747 encoder.
748
749
750
751 .. flat-table::
752 :header-rows: 0
753 :stub-columns: 0
754
755 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
756 - Unspecified
757 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
758 - 1x1
759 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
760 - 12x11
761 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
762 - 10x11
763 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
764 - 16x11
765 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
766 - 40x33
767 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
768 - 24x11
769 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
770 - 20x11
771 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
772 - 32x11
773 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
774 - 80x33
775 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
776 - 18x11
777 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
778 - 15x11
779 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
780 - 64x33
781 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
782 - 160x99
783 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
784 - 4x3
785 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
786 - 3x2
787 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
788 - 2x1
789 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
790 - Extended SAR
791
792
793
794 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
795 Extended sample aspect ratio width for H.264 VUI encoding.
796 Applicable to the H264 encoder.
797
798 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
799 Extended sample aspect ratio height for H.264 VUI encoding.
800 Applicable to the H264 encoder.
801
802 .. _v4l2-mpeg-video-h264-level:
803
804 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
805 (enum)
806
807 enum v4l2_mpeg_video_h264_level -
808 The level information for the H264 video elementary stream.
809 Applicable to the H264 encoder. Possible values are:
810
811
812
813 .. flat-table::
814 :header-rows: 0
815 :stub-columns: 0
816
817 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
818 - Level 1.0
819 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
820 - Level 1B
821 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
822 - Level 1.1
823 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
824 - Level 1.2
825 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
826 - Level 1.3
827 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
828 - Level 2.0
829 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
830 - Level 2.1
831 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
832 - Level 2.2
833 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
834 - Level 3.0
835 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
836 - Level 3.1
837 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
838 - Level 3.2
839 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
840 - Level 4.0
841 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
842 - Level 4.1
843 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
844 - Level 4.2
845 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
846 - Level 5.0
847 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
848 - Level 5.1
849 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
850 - Level 5.2
851 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
852 - Level 6.0
853 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
854 - Level 6.1
855 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
856 - Level 6.2
857
858
859
860 .. _v4l2-mpeg-video-mpeg2-level:
861
862 ``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
863 (enum)
864
865 enum v4l2_mpeg_video_mpeg2_level -
866 The level information for the MPEG2 elementary stream. Applicable to
867 MPEG2 codecs. Possible values are:
868
869
870
871 .. flat-table::
872 :header-rows: 0
873 :stub-columns: 0
874
875 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
876 - Low Level (LL)
877 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
878 - Main Level (ML)
879 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
880 - High-1440 Level (H-14)
881 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
882 - High Level (HL)
883
884
885
886 .. _v4l2-mpeg-video-mpeg4-level:
887
888 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
889 (enum)
890
891 enum v4l2_mpeg_video_mpeg4_level -
892 The level information for the MPEG4 elementary stream. Applicable to
893 the MPEG4 encoder. Possible values are:
894
895
896
897 .. flat-table::
898 :header-rows: 0
899 :stub-columns: 0
900
901 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
902 - Level 0
903 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
904 - Level 0b
905 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
906 - Level 1
907 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
908 - Level 2
909 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
910 - Level 3
911 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
912 - Level 3b
913 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
914 - Level 4
915 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
916 - Level 5
917
918
919
920 .. _v4l2-mpeg-video-h264-profile:
921
922 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
923 (enum)
924
925 enum v4l2_mpeg_video_h264_profile -
926 The profile information for H264. Applicable to the H264 encoder.
927 Possible values are:
928
929 .. raw:: latex
930
931 \small
932
933 .. tabularcolumns:: |p{10.2cm}|p{7.3cm}|
934
935 .. flat-table::
936 :header-rows: 0
937 :stub-columns: 0
938
939 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
940 - Baseline profile
941 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
942 - Constrained Baseline profile
943 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
944 - Main profile
945 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
946 - Extended profile
947 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
948 - High profile
949 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
950 - High 10 profile
951 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
952 - High 422 profile
953 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
954 - High 444 Predictive profile
955 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
956 - High 10 Intra profile
957 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
958 - High 422 Intra profile
959 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
960 - High 444 Intra profile
961 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
962 - CAVLC 444 Intra profile
963 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
964 - Scalable Baseline profile
965 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
966 - Scalable High profile
967 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
968 - Scalable High Intra profile
969 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
970 - Stereo High profile
971 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
972 - Multiview High profile
973 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
974 - Constrained High profile
975
976 .. raw:: latex
977
978 \normalsize
979
980 .. _v4l2-mpeg-video-mpeg2-profile:
981
982 ``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
983 (enum)
984
985 enum v4l2_mpeg_video_mpeg2_profile -
986 The profile information for MPEG2. Applicable to MPEG2 codecs.
987 Possible values are:
988
989 .. raw:: latex
990
991 \small
992
993 .. tabularcolumns:: |p{10.2cm}|p{7.3cm}|
994
995 .. flat-table::
996 :header-rows: 0
997 :stub-columns: 0
998
999 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
1000 - Simple profile (SP)
1001 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
1002 - Main profile (MP)
1003 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
1004 - SNR Scalable profile (SNR)
1005 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
1006 - Spatially Scalable profile (Spt)
1007 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
1008 - High profile (HP)
1009 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
1010 - Multi-view profile (MVP)
1013 .. raw:: latex
1015 \normalsize
1017 .. _v4l2-mpeg-video-mpeg4-profile:
1019 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
1020 (enum)
1022 enum v4l2_mpeg_video_mpeg4_profile -
1023 The profile information for MPEG4. Applicable to the MPEG4 encoder.
1024 Possible values are:
1026 .. raw:: latex
1028 \small
1030 .. tabularcolumns:: |p{11.8cm}|p{5.7cm}|
1032 .. flat-table::
1033 :header-rows: 0
1034 :stub-columns: 0
1036 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
1037 - Simple profile
1038 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
1039 - Advanced Simple profile
1040 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
1041 - Core profile
1042 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
1043 - Simple Scalable profile
1044 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
1045 - Advanced Coding Efficiency profile
1047 .. raw:: latex
1049 \normalsize
1051 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
1052 The maximum number of reference pictures used for encoding.
1053 Applicable to the encoder.
1055 .. _v4l2-mpeg-video-multi-slice-mode:
1057 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
1058 (enum)
1060 enum v4l2_mpeg_video_multi_slice_mode -
1061 Determines how the encoder should handle division of frame into
1062 slices. Applicable to the encoder. Possible values are:
1066 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1068 .. flat-table::
1069 :header-rows: 0
1070 :stub-columns: 0
1072 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
1073 - Single slice per frame.
1074 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
1075 - Multiple slices with set maximum number of macroblocks per slice.
1076 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
1077 - Multiple slice with set maximum size in bytes per slice.
1081 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
1082 The maximum number of macroblocks in a slice. Used when
1083 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1084 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
1085 encoder.
1087 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
1088 The maximum size of a slice in bytes. Used when
1089 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1090 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
1091 encoder.
1093 .. _v4l2-mpeg-video-h264-loop-filter-mode:
1095 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
1096 (enum)
1098 enum v4l2_mpeg_video_h264_loop_filter_mode -
1099 Loop filter mode for H264 encoder. Possible values are:
1101 .. raw:: latex
1103 \small
1105 .. tabularcolumns:: |p{13.5cm}|p{4.0cm}|
1107 .. flat-table::
1108 :header-rows: 0
1109 :stub-columns: 0
1111 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1112 - Loop filter is enabled.
1113 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1114 - Loop filter is disabled.
1115 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1116 - Loop filter is disabled at the slice boundary.
1118 .. raw:: latex
1120 \normalsize
1123 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1124 Loop filter alpha coefficient, defined in the H264 standard.
1125 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1126 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1127 offset FilterOffsetA is twice this value.
1128 Applicable to the H264 encoder.
1130 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1131 Loop filter beta coefficient, defined in the H264 standard.
1132 This corresponds to the slice_beta_offset_div2 slice header field, and
1133 should be in the range of -6 to +6, inclusive. The actual beta offset
1134 FilterOffsetB is twice this value.
1135 Applicable to the H264 encoder.
1137 .. _v4l2-mpeg-video-h264-entropy-mode:
1139 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1140 (enum)
1142 enum v4l2_mpeg_video_h264_entropy_mode -
1143 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1144 encoder. Possible values are:
1147 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1150 .. flat-table::
1151 :header-rows: 0
1152 :stub-columns: 0
1154 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1155 - Use CAVLC entropy coding.
1156 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1157 - Use CABAC entropy coding.
1161 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1162 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1164 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1165 Enable constrained intra prediction for H264. Applicable to the H264
1166 encoder.
1168 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1169 Specify the offset that should be added to the luma quantization
1170 parameter to determine the chroma quantization parameter. Applicable
1171 to the H264 encoder.
1173 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1174 Cyclic intra macroblock refresh. This is the number of continuous
1175 macroblocks refreshed every frame. Each frame a successive set of
1176 macroblocks is refreshed until the cycle completes and starts from
1177 the top of the frame. Setting this control to zero means that
1178 macroblocks will not be refreshed. Note that this control will not
1179 take effect when ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`` control
1180 is set to non zero value.
1181 Applicable to H264, H263 and MPEG4 encoder.
1183 ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (enum)``
1185 enum v4l2_mpeg_video_intra_refresh_period_type -
1186 Sets the type of intra refresh. The period to refresh
1187 the whole frame is specified by V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD.
1188 Note that if this control is not present, then it is undefined what
1189 refresh type is used and it is up to the driver to decide.
1190 Applicable to H264 and HEVC encoders. Possible values are:
1192 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1194 .. flat-table::
1195 :header-rows: 0
1196 :stub-columns: 0
1198 * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM``
1199 - The whole frame is completely refreshed randomly
1200 after the specified period.
1201 * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC``
1202 - The whole frame MBs are completely refreshed in cyclic order
1203 after the specified period.
1205 ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (integer)``
1206 Intra macroblock refresh period. This sets the period to refresh
1207 the whole frame. In other words, this defines the number of frames
1208 for which the whole frame will be intra-refreshed. An example:
1209 setting period to 1 means that the whole frame will be refreshed,
1210 setting period to 2 means that the half of macroblocks will be
1211 intra-refreshed on frameX and the other half of macroblocks
1212 will be refreshed in frameX + 1 and so on. Setting the period to
1213 zero means no period is specified.
1214 Note that if the client sets this control to non zero value the
1215 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`` control shall be
1216 ignored. Applicable to H264 and HEVC encoders.
1218 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1219 Frame level rate control enable. If this control is disabled then
1220 the quantization parameter for each frame type is constant and set
1221 with appropriate controls (e.g.
1222 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1223 enabled then quantization parameter is adjusted to meet the chosen
1224 bitrate. Minimum and maximum value for the quantization parameter
1225 can be set with appropriate controls (e.g.
1226 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1228 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1229 Macroblock level rate control enable. Applicable to the MPEG4 and
1230 H264 encoders.
1232 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1233 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1234 encoder.
1236 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1237 Quantization parameter for an I frame for H263. Valid range: from 1
1238 to 31.
1240 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1241 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1243 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1244 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1246 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1247 Quantization parameter for an P frame for H263. Valid range: from 1
1248 to 31.
1250 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1251 Quantization parameter for an B frame for H263. Valid range: from 1
1252 to 31.
1254 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1255 Quantization parameter for an I frame for H264. Valid range: from 0
1256 to 51.
1258 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1259 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1261 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1262 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1264 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1265 Quantization parameter for an P frame for H264. Valid range: from 0
1266 to 51.
1268 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1269 Quantization parameter for an B frame for H264. Valid range: from 0
1270 to 51.
1272 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1273 Minimum quantization parameter for the H264 I frame to limit I frame
1274 quality to a range. Valid range: from 0 to 51. If
1275 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1276 should be chosen to meet both requirements.
1278 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1279 Maximum quantization parameter for the H264 I frame to limit I frame
1280 quality to a range. Valid range: from 0 to 51. If
1281 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1282 should be chosen to meet both requirements.
1284 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1285 Minimum quantization parameter for the H264 P frame to limit P frame
1286 quality to a range. Valid range: from 0 to 51. If
1287 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1288 should be chosen to meet both requirements.
1290 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1291 Maximum quantization parameter for the H264 P frame to limit P frame
1292 quality to a range. Valid range: from 0 to 51. If
1293 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1294 should be chosen to meet both requirements.
1296 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)``
1297 Minimum quantization parameter for the H264 B frame to limit B frame
1298 quality to a range. Valid range: from 0 to 51. If
1299 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1300 should be chosen to meet both requirements.
1302 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)``
1303 Maximum quantization parameter for the H264 B frame to limit B frame
1304 quality to a range. Valid range: from 0 to 51. If
1305 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1306 should be chosen to meet both requirements.
1308 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1309 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1310 to 31.
1312 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1313 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1315 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1316 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1318 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1319 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1320 to 31.
1322 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1323 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1324 to 31.
1326 .. _v4l2-mpeg-video-vbv-size:
1328 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1329 The Video Buffer Verifier size in kilobytes, it is used as a
1330 limitation of frame skip. The VBV is defined in the standard as a
1331 mean to verify that the produced stream will be successfully
1332 decoded. The standard describes it as "Part of a hypothetical
1333 decoder that is conceptually connected to the output of the encoder.
1334 Its purpose is to provide a constraint on the variability of the
1335 data rate that an encoder or editing process may produce.".
1336 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1338 .. _v4l2-mpeg-video-vbv-delay:
1340 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1341 Sets the initial delay in milliseconds for VBV buffer control.
1343 .. _v4l2-mpeg-video-hor-search-range:
1345 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1346 Horizontal search range defines maximum horizontal search area in
1347 pixels to search and match for the present Macroblock (MB) in the
1348 reference picture. This V4L2 control macro is used to set horizontal
1349 search range for motion estimation module in video encoder.
1351 .. _v4l2-mpeg-video-vert-search-range:
1353 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1354 Vertical search range defines maximum vertical search area in pixels
1355 to search and match for the present Macroblock (MB) in the reference
1356 picture. This V4L2 control macro is used to set vertical search
1357 range for motion estimation module in video encoder.
1359 .. _v4l2-mpeg-video-force-key-frame:
1361 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1362 Force a key frame for the next queued buffer. Applicable to
1363 encoders. This is a general, codec-agnostic keyframe control.
1365 .. _v4l2-mpeg-video-h264-cpb-size:
1367 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1368 The Coded Picture Buffer size in kilobytes, it is used as a
1369 limitation of frame skip. The CPB is defined in the H264 standard as
1370 a mean to verify that the produced stream will be successfully
1371 decoded. Applicable to the H264 encoder.
1373 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1374 Period between I-frames in the open GOP for H264. In case of an open
1375 GOP this is the period between two I-frames. The period between IDR
1376 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1377 control. An IDR frame, which stands for Instantaneous Decoding
1378 Refresh is an I-frame after which no prior frames are referenced.
1379 This means that a stream can be restarted from an IDR frame without
1380 the need to store or decode any previous frames. Applicable to the
1381 H264 encoder.
1383 .. _v4l2-mpeg-video-header-mode:
1385 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1386 (enum)
1388 enum v4l2_mpeg_video_header_mode -
1389 Determines whether the header is returned as the first buffer or is
1390 it returned together with the first frame. Applicable to encoders.
1391 Possible values are:
1393 .. raw:: latex
1395 \small
1397 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1399 .. flat-table::
1400 :header-rows: 0
1401 :stub-columns: 0
1403 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1404 - The stream header is returned separately in the first buffer.
1405 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1406 - The stream header is returned together with the first encoded
1407 frame.
1409 .. raw:: latex
1411 \normalsize
1414 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1415 Repeat the video sequence headers. Repeating these headers makes
1416 random access to the video stream easier. Applicable to the MPEG1, 2
1417 and 4 encoder.
1419 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1420 Enabled the deblocking post processing filter for MPEG4 decoder.
1421 Applicable to the MPEG4 decoder.
1423 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1424 vop_time_increment_resolution value for MPEG4. Applicable to the
1425 MPEG4 encoder.
1427 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1428 vop_time_increment value for MPEG4. Applicable to the MPEG4
1429 encoder.
1431 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1432 Enable generation of frame packing supplemental enhancement
1433 information in the encoded bitstream. The frame packing SEI message
1434 contains the arrangement of L and R planes for 3D viewing.
1435 Applicable to the H264 encoder.
1437 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1438 Sets current frame as frame0 in frame packing SEI. Applicable to the
1439 H264 encoder.
1441 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1443 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1444 (enum)
1446 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1447 Frame packing arrangement type for H264 SEI. Applicable to the H264
1448 encoder. Possible values are:
1450 .. raw:: latex
1452 \small
1454 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1456 .. flat-table::
1457 :header-rows: 0
1458 :stub-columns: 0
1460 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1461 - Pixels are alternatively from L and R.
1462 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1463 - L and R are interlaced by column.
1464 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1465 - L and R are interlaced by row.
1466 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1467 - L is on the left, R on the right.
1468 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1469 - L is on top, R on bottom.
1470 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1471 - One view per frame.
1473 .. raw:: latex
1475 \normalsize
1479 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1480 Enables flexible macroblock ordering in the encoded bitstream. It is
1481 a technique used for restructuring the ordering of macroblocks in
1482 pictures. Applicable to the H264 encoder.
1484 .. _v4l2-mpeg-video-h264-fmo-map-type:
1486 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1487 (enum)
1489 enum v4l2_mpeg_video_h264_fmo_map_type -
1490 When using FMO, the map type divides the image in different scan
1491 patterns of macroblocks. Applicable to the H264 encoder. Possible
1492 values are:
1494 .. raw:: latex
1496 \small
1498 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1500 .. flat-table::
1501 :header-rows: 0
1502 :stub-columns: 0
1504 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1505 - Slices are interleaved one after other with macroblocks in run
1506 length order.
1507 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1508 - Scatters the macroblocks based on a mathematical function known to
1509 both encoder and decoder.
1510 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1511 - Macroblocks arranged in rectangular areas or regions of interest.
1512 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1513 - Slice groups grow in a cyclic way from centre to outwards.
1514 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1515 - Slice groups grow in raster scan pattern from left to right.
1516 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1517 - Slice groups grow in wipe scan pattern from top to bottom.
1518 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1519 - User defined map type.
1521 .. raw:: latex
1523 \normalsize
1527 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1528 Number of slice groups in FMO. Applicable to the H264 encoder.
1530 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1532 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1533 (enum)
1535 enum v4l2_mpeg_video_h264_fmo_change_dir -
1536 Specifies a direction of the slice group change for raster and wipe
1537 maps. Applicable to the H264 encoder. Possible values are:
1539 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1541 .. flat-table::
1542 :header-rows: 0
1543 :stub-columns: 0
1545 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1546 - Raster scan or wipe right.
1547 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1548 - Reverse raster scan or wipe left.
1552 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1553 Specifies the size of the first slice group for raster and wipe map.
1554 Applicable to the H264 encoder.
1556 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1557 Specifies the number of consecutive macroblocks for the interleaved
1558 map. Applicable to the H264 encoder.
1560 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1561 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1562 the H264 encoder.
1564 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1565 Specifies the slice order in ASO. Applicable to the H264 encoder.
1566 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1567 significant bit):
1571 .. flat-table::
1572 :header-rows: 0
1573 :stub-columns: 0
1575 * - Bit 0:15
1576 - Slice ID
1577 * - Bit 16:32
1578 - Slice position or order
1582 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1583 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1585 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1587 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1588 (enum)
1590 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1591 Specifies the hierarchical coding type. Applicable to the H264
1592 encoder. Possible values are:
1596 .. flat-table::
1597 :header-rows: 0
1598 :stub-columns: 0
1600 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1601 - Hierarchical B coding.
1602 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1603 - Hierarchical P coding.
1607 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1608 Specifies the number of hierarchical coding layers. Applicable to
1609 the H264 encoder.
1611 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1612 Specifies a user defined QP for each layer. Applicable to the H264
1613 encoder. The supplied 32-bit integer is interpreted as follows (bit
1614 0 = least significant bit):
1618 .. flat-table::
1619 :header-rows: 0
1620 :stub-columns: 0
1622 * - Bit 0:15
1623 - QP value
1624 * - Bit 16:32
1625 - Layer number
1627 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)``
1628 Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder.
1630 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)``
1631 Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder.
1633 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)``
1634 Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder.
1636 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)``
1637 Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder.
1639 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)``
1640 Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder.
1642 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)``
1643 Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder.
1645 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``
1646 Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.
1648 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
1649 Quantization parameter for an I frame for FWHT. Valid range: from 1
1650 to 31.
1652 ``V4L2_CID_FWHT_P_FRAME_QP (integer)``
1653 Quantization parameter for a P frame for FWHT. Valid range: from 1
1654 to 31.
1656 ``V4L2_CID_MPEG_VIDEO_AVERAGE_QP (integer)``
1657 This read-only control returns the average QP value of the currently
1658 encoded frame. The value applies to the last dequeued capture buffer
1659 (VIDIOC_DQBUF). Its valid range depends on the encoding format and parameters.
1660 For H264, its valid range is from 0 to 51.
1661 For HEVC, its valid range is from 0 to 51 for 8 bit and
1662 from 0 to 63 for 10 bit.
1663 For H263 and MPEG4, its valid range is from 1 to 31.
1664 For VP8, its valid range is from 0 to 127.
1665 For VP9, its valid range is from 0 to 255.
1666 If the codec's MIN_QP and MAX_QP are set, then the QP will meet both requirements.
1667 Codecs need to always use the specified range, rather then a HW custom range.
1668 Applicable to encoders
1670 .. raw:: latex
1672 \normalsize
1675 MFC 5.1 MPEG Controls
1676 =====================
1678 The following MPEG class controls deal with MPEG decoding and encoding
1679 settings that are specific to the Multi Format Codec 5.1 device present
1680 in the S5P family of SoCs by Samsung.
1683 .. _mfc51-control-id:
1685 MFC 5.1 Control IDs
1686 -------------------
1688 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
1689 If the display delay is enabled then the decoder is forced to return
1690 a CAPTURE buffer (decoded frame) after processing a certain number
1691 of OUTPUT buffers. The delay can be set through
1692 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
1693 feature can be used for example for generating thumbnails of videos.
1694 Applicable to the H264 decoder.
1696 .. note::
1698 This control is deprecated. Use the standard
1699 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead.
1701 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
1702 Display delay value for H264 decoder. The decoder is forced to
1703 return a decoded frame after the set 'display delay' number of
1704 frames. If this number is low it may result in frames returned out
1705 of display order, in addition the hardware may still be using the
1706 returned buffer as a reference picture for subsequent frames.
1708 .. note::
1710 This control is deprecated. Use the standard
1711 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead.
1713 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
1714 The number of reference pictures used for encoding a P picture.
1715 Applicable to the H264 encoder.
1717 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
1718 Padding enable in the encoder - use a color instead of repeating
1719 border pixels. Applicable to encoders.
1721 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
1722 Padding color in the encoder. Applicable to encoders. The supplied
1723 32-bit integer is interpreted as follows (bit 0 = least significant
1724 bit):
1728 .. flat-table::
1729 :header-rows: 0
1730 :stub-columns: 0
1732 * - Bit 0:7
1733 - V chrominance information
1734 * - Bit 8:15
1735 - U chrominance information
1736 * - Bit 16:23
1737 - Y luminance information
1738 * - Bit 24:31
1739 - Must be zero.
1743 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
1744 Reaction coefficient for MFC rate control. Applicable to encoders.
1746 .. note::
1748 #. Valid only when the frame level RC is enabled.
1750 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
1751 VBR, this field must be large (ex. 100 ~ 1000).
1753 #. It is not recommended to use the greater number than
1754 FRAME_RATE * (10^9 / BIT_RATE).
1756 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
1757 Adaptive rate control for dark region. Valid only when H.264 and
1758 macroblock level RC is enabled
1759 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1760 encoder.
1762 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
1763 Adaptive rate control for smooth region. Valid only when H.264 and
1764 macroblock level RC is enabled
1765 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1766 encoder.
1768 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
1769 Adaptive rate control for static region. Valid only when H.264 and
1770 macroblock level RC is enabled
1771 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1772 encoder.
1774 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
1775 Adaptive rate control for activity region. Valid only when H.264 and
1776 macroblock level RC is enabled
1777 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1778 encoder.
1780 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
1782 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
1783 (enum)
1785 .. note::
1787 This control is deprecated. Use the standard
1788 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.
1790 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
1791 Indicates in what conditions the encoder should skip frames. If
1792 encoding a frame would cause the encoded stream to be larger then a
1793 chosen data limit then the frame will be skipped. Possible values
1794 are:
1797 .. tabularcolumns:: |p{9.4cm}|p{8.1cm}|
1799 .. raw:: latex
1801 \small
1803 .. flat-table::
1804 :header-rows: 0
1805 :stub-columns: 0
1807 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED``
1808 - Frame skip mode is disabled.
1809 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``
1810 - Frame skip mode enabled and buffer limit is set by the chosen
1811 level and is defined by the standard.
1812 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``
1813 - Frame skip mode enabled and buffer limit is set by the VBV
1814 (MPEG1/2/4) or CPB (H264) buffer size control.
1816 .. raw:: latex
1818 \normalsize
1820 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
1821 Enable rate-control with fixed target bit. If this setting is
1822 enabled, then the rate control logic of the encoder will calculate
1823 the average bitrate for a GOP and keep it below or equal the set
1824 bitrate target. Otherwise the rate control logic calculates the
1825 overall average bitrate for the stream and keeps it below or equal
1826 to the set bitrate. In the first case the average bitrate for the
1827 whole stream will be smaller then the set bitrate. This is caused
1828 because the average is calculated for smaller number of frames, on
1829 the other hand enabling this setting will ensure that the stream
1830 will meet tight bandwidth constraints. Applicable to encoders.
1832 .. _v4l2-mpeg-mfc51-video-force-frame-type:
1834 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
1835 (enum)
1837 enum v4l2_mpeg_mfc51_video_force_frame_type -
1838 Force a frame type for the next queued buffer. Applicable to
1839 encoders. Possible values are:
1841 .. tabularcolumns:: |p{9.9cm}|p{7.6cm}|
1843 .. flat-table::
1844 :header-rows: 0
1845 :stub-columns: 0
1847 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
1848 - Forcing a specific frame type disabled.
1849 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
1850 - Force an I-frame.
1851 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
1852 - Force a non-coded frame.
1855 CX2341x MPEG Controls
1856 =====================
1858 The following MPEG class controls deal with MPEG encoding settings that
1859 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
1862 .. _cx2341x-control-id:
1864 CX2341x Control IDs
1865 -------------------
1867 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
1869 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
1870 (enum)
1872 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
1873 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
1874 are:
1877 .. tabularcolumns:: |p{11.5cm}|p{6.0cm}|
1879 .. flat-table::
1880 :header-rows: 0
1881 :stub-columns: 0
1883 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
1884 - Choose the filter manually
1885 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
1886 - Choose the filter automatically
1890 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
1891 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
1892 is 0.)
1894 .. _luma-spatial-filter-type:
1896 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
1897 (enum)
1899 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
1900 Select the algorithm to use for the Luma Spatial Filter (default
1901 ``1D_HOR``). Possible values:
1903 .. tabularcolumns:: |p{13.1cm}|p{4.4cm}|
1905 .. raw:: latex
1907 \footnotesize
1909 .. flat-table::
1910 :header-rows: 0
1911 :stub-columns: 0
1913 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
1914 - No filter
1915 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
1916 - One-dimensional horizontal
1917 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
1918 - One-dimensional vertical
1919 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
1920 - Two-dimensional separable
1921 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
1922 - Two-dimensional symmetrical non-separable
1924 .. raw:: latex
1926 \normalsize
1928 .. _chroma-spatial-filter-type:
1930 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
1931 (enum)
1933 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
1934 Select the algorithm for the Chroma Spatial Filter (default
1935 ``1D_HOR``). Possible values are:
1937 .. raw:: latex
1939 \footnotesize
1941 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
1943 .. flat-table::
1944 :header-rows: 0
1945 :stub-columns: 0
1947 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
1948 - No filter
1949 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
1950 - One-dimensional horizontal
1952 .. raw:: latex
1954 \normalsize
1956 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
1958 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
1959 (enum)
1961 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
1962 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
1963 are:
1965 .. raw:: latex
1967 \footnotesize
1969 .. flat-table::
1970 :header-rows: 0
1971 :stub-columns: 0
1973 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
1974 - Choose the filter manually
1975 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
1976 - Choose the filter automatically
1978 .. raw:: latex
1980 \normalsize
1982 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
1983 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
1984 is 8 for full-scale capturing and 0 for scaled capturing.)
1986 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
1988 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
1989 (enum)
1991 enum v4l2_mpeg_cx2341x_video_median_filter_type -
1992 Median Filter Type (default ``OFF``). Possible values are:
1995 .. raw:: latex
1997 \small
1999 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
2001 .. flat-table::
2002 :header-rows: 0
2003 :stub-columns: 0
2005 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
2006 - No filter
2007 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
2008 - Horizontal filter
2009 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
2010 - Vertical filter
2011 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
2012 - Horizontal and vertical filter
2013 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
2014 - Diagonal filter
2016 .. raw:: latex
2018 \normalsize
2020 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2021 Threshold above which the luminance median filter is enabled
2022 (default 0)
2024 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
2025 Threshold below which the luminance median filter is enabled
2026 (default 255)
2028 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2029 Threshold above which the chroma median filter is enabled (default
2030 0)
2032 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
2033 Threshold below which the chroma median filter is enabled (default
2034 255)
2036 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
2037 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
2038 the stream between every four video frames. The packet size is 2048
2039 bytes, including the packet_start_code_prefix and stream_id
2040 fields. The stream_id is 0xBF (private stream 2). The payload
2041 consists of 0x00 bytes, to be filled in by the application. 0 = do
2042 not insert, 1 = insert packets.
2045 VPX Control Reference
2046 =====================
2048 The VPX controls include controls for encoding parameters of VPx video
2049 codec.
2052 .. _vpx-control-id:
2054 VPX Control IDs
2055 ---------------
2057 .. _v4l2-vpx-num-partitions:
2059 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
2060 (enum)
2062 enum v4l2_vp8_num_partitions -
2063 The number of token partitions to use in VP8 encoder. Possible
2064 values are:
2068 .. flat-table::
2069 :header-rows: 0
2070 :stub-columns: 0
2072 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
2073 - 1 coefficient partition
2074 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
2075 - 2 coefficient partitions
2076 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
2077 - 4 coefficient partitions
2078 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
2079 - 8 coefficient partitions
2083 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
2084 Setting this prevents intra 4x4 mode in the intra mode decision.
2086 .. _v4l2-vpx-num-ref-frames:
2088 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
2089 (enum)
2091 enum v4l2_vp8_num_ref_frames -
2092 The number of reference pictures for encoding P frames. Possible
2093 values are:
2095 .. tabularcolumns:: |p{7.5cm}|p{7.5cm}|
2097 .. raw:: latex
2099 \small
2101 .. flat-table::
2102 :header-rows: 0
2103 :stub-columns: 0
2105 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
2106 - Last encoded frame will be searched
2107 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
2108 - Two frames will be searched among the last encoded frame, the
2109 golden frame and the alternate reference (altref) frame. The
2110 encoder implementation will decide which two are chosen.
2111 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
2112 - The last encoded frame, the golden frame and the altref frame will
2113 be searched.
2115 .. raw:: latex
2117 \normalsize
2121 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
2122 Indicates the loop filter level. The adjustment of the loop filter
2123 level is done via a delta value against a baseline loop filter
2124 value.
2126 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
2127 This parameter affects the loop filter. Anything above zero weakens
2128 the deblocking effect on the loop filter.
2130 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
2131 Sets the refresh period for the golden frame. The period is defined
2132 in number of frames. For a value of 'n', every nth frame starting
2133 from the first key frame will be taken as a golden frame. For eg.
2134 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
2135 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
2136 taken as the golden frames as frame 0 is always a key frame.
2138 .. _v4l2-vpx-golden-frame-sel:
2140 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
2141 (enum)
2143 enum v4l2_vp8_golden_frame_sel -
2144 Selects the golden frame for encoding. Possible values are:
2146 .. raw:: latex
2148 \scriptsize
2150 .. tabularcolumns:: |p{8.6cm}|p{8.9cm}|
2152 .. flat-table::
2153 :header-rows: 0
2154 :stub-columns: 0
2156 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
2157 - Use the (n-2)th frame as a golden frame, current frame index being
2158 'n'.
2159 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
2160 - Use the previous specific frame indicated by
2161 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
2162 golden frame.
2164 .. raw:: latex
2166 \normalsize
2169 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
2170 Minimum quantization parameter for VP8.
2172 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
2173 Maximum quantization parameter for VP8.
2175 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
2176 Quantization parameter for an I frame for VP8.
2178 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
2179 Quantization parameter for a P frame for VP8.
2181 .. _v4l2-mpeg-video-vp8-profile:
2183 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
2184 (enum)
2186 enum v4l2_mpeg_video_vp8_profile -
2187 This control allows selecting the profile for VP8 encoder.
2188 This is also used to enumerate supported profiles by VP8 encoder or decoder.
2189 Possible values are:
2191 .. flat-table::
2192 :header-rows: 0
2193 :stub-columns: 0
2195 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
2196 - Profile 0
2197 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
2198 - Profile 1
2199 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
2200 - Profile 2
2201 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
2202 - Profile 3
2204 .. _v4l2-mpeg-video-vp9-profile:
2206 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
2207 (enum)
2209 enum v4l2_mpeg_video_vp9_profile -
2210 This control allows selecting the profile for VP9 encoder.
2211 This is also used to enumerate supported profiles by VP9 encoder or decoder.
2212 Possible values are:
2214 .. flat-table::
2215 :header-rows: 0
2216 :stub-columns: 0
2218 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
2219 - Profile 0
2220 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
2221 - Profile 1
2222 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
2223 - Profile 2
2224 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
2225 - Profile 3
2227 .. _v4l2-mpeg-video-vp9-level:
2229 ``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``
2231 enum v4l2_mpeg_video_vp9_level -
2232 This control allows selecting the level for VP9 encoder.
2233 This is also used to enumerate supported levels by VP9 encoder or decoder.
2234 More information can be found at
2235 `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:
2237 .. flat-table::
2238 :header-rows: 0
2239 :stub-columns: 0
2241 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``
2242 - Level 1
2243 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``
2244 - Level 1.1
2245 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``
2246 - Level 2
2247 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``
2248 - Level 2.1
2249 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``
2250 - Level 3
2251 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``
2252 - Level 3.1
2253 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``
2254 - Level 4
2255 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``
2256 - Level 4.1
2257 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``
2258 - Level 5
2259 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``
2260 - Level 5.1
2261 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``
2262 - Level 5.2
2263 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``
2264 - Level 6
2265 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``
2266 - Level 6.1
2267 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``
2268 - Level 6.2
2271 High Efficiency Video Coding (HEVC/H.265) Control Reference
2272 ===========================================================
2274 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
2275 video codec.
2278 .. _hevc-control-id:
2280 HEVC/H.265 Control IDs
2281 ----------------------
2283 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
2284 Minimum quantization parameter for HEVC.
2285 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2287 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
2288 Maximum quantization parameter for HEVC.
2289 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2291 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
2292 Quantization parameter for an I frame for HEVC.
2293 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2294 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2296 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
2297 Quantization parameter for a P frame for HEVC.
2298 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2299 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2301 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
2302 Quantization parameter for a B frame for HEVC.
2303 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2304 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2306 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)``
2307 Minimum quantization parameter for the HEVC I frame to limit I frame
2308 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2309 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2310 should be chosen to meet both requirements.
2312 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)``
2313 Maximum quantization parameter for the HEVC I frame to limit I frame
2314 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2315 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2316 should be chosen to meet both requirements.
2318 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)``
2319 Minimum quantization parameter for the HEVC P frame to limit P frame
2320 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2321 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2322 should be chosen to meet both requirements.
2324 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)``
2325 Maximum quantization parameter for the HEVC P frame to limit P frame
2326 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2327 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2328 should be chosen to meet both requirements.
2330 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)``
2331 Minimum quantization parameter for the HEVC B frame to limit B frame
2332 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2333 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2334 should be chosen to meet both requirements.
2336 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)``
2337 Maximum quantization parameter for the HEVC B frame to limit B frame
2338 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2339 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2340 should be chosen to meet both requirements.
2342 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
2343 HIERARCHICAL_QP allows the host to specify the quantization parameter
2344 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
2345 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
2346 control value to 1 enables setting of the QP values for the layers.
2348 .. _v4l2-hevc-hier-coding-type:
2350 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
2351 (enum)
2353 enum v4l2_mpeg_video_hevc_hier_coding_type -
2354 Selects the hierarchical coding type for encoding. Possible values are:
2356 .. raw:: latex
2358 \footnotesize
2360 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
2362 .. flat-table::
2363 :header-rows: 0
2364 :stub-columns: 0
2366 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
2367 - Use the B frame for hierarchical coding.
2368 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
2369 - Use the P frame for hierarchical coding.
2371 .. raw:: latex
2373 \normalsize
2376 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
2377 Selects the hierarchical coding layer. In normal encoding
2378 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
2379 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
2380 LAYER 1 and so on.
2382 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
2383 Indicates quantization parameter for hierarchical coding layer 0.
2384 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2385 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2387 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
2388 Indicates quantization parameter for hierarchical coding layer 1.
2389 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2390 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2392 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
2393 Indicates quantization parameter for hierarchical coding layer 2.
2394 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2395 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2397 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
2398 Indicates quantization parameter for hierarchical coding layer 3.
2399 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2400 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2402 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
2403 Indicates quantization parameter for hierarchical coding layer 4.
2404 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2405 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2407 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
2408 Indicates quantization parameter for hierarchical coding layer 5.
2409 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2410 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2412 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
2413 Indicates quantization parameter for hierarchical coding layer 6.
2414 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2415 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2417 .. _v4l2-hevc-profile:
2419 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
2420 (enum)
2422 enum v4l2_mpeg_video_hevc_profile -
2423 Select the desired profile for HEVC encoder.
2425 .. raw:: latex
2427 \footnotesize
2429 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
2431 .. flat-table::
2432 :header-rows: 0
2433 :stub-columns: 0
2435 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
2436 - Main profile.
2437 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
2438 - Main still picture profile.
2439 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
2440 - Main 10 profile.
2442 .. raw:: latex
2444 \normalsize
2447 .. _v4l2-hevc-level:
2449 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
2450 (enum)
2452 enum v4l2_mpeg_video_hevc_level -
2453 Selects the desired level for HEVC encoder.
2455 ================================== =========
2456 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1`` Level 1.0
2457 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2`` Level 2.0
2458 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1`` Level 2.1
2459 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3`` Level 3.0
2460 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1`` Level 3.1
2461 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4`` Level 4.0
2462 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1`` Level 4.1
2463 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5`` Level 5.0
2464 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1`` Level 5.1
2465 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2`` Level 5.2
2466 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6`` Level 6.0
2467 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1`` Level 6.1
2468 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2`` Level 6.2
2469 ================================== =========
2471 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
2472 Indicates the number of evenly spaced subintervals, called ticks, within
2473 one second. This is a 16 bit unsigned integer and has a maximum value up to
2474 0xffff and a minimum value of 1.
2476 .. _v4l2-hevc-tier:
2478 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
2479 (enum)
2481 enum v4l2_mpeg_video_hevc_tier -
2482 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
2483 were made to deal with applications that differ in terms of maximum bit
2484 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
2485 this flag to 1 indicates High tier. High tier is for applications requiring
2486 high bit rates.
2488 ================================== ==========
2489 ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN`` Main tier.
2490 ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH`` High tier.
2491 ================================== ==========
2494 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
2495 Selects HEVC maximum coding unit depth.
2497 .. _v4l2-hevc-loop-filter-mode:
2499 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
2500 (enum)
2502 enum v4l2_mpeg_video_hevc_loop_filter_mode -
2503 Loop filter mode for HEVC encoder. Possible values are:
2505 .. raw:: latex
2507 \footnotesize
2509 .. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
2511 .. flat-table::
2512 :header-rows: 0
2513 :stub-columns: 0
2515 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
2516 - Loop filter is disabled.
2517 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
2518 - Loop filter is enabled.
2519 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
2520 - Loop filter is disabled at the slice boundary.
2522 .. raw:: latex
2524 \normalsize
2527 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
2528 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
2530 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
2531 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
2533 .. _v4l2-hevc-refresh-type:
2535 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
2536 (enum)
2538 enum v4l2_mpeg_video_hevc_hier_refresh_type -
2539 Selects refresh type for HEVC encoder.
2540 Host has to specify the period into
2541 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
2543 .. raw:: latex
2545 \footnotesize
2547 .. tabularcolumns:: |p{6.2cm}|p{11.3cm}|
2549 .. flat-table::
2550 :header-rows: 0
2551 :stub-columns: 0
2553 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
2554 - Use the B frame for hierarchical coding.
2555 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
2556 - Use CRA (Clean Random Access Unit) picture encoding.
2557 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
2558 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
2560 .. raw:: latex
2562 \normalsize
2565 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
2566 Selects the refresh period for HEVC encoder.
2567 This specifies the number of I pictures between two CRA/IDR pictures.
2568 This is valid only if REFRESH_TYPE is not 0.
2570 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
2571 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
2572 encoding. Setting it to 1 enables lossless encoding.
2574 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
2575 Indicates constant intra prediction for HEVC encoder. Specifies the
2576 constrained intra prediction in which intra largest coding unit (LCU)
2577 prediction is performed by using residual data and decoded samples of
2578 neighboring intra LCU only. Setting the value to 1 enables constant intra
2579 prediction and setting the value to 0 disables constant intra prediction.
2581 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
2582 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
2583 disables the feature and setting it to 1 enables the wavefront parallel
2584 processing.
2586 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
2587 Setting the value to 1 enables combination of P and B frame for HEVC
2588 encoder.
2590 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
2591 Indicates temporal identifier for HEVC encoder which is enabled by
2592 setting the value to 1.
2594 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
2595 Indicates bi-linear interpolation is conditionally used in the intra
2596 prediction filtering process in the CVS when set to 1. Indicates bi-linear
2597 interpolation is not used in the CVS when set to 0.
2599 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
2600 Indicates maximum number of merge candidate motion vectors.
2601 Values are from 0 to 4.
2603 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
2604 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
2605 1 enables the prediction. Setting it to 0 disables the prediction.
2607 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
2608 Specifies if HEVC generates a stream with a size of the length field
2609 instead of start code pattern. The size of the length field is configurable
2610 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
2611 the value to 0 disables encoding without startcode pattern. Setting the
2612 value to 1 will enables encoding without startcode pattern.
2614 .. _v4l2-hevc-size-of-length-field:
2616 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
2617 (enum)
2619 enum v4l2_mpeg_video_hevc_size_of_length_field -
2620 Indicates the size of length field.
2621 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
2623 .. raw:: latex
2625 \footnotesize
2627 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
2629 .. flat-table::
2630 :header-rows: 0
2631 :stub-columns: 0
2633 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
2634 - Generate start code pattern (Normal).
2635 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
2636 - Generate size of length field instead of start code pattern and length is 1.
2637 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
2638 - Generate size of length field instead of start code pattern and length is 2.
2639 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
2640 - Generate size of length field instead of start code pattern and length is 4.
2642 .. raw:: latex
2644 \normalsize
2646 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
2647 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
2649 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
2650 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
2652 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
2653 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
2655 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
2656 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
2658 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
2659 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
2661 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
2662 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
2664 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
2665 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
2667 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
2668 Selects number of P reference pictures required for HEVC encoder.
2669 P-Frame can use 1 or 2 frames for reference.
2671 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
2672 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
2673 disables generating SPS and PPS at every IDR. Setting it to one enables
2674 generating SPS and PPS at every IDR.

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Codec 제어 클래스

1-23

Codec 제어 클래스는 MPEG 계열 audio/video codec과 하드웨어 encoder·decoder의 압축 형식, stream multiplexing, rate control, profile/level, filter와 vendor-specific 기능을 설정합니다. `V4L2_CID_CODEC_CLASS`는 이 클래스의 descriptor입니다.

제어가 특정 코덱이나 하드웨어에만 의미가 있으면 드라이버는 지원하는 항목만 노출합니다. 애플리케이션은 `VIDIOC_QUERYCTRL`·`VIDIOC_QUERYMENU`로 실제 menu와 범위를 확인하고, 서로 의존하는 제어를 codec 시작 전에 일관되게 설정해야 합니다.

Codec 제어 적용
Codec class 제어 열거Stream·audio·video format 선택Profile·level·rate-control 설정Codec별 filter·GOP·slice 설정Buffer queue 및 streaming 시작

지원 제어를 열거한 뒤 stream 형식과 encoder/decoder 상태를 구성합니다.

Codec class 상수
제어·상수한국어 설명
`V4L2_CID_MPEG``cid mpeg` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_MPEG`mpeg에 대응하는 V4L2 UAPI 선택값입니다.

도입부의 제어 상수입니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _codec-controls:

***********************
Codec Control Reference
***********************

Below all controls within the Codec control class are described. First
the generic controls, then controls specific for certain hardware.

.. note::

   These controls are applicable to all codecs and not just MPEG. The
   defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
   were originally made for MPEG codecs and later extended to cover all
   encoding formats.


Generic Codec Controls
======================

MPEG stream과 audio 제어

24-501

`V4L2_CID_MPEG_STREAM_TYPE`은 MPEG-2 program stream, transport stream, MPEG-1 system stream, DVD/VCD/SVCD stream 등 encoder가 생성할 multiplexed stream 형식을 선택합니다. 지원 가능한 형식은 하드웨어와 driver에 따라 다릅니다.

Transport stream에서는 PMT, audio, video, PCR PID를 각각 설정하고 program stream에서는 audio와 video PES ID를 설정합니다. PID와 PES ID는 다른 elementary stream과 충돌하지 않게 구성해야 합니다.

`V4L2_CID_MPEG_STREAM_VBI_FMT`은 VBI 데이터를 stream에 넣지 않거나 IVTV private packet 형식으로 삽입할지를 선택합니다. VBI payload를 실제로 지원하는지와 packet layout은 장치 규격을 확인해야 합니다.

Audio sampling frequency는 44.1, 48, 32 kHz 중 지원값을 선택하고 encoding은 MPEG Layer I/II/III, AAC, AC-3 등을 선택합니다. Layer별 bitrate menu는 규격에 허용된 bit/s 조합을 제공하며 AAC bitrate는 integer로 지정합니다.

Audio mode는 stereo, joint stereo, dual, mono를 선택합니다. Joint stereo를 사용하면 mode extension으로 bound 4, 8, 12, 16을 선택하며, 각 subband가 intensity stereo 또는 독립 stereo로 처리되는 경계를 정합니다.

Emphasis는 none, 50/15 us, CCITT J.17을 선택하고 CRC 제어는 audio frame의 오류 검출 보호를 켭니다. Decoder playback menu는 stereo, left, right, mono, swapped stereo 등 출력 channel routing을 선택합니다.

`V4L2_CID_MPEG_AUDIO_MUTE`는 audio encoding 또는 decoding 결과를 mute합니다. Multilingual playback 제어는 지원 장치에서 별도 multilingual channel의 재생 경로를 선택합니다.

Stream·audio 제어와 enum
제어·상수한국어 설명
`V4L2_CID_CODEC_CLASS`Codec 제어 클래스 descriptor입니다.
`V4L2_CID_MPEG_STREAM_TYPE`출력 MPEG stream/container 형식을 선택하는 menu 제어입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG2_PS`mpeg stream type mpeg2 ps stream 형식 선택값입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG2_TS`mpeg stream type mpeg2 ts stream 형식 선택값입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG1_SS`mpeg stream type mpeg1 ss stream 형식 선택값입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG2_DVD`mpeg stream type mpeg2 dvd stream 형식 선택값입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG1_VCD`mpeg stream type mpeg1 vcd stream 형식 선택값입니다.
`V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD`mpeg stream type mpeg2 svcd stream 형식 선택값입니다.
`V4L2_CID_MPEG_STREAM_PID_PMT`MPEG transport stream에서 사용할 PMT·audio·video·PCR PID를 설정합니다.
`V4L2_CID_MPEG_STREAM_PID_AUDIO`MPEG transport stream에서 사용할 PMT·audio·video·PCR PID를 설정합니다.
`V4L2_CID_MPEG_STREAM_PID_VIDEO`MPEG transport stream에서 사용할 PMT·audio·video·PCR PID를 설정합니다.
`V4L2_CID_MPEG_STREAM_PID_PCR`MPEG transport stream에서 사용할 PMT·audio·video·PCR PID를 설정합니다.
`V4L2_CID_MPEG_STREAM_PES_ID_AUDIO`MPEG program stream의 audio 또는 video PES ID를 설정합니다.
`V4L2_CID_MPEG_STREAM_PES_ID_VIDEO`MPEG program stream의 audio 또는 video PES ID를 설정합니다.
`V4L2_CID_MPEG_STREAM_VBI_FMT`VBI 데이터를 stream에 넣는 형식을 선택합니다.
`V4L2_MPEG_STREAM_VBI_FMT_NONE`mpeg stream vbi fmt none VBI stream 형식입니다.
`V4L2_MPEG_STREAM_VBI_FMT_IVTV`mpeg stream vbi fmt ivtv VBI stream 형식입니다.
`V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ`MPEG audio sampling frequency를 선택합니다.
`V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100`mpeg audio sampling freq 44100 sampling-frequency 선택값입니다.
`V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000`mpeg audio sampling freq 48000 sampling-frequency 선택값입니다.
`V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000`mpeg audio sampling freq 32000 sampling-frequency 선택값입니다.
`V4L2_CID_MPEG_AUDIO_ENCODING`MPEG audio encoding layer 또는 AC-3/AAC 형식을 선택합니다.
`V4L2_MPEG_AUDIO_ENCODING_LAYER_1`mpeg audio encoding layer 1 audio encoding 선택값입니다.
`V4L2_MPEG_AUDIO_ENCODING_LAYER_2`mpeg audio encoding layer 2 audio encoding 선택값입니다.
`V4L2_MPEG_AUDIO_ENCODING_LAYER_3`mpeg audio encoding layer 3 audio encoding 선택값입니다.
`V4L2_MPEG_AUDIO_ENCODING_AAC`mpeg audio encoding aac audio encoding 선택값입니다.
`V4L2_MPEG_AUDIO_ENCODING_AC3`mpeg audio encoding ac3 audio encoding 선택값입니다.
`V4L2_CID_MPEG_AUDIO_L1_BITRATE`선택한 MPEG audio 계층 또는 코덱의 bitrate를 설정합니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_32K`mpeg audio l1 bitrate 32k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_64K`mpeg audio l1 bitrate 64k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_96K`mpeg audio l1 bitrate 96k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_128K`mpeg audio l1 bitrate 128k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_160K`mpeg audio l1 bitrate 160k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_192K`mpeg audio l1 bitrate 192k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_224K`mpeg audio l1 bitrate 224k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_256K`mpeg audio l1 bitrate 256k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_288K`mpeg audio l1 bitrate 288k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_320K`mpeg audio l1 bitrate 320k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_352K`mpeg audio l1 bitrate 352k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_384K`mpeg audio l1 bitrate 384k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_416K`mpeg audio l1 bitrate 416k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L1_BITRATE_448K`mpeg audio l1 bitrate 448k audio bitrate 선택값입니다.
`V4L2_CID_MPEG_AUDIO_L2_BITRATE`선택한 MPEG audio 계층 또는 코덱의 bitrate를 설정합니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_32K`mpeg audio l2 bitrate 32k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_48K`mpeg audio l2 bitrate 48k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_56K`mpeg audio l2 bitrate 56k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_64K`mpeg audio l2 bitrate 64k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_80K`mpeg audio l2 bitrate 80k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_96K`mpeg audio l2 bitrate 96k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_112K`mpeg audio l2 bitrate 112k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_128K`mpeg audio l2 bitrate 128k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_160K`mpeg audio l2 bitrate 160k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_192K`mpeg audio l2 bitrate 192k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_224K`mpeg audio l2 bitrate 224k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_256K`mpeg audio l2 bitrate 256k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_320K`mpeg audio l2 bitrate 320k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L2_BITRATE_384K`mpeg audio l2 bitrate 384k audio bitrate 선택값입니다.
`V4L2_CID_MPEG_AUDIO_L3_BITRATE`선택한 MPEG audio 계층 또는 코덱의 bitrate를 설정합니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_32K`mpeg audio l3 bitrate 32k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_40K`mpeg audio l3 bitrate 40k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_48K`mpeg audio l3 bitrate 48k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_56K`mpeg audio l3 bitrate 56k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_64K`mpeg audio l3 bitrate 64k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_80K`mpeg audio l3 bitrate 80k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_96K`mpeg audio l3 bitrate 96k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_112K`mpeg audio l3 bitrate 112k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_128K`mpeg audio l3 bitrate 128k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_160K`mpeg audio l3 bitrate 160k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_192K`mpeg audio l3 bitrate 192k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_224K`mpeg audio l3 bitrate 224k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_256K`mpeg audio l3 bitrate 256k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_L3_BITRATE_320K`mpeg audio l3 bitrate 320k audio bitrate 선택값입니다.
`V4L2_CID_MPEG_AUDIO_AAC_BITRATE`선택한 MPEG audio 계층 또는 코덱의 bitrate를 설정합니다.
`V4L2_CID_MPEG_AUDIO_AC3_BITRATE`선택한 MPEG audio 계층 또는 코덱의 bitrate를 설정합니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_32K`mpeg audio ac3 bitrate 32k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_40K`mpeg audio ac3 bitrate 40k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_48K`mpeg audio ac3 bitrate 48k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_56K`mpeg audio ac3 bitrate 56k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_64K`mpeg audio ac3 bitrate 64k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_80K`mpeg audio ac3 bitrate 80k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_96K`mpeg audio ac3 bitrate 96k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_112K`mpeg audio ac3 bitrate 112k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_128K`mpeg audio ac3 bitrate 128k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_160K`mpeg audio ac3 bitrate 160k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_192K`mpeg audio ac3 bitrate 192k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_224K`mpeg audio ac3 bitrate 224k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_256K`mpeg audio ac3 bitrate 256k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_320K`mpeg audio ac3 bitrate 320k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_384K`mpeg audio ac3 bitrate 384k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_448K`mpeg audio ac3 bitrate 448k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_512K`mpeg audio ac3 bitrate 512k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_576K`mpeg audio ac3 bitrate 576k audio bitrate 선택값입니다.
`V4L2_MPEG_AUDIO_AC3_BITRATE_640K`mpeg audio ac3 bitrate 640k audio bitrate 선택값입니다.
`V4L2_CID_MPEG_AUDIO_MODE`Stereo, joint stereo, dual, mono audio mode를 선택합니다.
`V4L2_MPEG_AUDIO_MODE_STEREO`mpeg audio mode stereo audio channel mode입니다.
`V4L2_MPEG_AUDIO_MODE_JOINT_STEREO`mpeg audio mode joint stereo audio channel mode입니다.
`V4L2_MPEG_AUDIO_MODE_DUAL`mpeg audio mode dual audio channel mode입니다.
`V4L2_MPEG_AUDIO_MODE_MONO`mpeg audio mode mono audio channel mode입니다.
`V4L2_CID_MPEG_AUDIO_MODE_EXTENSION`Joint stereo mode extension을 선택합니다.
`V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4`mpeg audio mode extension bound 4 joint-stereo 확장 선택값입니다.
`V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8`mpeg audio mode extension bound 8 joint-stereo 확장 선택값입니다.
`V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12`mpeg audio mode extension bound 12 joint-stereo 확장 선택값입니다.
`V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16`mpeg audio mode extension bound 16 joint-stereo 확장 선택값입니다.
`V4L2_CID_MPEG_AUDIO_EMPHASIS`MPEG audio emphasis 방식을 선택합니다.
`V4L2_MPEG_AUDIO_EMPHASIS_NONE`mpeg audio emphasis none emphasis 선택값입니다.
`V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17`mpeg audio emphasis ccitt j17 emphasis 선택값입니다.
`V4L2_CID_MPEG_AUDIO_CRC`MPEG audio CRC 생성을 켜거나 끕니다.
`V4L2_MPEG_AUDIO_CRC_NONE`mpeg audio crc none CRC 선택값입니다.
`V4L2_MPEG_AUDIO_CRC_CRC16`mpeg audio crc crc16 CRC 선택값입니다.
`V4L2_CID_MPEG_AUDIO_MUTE`Encoded 또는 decoded audio 출력을 음소거하는 boolean 제어입니다.
`V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`Decoder의 main·stereo·left·right·mono playback 동작을 선택합니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO`mpeg audio dec playback auto decoder playback 선택값입니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO`mpeg audio dec playback stereo decoder playback 선택값입니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT`mpeg audio dec playback left decoder playback 선택값입니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT`mpeg audio dec playback right decoder playback 선택값입니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO`mpeg audio dec playback mono decoder playback 선택값입니다.
`V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO`mpeg audio dec playback swapped stereo decoder playback 선택값입니다.
`V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`Decoder의 main·stereo·left·right·mono playback 동작을 선택합니다.

원문의 PID, PES, sampling, encoding, bitrate, mode, emphasis, CRC와 playback 상수 전체입니다.

MPEG audio stream 구성
MPEG stream type 선택TS PID 또는 PS PES ID 배정Audio sampling frequency와 encoding 선택Layer·codec bitrate 선택Channel mode·emphasis·CRC 설정필요하면 VBI와 playback routing 설정

Container와 elementary stream을 함께 설정합니다.

.. _mpeg-control-id:

Codec Control IDs
-----------------

``V4L2_CID_CODEC_CLASS (class)``
    The Codec class descriptor. Calling
    :ref:`VIDIOC_QUERYCTRL` for this control will
    return a description of this control class. This description can be
    used as the caption of a Tab page in a GUI, for example.

.. _v4l2-mpeg-stream-type:

``V4L2_CID_MPEG_STREAM_TYPE``
    (enum)

enum v4l2_mpeg_stream_type -
    The MPEG-1, -2 or -4 output stream type. One cannot assume anything
    here. Each hardware MPEG encoder tends to support different subsets
    of the available MPEG stream types. This control is specific to
    multiplexed MPEG streams. The currently defined stream types are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
      - MPEG-2 program stream
    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
      - MPEG-2 transport stream
    * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
      - MPEG-1 system stream
    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
      - MPEG-2 DVD-compatible stream
    * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
      - MPEG-1 VCD-compatible stream
    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
      - MPEG-2 SVCD-compatible stream



``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
    Program Map Table Packet ID for the MPEG transport stream (default
    16)

``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
    Audio Packet ID for the MPEG transport stream (default 256)

``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
    Video Packet ID for the MPEG transport stream (default 260)

``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
    Packet ID for the MPEG transport stream carrying PCR fields (default
    259)

``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
    Audio ID for MPEG PES

``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
    Video ID for MPEG PES

.. _v4l2-mpeg-stream-vbi-fmt:

``V4L2_CID_MPEG_STREAM_VBI_FMT``
    (enum)

enum v4l2_mpeg_stream_vbi_fmt -
    Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
    the MPEG stream. This control selects whether VBI data should be
    embedded, and if so, what embedding method should be used. The list
    of possible VBI formats depends on the driver. The currently defined
    VBI format types are:



.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
      - No VBI in the MPEG stream
    * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
      - VBI in private packets, IVTV format (documented in the kernel
	sources in the file
	``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``)



.. _v4l2-mpeg-audio-sampling-freq:

``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
    (enum)

enum v4l2_mpeg_audio_sampling_freq -
    MPEG Audio sampling frequency. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
      - 44.1 kHz
    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
      - 48 kHz
    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
      - 32 kHz



.. _v4l2-mpeg-audio-encoding:

``V4L2_CID_MPEG_AUDIO_ENCODING``
    (enum)

enum v4l2_mpeg_audio_encoding -
    MPEG Audio encoding. This control is specific to multiplexed MPEG
    streams. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
      - MPEG-1/2 Layer I encoding
    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
      - MPEG-1/2 Layer II encoding
    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
      - MPEG-1/2 Layer III encoding
    * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
      - MPEG-2/4 AAC (Advanced Audio Coding)
    * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
      - AC-3 aka ATSC A/52 encoding



.. _v4l2-mpeg-audio-l1-bitrate:

``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
    (enum)

enum v4l2_mpeg_audio_l1_bitrate -
    MPEG-1/2 Layer I bitrate. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
      - 32 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
      - 64 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
      - 96 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
      - 128 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
      - 160 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
      - 192 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
      - 224 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
      - 256 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
      - 288 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
      - 320 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
      - 352 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
      - 384 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
      - 416 kbit/s
    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
      - 448 kbit/s



.. _v4l2-mpeg-audio-l2-bitrate:

``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
    (enum)

enum v4l2_mpeg_audio_l2_bitrate -
    MPEG-1/2 Layer II bitrate. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
      - 32 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
      - 48 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
      - 56 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
      - 64 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
      - 80 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
      - 96 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
      - 112 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
      - 128 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
      - 160 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
      - 192 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
      - 224 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
      - 256 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
      - 320 kbit/s
    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
      - 384 kbit/s



.. _v4l2-mpeg-audio-l3-bitrate:

``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
    (enum)

enum v4l2_mpeg_audio_l3_bitrate -
    MPEG-1/2 Layer III bitrate. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
      - 32 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
      - 40 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
      - 48 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
      - 56 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
      - 64 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
      - 80 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
      - 96 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
      - 112 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
      - 128 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
      - 160 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
      - 192 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
      - 224 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
      - 256 kbit/s
    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
      - 320 kbit/s



``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
    AAC bitrate in bits per second.

.. _v4l2-mpeg-audio-ac3-bitrate:

``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
    (enum)

enum v4l2_mpeg_audio_ac3_bitrate -
    AC-3 bitrate. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
      - 32 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
      - 40 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
      - 48 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
      - 56 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
      - 64 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
      - 80 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
      - 96 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
      - 112 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
      - 128 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
      - 160 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
      - 192 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
      - 224 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
      - 256 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
      - 320 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
      - 384 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
      - 448 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
      - 512 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
      - 576 kbit/s
    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
      - 640 kbit/s



.. _v4l2-mpeg-audio-mode:

``V4L2_CID_MPEG_AUDIO_MODE``
    (enum)

enum v4l2_mpeg_audio_mode -
    MPEG Audio mode. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
      - Stereo
    * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
      - Joint Stereo
    * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
      - Bilingual
    * - ``V4L2_MPEG_AUDIO_MODE_MONO``
      - Mono



.. _v4l2-mpeg-audio-mode-extension:

``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
    (enum)

enum v4l2_mpeg_audio_mode_extension -
    Joint Stereo audio mode extension. In Layer I and II they indicate
    which subbands are in intensity stereo. All other subbands are coded
    in stereo. Layer III is not (yet) supported. Possible values are:

.. tabularcolumns:: |p{9.1cm}|p{8.4cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
      - Subbands 4-31 in intensity stereo
    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
      - Subbands 8-31 in intensity stereo
    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
      - Subbands 12-31 in intensity stereo
    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
      - Subbands 16-31 in intensity stereo



.. _v4l2-mpeg-audio-emphasis:

``V4L2_CID_MPEG_AUDIO_EMPHASIS``
    (enum)

enum v4l2_mpeg_audio_emphasis -
    Audio Emphasis. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
      - None
    * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
      - 50/15 microsecond emphasis
    * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
      - CCITT J.17



.. _v4l2-mpeg-audio-crc:

``V4L2_CID_MPEG_AUDIO_CRC``
    (enum)

enum v4l2_mpeg_audio_crc -
    CRC method. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_CRC_NONE``
      - None
    * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
      - 16 bit parity check



``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
    Mutes the audio when capturing. This is not done by muting audio
    hardware, which can still produce a slight hiss, but in the encoder
    itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
    unmuted, 1 = muted.

.. _v4l2-mpeg-audio-dec-playback:

``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
    (enum)

enum v4l2_mpeg_audio_dec_playback -
    Determines how monolingual audio should be played back. Possible
    values are:



.. tabularcolumns:: |p{9.8cm}|p{7.7cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
      - Automatically determines the best playback mode.
    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
      - Stereo playback.
    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
      - Left channel playback.
    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
      - Right channel playback.
    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
      - Mono playback.
    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
      - Stereo playback with swapped left and right channels.



.. _v4l2-mpeg-audio-dec-multilingual-playback:

``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
    (enum)

enum v4l2_mpeg_audio_dec_playback -
    Determines how multilingual audio should be played back.

공통 video encoding·decode 제어

502-738

`V4L2_CID_MPEG_VIDEO_ENCODING`은 MPEG-1, MPEG-2, MPEG-4 AVC 등 video codec을 선택하고 `V4L2_CID_MPEG_VIDEO_ASPECT`는 encoded stream의 aspect ratio를 1:1, 4:3, 16:9, 2.21:1 등으로 신호합니다.

B frame 수와 GOP size는 prediction 구조와 random-access 간격을 결정합니다. GOP closure를 켜면 GOP가 이전 GOP의 참조를 사용하지 않으며 pulldown은 film frame rate를 television cadence로 변환하는 신호를 생성합니다.

Bitrate mode는 VBR, CBR, constant-quality 등 driver가 지원하는 방식을 선택합니다. 평균 bitrate, VBR peak bitrate와 constant-quality 값은 선택한 mode에서만 의미가 있으며 서로 모순되지 않아야 합니다.

Frame skip mode는 rate-control 한계를 맞추기 위해 frame을 건너뛸 수 있는 조건을 정합니다. Temporal decimation은 입력 frame 수를 정수 비율로 줄이고, video mute와 mute YUV는 stream을 중단하지 않고 정해진 색의 frame을 출력하게 합니다.

Decoder PTS와 frame 제어는 현재 처리 위치를 보고하고 conceal color는 손상된 영역을 채우는 Y'CbCr 값을 정합니다. Slice interface는 decoder가 OUTPUT buffer 하나에서 slice 단위 bitstream을 받을 수 있음을 활성화합니다.

Display delay enable과 delay 값은 decoded picture buffer에서 display 순서를 위해 지연할 frame 수를 설정합니다. 장치가 이 기능을 지원하지 않거나 disable 상태이면 delay 값은 적용되지 않습니다.

`V4L2_CID_MPEG_VIDEO_AU_DELIMITER`는 H.264 access-unit delimiter NAL을 삽입합니다. 이후의 VUI·profile·level 제어와 함께 decoder 및 muxer가 stream 경계를 해석할 수 있도록 구성합니다.

공통 video 제어와 enum
제어·상수한국어 설명
`V4L2_CID_MPEG_VIDEO_ENCODING`MPEG-1/2/4 AVC 등 video encoding 형식을 선택합니다.
`V4L2_MPEG_VIDEO_ENCODING_MPEG_1`mpeg video encoding mpeg 1 video codec 선택값입니다.
`V4L2_MPEG_VIDEO_ENCODING_MPEG_2`mpeg video encoding mpeg 2 video codec 선택값입니다.
`V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`mpeg video encoding mpeg 4 avc video codec 선택값입니다.
`V4L2_CID_MPEG_VIDEO_ASPECT`부호화 stream의 display aspect ratio를 선택합니다.
`V4L2_CID_MPEG_VIDEO_B_FRAMES`GOP에서 연속 B frame 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_GOP_SIZE`GOP의 picture 수, 즉 I frame 간격을 설정합니다.
`V4L2_CID_MPEG_VIDEO_GOP_CLOSURE`Closed GOP 생성 여부를 설정합니다.
`V4L2_CID_MPEG_VIDEO_PULLDOWN`3:2 pulldown 생성 여부를 설정합니다.
`V4L2_CID_MPEG_VIDEO_BITRATE_MODE`VBR, CBR, CQ 같은 bitrate 제어 방식을 선택합니다.
`V4L2_MPEG_VIDEO_BITRATE_MODE_VBR`mpeg video bitrate mode vbr rate-control mode입니다.
`V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`mpeg video bitrate mode cbr rate-control mode입니다.
`V4L2_MPEG_VIDEO_BITRATE_MODE_CQ`mpeg video bitrate mode cq rate-control mode입니다.
`V4L2_CID_MPEG_VIDEO_BITRATE`평균 또는 CBR target video bitrate를 bit/s 단위로 설정합니다.
`V4L2_CID_MPEG_VIDEO_BITRATE_PEAK`VBR에서 허용할 peak bitrate를 bit/s 단위로 설정합니다.
`V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY`Constant-quality mode의 품질 수준을 설정합니다.
`V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`Rate-control 제약에서 frame skip을 허용하는 방식을 선택합니다.
`V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED`mpeg video frame skip mode disabled frame-skip 정책입니다.
`V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT`mpeg video frame skip mode level limit frame-skip 정책입니다.
`V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT`mpeg video frame skip mode buf limit frame-skip 정책입니다.
`V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION`입력 frame을 시간축에서 줄이는 decimation 계수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MUTE`Encoded 또는 decoded video 출력을 음소거합니다.
`V4L2_CID_MPEG_VIDEO_MUTE_YUV`Video mute 때 출력할 Y'CbCr 색 값을 설정합니다.
`V4L2_CID_MPEG_VIDEO_DEC_PTS`Decoder가 현재 처리한 presentation timestamp를 보고하는 read-only 제어입니다.
`V4L2_CID_MPEG_VIDEO_DEC_FRAME`Decoder가 현재 처리한 frame 식별 또는 frame 수를 보고합니다.
`V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR`Decoder concealment에 사용할 Y'CbCr 색을 설정합니다.
`V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE`Decoder가 slice 단위 OUTPUT interface를 사용하도록 설정합니다.
`V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_AU_DELIMITER`H.264 access-unit delimiter NAL 생성을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE`H.264 VUI sample-aspect-ratio 신호와 확장 SAR 크기를 설정합니다.

Encoding, aspect, GOP, rate control, mute와 decoder 상태 상수 전체입니다.

Video encoder 기본 구성
Video encoding과 aspect 선택GOP size·B frame·closure 설정Bitrate mode 선택Average·peak bitrate 또는 quality 설정Frame-skip·decimation 정책 설정Decoder라면 display-delay와 concealment 설정

Codec 선택부터 GOP와 rate control까지의 순서입니다.

.. _v4l2-mpeg-video-encoding:

``V4L2_CID_MPEG_VIDEO_ENCODING``
    (enum)

enum v4l2_mpeg_video_encoding -
    MPEG Video encoding method. This control is specific to multiplexed
    MPEG streams. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
      - MPEG-1 Video encoding
    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
      - MPEG-2 Video encoding
    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
      - MPEG-4 AVC (H.264) Video encoding



.. _v4l2-mpeg-video-aspect:

``V4L2_CID_MPEG_VIDEO_ASPECT``
    (enum)

enum v4l2_mpeg_video_aspect -
    Video aspect. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
    * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
    * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
    * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``



``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
    Number of B-Frames (default 2)

``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
    GOP size (default 12)

``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
    GOP closure (default 1)

``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
    Enable 3:2 pulldown (default 0)

.. _v4l2-mpeg-video-bitrate-mode:

``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
    (enum)

enum v4l2_mpeg_video_bitrate_mode -
    Video bitrate mode. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
      - Variable bitrate
    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
      - Constant bitrate
    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``
      - Constant quality



``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
    Average video bitrate in bits per second.

``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
    Peak video bitrate in bits per second. Must be larger or equal to
    the average video bitrate. It is ignored if the video bitrate mode
    is set to constant bitrate.

``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)``
    Constant quality level control. This control is applicable when
    ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is
    ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100
    where 1 indicates lowest quality and 100 indicates highest quality.
    Encoder will decide the appropriate quantization parameter and
    bitrate to produce requested frame quality.


``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)``

enum v4l2_mpeg_video_frame_skip_mode -
    Indicates in what conditions the encoder should skip frames. If
    encoding a frame would cause the encoded stream to be larger then a
    chosen data limit then the frame will be skipped. Possible values
    are:


.. tabularcolumns:: |p{8.2cm}|p{9.3cm}|

.. raw:: latex

    \small

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED``
      - Frame skip mode is disabled.
    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``
      - Frame skip mode enabled and buffer limit is set by the chosen
        level and is defined by the standard.
    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``
      - Frame skip mode enabled and buffer limit is set by the
        :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or
        :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control.

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
    For every captured frame, skip this many subsequent frames (default
    0).

``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
    "Mutes" the video to a fixed color when capturing. This is useful
    for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
    muted.

``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
    Sets the "mute" color of the video. The supplied 32-bit integer is
    interpreted as follows (bit 0 = least significant bit):



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - Bit 0:7
      - V chrominance information
    * - Bit 8:15
      - U chrominance information
    * - Bit 16:23
      - Y luminance information
    * - Bit 24:31
      - Must be zero.



.. _v4l2-mpeg-video-dec-pts:

``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
    This read-only control returns the 33-bit video Presentation Time
    Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
    currently displayed frame. This is the same PTS as is used in
    :ref:`VIDIOC_DECODER_CMD`.

.. _v4l2-mpeg-video-dec-frame:

``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
    This read-only control returns the frame counter of the frame that
    is currently displayed (decoded). This value is reset to 0 whenever
    the decoder is started.

``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)``
    This control sets the conceal color in YUV color space. It describes
    the client preference of the error conceal color in case of an error
    where the reference frame is missing. The decoder should fill the
    reference buffer with the preferred color and use it for future
    decoding. The control is using 16 bits per channel.
    Applicable to decoders.

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * -
      - 8bit  format
      - 10bit format
      - 12bit format
    * - Y luminance
      - Bit 0:7
      - Bit 0:9
      - Bit 0:11
    * - Cb chrominance
      - Bit 16:23
      - Bit 16:25
      - Bit 16:27
    * - Cr chrominance
      - Bit 32:39
      - Bit 32:41
      - Bit 32:43
    * - Must be zero
      - Bit 48:63
      - Bit 48:63
      - Bit 48:63

``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
    If enabled the decoder expects to receive a single slice per buffer,
    otherwise the decoder expects a single frame in per buffer.
    Applicable to the decoder, all codecs.

``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)``
    If the display delay is enabled then the decoder is forced to return
    a CAPTURE buffer (decoded frame) after processing a certain number
    of OUTPUT buffers. The delay can be set through
    ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This
    feature can be used for example for generating thumbnails of videos.
    Applicable to the decoder.

``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)``
    Display delay value for decoder. The decoder is forced to
    return a decoded frame after the set 'display delay' number of
    frames. If this number is low it may result in frames returned out
    of display order, in addition the hardware may still be using the
    returned buffer as a reference picture for subsequent frames.

``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)``
    If enabled then, AUD (Access Unit Delimiter) NALUs will be generated.
    That could be useful to find the start of a frame without having to
    fully parse each NALU. Applicable to the H264 and HEVC encoders.

``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
    Enable writing sample aspect ratio in the Video Usability
    Information. Applicable to the H264 encoder.

Profile·level, H.264와 rate-control 제어

739-1682

H.264 VUI SAR 제어는 sample aspect ratio 정보의 존재 여부와 IDC를 설정합니다. Extended SAR를 선택하면 width와 height를 별도 integer 제어로 지정하며, display aspect ratio 계산에 반영됩니다.

H.264, MPEG-2, MPEG-4의 level과 profile menu는 encoder가 생성할 bitstream 제약을 선택하고 decoder 지원 능력을 열거하는 데도 사용됩니다. 애플리케이션은 resolution, bitrate, reference 수와 선택한 profile/level의 한계를 맞춰야 합니다.

Maximum reference pictures와 multi-slice mode는 reference buffer 요구량과 slice 분할 기준을 정합니다. Multi-slice는 macroblock 수 또는 byte 수를 기준으로 나눌 수 있고, 대응하는 maximum 제어가 각 slice 한계를 설정합니다.

H.264 loop-filter mode는 enabled, disabled, slice boundary disabled를 선택하고 alpha·beta offset은 deblocking 강도를 조절합니다. Entropy mode는 CAVLC와 CABAC 중 하나를 선택합니다.

8x8 transform, constrained intra prediction, chroma QP index offset, cyclic intra refresh와 period 제어는 압축 효율·오류 회복성과 화질을 조절합니다. Frame 및 macroblock rate-control enable은 제어 granularity를 결정합니다.

H.263, H.264, MPEG-4의 I/P/B frame QP와 codec 전체 min/max QP, frame 유형별 min/max QP를 설정할 수 있습니다. Frame별 범위와 전체 범위가 함께 설정되면 두 조건을 모두 만족하는 QP를 사용해야 합니다.

VBV size와 delay, motion-vector 수평·수직 search range, force-key-frame button, H.264 CPB size와 I period는 buffer 모델·motion estimation·random access를 제어합니다.

Header mode는 sequence header를 별도 buffer로 보낼지 첫 encoded frame에 결합할지 선택합니다. Repeat sequence header는 key frame마다 header를 반복하고 MPEG-4 deblock, VOP time resolution과 increment를 설정합니다.

H.264 frame-packing SEI는 stereo frame의 배열 유형과 current-frame-0 상태를 신호합니다. FMO는 map type, slice group, change direction/rate와 run length를 설정하고 ASO는 arbitrary slice order를 제공합니다.

Hierarchical H.264 coding은 P 또는 B 계층 유형, layer 수, 각 layer QP와 bitrate를 설정합니다. Layer 수가 1보다 클 때만 계층별 제어가 의미 있으며 구현이 지원하는 최대 layer를 확인해야 합니다.

FWHT I/P QP는 해당 frame 유형의 양자화를 정하고 `V4L2_CID_MPEG_VIDEO_AVERAGE_QP`는 마지막 encoded frame에서 사용된 평균 QP를 read-only로 보고합니다.

Profile·H.264·rate-control 제어
제어·상수한국어 설명
`V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC`H.264 VUI sample-aspect-ratio 신호와 확장 SAR 크기를 설정합니다.
`V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED`mpeg video h264 vui sar idc unspecified H.264 SAR IDC 선택값입니다.
`V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED`mpeg video h264 vui sar idc extended H.264 SAR IDC 선택값입니다.
`V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH``cid mpeg video h264 vui ext sar width` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT``cid mpeg video h264 vui ext sar height` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_H264_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_1_0`mpeg video h264 level 1 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_1B`mpeg video h264 level 1b codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_1_1`mpeg video h264 level 1 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_1_2`mpeg video h264 level 1 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_1_3`mpeg video h264 level 1 3 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_2_0`mpeg video h264 level 2 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_2_1`mpeg video h264 level 2 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_2_2`mpeg video h264 level 2 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_3_0`mpeg video h264 level 3 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_3_1`mpeg video h264 level 3 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_3_2`mpeg video h264 level 3 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_4_0`mpeg video h264 level 4 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_4_1`mpeg video h264 level 4 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_4_2`mpeg video h264 level 4 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_5_0`mpeg video h264 level 5 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_5_1`mpeg video h264 level 5 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_5_2`mpeg video h264 level 5 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_6_0`mpeg video h264 level 6 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_6_1`mpeg video h264 level 6 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_H264_LEVEL_6_2`mpeg video h264 level 6 2 codec level 선택값입니다.
`V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW`mpeg video mpeg2 level low codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN`mpeg video mpeg2 level main codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440`mpeg video mpeg2 level high 1440 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH`mpeg video mpeg2 level high codec level 선택값입니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_0`mpeg video mpeg4 level 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B`mpeg video mpeg4 level 0b codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_1`mpeg video mpeg4 level 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_2`mpeg video mpeg4 level 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_3`mpeg video mpeg4 level 3 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B`mpeg video mpeg4 level 3b codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_4`mpeg video mpeg4 level 4 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_LEVEL_5`mpeg video mpeg4 level 5 codec level 선택값입니다.
`V4L2_CID_MPEG_VIDEO_H264_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE`mpeg video h264 profile baseline codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE`mpeg video h264 profile constrained baseline codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_MAIN`mpeg video h264 profile main codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED`mpeg video h264 profile extended codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH`mpeg video h264 profile high codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10`mpeg video h264 profile high 10 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422`mpeg video h264 profile high 422 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE`mpeg video h264 profile high 444 predictive codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA`mpeg video h264 profile high 10 intra codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA`mpeg video h264 profile high 422 intra codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA`mpeg video h264 profile high 444 intra codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA`mpeg video h264 profile cavlc 444 intra codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE`mpeg video h264 profile scalable baseline codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH`mpeg video h264 profile scalable high codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA`mpeg video h264 profile scalable high intra codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH`mpeg video h264 profile stereo high codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH`mpeg video h264 profile multiview high codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH`mpeg video h264 profile constrained high codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE`mpeg video mpeg2 profile simple codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN`mpeg video mpeg2 profile main codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE`mpeg video mpeg2 profile snr scalable codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE`mpeg video mpeg2 profile spatially scalable codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH`mpeg video mpeg2 profile high codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW`mpeg video mpeg2 profile multiview codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE`mpeg video mpeg4 profile simple codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE`mpeg video mpeg4 profile advanced simple codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE`mpeg video mpeg4 profile core codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE`mpeg video mpeg4 profile simple scalable codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY`mpeg video mpeg4 profile advanced coding efficiency codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_MAX_REF_PIC`Encoder가 사용할 최대 reference picture 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`Frame을 여러 slice로 나누는 기준과 한계를 설정합니다.
`V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE`mpeg video multi slice mode single multi-slice mode입니다.
`V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB`mpeg video multi slice mode max mb multi-slice mode입니다.
`V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES`mpeg video multi slice mode max bytes multi-slice mode입니다.
`V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB`Frame을 여러 slice로 나누는 기준과 한계를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES`Frame을 여러 slice로 나누는 기준과 한계를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE`H.264 또는 HEVC in-loop deblocking filter의 mode와 offset을 설정합니다.
`V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED`mpeg video h264 loop filter mode enabled loop-filter mode입니다.
`V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED`mpeg video h264 loop filter mode disabled loop-filter mode입니다.
`V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`mpeg video h264 loop filter mode disabled at slice boundary loop-filter mode입니다.
`V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA`H.264 또는 HEVC in-loop deblocking filter의 mode와 offset을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA`H.264 또는 HEVC in-loop deblocking filter의 mode와 offset을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE`H.264 CAVLC 또는 CABAC entropy coding을 선택합니다.
`V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC`mpeg video h264 entropy mode cavlc entropy-coding mode입니다.
`V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC`mpeg video h264 entropy mode cabac entropy-coding mode입니다.
`V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM`H.264 8x8 transform 사용 여부를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION`Constrained intra prediction을 켜거나 끕니다.
`V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET`H.264 chroma QP index offset을 설정합니다.
`V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`Cyclic 또는 random intra refresh의 주기·단위·macroblock 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`Cyclic 또는 random intra refresh의 주기·단위·macroblock 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE`Cyclic 또는 random intra refresh의 주기·단위·macroblock 수를 설정합니다.
`V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM`mpeg video intra refresh period type random intra-refresh mode입니다.
`V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC`mpeg video intra refresh period type cyclic intra-refresh mode입니다.
`V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE`Frame 또는 macroblock 단위 rate control을 켜거나 끕니다.
`V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H263_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE`Frame 또는 macroblock 단위 rate control을 켜거나 끕니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_QPEL`MPEG-4 quarter-pixel motion estimation을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H263_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VBV_SIZE`Video buffering verifier buffer 크기를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VBV_DELAY`Encoder가 계산한 VBV delay를 보고하는 제어입니다.
`V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE`Motion vector의 수평 탐색 범위를 pixel 단위로 설정합니다.
`V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE`Motion vector의 수직 탐색 범위를 pixel 단위로 설정합니다.
`V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME`다음 encoded frame을 key frame으로 강제하는 button 제어입니다.
`V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE`H.264 coded-picture buffer 크기를 kB 단위로 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_I_PERIOD`H.264 I frame 주기를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEADER_MODE`Codec header를 별도 buffer 또는 첫 frame과 함께 출력할지 선택합니다.
`V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE`mpeg video header mode separate header-output mode입니다.
`V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME`mpeg video header mode joined with 1st frame header-output mode입니다.
`V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER`각 key/IDR frame에 sequence header 또는 SPS/PPS를 반복 삽입합니다.
`V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER``cid mpeg video decoder mpeg4 deblock filter` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES``cid mpeg video mpeg4 vop time res` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC``cid mpeg video mpeg4 vop time inc` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING`H.264 frame-packing SEI의 생성과 배열 방식을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0`H.264 frame-packing SEI의 생성과 배열 방식을 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE`H.264 frame-packing SEI의 생성과 배열 방식을 설정합니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD`mpeg video h264 sei fp arrangement type chekerboard frame-packing 배열값입니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN`mpeg video h264 sei fp arrangement type column frame-packing 배열값입니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW`mpeg video h264 sei fp arrangement type row frame-packing 배열값입니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE`mpeg video h264 sei fp arrangement type side by side frame-packing 배열값입니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM`mpeg video h264 sei fp arrangement type top bottom frame-packing 배열값입니다.
`V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL`mpeg video h264 sei fp arrangement type temporal frame-packing 배열값입니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES`mpeg video h264 fmo map type interleaved slices FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES`mpeg video h264 fmo map type scattered slices FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER`mpeg video h264 fmo map type foreground with left over FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT`mpeg video h264 fmo map type box out FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN`mpeg video h264 fmo map type raster scan FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN`mpeg video h264 fmo map type wipe scan FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT`mpeg video h264 fmo map type explicit FMO 선택값입니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT`mpeg video h264 fmo change dir right FMO 선택값입니다.
`V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT`mpeg video h264 fmo change dir left FMO 선택값입니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH`H.264 flexible macroblock ordering의 map, group, direction, rate와 run length를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_ASO`H.264 arbitrary slice ordering과 slice order를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER`H.264 arbitrary slice ordering과 slice order를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B`mpeg video h264 hierarchical coding b hierarchical-coding 선택값입니다.
`V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P`mpeg video h264 hierarchical coding p hierarchical-coding 선택값입니다.
`V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_FWHT_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_FWHT_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_AVERAGE_QP`마지막 encoded frame의 평균 QP를 보고하는 read-only 제어입니다.

VUI, profile/level, slice, filter, QP, buffer, SEI, FMO/ASO와 hierarchical coding 상수 전체입니다.

H.264 encoder 상세 구성
Profile·level·VUI SAR 선택Reference picture와 slice policy 설정Loop filter·entropy·transform 설정QP 범위와 rate-control granularity 설정VBV/CPB·motion search·I period 설정Header·SEI·FMO/ASO·hierarchy 선택

규격 제약과 hardware rate control을 함께 맞춥니다.

.. _v4l2-mpeg-video-h264-vui-sar-idc:

``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
    (enum)

enum v4l2_mpeg_video_h264_vui_sar_idc -
    VUI sample aspect ratio indicator for H.264 encoding. The value is
    defined in the table E-1 in the standard. Applicable to the H264
    encoder.



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
      - Unspecified
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
      - 1x1
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
      - 12x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
      - 10x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
      - 16x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
      - 40x33
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
      - 24x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
      - 20x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
      - 32x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
      - 80x33
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
      - 18x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
      - 15x11
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
      - 64x33
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
      - 160x99
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
      - 4x3
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
      - 3x2
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
      - 2x1
    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
      - Extended SAR



``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
    Extended sample aspect ratio width for H.264 VUI encoding.
    Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
    Extended sample aspect ratio height for H.264 VUI encoding.
    Applicable to the H264 encoder.

.. _v4l2-mpeg-video-h264-level:

``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
    (enum)

enum v4l2_mpeg_video_h264_level -
    The level information for the H264 video elementary stream.
    Applicable to the H264 encoder. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
      - Level 1.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
      - Level 1B
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
      - Level 1.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
      - Level 1.2
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
      - Level 1.3
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
      - Level 2.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
      - Level 2.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
      - Level 2.2
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
      - Level 3.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
      - Level 3.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
      - Level 3.2
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
      - Level 4.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
      - Level 4.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
      - Level 4.2
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
      - Level 5.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
      - Level 5.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
      - Level 5.2
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
      - Level 6.0
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
      - Level 6.1
    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
      - Level 6.2



.. _v4l2-mpeg-video-mpeg2-level:

``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
    (enum)

enum v4l2_mpeg_video_mpeg2_level -
    The level information for the MPEG2 elementary stream. Applicable to
    MPEG2 codecs. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
      - Low Level (LL)
    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
      - Main Level (ML)
    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
      - High-1440 Level (H-14)
    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
      - High Level (HL)



.. _v4l2-mpeg-video-mpeg4-level:

``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
    (enum)

enum v4l2_mpeg_video_mpeg4_level -
    The level information for the MPEG4 elementary stream. Applicable to
    the MPEG4 encoder. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
      - Level 0
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
      - Level 0b
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
      - Level 1
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
      - Level 2
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
      - Level 3
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
      - Level 3b
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
      - Level 4
    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
      - Level 5



.. _v4l2-mpeg-video-h264-profile:

``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
    (enum)

enum v4l2_mpeg_video_h264_profile -
    The profile information for H264. Applicable to the H264 encoder.
    Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{10.2cm}|p{7.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
      - Baseline profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
      - Constrained Baseline profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
      - Main profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
      - Extended profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
      - High profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
      - High 10 profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
      - High 422 profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
      - High 444 Predictive profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
      - High 10 Intra profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
      - High 422 Intra profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
      - High 444 Intra profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
      - CAVLC 444 Intra profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
      - Scalable Baseline profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
      - Scalable High profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
      - Scalable High Intra profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
      - Stereo High profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
      - Multiview High profile
    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
      - Constrained High profile

.. raw:: latex

    \normalsize

.. _v4l2-mpeg-video-mpeg2-profile:

``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
    (enum)

enum v4l2_mpeg_video_mpeg2_profile -
    The profile information for MPEG2. Applicable to MPEG2 codecs.
    Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{10.2cm}|p{7.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
      - Simple profile (SP)
    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
      - Main profile (MP)
    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
      - SNR Scalable profile (SNR)
    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
      - Spatially Scalable profile (Spt)
    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
      - High profile (HP)
    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
      - Multi-view profile (MVP)


.. raw:: latex

    \normalsize

.. _v4l2-mpeg-video-mpeg4-profile:

``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
    (enum)

enum v4l2_mpeg_video_mpeg4_profile -
    The profile information for MPEG4. Applicable to the MPEG4 encoder.
    Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{11.8cm}|p{5.7cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
      - Simple profile
    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
      - Advanced Simple profile
    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
      - Core profile
    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
      - Simple Scalable profile
    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
      - Advanced Coding Efficiency profile

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
    The maximum number of reference pictures used for encoding.
    Applicable to the encoder.

.. _v4l2-mpeg-video-multi-slice-mode:

``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
    (enum)

enum v4l2_mpeg_video_multi_slice_mode -
    Determines how the encoder should handle division of frame into
    slices. Applicable to the encoder. Possible values are:



.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
      - Single slice per frame.
    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
      - Multiple slices with set maximum number of macroblocks per slice.
    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
      - Multiple slice with set maximum size in bytes per slice.



``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
    The maximum number of macroblocks in a slice. Used when
    ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
    ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
    encoder.

``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
    The maximum size of a slice in bytes. Used when
    ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
    ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
    encoder.

.. _v4l2-mpeg-video-h264-loop-filter-mode:

``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
    (enum)

enum v4l2_mpeg_video_h264_loop_filter_mode -
    Loop filter mode for H264 encoder. Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{13.5cm}|p{4.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
      - Loop filter is enabled.
    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
      - Loop filter is disabled.
    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
      - Loop filter is disabled at the slice boundary.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
    Loop filter alpha coefficient, defined in the H264 standard.
    This value corresponds to the slice_alpha_c0_offset_div2 slice header
    field, and should be in the range of -6 to +6, inclusive. The actual alpha
    offset FilterOffsetA is twice this value.
    Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
    Loop filter beta coefficient, defined in the H264 standard.
    This corresponds to the slice_beta_offset_div2 slice header field, and
    should be in the range of -6 to +6, inclusive. The actual beta offset
    FilterOffsetB is twice this value.
    Applicable to the H264 encoder.

.. _v4l2-mpeg-video-h264-entropy-mode:

``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
    (enum)

enum v4l2_mpeg_video_h264_entropy_mode -
    Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
    encoder. Possible values are:


.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|


.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
      - Use CAVLC entropy coding.
    * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
      - Use CABAC entropy coding.



``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
    Enable 8X8 transform for H264. Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
    Enable constrained intra prediction for H264. Applicable to the H264
    encoder.

``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
    Specify the offset that should be added to the luma quantization
    parameter to determine the chroma quantization parameter. Applicable
    to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
    Cyclic intra macroblock refresh. This is the number of continuous
    macroblocks refreshed every frame. Each frame a successive set of
    macroblocks is refreshed until the cycle completes and starts from
    the top of the frame. Setting this control to zero means that
    macroblocks will not be refreshed.  Note that this control will not
    take effect when ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`` control
    is set to non zero value.
    Applicable to H264, H263 and MPEG4 encoder.

``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (enum)``

enum v4l2_mpeg_video_intra_refresh_period_type -
    Sets the type of intra refresh. The period to refresh
    the whole frame is specified by V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD.
    Note that if this control is not present, then it is undefined what
    refresh type is used and it is up to the driver to decide.
    Applicable to H264 and HEVC encoders. Possible values are:

.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM``
      - The whole frame is completely refreshed randomly
        after the specified period.
    * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC``
      - The whole frame MBs are completely refreshed in cyclic order
        after the specified period.

``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (integer)``
    Intra macroblock refresh period. This sets the period to refresh
    the whole frame. In other words, this defines the number of frames
    for which the whole frame will be intra-refreshed.  An example:
    setting period to 1 means that the whole frame will be refreshed,
    setting period to 2 means that the half of macroblocks will be
    intra-refreshed on frameX and the other half of macroblocks
    will be refreshed in frameX + 1 and so on. Setting the period to
    zero means no period is specified.
    Note that if the client sets this control to non zero value the
    ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`` control shall be
    ignored. Applicable to H264 and HEVC encoders.

``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
    Frame level rate control enable. If this control is disabled then
    the quantization parameter for each frame type is constant and set
    with appropriate controls (e.g.
    ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
    enabled then quantization parameter is adjusted to meet the chosen
    bitrate. Minimum and maximum value for the quantization parameter
    can be set with appropriate controls (e.g.
    ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.

``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
    Macroblock level rate control enable. Applicable to the MPEG4 and
    H264 encoders.

``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
    Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
    encoder.

``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for H263. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
    Minimum quantization parameter for H263. Valid range: from 1 to 31.

``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
    Maximum quantization parameter for H263. Valid range: from 1 to 31.

``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
    Quantization parameter for an P frame for H263. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
    Quantization parameter for an B frame for H263. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for H264. Valid range: from 0
    to 51.

``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
    Minimum quantization parameter for H264. Valid range: from 0 to 51.

``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
    Maximum quantization parameter for H264. Valid range: from 0 to 51.

``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
    Quantization parameter for an P frame for H264. Valid range: from 0
    to 51.

``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
    Quantization parameter for an B frame for H264. Valid range: from 0
    to 51.

``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the H264 I frame to limit I frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the H264 I frame to limit I frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the H264 P frame to limit P frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the H264 P frame to limit P frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the H264 B frame to limit B frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the H264 B frame to limit B frame
    quality to a range. Valid range: from 0 to 51. If
    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for MPEG4. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
    Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.

``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
    Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.

``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
    Quantization parameter for an P frame for MPEG4. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
    Quantization parameter for an B frame for MPEG4. Valid range: from 1
    to 31.

.. _v4l2-mpeg-video-vbv-size:

``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
    The Video Buffer Verifier size in kilobytes, it is used as a
    limitation of frame skip. The VBV is defined in the standard as a
    mean to verify that the produced stream will be successfully
    decoded. The standard describes it as "Part of a hypothetical
    decoder that is conceptually connected to the output of the encoder.
    Its purpose is to provide a constraint on the variability of the
    data rate that an encoder or editing process may produce.".
    Applicable to the MPEG1, MPEG2, MPEG4 encoders.

.. _v4l2-mpeg-video-vbv-delay:

``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
    Sets the initial delay in milliseconds for VBV buffer control.

.. _v4l2-mpeg-video-hor-search-range:

``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
    Horizontal search range defines maximum horizontal search area in
    pixels to search and match for the present Macroblock (MB) in the
    reference picture. This V4L2 control macro is used to set horizontal
    search range for motion estimation module in video encoder.

.. _v4l2-mpeg-video-vert-search-range:

``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
    Vertical search range defines maximum vertical search area in pixels
    to search and match for the present Macroblock (MB) in the reference
    picture. This V4L2 control macro is used to set vertical search
    range for motion estimation module in video encoder.

.. _v4l2-mpeg-video-force-key-frame:

``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
    Force a key frame for the next queued buffer. Applicable to
    encoders. This is a general, codec-agnostic keyframe control.

.. _v4l2-mpeg-video-h264-cpb-size:

``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
    The Coded Picture Buffer size in kilobytes, it is used as a
    limitation of frame skip. The CPB is defined in the H264 standard as
    a mean to verify that the produced stream will be successfully
    decoded. Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
    Period between I-frames in the open GOP for H264. In case of an open
    GOP this is the period between two I-frames. The period between IDR
    (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
    control. An IDR frame, which stands for Instantaneous Decoding
    Refresh is an I-frame after which no prior frames are referenced.
    This means that a stream can be restarted from an IDR frame without
    the need to store or decode any previous frames. Applicable to the
    H264 encoder.

.. _v4l2-mpeg-video-header-mode:

``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
    (enum)

enum v4l2_mpeg_video_header_mode -
    Determines whether the header is returned as the first buffer or is
    it returned together with the first frame. Applicable to encoders.
    Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{10.3cm}|p{7.2cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
      - The stream header is returned separately in the first buffer.
    * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
      - The stream header is returned together with the first encoded
	frame.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
    Repeat the video sequence headers. Repeating these headers makes
    random access to the video stream easier. Applicable to the MPEG1, 2
    and 4 encoder.

``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
    Enabled the deblocking post processing filter for MPEG4 decoder.
    Applicable to the MPEG4 decoder.

``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
    vop_time_increment_resolution value for MPEG4. Applicable to the
    MPEG4 encoder.

``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
    vop_time_increment value for MPEG4. Applicable to the MPEG4
    encoder.

``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
    Enable generation of frame packing supplemental enhancement
    information in the encoded bitstream. The frame packing SEI message
    contains the arrangement of L and R planes for 3D viewing.
    Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
    Sets current frame as frame0 in frame packing SEI. Applicable to the
    H264 encoder.

.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:

``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
    (enum)

enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
    Frame packing arrangement type for H264 SEI. Applicable to the H264
    encoder. Possible values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{12cm}|p{5.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
      - Pixels are alternatively from L and R.
    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
      - L and R are interlaced by column.
    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
      - L and R are interlaced by row.
    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
      - L is on the left, R on the right.
    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
      - L is on top, R on bottom.
    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
      - One view per frame.

.. raw:: latex

    \normalsize



``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
    Enables flexible macroblock ordering in the encoded bitstream. It is
    a technique used for restructuring the ordering of macroblocks in
    pictures. Applicable to the H264 encoder.

.. _v4l2-mpeg-video-h264-fmo-map-type:

``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
   (enum)

enum v4l2_mpeg_video_h264_fmo_map_type -
    When using FMO, the map type divides the image in different scan
    patterns of macroblocks. Applicable to the H264 encoder. Possible
    values are:

.. raw:: latex

    \small

.. tabularcolumns:: |p{12.5cm}|p{5.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
      - Slices are interleaved one after other with macroblocks in run
	length order.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
      - Scatters the macroblocks based on a mathematical function known to
	both encoder and decoder.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
      - Macroblocks arranged in rectangular areas or regions of interest.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
      - Slice groups grow in a cyclic way from centre to outwards.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
      - Slice groups grow in raster scan pattern from left to right.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
      - Slice groups grow in wipe scan pattern from top to bottom.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
      - User defined map type.

.. raw:: latex

    \normalsize



``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
    Number of slice groups in FMO. Applicable to the H264 encoder.

.. _v4l2-mpeg-video-h264-fmo-change-direction:

``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
    (enum)

enum v4l2_mpeg_video_h264_fmo_change_dir -
    Specifies a direction of the slice group change for raster and wipe
    maps. Applicable to the H264 encoder. Possible values are:

.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
      - Raster scan or wipe right.
    * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
      - Reverse raster scan or wipe left.



``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
    Specifies the size of the first slice group for raster and wipe map.
    Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
    Specifies the number of consecutive macroblocks for the interleaved
    map. Applicable to the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
    Enables arbitrary slice ordering in encoded bitstream. Applicable to
    the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
    Specifies the slice order in ASO. Applicable to the H264 encoder.
    The supplied 32-bit integer is interpreted as follows (bit 0 = least
    significant bit):



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - Bit 0:15
      - Slice ID
    * - Bit 16:32
      - Slice position or order



``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
    Enables H264 hierarchical coding. Applicable to the H264 encoder.

.. _v4l2-mpeg-video-h264-hierarchical-coding-type:

``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
    (enum)

enum v4l2_mpeg_video_h264_hierarchical_coding_type -
    Specifies the hierarchical coding type. Applicable to the H264
    encoder. Possible values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
      - Hierarchical B coding.
    * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
      - Hierarchical P coding.



``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
    Specifies the number of hierarchical coding layers. Applicable to
    the H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
    Specifies a user defined QP for each layer. Applicable to the H264
    encoder. The supplied 32-bit integer is interpreted as follows (bit
    0 = least significant bit):



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - Bit 0:15
      - QP value
    * - Bit 16:32
      - Layer number

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder.

``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``
    Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.

``V4L2_CID_FWHT_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for FWHT. Valid range: from 1
    to 31.

``V4L2_CID_FWHT_P_FRAME_QP (integer)``
    Quantization parameter for a P frame for FWHT. Valid range: from 1
    to 31.

``V4L2_CID_MPEG_VIDEO_AVERAGE_QP (integer)``
    This read-only control returns the average QP value of the currently
    encoded frame. The value applies to the last dequeued capture buffer
    (VIDIOC_DQBUF). Its valid range depends on the encoding format and parameters.
    For H264, its valid range is from 0 to 51.
    For HEVC, its valid range is from 0 to 51 for 8 bit and
    from 0 to 63 for 10 bit.
    For H263 and MPEG4, its valid range is from 1 to 31.
    For VP8, its valid range is from 0 to 127.
    For VP9, its valid range is from 0 to 255.
    If the codec's MIN_QP and MAX_QP are set, then the QP will meet both requirements.
    Codecs need to always use the specified range, rather then a HW custom range.
    Applicable to encoders

.. raw:: latex

    \normalsize


MFC 5.1 MPEG Controls
=====================

The following MPEG class controls deal with MPEG decoding and encoding
settings that are specific to the Multi Format Codec 5.1 device present
in the S5P family of SoCs by Samsung.

Samsung MFC 5.1 전용 제어

1683-1861

MFC 5.1 전용 display-delay 제어는 H.264 decoder가 decoded frame을 display 순서로 내보내기 전에 유지할 frame 수를 설정합니다. Enable을 켠 경우에만 delay 값이 적용됩니다.

P frame reference 수, padding enable과 padding YUV는 encoder의 참조 구조와 coded picture 바깥 영역의 채움 색을 설정합니다. Padding YUV는 packed integer의 Y, Cb, Cr component 배치를 원문대로 해석합니다.

Rate-control reaction coefficient와 adaptive RC dark/smooth/static/activity 제어는 장면 특성에 따라 bit 분배가 반응하는 방식을 조절합니다. 이 값들은 Samsung MFC 구현 전용이며 범위와 기본값은 query 결과를 따라야 합니다.

Frame-skip mode는 buffer limit, level limit 또는 둘 모두에서 skip을 허용할지 선택하고 fixed-target-bit는 목표 bit 사용률을 설정합니다. Force-frame-type menu는 다음 frame을 I, P 또는 B로 강제합니다.

MFC 5.1 제어와 enum
제어·상수한국어 설명
`V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`Decoder display delay 기능의 활성화 또는 frame 지연 수를 설정합니다.
`V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P`Samsung MFC 5.1 전용 cid mpeg mfc51 video h264 num ref pic for p 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_PADDING`Samsung MFC 5.1 전용 cid mpeg mfc51 video padding 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV`Samsung MFC 5.1 전용 cid mpeg mfc51 video padding yuv 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF`Samsung MFC 5.1 전용 cid mpeg mfc51 video rc reaction coeff 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK`Samsung MFC 5.1 전용 cid mpeg mfc51 video h264 adaptive rc dark 제어입니다.
`V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE`Frame 또는 macroblock 단위 rate control을 켜거나 끕니다.
`V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH`Samsung MFC 5.1 전용 cid mpeg mfc51 video h264 adaptive rc smooth 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC`Samsung MFC 5.1 전용 cid mpeg mfc51 video h264 adaptive rc static 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY`Samsung MFC 5.1 전용 cid mpeg mfc51 video h264 adaptive rc activity 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE`Rate-control 제약에서 frame skip을 허용하는 방식을 선택합니다.
`V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`Rate-control 제약에서 frame skip을 허용하는 방식을 선택합니다.
`V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED`mpeg mfc51 video frame skip mode disabled frame-skip 정책입니다.
`V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT`mpeg mfc51 video frame skip mode level limit frame-skip 정책입니다.
`V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT`mpeg mfc51 video frame skip mode buf limit frame-skip 정책입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT`Samsung MFC 5.1 전용 cid mpeg mfc51 video rc fixed target bit 제어입니다.
`V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE`Samsung MFC 5.1 전용 cid mpeg mfc51 video force frame type 제어입니다.
`V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED`mpeg mfc51 force frame type disabled MFC 5.1 선택값입니다.
`V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME`mpeg mfc51 force frame type i frame MFC 5.1 선택값입니다.
`V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED`mpeg mfc51 force frame type not coded MFC 5.1 선택값입니다.

Samsung MFC 5.1 codec driver가 노출하는 상수 전체입니다.

MFC51 rate control
일반 bitrate와 QP 설정Reaction coefficient 선택Adaptive RC 장면 분류 기능 선택Frame-skip 제한 선택필요하면 다음 frame 유형 강제

일반 codec 제어 위에 vendor-specific 정책을 더합니다.

.. _mfc51-control-id:

MFC 5.1 Control IDs
-------------------

``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
    If the display delay is enabled then the decoder is forced to return
    a CAPTURE buffer (decoded frame) after processing a certain number
    of OUTPUT buffers. The delay can be set through
    ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
    feature can be used for example for generating thumbnails of videos.
    Applicable to the H264 decoder.

    .. note::

       This control is deprecated. Use the standard
       ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead.

``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
    Display delay value for H264 decoder. The decoder is forced to
    return a decoded frame after the set 'display delay' number of
    frames. If this number is low it may result in frames returned out
    of display order, in addition the hardware may still be using the
    returned buffer as a reference picture for subsequent frames.

    .. note::

       This control is deprecated. Use the standard
       ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead.

``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
    The number of reference pictures used for encoding a P picture.
    Applicable to the H264 encoder.

``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
    Padding enable in the encoder - use a color instead of repeating
    border pixels. Applicable to encoders.

``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
    Padding color in the encoder. Applicable to encoders. The supplied
    32-bit integer is interpreted as follows (bit 0 = least significant
    bit):



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - Bit 0:7
      - V chrominance information
    * - Bit 8:15
      - U chrominance information
    * - Bit 16:23
      - Y luminance information
    * - Bit 24:31
      - Must be zero.



``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
    Reaction coefficient for MFC rate control. Applicable to encoders.

    .. note::

       #. Valid only when the frame level RC is enabled.

       #. For tight CBR, this field must be small (ex. 2 ~ 10). For
	  VBR, this field must be large (ex. 100 ~ 1000).

       #. It is not recommended to use the greater number than
	  FRAME_RATE * (10^9 / BIT_RATE).

``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
    Adaptive rate control for dark region. Valid only when H.264 and
    macroblock level RC is enabled
    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
    encoder.

``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
    Adaptive rate control for smooth region. Valid only when H.264 and
    macroblock level RC is enabled
    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
    encoder.

``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
    Adaptive rate control for static region. Valid only when H.264 and
    macroblock level RC is enabled
    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
    encoder.

``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
    Adaptive rate control for activity region. Valid only when H.264 and
    macroblock level RC is enabled
    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
    encoder.

.. _v4l2-mpeg-mfc51-video-frame-skip-mode:

``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
    (enum)

    .. note::

       This control is deprecated. Use the standard
       ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.

enum v4l2_mpeg_mfc51_video_frame_skip_mode -
    Indicates in what conditions the encoder should skip frames. If
    encoding a frame would cause the encoded stream to be larger then a
    chosen data limit then the frame will be skipped. Possible values
    are:


.. tabularcolumns:: |p{9.4cm}|p{8.1cm}|

.. raw:: latex

    \small

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED``
      - Frame skip mode is disabled.
    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``
      - Frame skip mode enabled and buffer limit is set by the chosen
	level and is defined by the standard.
    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``
      - Frame skip mode enabled and buffer limit is set by the VBV
	(MPEG1/2/4) or CPB (H264) buffer size control.

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
    Enable rate-control with fixed target bit. If this setting is
    enabled, then the rate control logic of the encoder will calculate
    the average bitrate for a GOP and keep it below or equal the set
    bitrate target. Otherwise the rate control logic calculates the
    overall average bitrate for the stream and keeps it below or equal
    to the set bitrate. In the first case the average bitrate for the
    whole stream will be smaller then the set bitrate. This is caused
    because the average is calculated for smaller number of frames, on
    the other hand enabling this setting will ensure that the stream
    will meet tight bandwidth constraints. Applicable to encoders.

.. _v4l2-mpeg-mfc51-video-force-frame-type:

``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
    (enum)

enum v4l2_mpeg_mfc51_video_force_frame_type -
    Force a frame type for the next queued buffer. Applicable to
    encoders. Possible values are:

.. tabularcolumns:: |p{9.9cm}|p{7.6cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
      - Forcing a specific frame type disabled.
    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
      - Force an I-frame.
    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
      - Force a non-coded frame.


CX2341x MPEG Controls
=====================

The following MPEG class controls deal with MPEG encoding settings that
are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.

CX2341x 전용 filter 제어

1862-2051

CX2341x spatial filter mode는 수동 또는 자동 강도 선택을 정하고 spatial-filter 값은 0~15 범위에서 공간 노이즈 감소 강도를 설정합니다.

Luma spatial filter type은 off, 1D horizontal, 1D vertical, 2D H/V separable, 2D symmetric non-separable을 선택하고 chroma filter type은 off 또는 1D horizontal을 선택합니다.

Temporal filter mode와 0~31 강도는 시간축 노이즈 감소를 제어합니다. Median filter type은 off, horizontal, vertical, H/V, diagonal 중 하나를 선택하며 luma/chroma top·bottom threshold로 적용 범위를 정합니다.

`V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS`는 MPEG stream에 DVD navigation packet을 삽입할지 설정합니다.

CX2341x 제어와 enum
제어·상수한국어 설명
`V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE`CX2341x 전용 cid mpeg cx2341x video spatial filter mode filter 제어입니다.
`V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL`mpeg cx2341x video spatial filter mode manual CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO`mpeg cx2341x video spatial filter mode auto CX2341x filter 선택값입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER`CX2341x 전용 cid mpeg cx2341x video spatial filter filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE`CX2341x 전용 cid mpeg cx2341x video luma spatial filter type filter 제어입니다.
`V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF`mpeg cx2341x video luma spatial filter type off CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR`mpeg cx2341x video luma spatial filter type 1d hor CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT`mpeg cx2341x video luma spatial filter type 1d vert CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE`mpeg cx2341x video luma spatial filter type 2d hv separable CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE`mpeg cx2341x video luma spatial filter type 2d sym non separable CX2341x filter 선택값입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE`CX2341x 전용 cid mpeg cx2341x video chroma spatial filter type filter 제어입니다.
`V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF`mpeg cx2341x video chroma spatial filter type off CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR`mpeg cx2341x video chroma spatial filter type 1d hor CX2341x filter 선택값입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE`CX2341x 전용 cid mpeg cx2341x video temporal filter mode filter 제어입니다.
`V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL`mpeg cx2341x video temporal filter mode manual CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO`mpeg cx2341x video temporal filter mode auto CX2341x filter 선택값입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER`CX2341x 전용 cid mpeg cx2341x video temporal filter filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE`CX2341x 전용 cid mpeg cx2341x video median filter type filter 제어입니다.
`V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF`mpeg cx2341x video median filter type off CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR`mpeg cx2341x video median filter type hor CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT`mpeg cx2341x video median filter type vert CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT`mpeg cx2341x video median filter type hor vert CX2341x filter 선택값입니다.
`V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG`mpeg cx2341x video median filter type diag CX2341x filter 선택값입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM`CX2341x 전용 cid mpeg cx2341x video luma median filter bottom filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP`CX2341x 전용 cid mpeg cx2341x video luma median filter top filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM`CX2341x 전용 cid mpeg cx2341x video chroma median filter bottom filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP`CX2341x 전용 cid mpeg cx2341x video chroma median filter top filter 제어입니다.
`V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS`CX2341x 전용 cid mpeg cx2341x stream insert nav packets filter 제어입니다.

Spatial, temporal, median filter와 navigation packet 상수 전체입니다.

CX2341x noise filter
Spatial filter auto/manual mode 선택Luma·chroma 공간 filter 유형 선택Spatial strength 설정Temporal mode와 strength 설정Median filter와 threshold 설정

공간과 시간 필터를 독립적으로 구성합니다.

.. _cx2341x-control-id:

CX2341x Control IDs
-------------------

.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:

``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
    (enum)

enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
    Sets the Spatial Filter mode (default ``MANUAL``). Possible values
    are:


.. tabularcolumns:: |p{11.5cm}|p{6.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
      - Choose the filter manually
    * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
      - Choose the filter automatically



``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
    The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
    is 0.)

.. _luma-spatial-filter-type:

``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
    (enum)

enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
    Select the algorithm to use for the Luma Spatial Filter (default
    ``1D_HOR``). Possible values:

.. tabularcolumns:: |p{13.1cm}|p{4.4cm}|

.. raw:: latex

    \footnotesize

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
      - No filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
      - One-dimensional horizontal
    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
      - One-dimensional vertical
    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
      - Two-dimensional separable
    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
      - Two-dimensional symmetrical non-separable

.. raw:: latex

    \normalsize

.. _chroma-spatial-filter-type:

``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
    (enum)

enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
    Select the algorithm for the Chroma Spatial Filter (default
    ``1D_HOR``). Possible values are:

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{11.0cm}|p{6.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
      - No filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
      - One-dimensional horizontal

.. raw:: latex

    \normalsize

.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:

``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
    (enum)

enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
    Sets the Temporal Filter mode (default ``MANUAL``). Possible values
    are:

.. raw:: latex

    \footnotesize

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
      - Choose the filter manually
    * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
      - Choose the filter automatically

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
    The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
    is 8 for full-scale capturing and 0 for scaled capturing.)

.. _v4l2-mpeg-cx2341x-video-median-filter-type:

``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
    (enum)

enum v4l2_mpeg_cx2341x_video_median_filter_type -
    Median Filter Type (default ``OFF``). Possible values are:


.. raw:: latex

    \small

.. tabularcolumns:: |p{11.0cm}|p{6.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
      - No filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
      - Horizontal filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
      - Vertical filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
      - Horizontal and vertical filter
    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
      - Diagonal filter

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
    Threshold above which the luminance median filter is enabled
    (default 0)

``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
    Threshold below which the luminance median filter is enabled
    (default 255)

``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
    Threshold above which the chroma median filter is enabled (default
    0)

``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
    Threshold below which the chroma median filter is enabled (default
    255)

``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
    The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
    the stream between every four video frames. The packet size is 2048
    bytes, including the packet_start_code_prefix and stream_id
    fields. The stream_id is 0xBF (private stream 2). The payload
    consists of 0x00 bytes, to be filled in by the application. 0 = do
    not insert, 1 = insert packets.


VPX Control Reference
=====================

The VPX controls include controls for encoding parameters of VPx video
codec.

VPX, VP8과 VP9 제어

2052-2277

VPX partition 제어는 VP8 token partition 수를 1, 2, 4, 8 중 선택합니다. `V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4`는 inverse transform에서 4x4 동작을 제한하는 구현 기능을 설정합니다.

Reference-frame 수는 VP8 encoder가 사용할 LAST, GOLDEN, ALTREF 구성 범위를 선택합니다. Filter level과 sharpness는 loop-filter 강도와 deblocking 효과를 조절합니다.

Golden-frame refresh period는 첫 key frame부터 몇 frame마다 golden frame을 갱신할지 지정합니다. Selection menu는 이전 특정 frame을 사용하거나 refresh-period 규칙을 적용할지 선택합니다.

VPX min/max QP와 I/P frame QP는 VP8 encoder의 양자화 범위와 frame별 값을 설정합니다. 전체 범위와 frame별 값은 일관되어야 합니다.

VP8 profile 0~3과 VP9 profile 0~3은 지원 bit depth와 color format 제약을 선택합니다. VP9 level 1.0부터 6.2까지의 menu는 해상도, sample rate와 bitrate 제약을 나타냅니다.

VPX·VP8·VP9 제어와 enum
제어·상수한국어 설명
`V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS`VP8 token partition 수를 선택합니다.
`V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``cid mpeg video vpx 1 partition` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``cid mpeg video vpx 2 partitions` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``cid mpeg video vpx 4 partitions` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``cid mpeg video vpx 8 partitions` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4``cid mpeg video vpx imd disable 4x4` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES`VP8 encoder가 유지할 reference frame 수를 선택합니다.
`V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``cid mpeg video vpx 1 ref frame` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``cid mpeg video vpx 2 ref frame` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``cid mpeg video vpx 3 ref frame` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS`VP8/VP9 loop-filter level 또는 sharpness를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`VP8 golden frame의 refresh 주기 또는 선택 정책을 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL`VP8 golden frame의 refresh 주기 또는 선택 정책을 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV`VP8 golden frame의 refresh 주기 또는 선택 정책을 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD`VP8 golden frame의 refresh 주기 또는 선택 정책을 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_VP8_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_VP8_PROFILE_0`mpeg video vp8 profile 0 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP8_PROFILE_1`mpeg video vp8 profile 1 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP8_PROFILE_2`mpeg video vp8 profile 2 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP8_PROFILE_3`mpeg video vp8 profile 3 codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_VP9_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_VP9_PROFILE_0`mpeg video vp9 profile 0 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_PROFILE_1`mpeg video vp9 profile 1 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_PROFILE_2`mpeg video vp9 profile 2 codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_PROFILE_3`mpeg video vp9 profile 3 codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_VP9_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_1_0`mpeg video vp9 level 1 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_1_1`mpeg video vp9 level 1 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_2_0`mpeg video vp9 level 2 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_2_1`mpeg video vp9 level 2 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_3_0`mpeg video vp9 level 3 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_3_1`mpeg video vp9 level 3 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_4_0`mpeg video vp9 level 4 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_4_1`mpeg video vp9 level 4 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_5_0`mpeg video vp9 level 5 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_5_1`mpeg video vp9 level 5 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_5_2`mpeg video vp9 level 5 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_6_0`mpeg video vp9 level 6 0 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_6_1`mpeg video vp9 level 6 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_VP9_LEVEL_6_2`mpeg video vp9 level 6 2 codec level 선택값입니다.

Partition, reference, filter, golden frame, QP, profile과 level 상수 전체입니다.

VPX encoder 구성
VP8 또는 VP9 profile 선택VP9이면 level 선택Partition과 reference-frame 수 선택Filter level·sharpness 설정Golden-frame 정책 설정QP 범위와 I/P QP 설정

Partition과 reference 구조를 rate-control 값에 결합합니다.

.. _vpx-control-id:

VPX Control IDs
---------------

.. _v4l2-vpx-num-partitions:

``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
    (enum)

enum v4l2_vp8_num_partitions -
    The number of token partitions to use in VP8 encoder. Possible
    values are:



.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
      - 1 coefficient partition
    * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
      - 2 coefficient partitions
    * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
      - 4 coefficient partitions
    * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
      - 8 coefficient partitions



``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
    Setting this prevents intra 4x4 mode in the intra mode decision.

.. _v4l2-vpx-num-ref-frames:

``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
    (enum)

enum v4l2_vp8_num_ref_frames -
    The number of reference pictures for encoding P frames. Possible
    values are:

.. tabularcolumns:: |p{7.5cm}|p{7.5cm}|

.. raw:: latex

    \small

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
      - Last encoded frame will be searched
    * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
      - Two frames will be searched among the last encoded frame, the
	golden frame and the alternate reference (altref) frame. The
	encoder implementation will decide which two are chosen.
    * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
      - The last encoded frame, the golden frame and the altref frame will
	be searched.

.. raw:: latex

    \normalsize



``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
    Indicates the loop filter level. The adjustment of the loop filter
    level is done via a delta value against a baseline loop filter
    value.

``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
    This parameter affects the loop filter. Anything above zero weakens
    the deblocking effect on the loop filter.

``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
    Sets the refresh period for the golden frame. The period is defined
    in number of frames. For a value of 'n', every nth frame starting
    from the first key frame will be taken as a golden frame. For eg.
    for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
    frame refresh period is set as 4, the frames 0, 4, 8 etc will be
    taken as the golden frames as frame 0 is always a key frame.

.. _v4l2-vpx-golden-frame-sel:

``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
    (enum)

enum v4l2_vp8_golden_frame_sel -
    Selects the golden frame for encoding. Possible values are:

.. raw:: latex

    \scriptsize

.. tabularcolumns:: |p{8.6cm}|p{8.9cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
      - Use the (n-2)th frame as a golden frame, current frame index being
	'n'.
    * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
      - Use the previous specific frame indicated by
	``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
	golden frame.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
    Minimum quantization parameter for VP8.

``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
    Maximum quantization parameter for VP8.

``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for VP8.

``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
    Quantization parameter for a P frame for VP8.

.. _v4l2-mpeg-video-vp8-profile:

``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
    (enum)

enum v4l2_mpeg_video_vp8_profile -
    This control allows selecting the profile for VP8 encoder.
    This is also used to enumerate supported profiles by VP8 encoder or decoder.
    Possible values are:

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
      - Profile 0
    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
      - Profile 1
    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
      - Profile 2
    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
      - Profile 3

.. _v4l2-mpeg-video-vp9-profile:

``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
    (enum)

enum v4l2_mpeg_video_vp9_profile -
    This control allows selecting the profile for VP9 encoder.
    This is also used to enumerate supported profiles by VP9 encoder or decoder.
    Possible values are:

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
      - Profile 0
    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
      - Profile 1
    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
      - Profile 2
    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
      - Profile 3

.. _v4l2-mpeg-video-vp9-level:

``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``

enum v4l2_mpeg_video_vp9_level -
    This control allows selecting the level for VP9 encoder.
    This is also used to enumerate supported levels by VP9 encoder or decoder.
    More information can be found at
    `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``
      - Level 1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``
      - Level 1.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``
      - Level 2
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``
      - Level 2.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``
      - Level 3
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``
      - Level 3.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``
      - Level 4
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``
      - Level 4.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``
      - Level 5
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``
      - Level 5.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``
      - Level 5.2
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``
      - Level 6
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``
      - Level 6.1
    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``
      - Level 6.2


High Efficiency Video Coding (HEVC/H.265) Control Reference
===========================================================

The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
video codec.

HEVC/H.265 encoder 제어

2278-2674

HEVC min/max QP와 I/P/B frame QP, frame 유형별 min/max QP는 8-bit에서 보통 0~51, 10-bit에서 0~63 범위를 사용합니다. 전체 범위와 frame별 범위가 함께 설정되면 두 제약을 모두 만족해야 합니다.

Hierarchical QP를 켜면 hierarchical coding layer별 QP를 설정할 수 있습니다. Coding type은 B 또는 P hierarchy를 선택하고 layer 수는 0~6 범위를 사용하며 layer 0~6 각각에 QP와 bitrate 제어가 제공됩니다.

HEVC profile은 Main, Main Still Picture, Main 10을 선택하고 level은 1.0부터 6.2까지, tier는 Main 또는 High를 선택합니다. Frame-rate resolution은 1초를 나누는 tick 수이며 16-bit unsigned 범위에서 설정합니다.

Maximum partition depth와 loop-filter mode, beta/tc offset은 coding-unit 분할과 deblocking을 조절합니다. Filter는 전체 enable, disable, slice boundary에서 disable 중 지원값을 선택합니다.

Refresh type은 none, CRA, IDR을 선택하고 refresh period는 CRA/IDR picture 사이의 I picture 수를 설정합니다. Type이 none이면 period는 의미가 없습니다.

Lossless CU, constrained intra prediction, wavefront parallel processing, general P/B 결합, temporal ID, strong smoothing, temporal motion-vector prediction과 maximum merge candidate 수를 각각 설정합니다.

WITHOUT_STARTCODE를 켜면 Annex B start code 대신 NAL length field를 출력하며 SIZE_OF_LENGTH_FIELD로 1, 2, 4 byte를 선택합니다. Normal 선택값은 start code pattern을 생성합니다.

Layer별 bitrate, P frame reference 수와 IDR마다 SPS/PPS prepend 여부는 hierarchical stream의 bit 분배와 random access를 구성합니다.

HEVC encoder 제어와 enum
제어·상수한국어 설명
`V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP`해당 codec과 frame 유형의 QP 또는 허용 QP 범위를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP`HEVC hierarchical coding layer의 type, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B`mpeg video hevc hierarchical coding b hierarchical-coding 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P`mpeg video hevc hierarchical coding p hierarchical-coding 선택값입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_PROFILE`해당 코덱의 profile을 선택하거나 지원 profile을 열거합니다.
`V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN`mpeg video hevc profile main codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE`mpeg video hevc profile main still picture codec profile 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10`mpeg video hevc profile main 10 codec profile 선택값입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_LEVEL`해당 코덱의 level을 선택하거나 지원 level을 열거합니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_1`mpeg video hevc level 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_2`mpeg video hevc level 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1`mpeg video hevc level 2 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_3`mpeg video hevc level 3 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1`mpeg video hevc level 3 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_4`mpeg video hevc level 4 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1`mpeg video hevc level 4 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_5`mpeg video hevc level 5 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1`mpeg video hevc level 5 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2`mpeg video hevc level 5 2 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_6`mpeg video hevc level 6 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1`mpeg video hevc level 6 1 codec level 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2`mpeg video hevc level 6 2 codec level 선택값입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION`HEVC encoder의 cid mpeg video hevc frame rate resolution 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_TIER`HEVC Main 또는 High tier를 선택합니다.
`V4L2_MPEG_VIDEO_HEVC_TIER_MAIN`mpeg video hevc tier main HEVC tier입니다.
`V4L2_MPEG_VIDEO_HEVC_TIER_HIGH`mpeg video hevc tier high HEVC tier입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH`HEVC encoder의 cid mpeg video hevc max partition depth 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE`H.264 또는 HEVC in-loop deblocking filter의 mode와 offset을 설정합니다.
`V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED`mpeg video hevc loop filter mode disabled loop-filter mode입니다.
`V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED`mpeg video hevc loop filter mode enabled loop-filter mode입니다.
`V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`mpeg video hevc loop filter mode disabled at slice boundary loop-filter mode입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2`HEVC encoder의 cid mpeg video hevc lf beta offset div2 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2`HEVC encoder의 cid mpeg video hevc lf tc offset div2 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE`HEVC CRA/IDR refresh 유형과 주기를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD`HEVC CRA/IDR refresh 유형과 주기를 설정합니다.
`V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE`mpeg video hevc refresh none HEVC refresh 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA`mpeg video hevc refresh cra HEVC refresh 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR`mpeg video hevc refresh idr HEVC refresh 선택값입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU`HEVC encoder의 cid mpeg video hevc lossless cu 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED`HEVC encoder의 cid mpeg video hevc const intra pred 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT`HEVC encoder의 cid mpeg video hevc wavefront 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB`HEVC encoder의 cid mpeg video hevc general pb 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID`HEVC encoder의 cid mpeg video hevc temporal id 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING`HEVC encoder의 cid mpeg video hevc strong smoothing 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1`HEVC encoder의 cid mpeg video hevc max num merge mv minus1 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION`HEVC encoder의 cid mpeg video hevc tmv prediction 기능 또는 파라미터를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE`HEVC stream을 start code 대신 length field 형식으로 생성합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD`Start code 대신 사용할 NAL length field의 크기를 선택합니다.
`V4L2_MPEG_VIDEO_HEVC_SIZE_0`mpeg video hevc size 0 HEVC 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_SIZE_1`mpeg video hevc size 1 HEVC 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_SIZE_2`mpeg video hevc size 2 HEVC 선택값입니다.
`V4L2_MPEG_VIDEO_HEVC_SIZE_4`mpeg video hevc size 4 HEVC 선택값입니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR`Hierarchical P/B coding의 활성화, 유형, layer, QP 또는 bitrate를 설정합니다.
`V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES``cid mpeg video ref number for pframes` 기능을 설정하는 V4L2 codec 제어 ID입니다.
`V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR`각 key/IDR frame에 sequence header 또는 SPS/PPS를 반복 삽입합니다.

QP, hierarchy, profile/level/tier, filter, refresh, coding tool와 NAL framing 상수 전체입니다.

HEVC encoder 구성
Profile·level·tier 선택QP 전체 및 I/P/B 범위 설정Hierarchical type·layer·QP·bitrate 설정Partition·loop filter·refresh 설정Prediction·wavefront·smoothing 도구 선택Start-code 또는 length-field 형식 선택Reference 수와 SPS/PPS prepend 설정

Profile 제약과 계층 rate control, bitstream framing을 순서대로 설정합니다.

.. _hevc-control-id:

HEVC/H.265 Control IDs
----------------------

``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
    Minimum quantization parameter for HEVC.
    Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.

``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
    Maximum quantization parameter for HEVC.
    Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.

``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
    Quantization parameter for an I frame for HEVC.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
    Quantization parameter for a P frame for HEVC.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
    Quantization parameter for a B frame for HEVC.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the HEVC I frame to limit I frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the HEVC I frame to limit I frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the HEVC P frame to limit P frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the HEVC P frame to limit P frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)``
    Minimum quantization parameter for the HEVC B frame to limit B frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)``
    Maximum quantization parameter for the HEVC B frame to limit B frame
    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
    should be chosen to meet both requirements.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
    HIERARCHICAL_QP allows the host to specify the quantization parameter
    values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
    valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
    control value to 1 enables setting of the QP values for the layers.

.. _v4l2-hevc-hier-coding-type:

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
    (enum)

enum v4l2_mpeg_video_hevc_hier_coding_type -
    Selects the hierarchical coding type for encoding. Possible values are:

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{8.2cm}|p{9.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
      - Use the B frame for hierarchical coding.
    * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
      - Use the P frame for hierarchical coding.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
    Selects the hierarchical coding layer. In normal encoding
    (non-hierarchial coding), it should be zero. Possible values are [0, 6].
    0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
    LAYER 1 and so on.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 0.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 1.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 2.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 3.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 4.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 5.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
    Indicates quantization parameter for hierarchical coding layer 6.
    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].

.. _v4l2-hevc-profile:

``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
    (enum)

enum v4l2_mpeg_video_hevc_profile -
    Select the desired profile for HEVC encoder.

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
      - Main profile.
    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
      - Main still picture profile.
    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
      - Main 10 profile.

.. raw:: latex

    \normalsize


.. _v4l2-hevc-level:

``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
    (enum)

enum v4l2_mpeg_video_hevc_level -
    Selects the desired level for HEVC encoder.

==================================	=========
``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``	Level 1.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``	Level 2.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``	Level 2.1
``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``	Level 3.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``	Level 3.1
``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``	Level 4.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``	Level 4.1
``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``	Level 5.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``	Level 5.1
``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``	Level 5.2
``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``	Level 6.0
``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``	Level 6.1
``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``	Level 6.2
==================================	=========

``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
    Indicates the number of evenly spaced subintervals, called ticks, within
    one second. This is a 16 bit unsigned integer and has a maximum value up to
    0xffff and a minimum value of 1.

.. _v4l2-hevc-tier:

``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
    (enum)

enum v4l2_mpeg_video_hevc_tier -
    TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
    were made to deal with applications that differ in terms of maximum bit
    rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
    this flag to 1 indicates High tier. High tier is for applications requiring
    high bit rates.

==================================	==========
``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``	Main tier.
``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``	High tier.
==================================	==========


``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
    Selects HEVC maximum coding unit depth.

.. _v4l2-hevc-loop-filter-mode:

``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
    (enum)

enum v4l2_mpeg_video_hevc_loop_filter_mode -
    Loop filter mode for HEVC encoder. Possible values are:

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{12.1cm}|p{5.4cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
      - Loop filter is disabled.
    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
      - Loop filter is enabled.
    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
      - Loop filter is disabled at the slice boundary.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
    Selects HEVC loop filter beta offset. The valid range is [-6, +6].

``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
    Selects HEVC loop filter tc offset. The valid range is [-6, +6].

.. _v4l2-hevc-refresh-type:

``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
    (enum)

enum v4l2_mpeg_video_hevc_hier_refresh_type -
    Selects refresh type for HEVC encoder.
    Host has to specify the period into
    V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{6.2cm}|p{11.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
      - Use the B frame for hierarchical coding.
    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
      - Use CRA (Clean Random Access Unit) picture encoding.
    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
      - Use IDR (Instantaneous Decoding Refresh) picture encoding.

.. raw:: latex

    \normalsize


``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
    Selects the refresh period for HEVC encoder.
    This specifies the number of I pictures between two CRA/IDR pictures.
    This is valid only if REFRESH_TYPE is not 0.

``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
    Indicates HEVC lossless encoding. Setting it to 0 disables lossless
    encoding. Setting it to 1 enables lossless encoding.

``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
    Indicates constant intra prediction for HEVC encoder. Specifies the
    constrained intra prediction in which intra largest coding unit (LCU)
    prediction is performed by using residual data and decoded samples of
    neighboring intra LCU only. Setting the value to 1 enables constant intra
    prediction and setting the value to 0 disables constant intra prediction.

``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
    Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
    disables the feature and setting it to 1 enables the wavefront parallel
    processing.

``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
    Setting the value to 1 enables combination of P and B frame for HEVC
    encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
    Indicates temporal identifier for HEVC encoder which is enabled by
    setting the value to 1.

``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
    Indicates bi-linear interpolation is conditionally used in the intra
    prediction filtering process in the CVS when set to 1. Indicates bi-linear
    interpolation is not used in the CVS when set to 0.

``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
    Indicates maximum number of merge candidate motion vectors.
    Values are from 0 to 4.

``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
    Indicates temporal motion vector prediction for HEVC encoder. Setting it to
    1 enables the prediction. Setting it to 0 disables the prediction.

``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
    Specifies if HEVC generates a stream with a size of the length field
    instead of start code pattern. The size of the length field is configurable
    through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
    the value to 0 disables encoding without startcode pattern. Setting the
    value to 1 will enables encoding without startcode pattern.

.. _v4l2-hevc-size-of-length-field:

``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
(enum)

enum v4l2_mpeg_video_hevc_size_of_length_field -
    Indicates the size of length field.
    This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.

.. raw:: latex

    \footnotesize

.. tabularcolumns:: |p{5.5cm}|p{12.0cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
      - Generate start code pattern (Normal).
    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
      - Generate size of length field instead of start code pattern and length is 1.
    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
      - Generate size of length field instead of start code pattern and length is 2.
    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
      - Generate size of length field instead of start code pattern and length is 4.

.. raw:: latex

    \normalsize

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
    Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
    Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
    Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
    Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
    Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
    Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
    Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.

``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
    Selects number of P reference pictures required for HEVC encoder.
    P-Frame can use 1 or 2 frames for reference.

``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
    Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
    disables generating SPS and PPS at every IDR. Setting it to one enables
    generating SPS and PPS at every IDR.