media: docs: ext-ctrls-codec: Document cyclic intra-refresh zero control value
[linux-2.6-microblaze.git] / Documentation / userspace-api / media / v4l / ext-ctrls-codec.rst
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)
1011
1012
1013 .. raw:: latex
1014
1015     \normalsize
1016
1017 .. _v4l2-mpeg-video-mpeg4-profile:
1018
1019 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
1020     (enum)
1021
1022 enum v4l2_mpeg_video_mpeg4_profile -
1023     The profile information for MPEG4. Applicable to the MPEG4 encoder.
1024     Possible values are:
1025
1026 .. raw:: latex
1027
1028     \small
1029
1030 .. tabularcolumns:: |p{11.8cm}|p{5.7cm}|
1031
1032 .. flat-table::
1033     :header-rows:  0
1034     :stub-columns: 0
1035
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
1046
1047 .. raw:: latex
1048
1049     \normalsize
1050
1051 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
1052     The maximum number of reference pictures used for encoding.
1053     Applicable to the encoder.
1054
1055 .. _v4l2-mpeg-video-multi-slice-mode:
1056
1057 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
1058     (enum)
1059
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:
1063
1064
1065
1066 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1067
1068 .. flat-table::
1069     :header-rows:  0
1070     :stub-columns: 0
1071
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.
1078
1079
1080
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.
1086
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.
1092
1093 .. _v4l2-mpeg-video-h264-loop-filter-mode:
1094
1095 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
1096     (enum)
1097
1098 enum v4l2_mpeg_video_h264_loop_filter_mode -
1099     Loop filter mode for H264 encoder. Possible values are:
1100
1101 .. raw:: latex
1102
1103     \small
1104
1105 .. tabularcolumns:: |p{13.5cm}|p{4.0cm}|
1106
1107 .. flat-table::
1108     :header-rows:  0
1109     :stub-columns: 0
1110
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.
1117
1118 .. raw:: latex
1119
1120     \normalsize
1121
1122
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.
1129
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.
1136
1137 .. _v4l2-mpeg-video-h264-entropy-mode:
1138
1139 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1140     (enum)
1141
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:
1145
1146
1147 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1148
1149
1150 .. flat-table::
1151     :header-rows:  0
1152     :stub-columns: 0
1153
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.
1158
1159
1160
1161 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1162     Enable 8X8 transform for H264. Applicable to the H264 encoder.
1163
1164 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1165     Enable constrained intra prediction for H264. Applicable to the H264
1166     encoder.
1167
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.
1172
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.
1179     Applicable to H264, H263 and MPEG4 encoder.
1180
1181 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1182     Frame level rate control enable. If this control is disabled then
1183     the quantization parameter for each frame type is constant and set
1184     with appropriate controls (e.g.
1185     ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1186     enabled then quantization parameter is adjusted to meet the chosen
1187     bitrate. Minimum and maximum value for the quantization parameter
1188     can be set with appropriate controls (e.g.
1189     ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1190
1191 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1192     Macroblock level rate control enable. Applicable to the MPEG4 and
1193     H264 encoders.
1194
1195 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1196     Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1197     encoder.
1198
1199 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1200     Quantization parameter for an I frame for H263. Valid range: from 1
1201     to 31.
1202
1203 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1204     Minimum quantization parameter for H263. Valid range: from 1 to 31.
1205
1206 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1207     Maximum quantization parameter for H263. Valid range: from 1 to 31.
1208
1209 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1210     Quantization parameter for an P frame for H263. Valid range: from 1
1211     to 31.
1212
1213 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1214     Quantization parameter for an B frame for H263. Valid range: from 1
1215     to 31.
1216
1217 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1218     Quantization parameter for an I frame for H264. Valid range: from 0
1219     to 51.
1220
1221 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1222     Minimum quantization parameter for H264. Valid range: from 0 to 51.
1223
1224 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1225     Maximum quantization parameter for H264. Valid range: from 0 to 51.
1226
1227 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1228     Quantization parameter for an P frame for H264. Valid range: from 0
1229     to 51.
1230
1231 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1232     Quantization parameter for an B frame for H264. Valid range: from 0
1233     to 51.
1234
1235 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1236     Minimum quantization parameter for the H264 I frame to limit I frame
1237     quality to a range. Valid range: from 0 to 51. If
1238     V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1239     should be chosen to meet both requirements.
1240
1241 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1242     Maximum quantization parameter for the H264 I frame to limit I frame
1243     quality to a range. Valid range: from 0 to 51. If
1244     V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1245     should be chosen to meet both requirements.
1246
1247 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1248     Minimum quantization parameter for the H264 P frame to limit P frame
1249     quality to a range. Valid range: from 0 to 51. If
1250     V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1251     should be chosen to meet both requirements.
1252
1253 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1254     Maximum quantization parameter for the H264 P frame to limit P frame
1255     quality to a range. Valid range: from 0 to 51. If
1256     V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1257     should be chosen to meet both requirements.
1258
1259 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)``
1260     Minimum quantization parameter for the H264 B frame to limit B frame
1261     quality to a range. Valid range: from 0 to 51. If
1262     V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1263     should be chosen to meet both requirements.
1264
1265 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)``
1266     Maximum quantization parameter for the H264 B frame to limit B frame
1267     quality to a range. Valid range: from 0 to 51. If
1268     V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1269     should be chosen to meet both requirements.
1270
1271 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1272     Quantization parameter for an I frame for MPEG4. Valid range: from 1
1273     to 31.
1274
1275 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1276     Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1277
1278 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1279     Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1280
1281 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1282     Quantization parameter for an P frame for MPEG4. Valid range: from 1
1283     to 31.
1284
1285 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1286     Quantization parameter for an B frame for MPEG4. Valid range: from 1
1287     to 31.
1288
1289 .. _v4l2-mpeg-video-vbv-size:
1290
1291 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1292     The Video Buffer Verifier size in kilobytes, it is used as a
1293     limitation of frame skip. The VBV is defined in the standard as a
1294     mean to verify that the produced stream will be successfully
1295     decoded. The standard describes it as "Part of a hypothetical
1296     decoder that is conceptually connected to the output of the encoder.
1297     Its purpose is to provide a constraint on the variability of the
1298     data rate that an encoder or editing process may produce.".
1299     Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1300
1301 .. _v4l2-mpeg-video-vbv-delay:
1302
1303 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1304     Sets the initial delay in milliseconds for VBV buffer control.
1305
1306 .. _v4l2-mpeg-video-hor-search-range:
1307
1308 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1309     Horizontal search range defines maximum horizontal search area in
1310     pixels to search and match for the present Macroblock (MB) in the
1311     reference picture. This V4L2 control macro is used to set horizontal
1312     search range for motion estimation module in video encoder.
1313
1314 .. _v4l2-mpeg-video-vert-search-range:
1315
1316 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1317     Vertical search range defines maximum vertical search area in pixels
1318     to search and match for the present Macroblock (MB) in the reference
1319     picture. This V4L2 control macro is used to set vertical search
1320     range for motion estimation module in video encoder.
1321
1322 .. _v4l2-mpeg-video-force-key-frame:
1323
1324 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1325     Force a key frame for the next queued buffer. Applicable to
1326     encoders. This is a general, codec-agnostic keyframe control.
1327
1328 .. _v4l2-mpeg-video-h264-cpb-size:
1329
1330 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1331     The Coded Picture Buffer size in kilobytes, it is used as a
1332     limitation of frame skip. The CPB is defined in the H264 standard as
1333     a mean to verify that the produced stream will be successfully
1334     decoded. Applicable to the H264 encoder.
1335
1336 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1337     Period between I-frames in the open GOP for H264. In case of an open
1338     GOP this is the period between two I-frames. The period between IDR
1339     (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1340     control. An IDR frame, which stands for Instantaneous Decoding
1341     Refresh is an I-frame after which no prior frames are referenced.
1342     This means that a stream can be restarted from an IDR frame without
1343     the need to store or decode any previous frames. Applicable to the
1344     H264 encoder.
1345
1346 .. _v4l2-mpeg-video-header-mode:
1347
1348 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1349     (enum)
1350
1351 enum v4l2_mpeg_video_header_mode -
1352     Determines whether the header is returned as the first buffer or is
1353     it returned together with the first frame. Applicable to encoders.
1354     Possible values are:
1355
1356 .. raw:: latex
1357
1358     \small
1359
1360 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1361
1362 .. flat-table::
1363     :header-rows:  0
1364     :stub-columns: 0
1365
1366     * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1367       - The stream header is returned separately in the first buffer.
1368     * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1369       - The stream header is returned together with the first encoded
1370         frame.
1371
1372 .. raw:: latex
1373
1374     \normalsize
1375
1376
1377 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1378     Repeat the video sequence headers. Repeating these headers makes
1379     random access to the video stream easier. Applicable to the MPEG1, 2
1380     and 4 encoder.
1381
1382 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1383     Enabled the deblocking post processing filter for MPEG4 decoder.
1384     Applicable to the MPEG4 decoder.
1385
1386 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1387     vop_time_increment_resolution value for MPEG4. Applicable to the
1388     MPEG4 encoder.
1389
1390 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1391     vop_time_increment value for MPEG4. Applicable to the MPEG4
1392     encoder.
1393
1394 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1395     Enable generation of frame packing supplemental enhancement
1396     information in the encoded bitstream. The frame packing SEI message
1397     contains the arrangement of L and R planes for 3D viewing.
1398     Applicable to the H264 encoder.
1399
1400 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1401     Sets current frame as frame0 in frame packing SEI. Applicable to the
1402     H264 encoder.
1403
1404 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1405
1406 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1407     (enum)
1408
1409 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1410     Frame packing arrangement type for H264 SEI. Applicable to the H264
1411     encoder. Possible values are:
1412
1413 .. raw:: latex
1414
1415     \small
1416
1417 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1418
1419 .. flat-table::
1420     :header-rows:  0
1421     :stub-columns: 0
1422
1423     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1424       - Pixels are alternatively from L and R.
1425     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1426       - L and R are interlaced by column.
1427     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1428       - L and R are interlaced by row.
1429     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1430       - L is on the left, R on the right.
1431     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1432       - L is on top, R on bottom.
1433     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1434       - One view per frame.
1435
1436 .. raw:: latex
1437
1438     \normalsize
1439
1440
1441
1442 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1443     Enables flexible macroblock ordering in the encoded bitstream. It is
1444     a technique used for restructuring the ordering of macroblocks in
1445     pictures. Applicable to the H264 encoder.
1446
1447 .. _v4l2-mpeg-video-h264-fmo-map-type:
1448
1449 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1450    (enum)
1451
1452 enum v4l2_mpeg_video_h264_fmo_map_type -
1453     When using FMO, the map type divides the image in different scan
1454     patterns of macroblocks. Applicable to the H264 encoder. Possible
1455     values are:
1456
1457 .. raw:: latex
1458
1459     \small
1460
1461 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1462
1463 .. flat-table::
1464     :header-rows:  0
1465     :stub-columns: 0
1466
1467     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1468       - Slices are interleaved one after other with macroblocks in run
1469         length order.
1470     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1471       - Scatters the macroblocks based on a mathematical function known to
1472         both encoder and decoder.
1473     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1474       - Macroblocks arranged in rectangular areas or regions of interest.
1475     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1476       - Slice groups grow in a cyclic way from centre to outwards.
1477     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1478       - Slice groups grow in raster scan pattern from left to right.
1479     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1480       - Slice groups grow in wipe scan pattern from top to bottom.
1481     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1482       - User defined map type.
1483
1484 .. raw:: latex
1485
1486     \normalsize
1487
1488
1489
1490 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1491     Number of slice groups in FMO. Applicable to the H264 encoder.
1492
1493 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1494
1495 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1496     (enum)
1497
1498 enum v4l2_mpeg_video_h264_fmo_change_dir -
1499     Specifies a direction of the slice group change for raster and wipe
1500     maps. Applicable to the H264 encoder. Possible values are:
1501
1502 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1503
1504 .. flat-table::
1505     :header-rows:  0
1506     :stub-columns: 0
1507
1508     * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1509       - Raster scan or wipe right.
1510     * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1511       - Reverse raster scan or wipe left.
1512
1513
1514
1515 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1516     Specifies the size of the first slice group for raster and wipe map.
1517     Applicable to the H264 encoder.
1518
1519 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1520     Specifies the number of consecutive macroblocks for the interleaved
1521     map. Applicable to the H264 encoder.
1522
1523 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1524     Enables arbitrary slice ordering in encoded bitstream. Applicable to
1525     the H264 encoder.
1526
1527 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1528     Specifies the slice order in ASO. Applicable to the H264 encoder.
1529     The supplied 32-bit integer is interpreted as follows (bit 0 = least
1530     significant bit):
1531
1532
1533
1534 .. flat-table::
1535     :header-rows:  0
1536     :stub-columns: 0
1537
1538     * - Bit 0:15
1539       - Slice ID
1540     * - Bit 16:32
1541       - Slice position or order
1542
1543
1544
1545 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1546     Enables H264 hierarchical coding. Applicable to the H264 encoder.
1547
1548 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1549
1550 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1551     (enum)
1552
1553 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1554     Specifies the hierarchical coding type. Applicable to the H264
1555     encoder. Possible values are:
1556
1557
1558
1559 .. flat-table::
1560     :header-rows:  0
1561     :stub-columns: 0
1562
1563     * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1564       - Hierarchical B coding.
1565     * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1566       - Hierarchical P coding.
1567
1568
1569
1570 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1571     Specifies the number of hierarchical coding layers. Applicable to
1572     the H264 encoder.
1573
1574 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1575     Specifies a user defined QP for each layer. Applicable to the H264
1576     encoder. The supplied 32-bit integer is interpreted as follows (bit
1577     0 = least significant bit):
1578
1579
1580
1581 .. flat-table::
1582     :header-rows:  0
1583     :stub-columns: 0
1584
1585     * - Bit 0:15
1586       - QP value
1587     * - Bit 16:32
1588       - Layer number
1589
1590 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)``
1591     Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder.
1592
1593 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)``
1594     Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder.
1595
1596 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)``
1597     Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder.
1598
1599 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)``
1600     Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder.
1601
1602 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)``
1603     Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder.
1604
1605 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)``
1606     Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder.
1607
1608 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``
1609     Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.
1610
1611 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
1612     Quantization parameter for an I frame for FWHT. Valid range: from 1
1613     to 31.
1614
1615 ``V4L2_CID_FWHT_P_FRAME_QP (integer)``
1616     Quantization parameter for a P frame for FWHT. Valid range: from 1
1617     to 31.
1618
1619 .. raw:: latex
1620
1621     \normalsize
1622
1623
1624 MFC 5.1 MPEG Controls
1625 =====================
1626
1627 The following MPEG class controls deal with MPEG decoding and encoding
1628 settings that are specific to the Multi Format Codec 5.1 device present
1629 in the S5P family of SoCs by Samsung.
1630
1631
1632 .. _mfc51-control-id:
1633
1634 MFC 5.1 Control IDs
1635 -------------------
1636
1637 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
1638     If the display delay is enabled then the decoder is forced to return
1639     a CAPTURE buffer (decoded frame) after processing a certain number
1640     of OUTPUT buffers. The delay can be set through
1641     ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
1642     feature can be used for example for generating thumbnails of videos.
1643     Applicable to the H264 decoder.
1644
1645     .. note::
1646
1647        This control is deprecated. Use the standard
1648        ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead.
1649
1650 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
1651     Display delay value for H264 decoder. The decoder is forced to
1652     return a decoded frame after the set 'display delay' number of
1653     frames. If this number is low it may result in frames returned out
1654     of display order, in addition the hardware may still be using the
1655     returned buffer as a reference picture for subsequent frames.
1656
1657     .. note::
1658
1659        This control is deprecated. Use the standard
1660        ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead.
1661
1662 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
1663     The number of reference pictures used for encoding a P picture.
1664     Applicable to the H264 encoder.
1665
1666 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
1667     Padding enable in the encoder - use a color instead of repeating
1668     border pixels. Applicable to encoders.
1669
1670 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
1671     Padding color in the encoder. Applicable to encoders. The supplied
1672     32-bit integer is interpreted as follows (bit 0 = least significant
1673     bit):
1674
1675
1676
1677 .. flat-table::
1678     :header-rows:  0
1679     :stub-columns: 0
1680
1681     * - Bit 0:7
1682       - V chrominance information
1683     * - Bit 8:15
1684       - U chrominance information
1685     * - Bit 16:23
1686       - Y luminance information
1687     * - Bit 24:31
1688       - Must be zero.
1689
1690
1691
1692 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
1693     Reaction coefficient for MFC rate control. Applicable to encoders.
1694
1695     .. note::
1696
1697        #. Valid only when the frame level RC is enabled.
1698
1699        #. For tight CBR, this field must be small (ex. 2 ~ 10). For
1700           VBR, this field must be large (ex. 100 ~ 1000).
1701
1702        #. It is not recommended to use the greater number than
1703           FRAME_RATE * (10^9 / BIT_RATE).
1704
1705 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
1706     Adaptive rate control for dark region. Valid only when H.264 and
1707     macroblock level RC is enabled
1708     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1709     encoder.
1710
1711 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
1712     Adaptive rate control for smooth region. Valid only when H.264 and
1713     macroblock level RC is enabled
1714     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1715     encoder.
1716
1717 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
1718     Adaptive rate control for static region. Valid only when H.264 and
1719     macroblock level RC is enabled
1720     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1721     encoder.
1722
1723 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
1724     Adaptive rate control for activity region. Valid only when H.264 and
1725     macroblock level RC is enabled
1726     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1727     encoder.
1728
1729 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
1730
1731 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
1732     (enum)
1733
1734     .. note::
1735
1736        This control is deprecated. Use the standard
1737        ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.
1738
1739 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
1740     Indicates in what conditions the encoder should skip frames. If
1741     encoding a frame would cause the encoded stream to be larger then a
1742     chosen data limit then the frame will be skipped. Possible values
1743     are:
1744
1745
1746 .. tabularcolumns:: |p{9.4cm}|p{8.1cm}|
1747
1748 .. raw:: latex
1749
1750     \small
1751
1752 .. flat-table::
1753     :header-rows:  0
1754     :stub-columns: 0
1755
1756     * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED``
1757       - Frame skip mode is disabled.
1758     * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``
1759       - Frame skip mode enabled and buffer limit is set by the chosen
1760         level and is defined by the standard.
1761     * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``
1762       - Frame skip mode enabled and buffer limit is set by the VBV
1763         (MPEG1/2/4) or CPB (H264) buffer size control.
1764
1765 .. raw:: latex
1766
1767     \normalsize
1768
1769 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
1770     Enable rate-control with fixed target bit. If this setting is
1771     enabled, then the rate control logic of the encoder will calculate
1772     the average bitrate for a GOP and keep it below or equal the set
1773     bitrate target. Otherwise the rate control logic calculates the
1774     overall average bitrate for the stream and keeps it below or equal
1775     to the set bitrate. In the first case the average bitrate for the
1776     whole stream will be smaller then the set bitrate. This is caused
1777     because the average is calculated for smaller number of frames, on
1778     the other hand enabling this setting will ensure that the stream
1779     will meet tight bandwidth constraints. Applicable to encoders.
1780
1781 .. _v4l2-mpeg-mfc51-video-force-frame-type:
1782
1783 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
1784     (enum)
1785
1786 enum v4l2_mpeg_mfc51_video_force_frame_type -
1787     Force a frame type for the next queued buffer. Applicable to
1788     encoders. Possible values are:
1789
1790 .. tabularcolumns:: |p{9.9cm}|p{7.6cm}|
1791
1792 .. flat-table::
1793     :header-rows:  0
1794     :stub-columns: 0
1795
1796     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
1797       - Forcing a specific frame type disabled.
1798     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
1799       - Force an I-frame.
1800     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
1801       - Force a non-coded frame.
1802
1803
1804 CX2341x MPEG Controls
1805 =====================
1806
1807 The following MPEG class controls deal with MPEG encoding settings that
1808 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
1809
1810
1811 .. _cx2341x-control-id:
1812
1813 CX2341x Control IDs
1814 -------------------
1815
1816 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
1817
1818 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
1819     (enum)
1820
1821 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
1822     Sets the Spatial Filter mode (default ``MANUAL``). Possible values
1823     are:
1824
1825
1826 .. tabularcolumns:: |p{11.5cm}|p{6.0cm}|
1827
1828 .. flat-table::
1829     :header-rows:  0
1830     :stub-columns: 0
1831
1832     * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
1833       - Choose the filter manually
1834     * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
1835       - Choose the filter automatically
1836
1837
1838
1839 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
1840     The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
1841     is 0.)
1842
1843 .. _luma-spatial-filter-type:
1844
1845 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
1846     (enum)
1847
1848 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
1849     Select the algorithm to use for the Luma Spatial Filter (default
1850     ``1D_HOR``). Possible values:
1851
1852 .. tabularcolumns:: |p{13.1cm}|p{4.4cm}|
1853
1854 .. raw:: latex
1855
1856     \footnotesize
1857
1858 .. flat-table::
1859     :header-rows:  0
1860     :stub-columns: 0
1861
1862     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
1863       - No filter
1864     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
1865       - One-dimensional horizontal
1866     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
1867       - One-dimensional vertical
1868     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
1869       - Two-dimensional separable
1870     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
1871       - Two-dimensional symmetrical non-separable
1872
1873 .. raw:: latex
1874
1875     \normalsize
1876
1877 .. _chroma-spatial-filter-type:
1878
1879 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
1880     (enum)
1881
1882 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
1883     Select the algorithm for the Chroma Spatial Filter (default
1884     ``1D_HOR``). Possible values are:
1885
1886 .. raw:: latex
1887
1888     \footnotesize
1889
1890 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
1891
1892 .. flat-table::
1893     :header-rows:  0
1894     :stub-columns: 0
1895
1896     * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
1897       - No filter
1898     * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
1899       - One-dimensional horizontal
1900
1901 .. raw:: latex
1902
1903     \normalsize
1904
1905 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
1906
1907 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
1908     (enum)
1909
1910 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
1911     Sets the Temporal Filter mode (default ``MANUAL``). Possible values
1912     are:
1913
1914 .. raw:: latex
1915
1916     \footnotesize
1917
1918 .. flat-table::
1919     :header-rows:  0
1920     :stub-columns: 0
1921
1922     * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
1923       - Choose the filter manually
1924     * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
1925       - Choose the filter automatically
1926
1927 .. raw:: latex
1928
1929     \normalsize
1930
1931 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
1932     The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
1933     is 8 for full-scale capturing and 0 for scaled capturing.)
1934
1935 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
1936
1937 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
1938     (enum)
1939
1940 enum v4l2_mpeg_cx2341x_video_median_filter_type -
1941     Median Filter Type (default ``OFF``). Possible values are:
1942
1943
1944 .. raw:: latex
1945
1946     \small
1947
1948 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
1949
1950 .. flat-table::
1951     :header-rows:  0
1952     :stub-columns: 0
1953
1954     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
1955       - No filter
1956     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
1957       - Horizontal filter
1958     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
1959       - Vertical filter
1960     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
1961       - Horizontal and vertical filter
1962     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
1963       - Diagonal filter
1964
1965 .. raw:: latex
1966
1967     \normalsize
1968
1969 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1970     Threshold above which the luminance median filter is enabled
1971     (default 0)
1972
1973 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
1974     Threshold below which the luminance median filter is enabled
1975     (default 255)
1976
1977 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1978     Threshold above which the chroma median filter is enabled (default
1979     0)
1980
1981 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
1982     Threshold below which the chroma median filter is enabled (default
1983     255)
1984
1985 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
1986     The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
1987     the stream between every four video frames. The packet size is 2048
1988     bytes, including the packet_start_code_prefix and stream_id
1989     fields. The stream_id is 0xBF (private stream 2). The payload
1990     consists of 0x00 bytes, to be filled in by the application. 0 = do
1991     not insert, 1 = insert packets.
1992
1993
1994 VPX Control Reference
1995 =====================
1996
1997 The VPX controls include controls for encoding parameters of VPx video
1998 codec.
1999
2000
2001 .. _vpx-control-id:
2002
2003 VPX Control IDs
2004 ---------------
2005
2006 .. _v4l2-vpx-num-partitions:
2007
2008 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
2009     (enum)
2010
2011 enum v4l2_vp8_num_partitions -
2012     The number of token partitions to use in VP8 encoder. Possible
2013     values are:
2014
2015
2016
2017 .. flat-table::
2018     :header-rows:  0
2019     :stub-columns: 0
2020
2021     * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
2022       - 1 coefficient partition
2023     * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
2024       - 2 coefficient partitions
2025     * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
2026       - 4 coefficient partitions
2027     * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
2028       - 8 coefficient partitions
2029
2030
2031
2032 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
2033     Setting this prevents intra 4x4 mode in the intra mode decision.
2034
2035 .. _v4l2-vpx-num-ref-frames:
2036
2037 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
2038     (enum)
2039
2040 enum v4l2_vp8_num_ref_frames -
2041     The number of reference pictures for encoding P frames. Possible
2042     values are:
2043
2044 .. tabularcolumns:: |p{7.5cm}|p{7.5cm}|
2045
2046 .. raw:: latex
2047
2048     \small
2049
2050 .. flat-table::
2051     :header-rows:  0
2052     :stub-columns: 0
2053
2054     * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
2055       - Last encoded frame will be searched
2056     * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
2057       - Two frames will be searched among the last encoded frame, the
2058         golden frame and the alternate reference (altref) frame. The
2059         encoder implementation will decide which two are chosen.
2060     * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
2061       - The last encoded frame, the golden frame and the altref frame will
2062         be searched.
2063
2064 .. raw:: latex
2065
2066     \normalsize
2067
2068
2069
2070 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
2071     Indicates the loop filter level. The adjustment of the loop filter
2072     level is done via a delta value against a baseline loop filter
2073     value.
2074
2075 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
2076     This parameter affects the loop filter. Anything above zero weakens
2077     the deblocking effect on the loop filter.
2078
2079 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
2080     Sets the refresh period for the golden frame. The period is defined
2081     in number of frames. For a value of 'n', every nth frame starting
2082     from the first key frame will be taken as a golden frame. For eg.
2083     for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
2084     frame refresh period is set as 4, the frames 0, 4, 8 etc will be
2085     taken as the golden frames as frame 0 is always a key frame.
2086
2087 .. _v4l2-vpx-golden-frame-sel:
2088
2089 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
2090     (enum)
2091
2092 enum v4l2_vp8_golden_frame_sel -
2093     Selects the golden frame for encoding. Possible values are:
2094
2095 .. raw:: latex
2096
2097     \scriptsize
2098
2099 .. tabularcolumns:: |p{8.6cm}|p{8.9cm}|
2100
2101 .. flat-table::
2102     :header-rows:  0
2103     :stub-columns: 0
2104
2105     * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
2106       - Use the (n-2)th frame as a golden frame, current frame index being
2107         'n'.
2108     * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
2109       - Use the previous specific frame indicated by
2110         ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
2111         golden frame.
2112
2113 .. raw:: latex
2114
2115     \normalsize
2116
2117
2118 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
2119     Minimum quantization parameter for VP8.
2120
2121 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
2122     Maximum quantization parameter for VP8.
2123
2124 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
2125     Quantization parameter for an I frame for VP8.
2126
2127 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
2128     Quantization parameter for a P frame for VP8.
2129
2130 .. _v4l2-mpeg-video-vp8-profile:
2131
2132 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
2133     (enum)
2134
2135 enum v4l2_mpeg_video_vp8_profile -
2136     This control allows selecting the profile for VP8 encoder.
2137     This is also used to enumerate supported profiles by VP8 encoder or decoder.
2138     Possible values are:
2139
2140 .. flat-table::
2141     :header-rows:  0
2142     :stub-columns: 0
2143
2144     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
2145       - Profile 0
2146     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
2147       - Profile 1
2148     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
2149       - Profile 2
2150     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
2151       - Profile 3
2152
2153 .. _v4l2-mpeg-video-vp9-profile:
2154
2155 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
2156     (enum)
2157
2158 enum v4l2_mpeg_video_vp9_profile -
2159     This control allows selecting the profile for VP9 encoder.
2160     This is also used to enumerate supported profiles by VP9 encoder or decoder.
2161     Possible values are:
2162
2163 .. flat-table::
2164     :header-rows:  0
2165     :stub-columns: 0
2166
2167     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
2168       - Profile 0
2169     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
2170       - Profile 1
2171     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
2172       - Profile 2
2173     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
2174       - Profile 3
2175
2176 .. _v4l2-mpeg-video-vp9-level:
2177
2178 ``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``
2179
2180 enum v4l2_mpeg_video_vp9_level -
2181     This control allows selecting the level for VP9 encoder.
2182     This is also used to enumerate supported levels by VP9 encoder or decoder.
2183     More information can be found at
2184     `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:
2185
2186 .. flat-table::
2187     :header-rows:  0
2188     :stub-columns: 0
2189
2190     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``
2191       - Level 1
2192     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``
2193       - Level 1.1
2194     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``
2195       - Level 2
2196     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``
2197       - Level 2.1
2198     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``
2199       - Level 3
2200     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``
2201       - Level 3.1
2202     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``
2203       - Level 4
2204     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``
2205       - Level 4.1
2206     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``
2207       - Level 5
2208     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``
2209       - Level 5.1
2210     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``
2211       - Level 5.2
2212     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``
2213       - Level 6
2214     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``
2215       - Level 6.1
2216     * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``
2217       - Level 6.2
2218
2219
2220 High Efficiency Video Coding (HEVC/H.265) Control Reference
2221 ===========================================================
2222
2223 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
2224 video codec.
2225
2226
2227 .. _hevc-control-id:
2228
2229 HEVC/H.265 Control IDs
2230 ----------------------
2231
2232 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
2233     Minimum quantization parameter for HEVC.
2234     Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2235
2236 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
2237     Maximum quantization parameter for HEVC.
2238     Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2239
2240 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
2241     Quantization parameter for an I frame for HEVC.
2242     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2243     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2244
2245 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
2246     Quantization parameter for a P frame for HEVC.
2247     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2248     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2249
2250 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
2251     Quantization parameter for a B frame for HEVC.
2252     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2253     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2254
2255 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)``
2256     Minimum quantization parameter for the HEVC I frame to limit I frame
2257     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2258     If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2259     should be chosen to meet both requirements.
2260
2261 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)``
2262     Maximum quantization parameter for the HEVC I frame to limit I frame
2263     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2264     If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2265     should be chosen to meet both requirements.
2266
2267 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)``
2268     Minimum quantization parameter for the HEVC P frame to limit P frame
2269     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2270     If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2271     should be chosen to meet both requirements.
2272
2273 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)``
2274     Maximum quantization parameter for the HEVC P frame to limit P frame
2275     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2276     If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2277     should be chosen to meet both requirements.
2278
2279 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)``
2280     Minimum quantization parameter for the HEVC B frame to limit B frame
2281     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2282     If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2283     should be chosen to meet both requirements.
2284
2285 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)``
2286     Maximum quantization parameter for the HEVC B frame to limit B frame
2287     quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2288     If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2289     should be chosen to meet both requirements.
2290
2291 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
2292     HIERARCHICAL_QP allows the host to specify the quantization parameter
2293     values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
2294     valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
2295     control value to 1 enables setting of the QP values for the layers.
2296
2297 .. _v4l2-hevc-hier-coding-type:
2298
2299 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
2300     (enum)
2301
2302 enum v4l2_mpeg_video_hevc_hier_coding_type -
2303     Selects the hierarchical coding type for encoding. Possible values are:
2304
2305 .. raw:: latex
2306
2307     \footnotesize
2308
2309 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
2310
2311 .. flat-table::
2312     :header-rows:  0
2313     :stub-columns: 0
2314
2315     * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
2316       - Use the B frame for hierarchical coding.
2317     * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
2318       - Use the P frame for hierarchical coding.
2319
2320 .. raw:: latex
2321
2322     \normalsize
2323
2324
2325 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
2326     Selects the hierarchical coding layer. In normal encoding
2327     (non-hierarchial coding), it should be zero. Possible values are [0, 6].
2328     0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
2329     LAYER 1 and so on.
2330
2331 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
2332     Indicates quantization parameter for hierarchical coding layer 0.
2333     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2334     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2335
2336 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
2337     Indicates quantization parameter for hierarchical coding layer 1.
2338     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2339     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2340
2341 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
2342     Indicates quantization parameter for hierarchical coding layer 2.
2343     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2344     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2345
2346 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
2347     Indicates quantization parameter for hierarchical coding layer 3.
2348     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2349     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2350
2351 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
2352     Indicates quantization parameter for hierarchical coding layer 4.
2353     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2354     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2355
2356 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
2357     Indicates quantization parameter for hierarchical coding layer 5.
2358     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2359     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2360
2361 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
2362     Indicates quantization parameter for hierarchical coding layer 6.
2363     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2364     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2365
2366 .. _v4l2-hevc-profile:
2367
2368 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
2369     (enum)
2370
2371 enum v4l2_mpeg_video_hevc_profile -
2372     Select the desired profile for HEVC encoder.
2373
2374 .. raw:: latex
2375
2376     \footnotesize
2377
2378 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
2379
2380 .. flat-table::
2381     :header-rows:  0
2382     :stub-columns: 0
2383
2384     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
2385       - Main profile.
2386     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
2387       - Main still picture profile.
2388     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
2389       - Main 10 profile.
2390
2391 .. raw:: latex
2392
2393     \normalsize
2394
2395
2396 .. _v4l2-hevc-level:
2397
2398 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
2399     (enum)
2400
2401 enum v4l2_mpeg_video_hevc_level -
2402     Selects the desired level for HEVC encoder.
2403
2404 ==================================      =========
2405 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``        Level 1.0
2406 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``        Level 2.0
2407 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``      Level 2.1
2408 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``        Level 3.0
2409 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``      Level 3.1
2410 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``        Level 4.0
2411 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``      Level 4.1
2412 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``        Level 5.0
2413 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``      Level 5.1
2414 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``      Level 5.2
2415 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``        Level 6.0
2416 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``      Level 6.1
2417 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``      Level 6.2
2418 ==================================      =========
2419
2420 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
2421     Indicates the number of evenly spaced subintervals, called ticks, within
2422     one second. This is a 16 bit unsigned integer and has a maximum value up to
2423     0xffff and a minimum value of 1.
2424
2425 .. _v4l2-hevc-tier:
2426
2427 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
2428     (enum)
2429
2430 enum v4l2_mpeg_video_hevc_tier -
2431     TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
2432     were made to deal with applications that differ in terms of maximum bit
2433     rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
2434     this flag to 1 indicates High tier. High tier is for applications requiring
2435     high bit rates.
2436
2437 ==================================      ==========
2438 ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``      Main tier.
2439 ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``      High tier.
2440 ==================================      ==========
2441
2442
2443 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
2444     Selects HEVC maximum coding unit depth.
2445
2446 .. _v4l2-hevc-loop-filter-mode:
2447
2448 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
2449     (enum)
2450
2451 enum v4l2_mpeg_video_hevc_loop_filter_mode -
2452     Loop filter mode for HEVC encoder. Possible values are:
2453
2454 .. raw:: latex
2455
2456     \footnotesize
2457
2458 .. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
2459
2460 .. flat-table::
2461     :header-rows:  0
2462     :stub-columns: 0
2463
2464     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
2465       - Loop filter is disabled.
2466     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
2467       - Loop filter is enabled.
2468     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
2469       - Loop filter is disabled at the slice boundary.
2470
2471 .. raw:: latex
2472
2473     \normalsize
2474
2475
2476 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
2477     Selects HEVC loop filter beta offset. The valid range is [-6, +6].
2478
2479 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
2480     Selects HEVC loop filter tc offset. The valid range is [-6, +6].
2481
2482 .. _v4l2-hevc-refresh-type:
2483
2484 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
2485     (enum)
2486
2487 enum v4l2_mpeg_video_hevc_hier_refresh_type -
2488     Selects refresh type for HEVC encoder.
2489     Host has to specify the period into
2490     V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
2491
2492 .. raw:: latex
2493
2494     \footnotesize
2495
2496 .. tabularcolumns:: |p{6.2cm}|p{11.3cm}|
2497
2498 .. flat-table::
2499     :header-rows:  0
2500     :stub-columns: 0
2501
2502     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
2503       - Use the B frame for hierarchical coding.
2504     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
2505       - Use CRA (Clean Random Access Unit) picture encoding.
2506     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
2507       - Use IDR (Instantaneous Decoding Refresh) picture encoding.
2508
2509 .. raw:: latex
2510
2511     \normalsize
2512
2513
2514 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
2515     Selects the refresh period for HEVC encoder.
2516     This specifies the number of I pictures between two CRA/IDR pictures.
2517     This is valid only if REFRESH_TYPE is not 0.
2518
2519 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
2520     Indicates HEVC lossless encoding. Setting it to 0 disables lossless
2521     encoding. Setting it to 1 enables lossless encoding.
2522
2523 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
2524     Indicates constant intra prediction for HEVC encoder. Specifies the
2525     constrained intra prediction in which intra largest coding unit (LCU)
2526     prediction is performed by using residual data and decoded samples of
2527     neighboring intra LCU only. Setting the value to 1 enables constant intra
2528     prediction and setting the value to 0 disables constant intra prediction.
2529
2530 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
2531     Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
2532     disables the feature and setting it to 1 enables the wavefront parallel
2533     processing.
2534
2535 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
2536     Setting the value to 1 enables combination of P and B frame for HEVC
2537     encoder.
2538
2539 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
2540     Indicates temporal identifier for HEVC encoder which is enabled by
2541     setting the value to 1.
2542
2543 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
2544     Indicates bi-linear interpolation is conditionally used in the intra
2545     prediction filtering process in the CVS when set to 1. Indicates bi-linear
2546     interpolation is not used in the CVS when set to 0.
2547
2548 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
2549     Indicates maximum number of merge candidate motion vectors.
2550     Values are from 0 to 4.
2551
2552 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
2553     Indicates temporal motion vector prediction for HEVC encoder. Setting it to
2554     1 enables the prediction. Setting it to 0 disables the prediction.
2555
2556 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
2557     Specifies if HEVC generates a stream with a size of the length field
2558     instead of start code pattern. The size of the length field is configurable
2559     through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
2560     the value to 0 disables encoding without startcode pattern. Setting the
2561     value to 1 will enables encoding without startcode pattern.
2562
2563 .. _v4l2-hevc-size-of-length-field:
2564
2565 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
2566 (enum)
2567
2568 enum v4l2_mpeg_video_hevc_size_of_length_field -
2569     Indicates the size of length field.
2570     This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
2571
2572 .. raw:: latex
2573
2574     \footnotesize
2575
2576 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
2577
2578 .. flat-table::
2579     :header-rows:  0
2580     :stub-columns: 0
2581
2582     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
2583       - Generate start code pattern (Normal).
2584     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
2585       - Generate size of length field instead of start code pattern and length is 1.
2586     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
2587       - Generate size of length field instead of start code pattern and length is 2.
2588     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
2589       - Generate size of length field instead of start code pattern and length is 4.
2590
2591 .. raw:: latex
2592
2593     \normalsize
2594
2595 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
2596     Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
2597
2598 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
2599     Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
2600
2601 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
2602     Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
2603
2604 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
2605     Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
2606
2607 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
2608     Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
2609
2610 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
2611     Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
2612
2613 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
2614     Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
2615
2616 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
2617     Selects number of P reference pictures required for HEVC encoder.
2618     P-Frame can use 1 or 2 frames for reference.
2619
2620 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
2621     Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
2622     disables generating SPS and PPS at every IDR. Setting it to one enables
2623     generating SPS and PPS at every IDR.
2624
2625 .. _v4l2-mpeg-hevc:
2626
2627 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)``
2628     Specifies the Sequence Parameter Set fields (as extracted from the
2629     bitstream) for the associated HEVC slice data.
2630     These bitstream parameters are defined according to :ref:`hevc`.
2631     They are described in section 7.4.3.2 "Sequence parameter set RBSP
2632     semantics" of the specification.
2633
2634 .. c:type:: v4l2_ctrl_hevc_sps
2635
2636 .. raw:: latex
2637
2638     \small
2639
2640 .. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|
2641
2642 .. cssclass:: longtable
2643
2644 .. flat-table:: struct v4l2_ctrl_hevc_sps
2645     :header-rows:  0
2646     :stub-columns: 0
2647     :widths:       1 1 2
2648
2649     * - __u16
2650       - ``pic_width_in_luma_samples``
2651       -
2652     * - __u16
2653       - ``pic_height_in_luma_samples``
2654       -
2655     * - __u8
2656       - ``bit_depth_luma_minus8``
2657       -
2658     * - __u8
2659       - ``bit_depth_chroma_minus8``
2660       -
2661     * - __u8
2662       - ``log2_max_pic_order_cnt_lsb_minus4``
2663       -
2664     * - __u8
2665       - ``sps_max_dec_pic_buffering_minus1``
2666       -
2667     * - __u8
2668       - ``sps_max_num_reorder_pics``
2669       -
2670     * - __u8
2671       - ``sps_max_latency_increase_plus1``
2672       -
2673     * - __u8
2674       - ``log2_min_luma_coding_block_size_minus3``
2675       -
2676     * - __u8
2677       - ``log2_diff_max_min_luma_coding_block_size``
2678       -
2679     * - __u8
2680       - ``log2_min_luma_transform_block_size_minus2``
2681       -
2682     * - __u8
2683       - ``log2_diff_max_min_luma_transform_block_size``
2684       -
2685     * - __u8
2686       - ``max_transform_hierarchy_depth_inter``
2687       -
2688     * - __u8
2689       - ``max_transform_hierarchy_depth_intra``
2690       -
2691     * - __u8
2692       - ``pcm_sample_bit_depth_luma_minus1``
2693       -
2694     * - __u8
2695       - ``pcm_sample_bit_depth_chroma_minus1``
2696       -
2697     * - __u8
2698       - ``log2_min_pcm_luma_coding_block_size_minus3``
2699       -
2700     * - __u8
2701       - ``log2_diff_max_min_pcm_luma_coding_block_size``
2702       -
2703     * - __u8
2704       - ``num_short_term_ref_pic_sets``
2705       -
2706     * - __u8
2707       - ``num_long_term_ref_pics_sps``
2708       -
2709     * - __u8
2710       - ``chroma_format_idc``
2711       -
2712     * - __u8
2713       - ``sps_max_sub_layers_minus1``
2714       -
2715     * - __u64
2716       - ``flags``
2717       - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
2718
2719 .. raw:: latex
2720
2721     \normalsize
2722
2723 .. _hevc_sps_flags:
2724
2725 ``Sequence Parameter Set Flags``
2726
2727 .. raw:: latex
2728
2729     \small
2730
2731 .. cssclass:: longtable
2732
2733 .. flat-table::
2734     :header-rows:  0
2735     :stub-columns: 0
2736     :widths:       1 1 2
2737
2738     * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
2739       - 0x00000001
2740       -
2741     * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
2742       - 0x00000002
2743       -
2744     * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
2745       - 0x00000004
2746       -
2747     * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
2748       - 0x00000008
2749       -
2750     * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
2751       - 0x00000010
2752       -
2753     * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
2754       - 0x00000020
2755       -
2756     * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
2757       - 0x00000040
2758       -
2759     * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
2760       - 0x00000080
2761       -
2762     * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
2763       - 0x00000100
2764       -
2765
2766 .. raw:: latex
2767
2768     \normalsize
2769
2770 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)``
2771     Specifies the Picture Parameter Set fields (as extracted from the
2772     bitstream) for the associated HEVC slice data.
2773     These bitstream parameters are defined according to :ref:`hevc`.
2774     They are described in section 7.4.3.3 "Picture parameter set RBSP
2775     semantics" of the specification.
2776
2777 .. c:type:: v4l2_ctrl_hevc_pps
2778
2779 .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
2780
2781 .. cssclass:: longtable
2782
2783 .. flat-table:: struct v4l2_ctrl_hevc_pps
2784     :header-rows:  0
2785     :stub-columns: 0
2786     :widths:       1 1 2
2787
2788     * - __u8
2789       - ``num_extra_slice_header_bits``
2790       -
2791     * - __u8
2792       - ``num_ref_idx_l0_default_active_minus1``
2793       - Specifies the inferred value of num_ref_idx_l0_active_minus1
2794     * - __u8
2795       - ``num_ref_idx_l1_default_active_minus1``
2796       - Specifies the inferred value of num_ref_idx_l1_active_minus1
2797     * - __s8
2798       - ``init_qp_minus26``
2799       -
2800     * - __u8
2801       - ``diff_cu_qp_delta_depth``
2802       -
2803     * - __s8
2804       - ``pps_cb_qp_offset``
2805       -
2806     * - __s8
2807       - ``pps_cr_qp_offset``
2808       -
2809     * - __u8
2810       - ``num_tile_columns_minus1``
2811       -
2812     * - __u8
2813       - ``num_tile_rows_minus1``
2814       -
2815     * - __u8
2816       - ``column_width_minus1[20]``
2817       -
2818     * - __u8
2819       - ``row_height_minus1[22]``
2820       -
2821     * - __s8
2822       - ``pps_beta_offset_div2``
2823       -
2824     * - __s8
2825       - ``pps_tc_offset_div2``
2826       -
2827     * - __u8
2828       - ``log2_parallel_merge_level_minus2``
2829       -
2830     * - __u8
2831       - ``padding[4]``
2832       - Applications and drivers must set this to zero.
2833     * - __u64
2834       - ``flags``
2835       - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
2836
2837 .. _hevc_pps_flags:
2838
2839 ``Picture Parameter Set Flags``
2840
2841 .. raw:: latex
2842
2843     \small
2844
2845 .. flat-table::
2846     :header-rows:  0
2847     :stub-columns: 0
2848     :widths:       1 1 2
2849
2850     * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
2851       - 0x00000001
2852       -
2853     * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
2854       - 0x00000002
2855       -
2856     * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
2857       - 0x00000004
2858       -
2859     * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
2860       - 0x00000008
2861       -
2862     * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
2863       - 0x00000010
2864       -
2865     * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
2866       - 0x00000020
2867       -
2868     * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
2869       - 0x00000040
2870       -
2871     * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
2872       - 0x00000080
2873       -
2874     * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
2875       - 0x00000100
2876       -
2877     * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
2878       - 0x00000200
2879       -
2880     * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
2881       - 0x00000400
2882       -
2883     * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
2884       - 0x00000800
2885       -
2886     * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
2887       - 0x00001000
2888       -
2889     * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
2890       - 0x00002000
2891       -
2892     * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
2893       - 0x00004000
2894       -
2895     * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
2896       - 0x00008000
2897       -
2898     * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
2899       - 0x00010000
2900       -
2901     * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
2902       - 0x00020000
2903       -
2904     * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
2905       - 0x00040000
2906       -
2907     * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
2908       - 0x00080000
2909       - Specifies the presence of deblocking filter control syntax elements in
2910         the PPS
2911     * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
2912       - 0x00100000
2913       - Specifies that tile column boundaries and likewise tile row boundaries
2914         are distributed uniformly across the picture
2915
2916 .. raw:: latex
2917
2918     \normalsize
2919
2920 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
2921     Specifies various slice-specific parameters, especially from the NAL unit
2922     header, general slice segment header and weighted prediction parameter
2923     parts of the bitstream.
2924     These bitstream parameters are defined according to :ref:`hevc`.
2925     They are described in section 7.4.7 "General slice segment header
2926     semantics" of the specification.
2927
2928 .. c:type:: v4l2_ctrl_hevc_slice_params
2929
2930 .. raw:: latex
2931
2932     \scriptsize
2933
2934 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
2935
2936 .. cssclass:: longtable
2937
2938 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
2939     :header-rows:  0
2940     :stub-columns: 0
2941     :widths:       1 1 2
2942
2943     * - __u32
2944       - ``bit_size``
2945       - Size (in bits) of the current slice data.
2946     * - __u32
2947       - ``data_bit_offset``
2948       - Offset (in bits) to the video data in the current slice data.
2949     * - __u8
2950       - ``nal_unit_type``
2951       -
2952     * - __u8
2953       - ``nuh_temporal_id_plus1``
2954       -
2955     * - __u8
2956       - ``slice_type``
2957       -
2958         (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
2959         V4L2_HEVC_SLICE_TYPE_B).
2960     * - __u8
2961       - ``colour_plane_id``
2962       -
2963     * - __u16
2964       - ``slice_pic_order_cnt``
2965       -
2966     * - __u8
2967       - ``num_ref_idx_l0_active_minus1``
2968       -
2969     * - __u8
2970       - ``num_ref_idx_l1_active_minus1``
2971       -
2972     * - __u8
2973       - ``collocated_ref_idx``
2974       -
2975     * - __u8
2976       - ``five_minus_max_num_merge_cand``
2977       -
2978     * - __s8
2979       - ``slice_qp_delta``
2980       -
2981     * - __s8
2982       - ``slice_cb_qp_offset``
2983       -
2984     * - __s8
2985       - ``slice_cr_qp_offset``
2986       -
2987     * - __s8
2988       - ``slice_act_y_qp_offset``
2989       -
2990     * - __s8
2991       - ``slice_act_cb_qp_offset``
2992       -
2993     * - __s8
2994       - ``slice_act_cr_qp_offset``
2995       -
2996     * - __s8
2997       - ``slice_beta_offset_div2``
2998       -
2999     * - __s8
3000       - ``slice_tc_offset_div2``
3001       -
3002     * - __u8
3003       - ``pic_struct``
3004       -
3005     * - __u32
3006       - ``slice_segment_addr``
3007       -
3008     * - __u8
3009       - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3010       - The list of L0 reference elements as indices in the DPB.
3011     * - __u8
3012       - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3013       - The list of L1 reference elements as indices in the DPB.
3014     * - __u8
3015       - ``padding``
3016       - Applications and drivers must set this to zero.
3017     * - struct :c:type:`v4l2_hevc_pred_weight_table`
3018       - ``pred_weight_table``
3019       - The prediction weight coefficients for inter-picture prediction.
3020     * - __u64
3021       - ``flags``
3022       - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
3023
3024 .. raw:: latex
3025
3026     \normalsize
3027
3028 .. _hevc_slice_params_flags:
3029
3030 ``Slice Parameters Flags``
3031
3032 .. raw:: latex
3033
3034     \scriptsize
3035
3036 .. flat-table::
3037     :header-rows:  0
3038     :stub-columns: 0
3039     :widths:       1 1 2
3040
3041     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
3042       - 0x00000001
3043       -
3044     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
3045       - 0x00000002
3046       -
3047     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
3048       - 0x00000004
3049       -
3050     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
3051       - 0x00000008
3052       -
3053     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
3054       - 0x00000010
3055       -
3056     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
3057       - 0x00000020
3058       -
3059     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
3060       - 0x00000040
3061       -
3062     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
3063       - 0x00000080
3064       -
3065     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
3066       - 0x00000100
3067       -
3068     * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
3069       - 0x00000200
3070       -
3071
3072 .. raw:: latex
3073
3074     \normalsize
3075
3076 .. c:type:: v4l2_hevc_dpb_entry
3077
3078 .. raw:: latex
3079
3080     \small
3081
3082 .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|
3083
3084 .. flat-table:: struct v4l2_hevc_dpb_entry
3085     :header-rows:  0
3086     :stub-columns: 0
3087     :widths:       1 1 2
3088
3089     * - __u64
3090       - ``timestamp``
3091       - Timestamp of the V4L2 capture buffer to use as reference, used
3092         with B-coded and P-coded frames. The timestamp refers to the
3093         ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
3094         :c:func:`v4l2_timeval_to_ns()` function to convert the struct
3095         :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
3096     * - __u8
3097       - ``rps``
3098       - The reference set for the reference frame
3099         (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
3100         V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
3101         V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
3102     * - __u8
3103       - ``field_pic``
3104       - Whether the reference is a field picture or a frame.
3105     * - __u16
3106       - ``pic_order_cnt[2]``
3107       - The picture order count of the reference. Only the first element of the
3108         array is used for frame pictures, while the first element identifies the
3109         top field and the second the bottom field in field-coded pictures.
3110     * - __u8
3111       - ``padding[2]``
3112       - Applications and drivers must set this to zero.
3113
3114 .. raw:: latex
3115
3116     \normalsize
3117
3118 .. c:type:: v4l2_hevc_pred_weight_table
3119
3120 .. raw:: latex
3121
3122     \footnotesize
3123
3124 .. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|
3125
3126 .. flat-table:: struct v4l2_hevc_pred_weight_table
3127     :header-rows:  0
3128     :stub-columns: 0
3129     :widths:       1 1 2
3130
3131     * - __u8
3132       - ``luma_log2_weight_denom``
3133       -
3134     * - __s8
3135       - ``delta_chroma_log2_weight_denom``
3136       -
3137     * - __s8
3138       - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3139       -
3140     * - __s8
3141       - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3142       -
3143     * - __s8
3144       - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3145       -
3146     * - __s8
3147       - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3148       -
3149     * - __s8
3150       - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3151       -
3152     * - __s8
3153       - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3154       -
3155     * - __s8
3156       - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3157       -
3158     * - __s8
3159       - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3160       -
3161     * - __u8
3162       - ``padding[6]``
3163       - Applications and drivers must set this to zero.
3164
3165 .. raw:: latex
3166
3167     \normalsize
3168
3169 ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)``
3170     Specifies the decoding mode to use. Currently exposes slice-based and
3171     frame-based decoding but new modes might be added later on.
3172     This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
3173     pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
3174     are required to set this control in order to specify the decoding mode
3175     that is expected for the buffer.
3176     Drivers may expose a single or multiple decoding modes, depending
3177     on what they can support.
3178
3179     .. note::
3180
3181        This menu control is not yet part of the public kernel API and
3182        it is expected to change.
3183
3184 .. c:type:: v4l2_mpeg_video_hevc_decode_mode
3185
3186 .. raw:: latex
3187
3188     \small
3189
3190 .. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|
3191
3192 .. flat-table::
3193     :header-rows:  0
3194     :stub-columns: 0
3195     :widths:       1 1 2
3196
3197     * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED``
3198       - 0
3199       - Decoding is done at the slice granularity.
3200         The OUTPUT buffer must contain a single slice.
3201     * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED``
3202       - 1
3203       - Decoding is done at the frame granularity.
3204         The OUTPUT buffer must contain all slices needed to decode the
3205         frame. The OUTPUT buffer must also contain both fields.
3206
3207 .. raw:: latex
3208
3209     \normalsize
3210
3211 ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)``
3212     Specifies the HEVC slice start code expected for each slice.
3213     This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
3214     pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
3215     are required to set this control in order to specify the start code
3216     that is expected for the buffer.
3217     Drivers may expose a single or multiple start codes, depending
3218     on what they can support.
3219
3220     .. note::
3221
3222        This menu control is not yet part of the public kernel API and
3223        it is expected to change.
3224
3225 .. c:type:: v4l2_mpeg_video_hevc_start_code
3226
3227 .. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|
3228
3229 .. flat-table::
3230     :header-rows:  0
3231     :stub-columns: 0
3232     :widths:       1 1 2
3233
3234     * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
3235       - 0
3236       - Selecting this value specifies that HEVC slices are passed
3237         to the driver without any start code. The bitstream data should be
3238         according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
3239         contains emulation prevention bytes when required.
3240     * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
3241       - 1
3242       - Selecting this value specifies that HEVC slices are expected
3243         to be prefixed by Annex B start codes. According to :ref:`hevc`
3244         valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
3245
3246 ``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``
3247     Specifies a priority identifier for the NAL unit, which will be applied to
3248     the base layer. By default this value is set to 0 for the base layer,
3249     and the next layer will have the priority ID assigned as 1, 2, 3 and so on.
3250     The video encoder can't decide the priority id to be applied to a layer,
3251     so this has to come from client.
3252     This is applicable to H264 and valid Range is from 0 to 63.
3253     Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.
3254
3255 ``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)``
3256     Specifies the maximum number of Long Term Reference (LTR) frames at any
3257     given time that the encoder can keep.
3258     This is applicable to the H264 and HEVC encoders.
3259
3260 ``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)``
3261     After setting this control the frame that will be queued next
3262     will be marked as a Long Term Reference (LTR) frame
3263     and given this LTR index which ranges from 0 to LTR_COUNT-1.
3264     This is applicable to the H264 and HEVC encoders.
3265     Source Rec. ITU-T H.264 (06/2019); Table 7.9
3266
3267 ``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)``
3268     Specifies the Long Term Reference (LTR) frame(s) to be used for
3269     encoding the next frame queued after setting this control.
3270     This provides a bitmask which consists of bits [0, LTR_COUNT-1].
3271     This is applicable to the H264 and HEVC encoders.
3272
3273 ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS (struct)``
3274     Specifies various decode parameters, especially the references picture order
3275     count (POC) for all the lists (short, long, before, current, after) and the
3276     number of entries for each of them.
3277     These parameters are defined according to :ref:`hevc`.
3278     They are described in section 8.3 "Slice decoding process" of the
3279     specification.
3280
3281 .. c:type:: v4l2_ctrl_hevc_decode_params
3282
3283 .. cssclass:: longtable
3284
3285 .. flat-table:: struct v4l2_ctrl_hevc_decode_params
3286     :header-rows:  0
3287     :stub-columns: 0
3288     :widths:       1 1 2
3289
3290     * - __s32
3291       - ``pic_order_cnt_val``
3292       - PicOrderCntVal as described in section 8.3.1 "Decoding process
3293         for picture order count" of the specification.
3294     * - __u8
3295       - ``num_active_dpb_entries``
3296       - The number of entries in ``dpb``.
3297     * - struct :c:type:`v4l2_hevc_dpb_entry`
3298       - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3299       - The decoded picture buffer, for meta-data about reference frames.
3300     * - __u8
3301       - ``num_poc_st_curr_before``
3302       - The number of reference pictures in the short-term set that come before
3303         the current frame.
3304     * - __u8
3305       - ``num_poc_st_curr_after``
3306       - The number of reference pictures in the short-term set that come after
3307         the current frame.
3308     * - __u8
3309       - ``num_poc_lt_curr``
3310       - The number of reference pictures in the long-term set.
3311     * - __u8
3312       - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3313       - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
3314         picture set.
3315     * - __u8
3316       - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3317       - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
3318         picture set.
3319     * - __u8
3320       - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3321       - PocLtCurr as described in section 8.3.2 "Decoding process for reference
3322         picture set.
3323     * - __u64
3324       - ``flags``
3325       - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
3326
3327 .. _hevc_decode_params_flags:
3328
3329 ``Decode Parameters Flags``
3330
3331 .. cssclass:: longtable
3332
3333 .. flat-table::
3334     :header-rows:  0
3335     :stub-columns: 0
3336     :widths:       1 1 2
3337
3338     * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
3339       - 0x00000001
3340       -
3341     * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
3342       - 0x00000002
3343       -
3344     * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
3345       - 0x00000004
3346       -