Merge tag 'for-5.1-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / ext-ctrls-codec.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _mpeg-controls:
11
12 ***********************
13 Codec Control Reference
14 ***********************
15
16 Below all controls within the Codec control class are described. First
17 the generic controls, then controls specific for certain hardware.
18
19 .. note::
20
21    These controls are applicable to all codecs and not just MPEG. The
22    defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
23    were originally made for MPEG codecs and later extended to cover all
24    encoding formats.
25
26
27 Generic Codec Controls
28 ======================
29
30
31 .. _mpeg-control-id:
32
33 Codec Control IDs
34 -----------------
35
36 ``V4L2_CID_MPEG_CLASS (class)``
37     The Codec class descriptor. Calling
38     :ref:`VIDIOC_QUERYCTRL` for this control will
39     return a description of this control class. This description can be
40     used as the caption of a Tab page in a GUI, for example.
41
42 .. _v4l2-mpeg-stream-type:
43
44 ``V4L2_CID_MPEG_STREAM_TYPE``
45     (enum)
46
47 enum v4l2_mpeg_stream_type -
48     The MPEG-1, -2 or -4 output stream type. One cannot assume anything
49     here. Each hardware MPEG encoder tends to support different subsets
50     of the available MPEG stream types. This control is specific to
51     multiplexed MPEG streams. The currently defined stream types are:
52
53
54
55 .. flat-table::
56     :header-rows:  0
57     :stub-columns: 0
58
59     * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
60       - MPEG-2 program stream
61     * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
62       - MPEG-2 transport stream
63     * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
64       - MPEG-1 system stream
65     * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
66       - MPEG-2 DVD-compatible stream
67     * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
68       - MPEG-1 VCD-compatible stream
69     * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
70       - MPEG-2 SVCD-compatible stream
71
72
73
74 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
75     Program Map Table Packet ID for the MPEG transport stream (default
76     16)
77
78 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
79     Audio Packet ID for the MPEG transport stream (default 256)
80
81 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
82     Video Packet ID for the MPEG transport stream (default 260)
83
84 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
85     Packet ID for the MPEG transport stream carrying PCR fields (default
86     259)
87
88 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
89     Audio ID for MPEG PES
90
91 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
92     Video ID for MPEG PES
93
94 .. _v4l2-mpeg-stream-vbi-fmt:
95
96 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
97     (enum)
98
99 enum v4l2_mpeg_stream_vbi_fmt -
100     Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
101     the MPEG stream. This control selects whether VBI data should be
102     embedded, and if so, what embedding method should be used. The list
103     of possible VBI formats depends on the driver. The currently defined
104     VBI format types are:
105
106
107
108 .. tabularcolumns:: |p{6 cm}|p{11.5cm}|
109
110 .. flat-table::
111     :header-rows:  0
112     :stub-columns: 0
113
114     * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
115       - No VBI in the MPEG stream
116     * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
117       - VBI in private packets, IVTV format (documented in the kernel
118         sources in the file
119         ``Documentation/media/v4l-drivers/cx2341x.rst``)
120
121
122
123 .. _v4l2-mpeg-audio-sampling-freq:
124
125 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
126     (enum)
127
128 enum v4l2_mpeg_audio_sampling_freq -
129     MPEG Audio sampling frequency. Possible values are:
130
131
132
133 .. flat-table::
134     :header-rows:  0
135     :stub-columns: 0
136
137     * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
138       - 44.1 kHz
139     * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
140       - 48 kHz
141     * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
142       - 32 kHz
143
144
145
146 .. _v4l2-mpeg-audio-encoding:
147
148 ``V4L2_CID_MPEG_AUDIO_ENCODING``
149     (enum)
150
151 enum v4l2_mpeg_audio_encoding -
152     MPEG Audio encoding. This control is specific to multiplexed MPEG
153     streams. Possible values are:
154
155
156
157 .. flat-table::
158     :header-rows:  0
159     :stub-columns: 0
160
161     * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
162       - MPEG-1/2 Layer I encoding
163     * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
164       - MPEG-1/2 Layer II encoding
165     * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
166       - MPEG-1/2 Layer III encoding
167     * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
168       - MPEG-2/4 AAC (Advanced Audio Coding)
169     * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
170       - AC-3 aka ATSC A/52 encoding
171
172
173
174 .. _v4l2-mpeg-audio-l1-bitrate:
175
176 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
177     (enum)
178
179 enum v4l2_mpeg_audio_l1_bitrate -
180     MPEG-1/2 Layer I bitrate. Possible values are:
181
182
183
184 .. flat-table::
185     :header-rows:  0
186     :stub-columns: 0
187
188     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
189       - 32 kbit/s
190     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
191       - 64 kbit/s
192     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
193       - 96 kbit/s
194     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
195       - 128 kbit/s
196     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
197       - 160 kbit/s
198     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
199       - 192 kbit/s
200     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
201       - 224 kbit/s
202     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
203       - 256 kbit/s
204     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
205       - 288 kbit/s
206     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
207       - 320 kbit/s
208     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
209       - 352 kbit/s
210     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
211       - 384 kbit/s
212     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
213       - 416 kbit/s
214     * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
215       - 448 kbit/s
216
217
218
219 .. _v4l2-mpeg-audio-l2-bitrate:
220
221 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
222     (enum)
223
224 enum v4l2_mpeg_audio_l2_bitrate -
225     MPEG-1/2 Layer II bitrate. Possible values are:
226
227
228
229 .. flat-table::
230     :header-rows:  0
231     :stub-columns: 0
232
233     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
234       - 32 kbit/s
235     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
236       - 48 kbit/s
237     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
238       - 56 kbit/s
239     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
240       - 64 kbit/s
241     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
242       - 80 kbit/s
243     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
244       - 96 kbit/s
245     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
246       - 112 kbit/s
247     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
248       - 128 kbit/s
249     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
250       - 160 kbit/s
251     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
252       - 192 kbit/s
253     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
254       - 224 kbit/s
255     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
256       - 256 kbit/s
257     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
258       - 320 kbit/s
259     * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
260       - 384 kbit/s
261
262
263
264 .. _v4l2-mpeg-audio-l3-bitrate:
265
266 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
267     (enum)
268
269 enum v4l2_mpeg_audio_l3_bitrate -
270     MPEG-1/2 Layer III bitrate. Possible values are:
271
272
273
274 .. flat-table::
275     :header-rows:  0
276     :stub-columns: 0
277
278     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
279       - 32 kbit/s
280     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
281       - 40 kbit/s
282     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
283       - 48 kbit/s
284     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
285       - 56 kbit/s
286     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
287       - 64 kbit/s
288     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
289       - 80 kbit/s
290     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
291       - 96 kbit/s
292     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
293       - 112 kbit/s
294     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
295       - 128 kbit/s
296     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
297       - 160 kbit/s
298     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
299       - 192 kbit/s
300     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
301       - 224 kbit/s
302     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
303       - 256 kbit/s
304     * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
305       - 320 kbit/s
306
307
308
309 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
310     AAC bitrate in bits per second.
311
312 .. _v4l2-mpeg-audio-ac3-bitrate:
313
314 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
315     (enum)
316
317 enum v4l2_mpeg_audio_ac3_bitrate -
318     AC-3 bitrate. Possible values are:
319
320
321
322 .. flat-table::
323     :header-rows:  0
324     :stub-columns: 0
325
326     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
327       - 32 kbit/s
328     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
329       - 40 kbit/s
330     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
331       - 48 kbit/s
332     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
333       - 56 kbit/s
334     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
335       - 64 kbit/s
336     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
337       - 80 kbit/s
338     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
339       - 96 kbit/s
340     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
341       - 112 kbit/s
342     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
343       - 128 kbit/s
344     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
345       - 160 kbit/s
346     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
347       - 192 kbit/s
348     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
349       - 224 kbit/s
350     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
351       - 256 kbit/s
352     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
353       - 320 kbit/s
354     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
355       - 384 kbit/s
356     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
357       - 448 kbit/s
358     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
359       - 512 kbit/s
360     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
361       - 576 kbit/s
362     * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
363       - 640 kbit/s
364
365
366
367 .. _v4l2-mpeg-audio-mode:
368
369 ``V4L2_CID_MPEG_AUDIO_MODE``
370     (enum)
371
372 enum v4l2_mpeg_audio_mode -
373     MPEG Audio mode. Possible values are:
374
375
376
377 .. flat-table::
378     :header-rows:  0
379     :stub-columns: 0
380
381     * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
382       - Stereo
383     * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
384       - Joint Stereo
385     * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
386       - Bilingual
387     * - ``V4L2_MPEG_AUDIO_MODE_MONO``
388       - Mono
389
390
391
392 .. _v4l2-mpeg-audio-mode-extension:
393
394 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
395     (enum)
396
397 enum v4l2_mpeg_audio_mode_extension -
398     Joint Stereo audio mode extension. In Layer I and II they indicate
399     which subbands are in intensity stereo. All other subbands are coded
400     in stereo. Layer III is not (yet) supported. Possible values are:
401
402
403
404 .. flat-table::
405     :header-rows:  0
406     :stub-columns: 0
407
408     * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
409       - Subbands 4-31 in intensity stereo
410     * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
411       - Subbands 8-31 in intensity stereo
412     * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
413       - Subbands 12-31 in intensity stereo
414     * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
415       - Subbands 16-31 in intensity stereo
416
417
418
419 .. _v4l2-mpeg-audio-emphasis:
420
421 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
422     (enum)
423
424 enum v4l2_mpeg_audio_emphasis -
425     Audio Emphasis. Possible values are:
426
427
428
429 .. flat-table::
430     :header-rows:  0
431     :stub-columns: 0
432
433     * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
434       - None
435     * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
436       - 50/15 microsecond emphasis
437     * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
438       - CCITT J.17
439
440
441
442 .. _v4l2-mpeg-audio-crc:
443
444 ``V4L2_CID_MPEG_AUDIO_CRC``
445     (enum)
446
447 enum v4l2_mpeg_audio_crc -
448     CRC method. Possible values are:
449
450
451
452 .. flat-table::
453     :header-rows:  0
454     :stub-columns: 0
455
456     * - ``V4L2_MPEG_AUDIO_CRC_NONE``
457       - None
458     * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
459       - 16 bit parity check
460
461
462
463 ``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
464     Mutes the audio when capturing. This is not done by muting audio
465     hardware, which can still produce a slight hiss, but in the encoder
466     itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
467     unmuted, 1 = muted.
468
469 .. _v4l2-mpeg-audio-dec-playback:
470
471 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
472     (enum)
473
474 enum v4l2_mpeg_audio_dec_playback -
475     Determines how monolingual audio should be played back. Possible
476     values are:
477
478
479
480 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
481
482 .. flat-table::
483     :header-rows:  0
484     :stub-columns: 0
485
486     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
487       - Automatically determines the best playback mode.
488     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
489       - Stereo playback.
490     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
491       - Left channel playback.
492     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
493       - Right channel playback.
494     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
495       - Mono playback.
496     * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
497       - Stereo playback with swapped left and right channels.
498
499
500
501 .. _v4l2-mpeg-audio-dec-multilingual-playback:
502
503 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
504     (enum)
505
506 enum v4l2_mpeg_audio_dec_playback -
507     Determines how multilingual audio should be played back.
508
509 .. _v4l2-mpeg-video-encoding:
510
511 ``V4L2_CID_MPEG_VIDEO_ENCODING``
512     (enum)
513
514 enum v4l2_mpeg_video_encoding -
515     MPEG Video encoding method. This control is specific to multiplexed
516     MPEG streams. Possible values are:
517
518
519
520 .. flat-table::
521     :header-rows:  0
522     :stub-columns: 0
523
524     * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
525       - MPEG-1 Video encoding
526     * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
527       - MPEG-2 Video encoding
528     * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
529       - MPEG-4 AVC (H.264) Video encoding
530
531
532
533 .. _v4l2-mpeg-video-aspect:
534
535 ``V4L2_CID_MPEG_VIDEO_ASPECT``
536     (enum)
537
538 enum v4l2_mpeg_video_aspect -
539     Video aspect. Possible values are:
540
541
542
543 .. flat-table::
544     :header-rows:  0
545     :stub-columns: 0
546
547     * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
548     * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
549     * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
550     * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
551
552
553
554 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
555     Number of B-Frames (default 2)
556
557 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
558     GOP size (default 12)
559
560 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
561     GOP closure (default 1)
562
563 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
564     Enable 3:2 pulldown (default 0)
565
566 .. _v4l2-mpeg-video-bitrate-mode:
567
568 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
569     (enum)
570
571 enum v4l2_mpeg_video_bitrate_mode -
572     Video bitrate mode. Possible values are:
573
574
575
576 .. flat-table::
577     :header-rows:  0
578     :stub-columns: 0
579
580     * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
581       - Variable bitrate
582     * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
583       - Constant bitrate
584
585
586
587 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
588     Video bitrate in bits per second.
589
590 ``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
591     Peak video bitrate in bits per second. Must be larger or equal to
592     the average video bitrate. It is ignored if the video bitrate mode
593     is set to constant bitrate.
594
595 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
596     For every captured frame, skip this many subsequent frames (default
597     0).
598
599 ``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
600     "Mutes" the video to a fixed color when capturing. This is useful
601     for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
602     muted.
603
604 ``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
605     Sets the "mute" color of the video. The supplied 32-bit integer is
606     interpreted as follows (bit 0 = least significant bit):
607
608
609
610 .. flat-table::
611     :header-rows:  0
612     :stub-columns: 0
613
614     * - Bit 0:7
615       - V chrominance information
616     * - Bit 8:15
617       - U chrominance information
618     * - Bit 16:23
619       - Y luminance information
620     * - Bit 24:31
621       - Must be zero.
622
623
624
625 .. _v4l2-mpeg-video-dec-pts:
626
627 ``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
628     This read-only control returns the 33-bit video Presentation Time
629     Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
630     currently displayed frame. This is the same PTS as is used in
631     :ref:`VIDIOC_DECODER_CMD`.
632
633 .. _v4l2-mpeg-video-dec-frame:
634
635 ``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
636     This read-only control returns the frame counter of the frame that
637     is currently displayed (decoded). This value is reset to 0 whenever
638     the decoder is started.
639
640 ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
641     If enabled the decoder expects to receive a single slice per buffer,
642     otherwise the decoder expects a single frame in per buffer.
643     Applicable to the decoder, all codecs.
644
645 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
646     Enable writing sample aspect ratio in the Video Usability
647     Information. Applicable to the H264 encoder.
648
649 .. _v4l2-mpeg-video-h264-vui-sar-idc:
650
651 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
652     (enum)
653
654 enum v4l2_mpeg_video_h264_vui_sar_idc -
655     VUI sample aspect ratio indicator for H.264 encoding. The value is
656     defined in the table E-1 in the standard. Applicable to the H264
657     encoder.
658
659
660
661 .. flat-table::
662     :header-rows:  0
663     :stub-columns: 0
664
665     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
666       - Unspecified
667     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
668       - 1x1
669     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
670       - 12x11
671     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
672       - 10x11
673     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
674       - 16x11
675     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
676       - 40x33
677     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
678       - 24x11
679     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
680       - 20x11
681     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
682       - 32x11
683     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
684       - 80x33
685     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
686       - 18x11
687     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
688       - 15x11
689     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
690       - 64x33
691     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
692       - 160x99
693     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
694       - 4x3
695     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
696       - 3x2
697     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
698       - 2x1
699     * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
700       - Extended SAR
701
702
703
704 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
705     Extended sample aspect ratio width for H.264 VUI encoding.
706     Applicable to the H264 encoder.
707
708 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
709     Extended sample aspect ratio height for H.264 VUI encoding.
710     Applicable to the H264 encoder.
711
712 .. _v4l2-mpeg-video-h264-level:
713
714 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
715     (enum)
716
717 enum v4l2_mpeg_video_h264_level -
718     The level information for the H264 video elementary stream.
719     Applicable to the H264 encoder. Possible values are:
720
721
722
723 .. flat-table::
724     :header-rows:  0
725     :stub-columns: 0
726
727     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
728       - Level 1.0
729     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
730       - Level 1B
731     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
732       - Level 1.1
733     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
734       - Level 1.2
735     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
736       - Level 1.3
737     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
738       - Level 2.0
739     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
740       - Level 2.1
741     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
742       - Level 2.2
743     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
744       - Level 3.0
745     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
746       - Level 3.1
747     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
748       - Level 3.2
749     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
750       - Level 4.0
751     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
752       - Level 4.1
753     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
754       - Level 4.2
755     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
756       - Level 5.0
757     * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
758       - Level 5.1
759
760
761
762 .. _v4l2-mpeg-video-mpeg4-level:
763
764 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
765     (enum)
766
767 enum v4l2_mpeg_video_mpeg4_level -
768     The level information for the MPEG4 elementary stream. Applicable to
769     the MPEG4 encoder. Possible values are:
770
771
772
773 .. flat-table::
774     :header-rows:  0
775     :stub-columns: 0
776
777     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
778       - Level 0
779     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
780       - Level 0b
781     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
782       - Level 1
783     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
784       - Level 2
785     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
786       - Level 3
787     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
788       - Level 3b
789     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
790       - Level 4
791     * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
792       - Level 5
793
794
795
796 .. _v4l2-mpeg-video-h264-profile:
797
798 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
799     (enum)
800
801 enum v4l2_mpeg_video_h264_profile -
802     The profile information for H264. Applicable to the H264 encoder.
803     Possible values are:
804
805
806
807 .. flat-table::
808     :header-rows:  0
809     :stub-columns: 0
810
811     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
812       - Baseline profile
813     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
814       - Constrained Baseline profile
815     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
816       - Main profile
817     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
818       - Extended profile
819     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
820       - High profile
821     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
822       - High 10 profile
823     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
824       - High 422 profile
825     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
826       - High 444 Predictive profile
827     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
828       - High 10 Intra profile
829     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
830       - High 422 Intra profile
831     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
832       - High 444 Intra profile
833     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
834       - CAVLC 444 Intra profile
835     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
836       - Scalable Baseline profile
837     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
838       - Scalable High profile
839     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
840       - Scalable High Intra profile
841     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
842       - Stereo High profile
843     * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
844       - Multiview High profile
845
846
847
848 .. _v4l2-mpeg-video-mpeg4-profile:
849
850 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
851     (enum)
852
853 enum v4l2_mpeg_video_mpeg4_profile -
854     The profile information for MPEG4. Applicable to the MPEG4 encoder.
855     Possible values are:
856
857
858
859 .. flat-table::
860     :header-rows:  0
861     :stub-columns: 0
862
863     * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
864       - Simple profile
865     * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
866       - Advanced Simple profile
867     * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
868       - Core profile
869     * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
870       - Simple Scalable profile
871     * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
872       -
873
874
875
876 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
877     The maximum number of reference pictures used for encoding.
878     Applicable to the encoder.
879
880 .. _v4l2-mpeg-video-multi-slice-mode:
881
882 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
883     (enum)
884
885 enum v4l2_mpeg_video_multi_slice_mode -
886     Determines how the encoder should handle division of frame into
887     slices. Applicable to the encoder. Possible values are:
888
889
890
891 .. tabularcolumns:: |p{8.7cm}|p{8.8cm}|
892
893 .. flat-table::
894     :header-rows:  0
895     :stub-columns: 0
896
897     * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
898       - Single slice per frame.
899     * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
900       - Multiple slices with set maximum number of macroblocks per slice.
901     * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
902       - Multiple slice with set maximum size in bytes per slice.
903
904
905
906 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
907     The maximum number of macroblocks in a slice. Used when
908     ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
909     ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
910     encoder.
911
912 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
913     The maximum size of a slice in bytes. Used when
914     ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
915     ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
916     encoder.
917
918 .. _v4l2-mpeg-video-h264-loop-filter-mode:
919
920 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
921     (enum)
922
923 enum v4l2_mpeg_video_h264_loop_filter_mode -
924     Loop filter mode for H264 encoder. Possible values are:
925
926
927
928 .. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
929
930 .. flat-table::
931     :header-rows:  0
932     :stub-columns: 0
933
934     * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
935       - Loop filter is enabled.
936     * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
937       - Loop filter is disabled.
938     * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
939       - Loop filter is disabled at the slice boundary.
940
941
942
943 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
944     Loop filter alpha coefficient, defined in the H264 standard.
945     This value corresponds to the slice_alpha_c0_offset_div2 slice header
946     field, and should be in the range of -6 to +6, inclusive. The actual alpha
947     offset FilterOffsetA is twice this value.
948     Applicable to the H264 encoder.
949
950 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
951     Loop filter beta coefficient, defined in the H264 standard.
952     This corresponds to the slice_beta_offset_div2 slice header field, and
953     should be in the range of -6 to +6, inclusive. The actual beta offset
954     FilterOffsetB is twice this value.
955     Applicable to the H264 encoder.
956
957 .. _v4l2-mpeg-video-h264-entropy-mode:
958
959 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
960     (enum)
961
962 enum v4l2_mpeg_video_h264_entropy_mode -
963     Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
964     encoder. Possible values are:
965
966
967
968 .. flat-table::
969     :header-rows:  0
970     :stub-columns: 0
971
972     * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
973       - Use CAVLC entropy coding.
974     * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
975       - Use CABAC entropy coding.
976
977
978
979 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
980     Enable 8X8 transform for H264. Applicable to the H264 encoder.
981
982 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
983     Enable constrained intra prediction for H264. Applicable to the H264
984     encoder.
985
986 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
987     Specify the offset that should be added to the luma quantization
988     parameter to determine the chroma quantization parameter. Applicable
989     to the H264 encoder.
990
991 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
992     Cyclic intra macroblock refresh. This is the number of continuous
993     macroblocks refreshed every frame. Each frame a successive set of
994     macroblocks is refreshed until the cycle completes and starts from
995     the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
996
997 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
998     Frame level rate control enable. If this control is disabled then
999     the quantization parameter for each frame type is constant and set
1000     with appropriate controls (e.g.
1001     ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1002     enabled then quantization parameter is adjusted to meet the chosen
1003     bitrate. Minimum and maximum value for the quantization parameter
1004     can be set with appropriate controls (e.g.
1005     ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1006
1007 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1008     Macroblock level rate control enable. Applicable to the MPEG4 and
1009     H264 encoders.
1010
1011 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1012     Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1013     encoder.
1014
1015 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1016     Quantization parameter for an I frame for H263. Valid range: from 1
1017     to 31.
1018
1019 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1020     Minimum quantization parameter for H263. Valid range: from 1 to 31.
1021
1022 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1023     Maximum quantization parameter for H263. Valid range: from 1 to 31.
1024
1025 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1026     Quantization parameter for an P frame for H263. Valid range: from 1
1027     to 31.
1028
1029 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1030     Quantization parameter for an B frame for H263. Valid range: from 1
1031     to 31.
1032
1033 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1034     Quantization parameter for an I frame for H264. Valid range: from 0
1035     to 51.
1036
1037 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1038     Minimum quantization parameter for H264. Valid range: from 0 to 51.
1039
1040 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1041     Maximum quantization parameter for H264. Valid range: from 0 to 51.
1042
1043 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1044     Quantization parameter for an P frame for H264. Valid range: from 0
1045     to 51.
1046
1047 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1048     Quantization parameter for an B frame for H264. Valid range: from 0
1049     to 51.
1050
1051 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1052     Quantization parameter for an I frame for MPEG4. Valid range: from 1
1053     to 31.
1054
1055 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1056     Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1057
1058 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1059     Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1060
1061 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1062     Quantization parameter for an P frame for MPEG4. Valid range: from 1
1063     to 31.
1064
1065 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1066     Quantization parameter for an B frame for MPEG4. Valid range: from 1
1067     to 31.
1068
1069 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1070     The Video Buffer Verifier size in kilobytes, it is used as a
1071     limitation of frame skip. The VBV is defined in the standard as a
1072     mean to verify that the produced stream will be successfully
1073     decoded. The standard describes it as "Part of a hypothetical
1074     decoder that is conceptually connected to the output of the encoder.
1075     Its purpose is to provide a constraint on the variability of the
1076     data rate that an encoder or editing process may produce.".
1077     Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1078
1079 .. _v4l2-mpeg-video-vbv-delay:
1080
1081 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1082     Sets the initial delay in milliseconds for VBV buffer control.
1083
1084 .. _v4l2-mpeg-video-hor-search-range:
1085
1086 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1087     Horizontal search range defines maximum horizontal search area in
1088     pixels to search and match for the present Macroblock (MB) in the
1089     reference picture. This V4L2 control macro is used to set horizontal
1090     search range for motion estimation module in video encoder.
1091
1092 .. _v4l2-mpeg-video-vert-search-range:
1093
1094 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1095     Vertical search range defines maximum vertical search area in pixels
1096     to search and match for the present Macroblock (MB) in the reference
1097     picture. This V4L2 control macro is used to set vertical search
1098     range for motion estimation module in video encoder.
1099
1100 .. _v4l2-mpeg-video-force-key-frame:
1101
1102 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1103     Force a key frame for the next queued buffer. Applicable to
1104     encoders. This is a general, codec-agnostic keyframe control.
1105
1106 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1107     The Coded Picture Buffer size in kilobytes, it is used as a
1108     limitation of frame skip. The CPB is defined in the H264 standard as
1109     a mean to verify that the produced stream will be successfully
1110     decoded. Applicable to the H264 encoder.
1111
1112 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1113     Period between I-frames in the open GOP for H264. In case of an open
1114     GOP this is the period between two I-frames. The period between IDR
1115     (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1116     control. An IDR frame, which stands for Instantaneous Decoding
1117     Refresh is an I-frame after which no prior frames are referenced.
1118     This means that a stream can be restarted from an IDR frame without
1119     the need to store or decode any previous frames. Applicable to the
1120     H264 encoder.
1121
1122 .. _v4l2-mpeg-video-header-mode:
1123
1124 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1125     (enum)
1126
1127 enum v4l2_mpeg_video_header_mode -
1128     Determines whether the header is returned as the first buffer or is
1129     it returned together with the first frame. Applicable to encoders.
1130     Possible values are:
1131
1132
1133
1134 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1135
1136 .. flat-table::
1137     :header-rows:  0
1138     :stub-columns: 0
1139
1140     * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1141       - The stream header is returned separately in the first buffer.
1142     * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1143       - The stream header is returned together with the first encoded
1144         frame.
1145
1146
1147
1148 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1149     Repeat the video sequence headers. Repeating these headers makes
1150     random access to the video stream easier. Applicable to the MPEG1, 2
1151     and 4 encoder.
1152
1153 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1154     Enabled the deblocking post processing filter for MPEG4 decoder.
1155     Applicable to the MPEG4 decoder.
1156
1157 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1158     vop_time_increment_resolution value for MPEG4. Applicable to the
1159     MPEG4 encoder.
1160
1161 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1162     vop_time_increment value for MPEG4. Applicable to the MPEG4
1163     encoder.
1164
1165 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1166     Enable generation of frame packing supplemental enhancement
1167     information in the encoded bitstream. The frame packing SEI message
1168     contains the arrangement of L and R planes for 3D viewing.
1169     Applicable to the H264 encoder.
1170
1171 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1172     Sets current frame as frame0 in frame packing SEI. Applicable to the
1173     H264 encoder.
1174
1175 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1176
1177 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1178     (enum)
1179
1180 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1181     Frame packing arrangement type for H264 SEI. Applicable to the H264
1182     encoder. Possible values are:
1183
1184 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1185
1186 .. flat-table::
1187     :header-rows:  0
1188     :stub-columns: 0
1189
1190     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1191       - Pixels are alternatively from L and R.
1192     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1193       - L and R are interlaced by column.
1194     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1195       - L and R are interlaced by row.
1196     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1197       - L is on the left, R on the right.
1198     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1199       - L is on top, R on bottom.
1200     * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1201       - One view per frame.
1202
1203
1204
1205 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1206     Enables flexible macroblock ordering in the encoded bitstream. It is
1207     a technique used for restructuring the ordering of macroblocks in
1208     pictures. Applicable to the H264 encoder.
1209
1210 .. _v4l2-mpeg-video-h264-fmo-map-type:
1211
1212 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1213    (enum)
1214
1215 enum v4l2_mpeg_video_h264_fmo_map_type -
1216     When using FMO, the map type divides the image in different scan
1217     patterns of macroblocks. Applicable to the H264 encoder. Possible
1218     values are:
1219
1220 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1221
1222 .. flat-table::
1223     :header-rows:  0
1224     :stub-columns: 0
1225
1226     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1227       - Slices are interleaved one after other with macroblocks in run
1228         length order.
1229     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1230       - Scatters the macroblocks based on a mathematical function known to
1231         both encoder and decoder.
1232     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1233       - Macroblocks arranged in rectangular areas or regions of interest.
1234     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1235       - Slice groups grow in a cyclic way from centre to outwards.
1236     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1237       - Slice groups grow in raster scan pattern from left to right.
1238     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1239       - Slice groups grow in wipe scan pattern from top to bottom.
1240     * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1241       - User defined map type.
1242
1243
1244
1245 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1246     Number of slice groups in FMO. Applicable to the H264 encoder.
1247
1248 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1249
1250 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1251     (enum)
1252
1253 enum v4l2_mpeg_video_h264_fmo_change_dir -
1254     Specifies a direction of the slice group change for raster and wipe
1255     maps. Applicable to the H264 encoder. Possible values are:
1256
1257
1258
1259 .. flat-table::
1260     :header-rows:  0
1261     :stub-columns: 0
1262
1263     * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1264       - Raster scan or wipe right.
1265     * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1266       - Reverse raster scan or wipe left.
1267
1268
1269
1270 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1271     Specifies the size of the first slice group for raster and wipe map.
1272     Applicable to the H264 encoder.
1273
1274 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1275     Specifies the number of consecutive macroblocks for the interleaved
1276     map. Applicable to the H264 encoder.
1277
1278 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1279     Enables arbitrary slice ordering in encoded bitstream. Applicable to
1280     the H264 encoder.
1281
1282 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1283     Specifies the slice order in ASO. Applicable to the H264 encoder.
1284     The supplied 32-bit integer is interpreted as follows (bit 0 = least
1285     significant bit):
1286
1287
1288
1289 .. flat-table::
1290     :header-rows:  0
1291     :stub-columns: 0
1292
1293     * - Bit 0:15
1294       - Slice ID
1295     * - Bit 16:32
1296       - Slice position or order
1297
1298
1299
1300 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1301     Enables H264 hierarchical coding. Applicable to the H264 encoder.
1302
1303 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1304
1305 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1306     (enum)
1307
1308 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1309     Specifies the hierarchical coding type. Applicable to the H264
1310     encoder. Possible values are:
1311
1312
1313
1314 .. flat-table::
1315     :header-rows:  0
1316     :stub-columns: 0
1317
1318     * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1319       - Hierarchical B coding.
1320     * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1321       - Hierarchical P coding.
1322
1323
1324
1325 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1326     Specifies the number of hierarchical coding layers. Applicable to
1327     the H264 encoder.
1328
1329 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1330     Specifies a user defined QP for each layer. Applicable to the H264
1331     encoder. The supplied 32-bit integer is interpreted as follows (bit
1332     0 = least significant bit):
1333
1334
1335
1336 .. flat-table::
1337     :header-rows:  0
1338     :stub-columns: 0
1339
1340     * - Bit 0:15
1341       - QP value
1342     * - Bit 16:32
1343       - Layer number
1344
1345
1346
1347 .. _v4l2-mpeg-mpeg2:
1348
1349 ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
1350     Specifies the slice parameters (as extracted from the bitstream) for the
1351     associated MPEG-2 slice data. This includes the necessary parameters for
1352     configuring a stateless hardware decoding pipeline for MPEG-2.
1353     The bitstream parameters are defined according to :ref:`mpeg2part2`.
1354
1355     .. note::
1356
1357        This compound control is not yet part of the public kernel API and
1358        it is expected to change.
1359
1360 .. c:type:: v4l2_ctrl_mpeg2_slice_params
1361
1362 .. cssclass:: longtable
1363
1364 .. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
1365     :header-rows:  0
1366     :stub-columns: 0
1367     :widths:       1 1 2
1368
1369     * - __u32
1370       - ``bit_size``
1371       - Size (in bits) of the current slice data.
1372     * - __u32
1373       - ``data_bit_offset``
1374       - Offset (in bits) to the video data in the current slice data.
1375     * - struct :c:type:`v4l2_mpeg2_sequence`
1376       - ``sequence``
1377       - Structure with MPEG-2 sequence metadata, merging relevant fields from
1378         the sequence header and sequence extension parts of the bitstream.
1379     * - struct :c:type:`v4l2_mpeg2_picture`
1380       - ``picture``
1381       - Structure with MPEG-2 picture metadata, merging relevant fields from
1382         the picture header and picture coding extension parts of the bitstream.
1383     * - __u64
1384       - ``backward_ref_ts``
1385       - Timestamp of the V4L2 capture buffer to use as backward reference, used
1386         with B-coded and P-coded frames. The timestamp refers to the
1387         ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1388         :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1389         :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1390     * - __u64
1391       - ``forward_ref_ts``
1392       - Timestamp for the V4L2 capture buffer to use as forward reference, used
1393         with B-coded frames. The timestamp refers to the ``timestamp`` field in
1394         struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1395         function to convert the struct :c:type:`timeval` in struct
1396         :c:type:`v4l2_buffer` to a __u64.
1397     * - __u32
1398       - ``quantiser_scale_code``
1399       - Code used to determine the quantization scale to use for the IDCT.
1400
1401 .. c:type:: v4l2_mpeg2_sequence
1402
1403 .. cssclass:: longtable
1404
1405 .. flat-table:: struct v4l2_mpeg2_sequence
1406     :header-rows:  0
1407     :stub-columns: 0
1408     :widths:       1 1 2
1409
1410     * - __u16
1411       - ``horizontal_size``
1412       - The width of the displayable part of the frame's luminance component.
1413     * - __u16
1414       - ``vertical_size``
1415       - The height of the displayable part of the frame's luminance component.
1416     * - __u32
1417       - ``vbv_buffer_size``
1418       - Used to calculate the required size of the video buffering verifier,
1419         defined (in bits) as: 16 * 1024 * vbv_buffer_size.
1420     * - __u16
1421       - ``profile_and_level_indication``
1422       - The current profile and level indication as extracted from the
1423         bitstream.
1424     * - __u8
1425       - ``progressive_sequence``
1426       - Indication that all the frames for the sequence are progressive instead
1427         of interlaced.
1428     * - __u8
1429       - ``chroma_format``
1430       - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
1431
1432 .. c:type:: v4l2_mpeg2_picture
1433
1434 .. cssclass:: longtable
1435
1436 .. flat-table:: struct v4l2_mpeg2_picture
1437     :header-rows:  0
1438     :stub-columns: 0
1439     :widths:       1 1 2
1440
1441     * - __u8
1442       - ``picture_coding_type``
1443       - Picture coding type for the frame covered by the current slice
1444         (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
1445         V4L2_MPEG2_PICTURE_CODING_TYPE_B).
1446     * - __u8
1447       - ``f_code[2][2]``
1448       - Motion vector codes.
1449     * - __u8
1450       - ``intra_dc_precision``
1451       - Precision of Discrete Cosine transform (0: 8 bits precision,
1452         1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
1453     * - __u8
1454       - ``picture_structure``
1455       - Picture structure (1: interlaced top field, 2: interlaced bottom field,
1456         3: progressive frame).
1457     * - __u8
1458       - ``top_field_first``
1459       - If set to 1 and interlaced stream, top field is output first.
1460     * - __u8
1461       - ``frame_pred_frame_dct``
1462       - If set to 1, only frame-DCT and frame prediction are used.
1463     * - __u8
1464       - ``concealment_motion_vectors``
1465       -  If set to 1, motion vectors are coded for intra macroblocks.
1466     * - __u8
1467       - ``q_scale_type``
1468       - This flag affects the inverse quantization process.
1469     * - __u8
1470       - ``intra_vlc_format``
1471       - This flag affects the decoding of transform coefficient data.
1472     * - __u8
1473       - ``alternate_scan``
1474       - This flag affects the decoding of transform coefficient data.
1475     * - __u8
1476       - ``repeat_first_field``
1477       - This flag affects the decoding process of progressive frames.
1478     * - __u16
1479       - ``progressive_frame``
1480       - Indicates whether the current frame is progressive.
1481
1482 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
1483     Specifies quantization matrices (as extracted from the bitstream) for the
1484     associated MPEG-2 slice data.
1485
1486     .. note::
1487
1488        This compound control is not yet part of the public kernel API and
1489        it is expected to change.
1490
1491 .. c:type:: v4l2_ctrl_mpeg2_quantization
1492
1493 .. cssclass:: longtable
1494
1495 .. flat-table:: struct v4l2_ctrl_mpeg2_quantization
1496     :header-rows:  0
1497     :stub-columns: 0
1498     :widths:       1 1 2
1499
1500     * - __u8
1501       - ``load_intra_quantiser_matrix``
1502       - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
1503     * - __u8
1504       - ``load_non_intra_quantiser_matrix``
1505       - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
1506         data.
1507     * - __u8
1508       - ``load_chroma_intra_quantiser_matrix``
1509       - One bit to indicate whether to load the
1510         ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
1511         formats.
1512     * - __u8
1513       - ``load_chroma_non_intra_quantiser_matrix``
1514       - One bit to indicate whether to load the
1515         ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
1516         YUV formats.
1517     * - __u8
1518       - ``intra_quantiser_matrix[64]``
1519       - The quantization matrix coefficients for intra-coded frames, in zigzag
1520         scanning order. It is relevant for both luma and chroma components,
1521         although it can be superseded by the chroma-specific matrix for
1522         non-4:2:0 YUV formats.
1523     * - __u8
1524       - ``non_intra_quantiser_matrix[64]``
1525       - The quantization matrix coefficients for non-intra-coded frames, in
1526         zigzag scanning order. It is relevant for both luma and chroma
1527         components, although it can be superseded by the chroma-specific matrix
1528         for non-4:2:0 YUV formats.
1529     * - __u8
1530       - ``chroma_intra_quantiser_matrix[64]``
1531       - The quantization matrix coefficients for the chominance component of
1532         intra-coded frames, in zigzag scanning order. Only relevant for
1533         non-4:2:0 YUV formats.
1534     * - __u8
1535       - ``chroma_non_intra_quantiser_matrix[64]``
1536       - The quantization matrix coefficients for the chrominance component of
1537         non-intra-coded frames, in zigzag scanning order. Only relevant for
1538         non-4:2:0 YUV formats.
1539
1540 MFC 5.1 MPEG Controls
1541 =====================
1542
1543 The following MPEG class controls deal with MPEG decoding and encoding
1544 settings that are specific to the Multi Format Codec 5.1 device present
1545 in the S5P family of SoCs by Samsung.
1546
1547
1548 .. _mfc51-control-id:
1549
1550 MFC 5.1 Control IDs
1551 -------------------
1552
1553 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
1554     If the display delay is enabled then the decoder is forced to return
1555     a CAPTURE buffer (decoded frame) after processing a certain number
1556     of OUTPUT buffers. The delay can be set through
1557     ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
1558     feature can be used for example for generating thumbnails of videos.
1559     Applicable to the H264 decoder.
1560
1561 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
1562     Display delay value for H264 decoder. The decoder is forced to
1563     return a decoded frame after the set 'display delay' number of
1564     frames. If this number is low it may result in frames returned out
1565     of display order, in addition the hardware may still be using the
1566     returned buffer as a reference picture for subsequent frames.
1567
1568 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
1569     The number of reference pictures used for encoding a P picture.
1570     Applicable to the H264 encoder.
1571
1572 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
1573     Padding enable in the encoder - use a color instead of repeating
1574     border pixels. Applicable to encoders.
1575
1576 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
1577     Padding color in the encoder. Applicable to encoders. The supplied
1578     32-bit integer is interpreted as follows (bit 0 = least significant
1579     bit):
1580
1581
1582
1583 .. flat-table::
1584     :header-rows:  0
1585     :stub-columns: 0
1586
1587     * - Bit 0:7
1588       - V chrominance information
1589     * - Bit 8:15
1590       - U chrominance information
1591     * - Bit 16:23
1592       - Y luminance information
1593     * - Bit 24:31
1594       - Must be zero.
1595
1596
1597
1598 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
1599     Reaction coefficient for MFC rate control. Applicable to encoders.
1600
1601     .. note::
1602
1603        #. Valid only when the frame level RC is enabled.
1604
1605        #. For tight CBR, this field must be small (ex. 2 ~ 10). For
1606           VBR, this field must be large (ex. 100 ~ 1000).
1607
1608        #. It is not recommended to use the greater number than
1609           FRAME_RATE * (10^9 / BIT_RATE).
1610
1611 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
1612     Adaptive rate control for dark region. Valid only when H.264 and
1613     macroblock level RC is enabled
1614     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1615     encoder.
1616
1617 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
1618     Adaptive rate control for smooth region. Valid only when H.264 and
1619     macroblock level RC is enabled
1620     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1621     encoder.
1622
1623 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
1624     Adaptive rate control for static region. Valid only when H.264 and
1625     macroblock level RC is enabled
1626     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1627     encoder.
1628
1629 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
1630     Adaptive rate control for activity region. Valid only when H.264 and
1631     macroblock level RC is enabled
1632     (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1633     encoder.
1634
1635 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
1636
1637 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
1638     (enum)
1639
1640 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
1641     Indicates in what conditions the encoder should skip frames. If
1642     encoding a frame would cause the encoded stream to be larger then a
1643     chosen data limit then the frame will be skipped. Possible values
1644     are:
1645
1646
1647 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1648
1649 .. flat-table::
1650     :header-rows:  0
1651     :stub-columns: 0
1652
1653     * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
1654       - Frame skip mode is disabled.
1655     * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
1656       - Frame skip mode enabled and buffer limit is set by the chosen
1657         level and is defined by the standard.
1658     * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
1659       - Frame skip mode enabled and buffer limit is set by the VBV
1660         (MPEG1/2/4) or CPB (H264) buffer size control.
1661
1662
1663
1664 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
1665     Enable rate-control with fixed target bit. If this setting is
1666     enabled, then the rate control logic of the encoder will calculate
1667     the average bitrate for a GOP and keep it below or equal the set
1668     bitrate target. Otherwise the rate control logic calculates the
1669     overall average bitrate for the stream and keeps it below or equal
1670     to the set bitrate. In the first case the average bitrate for the
1671     whole stream will be smaller then the set bitrate. This is caused
1672     because the average is calculated for smaller number of frames, on
1673     the other hand enabling this setting will ensure that the stream
1674     will meet tight bandwidth constraints. Applicable to encoders.
1675
1676 .. _v4l2-mpeg-mfc51-video-force-frame-type:
1677
1678 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
1679     (enum)
1680
1681 enum v4l2_mpeg_mfc51_video_force_frame_type -
1682     Force a frame type for the next queued buffer. Applicable to
1683     encoders. Possible values are:
1684
1685
1686
1687 .. flat-table::
1688     :header-rows:  0
1689     :stub-columns: 0
1690
1691     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
1692       - Forcing a specific frame type disabled.
1693     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
1694       - Force an I-frame.
1695     * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
1696       - Force a non-coded frame.
1697
1698
1699
1700
1701 CX2341x MPEG Controls
1702 =====================
1703
1704 The following MPEG class controls deal with MPEG encoding settings that
1705 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
1706
1707
1708 .. _cx2341x-control-id:
1709
1710 CX2341x Control IDs
1711 -------------------
1712
1713 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
1714
1715 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
1716     (enum)
1717
1718 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
1719     Sets the Spatial Filter mode (default ``MANUAL``). Possible values
1720     are:
1721
1722
1723
1724 .. flat-table::
1725     :header-rows:  0
1726     :stub-columns: 0
1727
1728     * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
1729       - Choose the filter manually
1730     * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
1731       - Choose the filter automatically
1732
1733
1734
1735 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
1736     The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
1737     is 0.)
1738
1739 .. _luma-spatial-filter-type:
1740
1741 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
1742     (enum)
1743
1744 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
1745     Select the algorithm to use for the Luma Spatial Filter (default
1746     ``1D_HOR``). Possible values:
1747
1748
1749
1750 .. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
1751
1752 .. flat-table::
1753     :header-rows:  0
1754     :stub-columns: 0
1755
1756     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
1757       - No filter
1758     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
1759       - One-dimensional horizontal
1760     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
1761       - One-dimensional vertical
1762     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
1763       - Two-dimensional separable
1764     * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
1765       - Two-dimensional symmetrical non-separable
1766
1767
1768
1769 .. _chroma-spatial-filter-type:
1770
1771 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
1772     (enum)
1773
1774 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
1775     Select the algorithm for the Chroma Spatial Filter (default
1776     ``1D_HOR``). Possible values are:
1777
1778
1779
1780 .. flat-table::
1781     :header-rows:  0
1782     :stub-columns: 0
1783
1784     * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
1785       - No filter
1786     * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
1787       - One-dimensional horizontal
1788
1789
1790
1791 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
1792
1793 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
1794     (enum)
1795
1796 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
1797     Sets the Temporal Filter mode (default ``MANUAL``). Possible values
1798     are:
1799
1800
1801
1802 .. flat-table::
1803     :header-rows:  0
1804     :stub-columns: 0
1805
1806     * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
1807       - Choose the filter manually
1808     * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
1809       - Choose the filter automatically
1810
1811
1812
1813 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
1814     The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
1815     is 8 for full-scale capturing and 0 for scaled capturing.)
1816
1817 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
1818
1819 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
1820     (enum)
1821
1822 enum v4l2_mpeg_cx2341x_video_median_filter_type -
1823     Median Filter Type (default ``OFF``). Possible values are:
1824
1825
1826
1827 .. flat-table::
1828     :header-rows:  0
1829     :stub-columns: 0
1830
1831     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
1832       - No filter
1833     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
1834       - Horizontal filter
1835     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
1836       - Vertical filter
1837     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
1838       - Horizontal and vertical filter
1839     * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
1840       - Diagonal filter
1841
1842
1843
1844 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1845     Threshold above which the luminance median filter is enabled
1846     (default 0)
1847
1848 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
1849     Threshold below which the luminance median filter is enabled
1850     (default 255)
1851
1852 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1853     Threshold above which the chroma median filter is enabled (default
1854     0)
1855
1856 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
1857     Threshold below which the chroma median filter is enabled (default
1858     255)
1859
1860 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
1861     The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
1862     the stream between every four video frames. The packet size is 2048
1863     bytes, including the packet_start_code_prefix and stream_id
1864     fields. The stream_id is 0xBF (private stream 2). The payload
1865     consists of 0x00 bytes, to be filled in by the application. 0 = do
1866     not insert, 1 = insert packets.
1867
1868
1869 VPX Control Reference
1870 =====================
1871
1872 The VPX controls include controls for encoding parameters of VPx video
1873 codec.
1874
1875
1876 .. _vpx-control-id:
1877
1878 VPX Control IDs
1879 ---------------
1880
1881 .. _v4l2-vpx-num-partitions:
1882
1883 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
1884     (enum)
1885
1886 enum v4l2_vp8_num_partitions -
1887     The number of token partitions to use in VP8 encoder. Possible
1888     values are:
1889
1890
1891
1892 .. flat-table::
1893     :header-rows:  0
1894     :stub-columns: 0
1895
1896     * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
1897       - 1 coefficient partition
1898     * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
1899       - 2 coefficient partitions
1900     * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
1901       - 4 coefficient partitions
1902     * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
1903       - 8 coefficient partitions
1904
1905
1906
1907 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
1908     Setting this prevents intra 4x4 mode in the intra mode decision.
1909
1910 .. _v4l2-vpx-num-ref-frames:
1911
1912 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
1913     (enum)
1914
1915 enum v4l2_vp8_num_ref_frames -
1916     The number of reference pictures for encoding P frames. Possible
1917     values are:
1918
1919 .. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
1920
1921 .. flat-table::
1922     :header-rows:  0
1923     :stub-columns: 0
1924
1925     * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
1926       - Last encoded frame will be searched
1927     * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
1928       - Two frames will be searched among the last encoded frame, the
1929         golden frame and the alternate reference (altref) frame. The
1930         encoder implementation will decide which two are chosen.
1931     * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
1932       - The last encoded frame, the golden frame and the altref frame will
1933         be searched.
1934
1935
1936
1937 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
1938     Indicates the loop filter level. The adjustment of the loop filter
1939     level is done via a delta value against a baseline loop filter
1940     value.
1941
1942 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
1943     This parameter affects the loop filter. Anything above zero weakens
1944     the deblocking effect on the loop filter.
1945
1946 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
1947     Sets the refresh period for the golden frame. The period is defined
1948     in number of frames. For a value of 'n', every nth frame starting
1949     from the first key frame will be taken as a golden frame. For eg.
1950     for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
1951     frame refresh period is set as 4, the frames 0, 4, 8 etc will be
1952     taken as the golden frames as frame 0 is always a key frame.
1953
1954 .. _v4l2-vpx-golden-frame-sel:
1955
1956 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
1957     (enum)
1958
1959 enum v4l2_vp8_golden_frame_sel -
1960     Selects the golden frame for encoding. Possible values are:
1961
1962 .. raw:: latex
1963
1964     \footnotesize
1965
1966 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
1967
1968 .. flat-table::
1969     :header-rows:  0
1970     :stub-columns: 0
1971
1972     * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
1973       - Use the (n-2)th frame as a golden frame, current frame index being
1974         'n'.
1975     * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
1976       - Use the previous specific frame indicated by
1977         ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
1978         golden frame.
1979
1980 .. raw:: latex
1981
1982     \normalsize
1983
1984
1985 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
1986     Minimum quantization parameter for VP8.
1987
1988 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
1989     Maximum quantization parameter for VP8.
1990
1991 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
1992     Quantization parameter for an I frame for VP8.
1993
1994 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
1995     Quantization parameter for a P frame for VP8.
1996
1997 .. _v4l2-mpeg-video-vp8-profile:
1998
1999 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
2000     (enum)
2001
2002 enum v4l2_mpeg_video_vp8_profile -
2003     This control allows selecting the profile for VP8 encoder.
2004     This is also used to enumerate supported profiles by VP8 encoder or decoder.
2005     Possible values are:
2006
2007 .. flat-table::
2008     :header-rows:  0
2009     :stub-columns: 0
2010
2011     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
2012       - Profile 0
2013     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
2014       - Profile 1
2015     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
2016       - Profile 2
2017     * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
2018       - Profile 3
2019
2020 .. _v4l2-mpeg-video-vp9-profile:
2021
2022 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
2023     (enum)
2024
2025 enum v4l2_mpeg_video_vp9_profile -
2026     This control allows selecting the profile for VP9 encoder.
2027     This is also used to enumerate supported profiles by VP9 encoder or decoder.
2028     Possible values are:
2029
2030 .. flat-table::
2031     :header-rows:  0
2032     :stub-columns: 0
2033
2034     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
2035       - Profile 0
2036     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
2037       - Profile 1
2038     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
2039       - Profile 2
2040     * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
2041       - Profile 3
2042
2043
2044 High Efficiency Video Coding (HEVC/H.265) Control Reference
2045 ===========================================================
2046
2047 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
2048 video codec.
2049
2050
2051 .. _hevc-control-id:
2052
2053 HEVC/H.265 Control IDs
2054 ----------------------
2055
2056 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
2057     Minimum quantization parameter for HEVC.
2058     Valid range: from 0 to 51.
2059
2060 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
2061     Maximum quantization parameter for HEVC.
2062     Valid range: from 0 to 51.
2063
2064 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
2065     Quantization parameter for an I frame for HEVC.
2066     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2067     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2068
2069 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
2070     Quantization parameter for a P frame for HEVC.
2071     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2072     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2073
2074 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
2075     Quantization parameter for a B frame for HEVC.
2076     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2077     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2078
2079 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
2080     HIERARCHICAL_QP allows the host to specify the quantization parameter
2081     values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
2082     valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
2083     control value to 1 enables setting of the QP values for the layers.
2084
2085 .. _v4l2-hevc-hier-coding-type:
2086
2087 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
2088     (enum)
2089
2090 enum v4l2_mpeg_video_hevc_hier_coding_type -
2091     Selects the hierarchical coding type for encoding. Possible values are:
2092
2093 .. raw:: latex
2094
2095     \footnotesize
2096
2097 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2098
2099 .. flat-table::
2100     :header-rows:  0
2101     :stub-columns: 0
2102
2103     * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
2104       - Use the B frame for hierarchical coding.
2105     * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
2106       - Use the P frame for hierarchical coding.
2107
2108 .. raw:: latex
2109
2110     \normalsize
2111
2112
2113 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
2114     Selects the hierarchical coding layer. In normal encoding
2115     (non-hierarchial coding), it should be zero. Possible values are [0, 6].
2116     0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
2117     LAYER 1 and so on.
2118
2119 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
2120     Indicates quantization parameter for hierarchical coding layer 0.
2121     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2122     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2123
2124 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
2125     Indicates quantization parameter for hierarchical coding layer 1.
2126     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2127     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2128
2129 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
2130     Indicates quantization parameter for hierarchical coding layer 2.
2131     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2132     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2133
2134 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
2135     Indicates quantization parameter for hierarchical coding layer 3.
2136     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2137     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2138
2139 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
2140     Indicates quantization parameter for hierarchical coding layer 4.
2141     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2142     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2143
2144 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
2145     Indicates quantization parameter for hierarchical coding layer 5.
2146     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2147     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2148
2149 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
2150     Indicates quantization parameter for hierarchical coding layer 6.
2151     Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2152     V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2153
2154 .. _v4l2-hevc-profile:
2155
2156 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
2157     (enum)
2158
2159 enum v4l2_mpeg_video_hevc_profile -
2160     Select the desired profile for HEVC encoder.
2161
2162 .. raw:: latex
2163
2164     \footnotesize
2165
2166 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2167
2168 .. flat-table::
2169     :header-rows:  0
2170     :stub-columns: 0
2171
2172     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
2173       - Main profile.
2174     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
2175       - Main still picture profile.
2176     * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
2177       - Main 10 profile.
2178
2179 .. raw:: latex
2180
2181     \normalsize
2182
2183
2184 .. _v4l2-hevc-level:
2185
2186 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
2187     (enum)
2188
2189 enum v4l2_mpeg_video_hevc_level -
2190     Selects the desired level for HEVC encoder.
2191
2192 .. raw:: latex
2193
2194     \footnotesize
2195
2196 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2197
2198 .. flat-table::
2199     :header-rows:  0
2200     :stub-columns: 0
2201
2202     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
2203       - Level 1.0
2204     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
2205       - Level 2.0
2206     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
2207       - Level 2.1
2208     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
2209       - Level 3.0
2210     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
2211       - Level 3.1
2212     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
2213       - Level 4.0
2214     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
2215       - Level 4.1
2216     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
2217       - Level 5.0
2218     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
2219       - Level 5.1
2220     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
2221       - Level 5.2
2222     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
2223       - Level 6.0
2224     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
2225       - Level 6.1
2226     * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
2227       - Level 6.2
2228
2229 .. raw:: latex
2230
2231     \normalsize
2232
2233
2234 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
2235     Indicates the number of evenly spaced subintervals, called ticks, within
2236     one second. This is a 16 bit unsigned integer and has a maximum value up to
2237     0xffff and a minimum value of 1.
2238
2239 .. _v4l2-hevc-tier:
2240
2241 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
2242     (enum)
2243
2244 enum v4l2_mpeg_video_hevc_tier -
2245     TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
2246     were made to deal with applications that differ in terms of maximum bit
2247     rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
2248     this flag to 1 indicates High tier. High tier is for applications requiring
2249     high bit rates.
2250
2251 .. raw:: latex
2252
2253     \footnotesize
2254
2255 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2256
2257 .. flat-table::
2258     :header-rows:  0
2259     :stub-columns: 0
2260
2261     * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
2262       - Main tier.
2263     * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
2264       - High tier.
2265
2266 .. raw:: latex
2267
2268     \normalsize
2269
2270
2271 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
2272     Selects HEVC maximum coding unit depth.
2273
2274 .. _v4l2-hevc-loop-filter-mode:
2275
2276 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
2277     (enum)
2278
2279 enum v4l2_mpeg_video_hevc_loop_filter_mode -
2280     Loop filter mode for HEVC encoder. Possible values are:
2281
2282 .. raw:: latex
2283
2284     \footnotesize
2285
2286 .. tabularcolumns:: |p{10.7cm}|p{6.3cm}|
2287
2288 .. flat-table::
2289     :header-rows:  0
2290     :stub-columns: 0
2291
2292     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
2293       - Loop filter is disabled.
2294     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
2295       - Loop filter is enabled.
2296     * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
2297       - Loop filter is disabled at the slice boundary.
2298
2299 .. raw:: latex
2300
2301     \normalsize
2302
2303
2304 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
2305     Selects HEVC loop filter beta offset. The valid range is [-6, +6].
2306
2307 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
2308     Selects HEVC loop filter tc offset. The valid range is [-6, +6].
2309
2310 .. _v4l2-hevc-refresh-type:
2311
2312 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
2313     (enum)
2314
2315 enum v4l2_mpeg_video_hevc_hier_refresh_type -
2316     Selects refresh type for HEVC encoder.
2317     Host has to specify the period into
2318     V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
2319
2320 .. raw:: latex
2321
2322     \footnotesize
2323
2324 .. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
2325
2326 .. flat-table::
2327     :header-rows:  0
2328     :stub-columns: 0
2329
2330     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
2331       - Use the B frame for hierarchical coding.
2332     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
2333       - Use CRA (Clean Random Access Unit) picture encoding.
2334     * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
2335       - Use IDR (Instantaneous Decoding Refresh) picture encoding.
2336
2337 .. raw:: latex
2338
2339     \normalsize
2340
2341
2342 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
2343     Selects the refresh period for HEVC encoder.
2344     This specifies the number of I pictures between two CRA/IDR pictures.
2345     This is valid only if REFRESH_TYPE is not 0.
2346
2347 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
2348     Indicates HEVC lossless encoding. Setting it to 0 disables lossless
2349     encoding. Setting it to 1 enables lossless encoding.
2350
2351 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
2352     Indicates constant intra prediction for HEVC encoder. Specifies the
2353     constrained intra prediction in which intra largest coding unit (LCU)
2354     prediction is performed by using residual data and decoded samples of
2355     neighboring intra LCU only. Setting the value to 1 enables constant intra
2356     prediction and setting the value to 0 disables constant intra prediction.
2357
2358 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
2359     Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
2360     disables the feature and setting it to 1 enables the wavefront parallel
2361     processing.
2362
2363 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
2364     Setting the value to 1 enables combination of P and B frame for HEVC
2365     encoder.
2366
2367 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
2368     Indicates temporal identifier for HEVC encoder which is enabled by
2369     setting the value to 1.
2370
2371 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
2372     Indicates bi-linear interpolation is conditionally used in the intra
2373     prediction filtering process in the CVS when set to 1. Indicates bi-linear
2374     interpolation is not used in the CVS when set to 0.
2375
2376 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
2377     Indicates maximum number of merge candidate motion vectors.
2378     Values are from 0 to 4.
2379
2380 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
2381     Indicates temporal motion vector prediction for HEVC encoder. Setting it to
2382     1 enables the prediction. Setting it to 0 disables the prediction.
2383
2384 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
2385     Specifies if HEVC generates a stream with a size of the length field
2386     instead of start code pattern. The size of the length field is configurable
2387     through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
2388     the value to 0 disables encoding without startcode pattern. Setting the
2389     value to 1 will enables encoding without startcode pattern.
2390
2391 .. _v4l2-hevc-size-of-length-field:
2392
2393 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
2394 (enum)
2395
2396 enum v4l2_mpeg_video_hevc_size_of_length_field -
2397     Indicates the size of length field.
2398     This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
2399
2400 .. raw:: latex
2401
2402     \footnotesize
2403
2404 .. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
2405
2406 .. flat-table::
2407     :header-rows:  0
2408     :stub-columns: 0
2409
2410     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
2411       - Generate start code pattern (Normal).
2412     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
2413       - Generate size of length field instead of start code pattern and length is 1.
2414     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
2415       - Generate size of length field instead of start code pattern and length is 2.
2416     * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
2417       - Generate size of length field instead of start code pattern and length is 4.
2418
2419 .. raw:: latex
2420
2421     \normalsize
2422
2423 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
2424     Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
2425
2426 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
2427     Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
2428
2429 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
2430     Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
2431
2432 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
2433     Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
2434
2435 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
2436     Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
2437
2438 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
2439     Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
2440
2441 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
2442     Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
2443
2444 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
2445     Selects number of P reference pictures required for HEVC encoder.
2446     P-Frame can use 1 or 2 frames for reference.
2447
2448 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
2449     Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
2450     disables generating SPS and PPS at every IDR. Setting it to one enables
2451     generating SPS and PPS at every IDR.