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/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
12 ***********************
13 Codec Control Reference
14 ***********************
16 Below all controls within the Codec control class are described. First
17 the generic controls, then controls specific for certain hardware.
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
27 Generic Codec Controls
28 ======================
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.
42 .. _v4l2-mpeg-stream-type:
44 ``V4L2_CID_MPEG_STREAM_TYPE``
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:
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
74 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
75 Program Map Table Packet ID for the MPEG transport stream (default
78 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
79 Audio Packet ID for the MPEG transport stream (default 256)
81 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
82 Video Packet ID for the MPEG transport stream (default 260)
84 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
85 Packet ID for the MPEG transport stream carrying PCR fields (default
88 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
91 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
94 .. _v4l2-mpeg-stream-vbi-fmt:
96 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
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:
108 .. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|
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
119 ``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``)
123 .. _v4l2-mpeg-audio-sampling-freq:
125 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
128 enum v4l2_mpeg_audio_sampling_freq -
129 MPEG Audio sampling frequency. Possible values are:
137 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
139 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
141 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
146 .. _v4l2-mpeg-audio-encoding:
148 ``V4L2_CID_MPEG_AUDIO_ENCODING``
151 enum v4l2_mpeg_audio_encoding -
152 MPEG Audio encoding. This control is specific to multiplexed MPEG
153 streams. Possible values are:
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
174 .. _v4l2-mpeg-audio-l1-bitrate:
176 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
179 enum v4l2_mpeg_audio_l1_bitrate -
180 MPEG-1/2 Layer I bitrate. Possible values are:
188 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
190 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
192 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
194 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
196 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
198 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
200 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
202 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
204 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
206 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
208 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
210 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
212 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
214 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
219 .. _v4l2-mpeg-audio-l2-bitrate:
221 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
224 enum v4l2_mpeg_audio_l2_bitrate -
225 MPEG-1/2 Layer II bitrate. Possible values are:
233 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
235 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
237 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
239 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
241 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
243 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
245 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
247 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
249 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
251 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
253 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
255 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
257 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
259 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
264 .. _v4l2-mpeg-audio-l3-bitrate:
266 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
269 enum v4l2_mpeg_audio_l3_bitrate -
270 MPEG-1/2 Layer III bitrate. Possible values are:
278 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
280 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
282 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
284 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
286 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
288 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
290 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
292 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
294 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
296 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
298 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
300 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
302 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
304 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
309 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
310 AAC bitrate in bits per second.
312 .. _v4l2-mpeg-audio-ac3-bitrate:
314 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
317 enum v4l2_mpeg_audio_ac3_bitrate -
318 AC-3 bitrate. Possible values are:
326 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
328 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
330 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
332 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
334 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
336 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
338 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
340 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
342 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
344 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
346 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
348 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
350 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
352 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
354 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
356 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
358 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
360 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
362 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
367 .. _v4l2-mpeg-audio-mode:
369 ``V4L2_CID_MPEG_AUDIO_MODE``
372 enum v4l2_mpeg_audio_mode -
373 MPEG Audio mode. Possible values are:
381 * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
383 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
385 * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
387 * - ``V4L2_MPEG_AUDIO_MODE_MONO``
392 .. _v4l2-mpeg-audio-mode-extension:
394 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
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:
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
419 .. _v4l2-mpeg-audio-emphasis:
421 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
424 enum v4l2_mpeg_audio_emphasis -
425 Audio Emphasis. Possible values are:
433 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
435 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
436 - 50/15 microsecond emphasis
437 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
442 .. _v4l2-mpeg-audio-crc:
444 ``V4L2_CID_MPEG_AUDIO_CRC``
447 enum v4l2_mpeg_audio_crc -
448 CRC method. Possible values are:
456 * - ``V4L2_MPEG_AUDIO_CRC_NONE``
458 * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
459 - 16 bit parity check
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 =
469 .. _v4l2-mpeg-audio-dec-playback:
471 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
474 enum v4l2_mpeg_audio_dec_playback -
475 Determines how monolingual audio should be played back. Possible
480 .. tabularcolumns:: |p{9.8cm}|p{7.7cm}|
486 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
487 - Automatically determines the best playback mode.
488 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
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``
496 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
497 - Stereo playback with swapped left and right channels.
501 .. _v4l2-mpeg-audio-dec-multilingual-playback:
503 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
506 enum v4l2_mpeg_audio_dec_playback -
507 Determines how multilingual audio should be played back.
509 .. _v4l2-mpeg-video-encoding:
511 ``V4L2_CID_MPEG_VIDEO_ENCODING``
514 enum v4l2_mpeg_video_encoding -
515 MPEG Video encoding method. This control is specific to multiplexed
516 MPEG streams. Possible values are:
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
533 .. _v4l2-mpeg-video-aspect:
535 ``V4L2_CID_MPEG_VIDEO_ASPECT``
538 enum v4l2_mpeg_video_aspect -
539 Video aspect. Possible values are:
547 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
548 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
549 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
550 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
554 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
555 Number of B-Frames (default 2)
557 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
558 GOP size (default 12)
560 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
561 GOP closure (default 1)
563 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
564 Enable 3:2 pulldown (default 0)
566 .. _v4l2-mpeg-video-bitrate-mode:
568 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
571 enum v4l2_mpeg_video_bitrate_mode -
572 Video bitrate mode. Possible values are:
580 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
582 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
587 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
588 Video bitrate in bits per second.
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.
595 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
596 For every captured frame, skip this many subsequent frames (default
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 =
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):
615 - V chrominance information
617 - U chrominance information
619 - Y luminance information
625 .. _v4l2-mpeg-video-dec-pts:
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`.
633 .. _v4l2-mpeg-video-dec-frame:
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.
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.
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.
649 .. _v4l2-mpeg-video-h264-vui-sar-idc:
651 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
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
665 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
667 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
669 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
671 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
673 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
675 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
677 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
679 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
681 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
683 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
685 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
687 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
689 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
691 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
693 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
695 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
697 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
699 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
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.
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.
712 .. _v4l2-mpeg-video-h264-level:
714 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
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:
727 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
729 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
731 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
733 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
735 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
737 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
739 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
741 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
743 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
745 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
747 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
749 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
751 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
753 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
755 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
757 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
759 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
761 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
763 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
765 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
770 .. _v4l2-mpeg-video-mpeg2-level:
772 ``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
775 enum v4l2_mpeg_video_mpeg2_level -
776 The level information for the MPEG2 elementary stream. Applicable to
777 MPEG2 codecs. Possible values are:
785 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
787 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
789 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
790 - High-1440 Level (H-14)
791 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
796 .. _v4l2-mpeg-video-mpeg4-level:
798 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
801 enum v4l2_mpeg_video_mpeg4_level -
802 The level information for the MPEG4 elementary stream. Applicable to
803 the MPEG4 encoder. Possible values are:
811 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
813 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
815 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
817 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
819 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
821 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
823 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
825 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
830 .. _v4l2-mpeg-video-h264-profile:
832 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
835 enum v4l2_mpeg_video_h264_profile -
836 The profile information for H264. Applicable to the H264 encoder.
845 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
847 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
848 - Constrained Baseline profile
849 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
851 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
853 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
855 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
857 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
859 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
860 - High 444 Predictive profile
861 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
862 - High 10 Intra profile
863 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
864 - High 422 Intra profile
865 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
866 - High 444 Intra profile
867 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
868 - CAVLC 444 Intra profile
869 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
870 - Scalable Baseline profile
871 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
872 - Scalable High profile
873 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
874 - Scalable High Intra profile
875 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
876 - Stereo High profile
877 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
878 - Multiview High profile
879 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
880 - Constrained High profile
884 .. _v4l2-mpeg-video-mpeg2-profile:
886 ``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
889 enum v4l2_mpeg_video_mpeg2_profile -
890 The profile information for MPEG2. Applicable to MPEG2 codecs.
899 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
900 - Simple profile (SP)
901 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
903 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
904 - SNR Scalable profile (SNR)
905 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
906 - Spatially Scalable profile (Spt)
907 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
909 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
910 - Multi-view profile (MVP)
914 .. _v4l2-mpeg-video-mpeg4-profile:
916 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
919 enum v4l2_mpeg_video_mpeg4_profile -
920 The profile information for MPEG4. Applicable to the MPEG4 encoder.
929 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
931 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
932 - Advanced Simple profile
933 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
935 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
936 - Simple Scalable profile
937 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
942 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
943 The maximum number of reference pictures used for encoding.
944 Applicable to the encoder.
946 .. _v4l2-mpeg-video-multi-slice-mode:
948 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
951 enum v4l2_mpeg_video_multi_slice_mode -
952 Determines how the encoder should handle division of frame into
953 slices. Applicable to the encoder. Possible values are:
957 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
963 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
964 - Single slice per frame.
965 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
966 - Multiple slices with set maximum number of macroblocks per slice.
967 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
968 - Multiple slice with set maximum size in bytes per slice.
972 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
973 The maximum number of macroblocks in a slice. Used when
974 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
975 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
978 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
979 The maximum size of a slice in bytes. Used when
980 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
981 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
984 .. _v4l2-mpeg-video-h264-loop-filter-mode:
986 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
989 enum v4l2_mpeg_video_h264_loop_filter_mode -
990 Loop filter mode for H264 encoder. Possible values are:
996 .. tabularcolumns:: |p{13.6cm}|p{3.9cm}|
1002 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1003 - Loop filter is enabled.
1004 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1005 - Loop filter is disabled.
1006 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1007 - Loop filter is disabled at the slice boundary.
1014 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1015 Loop filter alpha coefficient, defined in the H264 standard.
1016 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1017 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1018 offset FilterOffsetA is twice this value.
1019 Applicable to the H264 encoder.
1021 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1022 Loop filter beta coefficient, defined in the H264 standard.
1023 This corresponds to the slice_beta_offset_div2 slice header field, and
1024 should be in the range of -6 to +6, inclusive. The actual beta offset
1025 FilterOffsetB is twice this value.
1026 Applicable to the H264 encoder.
1028 .. _v4l2-mpeg-video-h264-entropy-mode:
1030 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1033 enum v4l2_mpeg_video_h264_entropy_mode -
1034 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1035 encoder. Possible values are:
1038 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1045 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1046 - Use CAVLC entropy coding.
1047 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1048 - Use CABAC entropy coding.
1052 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1053 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1055 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1056 Enable constrained intra prediction for H264. Applicable to the H264
1059 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1060 Specify the offset that should be added to the luma quantization
1061 parameter to determine the chroma quantization parameter. Applicable
1062 to the H264 encoder.
1064 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1065 Cyclic intra macroblock refresh. This is the number of continuous
1066 macroblocks refreshed every frame. Each frame a successive set of
1067 macroblocks is refreshed until the cycle completes and starts from
1068 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1070 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1071 Frame level rate control enable. If this control is disabled then
1072 the quantization parameter for each frame type is constant and set
1073 with appropriate controls (e.g.
1074 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1075 enabled then quantization parameter is adjusted to meet the chosen
1076 bitrate. Minimum and maximum value for the quantization parameter
1077 can be set with appropriate controls (e.g.
1078 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1080 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1081 Macroblock level rate control enable. Applicable to the MPEG4 and
1084 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1085 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1088 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1089 Quantization parameter for an I frame for H263. Valid range: from 1
1092 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1093 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1095 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1096 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1098 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1099 Quantization parameter for an P frame for H263. Valid range: from 1
1102 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1103 Quantization parameter for an B frame for H263. Valid range: from 1
1106 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1107 Quantization parameter for an I frame for H264. Valid range: from 0
1110 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1111 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1113 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1114 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1116 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1117 Quantization parameter for an P frame for H264. Valid range: from 0
1120 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1121 Quantization parameter for an B frame for H264. Valid range: from 0
1124 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1125 Minimum quantization parameter for the H264 I frame to limit I frame
1126 quality to a range. Valid range: from 0 to 51. If
1127 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1128 should be chosen to meet both requirements.
1130 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1131 Maximum quantization parameter for the H264 I frame to limit I frame
1132 quality to a range. Valid range: from 0 to 51. If
1133 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1134 should be chosen to meet both requirements.
1136 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1137 Minimum quantization parameter for the H264 P frame to limit P frame
1138 quality to a range. Valid range: from 0 to 51. If
1139 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1140 should be chosen to meet both requirements.
1142 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1143 Maximum quantization parameter for the H264 P frame to limit P frame
1144 quality to a range. Valid range: from 0 to 51. If
1145 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1146 should be chosen to meet both requirements.
1148 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1149 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1152 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1153 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1155 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1156 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1158 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1159 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1162 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1163 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1166 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1167 The Video Buffer Verifier size in kilobytes, it is used as a
1168 limitation of frame skip. The VBV is defined in the standard as a
1169 mean to verify that the produced stream will be successfully
1170 decoded. The standard describes it as "Part of a hypothetical
1171 decoder that is conceptually connected to the output of the encoder.
1172 Its purpose is to provide a constraint on the variability of the
1173 data rate that an encoder or editing process may produce.".
1174 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1176 .. _v4l2-mpeg-video-vbv-delay:
1178 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1179 Sets the initial delay in milliseconds for VBV buffer control.
1181 .. _v4l2-mpeg-video-hor-search-range:
1183 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1184 Horizontal search range defines maximum horizontal search area in
1185 pixels to search and match for the present Macroblock (MB) in the
1186 reference picture. This V4L2 control macro is used to set horizontal
1187 search range for motion estimation module in video encoder.
1189 .. _v4l2-mpeg-video-vert-search-range:
1191 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1192 Vertical search range defines maximum vertical search area in pixels
1193 to search and match for the present Macroblock (MB) in the reference
1194 picture. This V4L2 control macro is used to set vertical search
1195 range for motion estimation module in video encoder.
1197 .. _v4l2-mpeg-video-force-key-frame:
1199 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1200 Force a key frame for the next queued buffer. Applicable to
1201 encoders. This is a general, codec-agnostic keyframe control.
1203 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1204 The Coded Picture Buffer size in kilobytes, it is used as a
1205 limitation of frame skip. The CPB is defined in the H264 standard as
1206 a mean to verify that the produced stream will be successfully
1207 decoded. Applicable to the H264 encoder.
1209 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1210 Period between I-frames in the open GOP for H264. In case of an open
1211 GOP this is the period between two I-frames. The period between IDR
1212 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1213 control. An IDR frame, which stands for Instantaneous Decoding
1214 Refresh is an I-frame after which no prior frames are referenced.
1215 This means that a stream can be restarted from an IDR frame without
1216 the need to store or decode any previous frames. Applicable to the
1219 .. _v4l2-mpeg-video-header-mode:
1221 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1224 enum v4l2_mpeg_video_header_mode -
1225 Determines whether the header is returned as the first buffer or is
1226 it returned together with the first frame. Applicable to encoders.
1227 Possible values are:
1233 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1239 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1240 - The stream header is returned separately in the first buffer.
1241 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1242 - The stream header is returned together with the first encoded
1250 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1251 Repeat the video sequence headers. Repeating these headers makes
1252 random access to the video stream easier. Applicable to the MPEG1, 2
1255 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1256 Enabled the deblocking post processing filter for MPEG4 decoder.
1257 Applicable to the MPEG4 decoder.
1259 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1260 vop_time_increment_resolution value for MPEG4. Applicable to the
1263 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1264 vop_time_increment value for MPEG4. Applicable to the MPEG4
1267 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1268 Enable generation of frame packing supplemental enhancement
1269 information in the encoded bitstream. The frame packing SEI message
1270 contains the arrangement of L and R planes for 3D viewing.
1271 Applicable to the H264 encoder.
1273 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1274 Sets current frame as frame0 in frame packing SEI. Applicable to the
1277 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1279 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1282 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1283 Frame packing arrangement type for H264 SEI. Applicable to the H264
1284 encoder. Possible values are:
1290 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1296 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1297 - Pixels are alternatively from L and R.
1298 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1299 - L and R are interlaced by column.
1300 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1301 - L and R are interlaced by row.
1302 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1303 - L is on the left, R on the right.
1304 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1305 - L is on top, R on bottom.
1306 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1307 - One view per frame.
1315 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1316 Enables flexible macroblock ordering in the encoded bitstream. It is
1317 a technique used for restructuring the ordering of macroblocks in
1318 pictures. Applicable to the H264 encoder.
1320 .. _v4l2-mpeg-video-h264-fmo-map-type:
1322 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1325 enum v4l2_mpeg_video_h264_fmo_map_type -
1326 When using FMO, the map type divides the image in different scan
1327 patterns of macroblocks. Applicable to the H264 encoder. Possible
1334 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1340 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1341 - Slices are interleaved one after other with macroblocks in run
1343 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1344 - Scatters the macroblocks based on a mathematical function known to
1345 both encoder and decoder.
1346 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1347 - Macroblocks arranged in rectangular areas or regions of interest.
1348 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1349 - Slice groups grow in a cyclic way from centre to outwards.
1350 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1351 - Slice groups grow in raster scan pattern from left to right.
1352 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1353 - Slice groups grow in wipe scan pattern from top to bottom.
1354 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1355 - User defined map type.
1363 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1364 Number of slice groups in FMO. Applicable to the H264 encoder.
1366 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1368 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1371 enum v4l2_mpeg_video_h264_fmo_change_dir -
1372 Specifies a direction of the slice group change for raster and wipe
1373 maps. Applicable to the H264 encoder. Possible values are:
1381 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1382 - Raster scan or wipe right.
1383 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1384 - Reverse raster scan or wipe left.
1388 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1389 Specifies the size of the first slice group for raster and wipe map.
1390 Applicable to the H264 encoder.
1392 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1393 Specifies the number of consecutive macroblocks for the interleaved
1394 map. Applicable to the H264 encoder.
1396 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1397 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1400 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1401 Specifies the slice order in ASO. Applicable to the H264 encoder.
1402 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1414 - Slice position or order
1418 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1419 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1421 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1423 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1426 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1427 Specifies the hierarchical coding type. Applicable to the H264
1428 encoder. Possible values are:
1436 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1437 - Hierarchical B coding.
1438 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1439 - Hierarchical P coding.
1443 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1444 Specifies the number of hierarchical coding layers. Applicable to
1447 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1448 Specifies a user defined QP for each layer. Applicable to the H264
1449 encoder. The supplied 32-bit integer is interpreted as follows (bit
1450 0 = least significant bit):
1466 ``V4L2_CID_MPEG_VIDEO_H264_SPS (struct)``
1467 Specifies the sequence parameter set (as extracted from the
1468 bitstream) for the associated H264 slice data. This includes the
1469 necessary parameters for configuring a stateless hardware decoding
1470 pipeline for H264. The bitstream parameters are defined according
1471 to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
1472 Semantics". For further documentation, refer to the above
1473 specification, unless there is an explicit comment stating
1478 This compound control is not yet part of the public kernel API and
1479 it is expected to change.
1481 .. c:type:: v4l2_ctrl_h264_sps
1483 .. cssclass:: longtable
1485 .. flat-table:: struct v4l2_ctrl_h264_sps
1494 - ``constraint_set_flags``
1495 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
1500 - ``seq_parameter_set_id``
1503 - ``chroma_format_idc``
1506 - ``bit_depth_luma_minus8``
1509 - ``bit_depth_chroma_minus8``
1512 - ``log2_max_frame_num_minus4``
1515 - ``pic_order_cnt_type``
1518 - ``log2_max_pic_order_cnt_lsb_minus4``
1521 - ``max_num_ref_frames``
1524 - ``num_ref_frames_in_pic_order_cnt_cycle``
1527 - ``offset_for_ref_frame[255]``
1530 - ``offset_for_non_ref_pic``
1533 - ``offset_for_top_to_bottom_field``
1536 - ``pic_width_in_mbs_minus1``
1539 - ``pic_height_in_map_units_minus1``
1543 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
1545 .. _h264_sps_constraints_set_flags:
1547 ``Sequence Parameter Set Constraints Set Flags``
1549 .. cssclass:: longtable
1556 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
1559 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
1562 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
1565 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
1568 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
1571 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
1577 ``Sequence Parameter Set Flags``
1579 .. cssclass:: longtable
1586 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
1589 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
1592 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
1595 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
1598 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
1601 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
1604 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
1608 ``V4L2_CID_MPEG_VIDEO_H264_PPS (struct)``
1609 Specifies the picture parameter set (as extracted from the
1610 bitstream) for the associated H264 slice data. This includes the
1611 necessary parameters for configuring a stateless hardware decoding
1612 pipeline for H264. The bitstream parameters are defined according
1613 to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
1614 Semantics". For further documentation, refer to the above
1615 specification, unless there is an explicit comment stating
1620 This compound control is not yet part of the public kernel API and
1621 it is expected to change.
1623 .. c:type:: v4l2_ctrl_h264_pps
1625 .. cssclass:: longtable
1627 .. flat-table:: struct v4l2_ctrl_h264_pps
1633 - ``pic_parameter_set_id``
1636 - ``seq_parameter_set_id``
1639 - ``num_slice_groups_minus1``
1642 - ``num_ref_idx_l0_default_active_minus1``
1645 - ``num_ref_idx_l1_default_active_minus1``
1648 - ``weighted_bipred_idc``
1651 - ``pic_init_qp_minus26``
1654 - ``pic_init_qs_minus26``
1657 - ``chroma_qp_index_offset``
1660 - ``second_chroma_qp_index_offset``
1664 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
1668 ``Picture Parameter Set Flags``
1670 .. cssclass:: longtable
1677 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
1680 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
1683 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
1686 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
1689 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
1692 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
1695 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
1698 * - ``V4L2_H264_PPS_FLAG_PIC_SCALING_MATRIX_PRESENT``
1702 ``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX (struct)``
1703 Specifies the scaling matrix (as extracted from the bitstream) for
1704 the associated H264 slice data. The bitstream parameters are
1705 defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
1706 List Semantics". For further documentation, refer to the above
1707 specification, unless there is an explicit comment stating
1712 This compound control is not yet part of the public kernel API and
1713 it is expected to change.
1715 .. c:type:: v4l2_ctrl_h264_scaling_matrix
1717 .. cssclass:: longtable
1719 .. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
1725 - ``scaling_list_4x4[6][16]``
1726 - Scaling matrix after applying the inverse scanning process.
1727 Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
1730 - ``scaling_list_8x8[6][64]``
1731 - Scaling matrix after applying the inverse scanning process.
1732 Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
1735 ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS (struct)``
1736 Specifies the slice parameters (as extracted from the bitstream)
1737 for the associated H264 slice data. This includes the necessary
1738 parameters for configuring a stateless hardware decoding pipeline
1739 for H264. The bitstream parameters are defined according to
1740 :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
1741 documentation, refer to the above specification, unless there is
1742 an explicit comment stating otherwise.
1746 This compound control is not yet part of the public kernel API
1747 and it is expected to change.
1749 This structure is expected to be passed as an array, with one
1750 entry for each slice included in the bitstream buffer.
1752 .. c:type:: v4l2_ctrl_h264_slice_params
1754 .. cssclass:: longtable
1756 .. flat-table:: struct v4l2_ctrl_h264_slice_params
1765 - ``start_byte_offset``
1766 Offset (in bytes) from the beginning of the OUTPUT buffer to the start
1767 of the slice. If the slice starts with a start code, then this is the
1768 offset to such start code. When operating in slice-based decoding mode
1769 (see :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field should
1770 be set to 0. When operating in frame-based decoding mode, this field
1771 should be 0 for the first slice.
1773 - ``header_bit_size``
1776 - ``first_mb_in_slice``
1782 - ``pic_parameter_set_id``
1785 - ``colour_plane_id``
1788 - ``redundant_pic_cnt``
1797 - ``pic_order_cnt_lsb``
1800 - ``delta_pic_order_cnt_bottom``
1803 - ``delta_pic_order_cnt0``
1806 - ``delta_pic_order_cnt1``
1808 * - struct :c:type:`v4l2_h264_pred_weight_table`
1809 - ``pred_weight_table``
1812 - ``dec_ref_pic_marking_bit_size``
1813 - Size in bits of the dec_ref_pic_marking() syntax element.
1815 - ``pic_order_cnt_bit_size``
1818 - ``cabac_init_idc``
1821 - ``slice_qp_delta``
1824 - ``slice_qs_delta``
1827 - ``disable_deblocking_filter_idc``
1830 - ``slice_alpha_c0_offset_div2``
1833 - ``slice_beta_offset_div2``
1836 - ``num_ref_idx_l0_active_minus1``
1837 - If num_ref_idx_active_override_flag is not set, this field must be
1838 set to the value of num_ref_idx_l0_default_active_minus1.
1840 - ``num_ref_idx_l1_active_minus1``
1841 - If num_ref_idx_active_override_flag is not set, this field must be
1842 set to the value of num_ref_idx_l1_default_active_minus1.
1844 - ``slice_group_change_cycle``
1847 - ``ref_pic_list0[32]``
1848 - Reference picture list after applying the per-slice modifications
1850 - ``ref_pic_list1[32]``
1851 - Reference picture list after applying the per-slice modifications
1854 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
1856 .. _h264_slice_flags:
1858 ``Slice Parameter Set Flags``
1860 .. cssclass:: longtable
1867 * - ``V4L2_H264_SLICE_FLAG_FIELD_PIC``
1870 * - ``V4L2_H264_SLICE_FLAG_BOTTOM_FIELD``
1873 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
1876 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
1880 ``Prediction Weight Table``
1882 The bitstream parameters are defined according to :ref:`h264`,
1883 section 7.4.3.2 "Prediction Weight Table Semantics". For further
1884 documentation, refer to the above specification, unless there is
1885 an explicit comment stating otherwise.
1887 .. c:type:: v4l2_h264_pred_weight_table
1889 .. cssclass:: longtable
1891 .. flat-table:: struct v4l2_h264_pred_weight_table
1897 - ``luma_log2_weight_denom``
1900 - ``chroma_log2_weight_denom``
1902 * - struct :c:type:`v4l2_h264_weight_factors`
1903 - ``weight_factors[2]``
1904 - The weight factors at index 0 are the weight factors for the reference
1905 list 0, the one at index 1 for the reference list 1.
1907 .. c:type:: v4l2_h264_weight_factors
1909 .. cssclass:: longtable
1911 .. flat-table:: struct v4l2_h264_weight_factors
1917 - ``luma_weight[32]``
1920 - ``luma_offset[32]``
1923 - ``chroma_weight[32][2]``
1926 - ``chroma_offset[32][2]``
1929 ``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS (struct)``
1930 Specifies the decode parameters (as extracted from the bitstream)
1931 for the associated H264 slice data. This includes the necessary
1932 parameters for configuring a stateless hardware decoding pipeline
1933 for H264. The bitstream parameters are defined according to
1934 :ref:`h264`. For further documentation, refer to the above
1935 specification, unless there is an explicit comment stating
1940 This compound control is not yet part of the public kernel API and
1941 it is expected to change.
1943 .. c:type:: v4l2_ctrl_h264_decode_params
1945 .. cssclass:: longtable
1947 .. flat-table:: struct v4l2_ctrl_h264_decode_params
1952 * - struct :c:type:`v4l2_h264_dpb_entry`
1957 - Number of slices needed to decode the current frame/field. When
1958 operating in slice-based decoding mode (see
1959 :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field
1960 should always be set to one.
1963 - NAL reference ID value coming from the NAL Unit header
1965 - ``top_field_order_cnt``
1966 - Picture Order Count for the coded top field
1968 - ``bottom_field_order_cnt``
1969 - Picture Order Count for the coded bottom field
1972 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
1974 .. _h264_decode_params_flags:
1976 ``Decode Parameters Flags``
1978 .. cssclass:: longtable
1985 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
1987 - That picture is an IDR picture
1989 .. c:type:: v4l2_h264_dpb_entry
1991 .. cssclass:: longtable
1993 .. flat-table:: struct v4l2_h264_dpb_entry
2000 - Timestamp of the V4L2 capture buffer to use as reference, used
2001 with B-coded and P-coded frames. The timestamp refers to the
2002 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2003 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2004 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2012 - ``top_field_order_cnt``
2015 - ``bottom_field_order_cnt``
2019 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
2023 ``DPB Entries Flags``
2025 .. cssclass:: longtable
2032 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
2034 - The DPB entry is valid and should be considered
2035 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
2037 - The DPB entry is currently being used as a reference frame
2038 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
2040 - The DPB entry is a long term reference frame
2041 * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
2043 - The DPB entry is a field reference, which means only one of the field
2044 will be used when decoding the new frame/field. When not set the DPB
2045 entry is a frame reference (both fields will be used). Note that this
2046 flag does not say anything about the number of fields contained in the
2047 reference frame, it just describes the one used to decode the new
2049 * - ``V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD``
2051 - The DPB entry is a bottom field reference (only the bottom field of the
2052 reference frame is needed to decode the new frame/field). Only valid if
2053 V4L2_H264_DPB_ENTRY_FLAG_FIELD is set. When
2054 V4L2_H264_DPB_ENTRY_FLAG_FIELD is set but
2055 V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD is not, that means the
2056 DPB entry is a top field reference
2058 ``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
2059 Specifies the decoding mode to use. Currently exposes slice-based and
2060 frame-based decoding but new modes might be added later on.
2061 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2062 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2063 are required to set this control in order to specify the decoding mode
2064 that is expected for the buffer.
2065 Drivers may expose a single or multiple decoding modes, depending
2066 on what they can support.
2070 This menu control is not yet part of the public kernel API and
2071 it is expected to change.
2073 .. c:type:: v4l2_mpeg_video_h264_decode_mode
2075 .. cssclass:: longtable
2082 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED``
2084 - Decoding is done at the slice granularity.
2085 In this mode, ``num_slices`` field in struct
2086 :c:type:`v4l2_ctrl_h264_decode_params` should be set to 1,
2087 and ``start_byte_offset`` in struct
2088 :c:type:`v4l2_ctrl_h264_slice_params` should be set to 0.
2089 The OUTPUT buffer must contain a single slice.
2090 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED``
2092 - Decoding is done at the frame granularity.
2093 In this mode, ``num_slices`` field in struct
2094 :c:type:`v4l2_ctrl_h264_decode_params` should be set to the number
2095 of slices in the frame, and ``start_byte_offset`` in struct
2096 :c:type:`v4l2_ctrl_h264_slice_params` should be set accordingly
2097 for each slice. For the first slice, ``start_byte_offset`` should
2099 The OUTPUT buffer must contain all slices needed to decode the
2100 frame. The OUTPUT buffer must also contain both fields.
2102 ``V4L2_CID_MPEG_VIDEO_H264_START_CODE (enum)``
2103 Specifies the H264 slice start code expected for each slice.
2104 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2105 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2106 are required to set this control in order to specify the start code
2107 that is expected for the buffer.
2108 Drivers may expose a single or multiple start codes, depending
2109 on what they can support.
2113 This menu control is not yet part of the public kernel API and
2114 it is expected to change.
2116 .. c:type:: v4l2_mpeg_video_h264_start_code
2118 .. cssclass:: longtable
2125 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_NONE``
2127 - Selecting this value specifies that H264 slices are passed
2128 to the driver without any start code.
2129 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B``
2131 - Selecting this value specifies that H264 slices are expected
2132 to be prefixed by Annex B start codes. According to :ref:`h264`
2133 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
2135 .. _v4l2-mpeg-mpeg2:
2137 ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
2138 Specifies the slice parameters (as extracted from the bitstream) for the
2139 associated MPEG-2 slice data. This includes the necessary parameters for
2140 configuring a stateless hardware decoding pipeline for MPEG-2.
2141 The bitstream parameters are defined according to :ref:`mpeg2part2`.
2145 This compound control is not yet part of the public kernel API and
2146 it is expected to change.
2148 .. c:type:: v4l2_ctrl_mpeg2_slice_params
2150 .. cssclass:: longtable
2152 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2154 .. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
2161 - Size (in bits) of the current slice data.
2163 - ``data_bit_offset``
2164 - Offset (in bits) to the video data in the current slice data.
2165 * - struct :c:type:`v4l2_mpeg2_sequence`
2167 - Structure with MPEG-2 sequence metadata, merging relevant fields from
2168 the sequence header and sequence extension parts of the bitstream.
2169 * - struct :c:type:`v4l2_mpeg2_picture`
2171 - Structure with MPEG-2 picture metadata, merging relevant fields from
2172 the picture header and picture coding extension parts of the bitstream.
2174 - ``backward_ref_ts``
2175 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2176 with B-coded and P-coded frames. The timestamp refers to the
2177 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2178 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2179 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2181 - ``forward_ref_ts``
2182 - Timestamp for the V4L2 capture buffer to use as forward reference, used
2183 with B-coded frames. The timestamp refers to the ``timestamp`` field in
2184 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2185 function to convert the struct :c:type:`timeval` in struct
2186 :c:type:`v4l2_buffer` to a __u64.
2188 - ``quantiser_scale_code``
2189 - Code used to determine the quantization scale to use for the IDCT.
2191 .. c:type:: v4l2_mpeg2_sequence
2193 .. cssclass:: longtable
2195 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2197 .. flat-table:: struct v4l2_mpeg2_sequence
2203 - ``horizontal_size``
2204 - The width of the displayable part of the frame's luminance component.
2207 - The height of the displayable part of the frame's luminance component.
2209 - ``vbv_buffer_size``
2210 - Used to calculate the required size of the video buffering verifier,
2211 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
2213 - ``profile_and_level_indication``
2214 - The current profile and level indication as extracted from the
2217 - ``progressive_sequence``
2218 - Indication that all the frames for the sequence are progressive instead
2222 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
2224 .. c:type:: v4l2_mpeg2_picture
2226 .. cssclass:: longtable
2228 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2230 .. flat-table:: struct v4l2_mpeg2_picture
2236 - ``picture_coding_type``
2237 - Picture coding type for the frame covered by the current slice
2238 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
2239 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
2242 - Motion vector codes.
2244 - ``intra_dc_precision``
2245 - Precision of Discrete Cosine transform (0: 8 bits precision,
2246 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
2248 - ``picture_structure``
2249 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
2250 3: progressive frame).
2252 - ``top_field_first``
2253 - If set to 1 and interlaced stream, top field is output first.
2255 - ``frame_pred_frame_dct``
2256 - If set to 1, only frame-DCT and frame prediction are used.
2258 - ``concealment_motion_vectors``
2259 - If set to 1, motion vectors are coded for intra macroblocks.
2262 - This flag affects the inverse quantization process.
2264 - ``intra_vlc_format``
2265 - This flag affects the decoding of transform coefficient data.
2267 - ``alternate_scan``
2268 - This flag affects the decoding of transform coefficient data.
2270 - ``repeat_first_field``
2271 - This flag affects the decoding process of progressive frames.
2273 - ``progressive_frame``
2274 - Indicates whether the current frame is progressive.
2276 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
2277 Specifies quantization matrices (as extracted from the bitstream) for the
2278 associated MPEG-2 slice data.
2282 This compound control is not yet part of the public kernel API and
2283 it is expected to change.
2285 .. c:type:: v4l2_ctrl_mpeg2_quantization
2287 .. cssclass:: longtable
2289 .. tabularcolumns:: |p{1.2cm}|p{8.0cm}|p{7.4cm}|
2295 .. flat-table:: struct v4l2_ctrl_mpeg2_quantization
2301 - ``load_intra_quantiser_matrix``
2302 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
2304 - ``load_non_intra_quantiser_matrix``
2305 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
2308 - ``load_chroma_intra_quantiser_matrix``
2309 - One bit to indicate whether to load the
2310 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
2313 - ``load_chroma_non_intra_quantiser_matrix``
2314 - One bit to indicate whether to load the
2315 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
2318 - ``intra_quantiser_matrix[64]``
2319 - The quantization matrix coefficients for intra-coded frames, in zigzag
2320 scanning order. It is relevant for both luma and chroma components,
2321 although it can be superseded by the chroma-specific matrix for
2322 non-4:2:0 YUV formats.
2324 - ``non_intra_quantiser_matrix[64]``
2325 - The quantization matrix coefficients for non-intra-coded frames, in
2326 zigzag scanning order. It is relevant for both luma and chroma
2327 components, although it can be superseded by the chroma-specific matrix
2328 for non-4:2:0 YUV formats.
2330 - ``chroma_intra_quantiser_matrix[64]``
2331 - The quantization matrix coefficients for the chominance component of
2332 intra-coded frames, in zigzag scanning order. Only relevant for
2333 non-4:2:0 YUV formats.
2335 - ``chroma_non_intra_quantiser_matrix[64]``
2336 - The quantization matrix coefficients for the chrominance component of
2337 non-intra-coded frames, in zigzag scanning order. Only relevant for
2338 non-4:2:0 YUV formats.
2340 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
2341 Quantization parameter for an I frame for FWHT. Valid range: from 1
2344 ``V4L2_CID_FWHT_P_FRAME_QP (integer)``
2345 Quantization parameter for a P frame for FWHT. Valid range: from 1
2350 ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
2351 Specifies the frame parameters for the associated VP8 parsed frame data.
2352 This includes the necessary parameters for
2353 configuring a stateless hardware decoding pipeline for VP8.
2354 The bitstream parameters are defined according to :ref:`vp8`.
2358 This compound control is not yet part of the public kernel API and
2359 it is expected to change.
2361 .. c:type:: v4l2_ctrl_vp8_frame_header
2363 .. cssclass:: longtable
2365 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2367 .. flat-table:: struct v4l2_ctrl_vp8_frame_header
2372 * - struct :c:type:`v4l2_vp8_segment_header`
2373 - ``segment_header``
2374 - Structure with segment-based adjustments metadata.
2375 * - struct :c:type:`v4l2_vp8_loopfilter_header`
2376 - ``loopfilter_header``
2377 - Structure with loop filter level adjustments metadata.
2378 * - struct :c:type:`v4l2_vp8_quantization_header`
2380 - Structure with VP8 dequantization indices metadata.
2381 * - struct :c:type:`v4l2_vp8_entropy_header`
2382 - ``entropy_header``
2383 - Structure with VP8 entropy coder probabilities metadata.
2384 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
2386 - Structure with VP8 entropy coder state.
2389 - The width of the frame. Must be set for all frames.
2392 - The height of the frame. Must be set for all frames.
2394 - ``horizontal_scale``
2395 - Horizontal scaling factor.
2397 - ``vertical_scaling factor``
2401 - Bitstream version.
2403 - ``prob_skip_false``
2404 - Indicates the probability that the macroblock is not skipped.
2407 - Indicates the probability that a macroblock is intra-predicted.
2410 - Indicates the probability that the last reference frame is used
2411 for inter-prediction
2414 - Indicates the probability that the golden reference frame is used
2415 for inter-prediction
2418 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
2420 - ``first_part_size``
2421 - Size of the first partition, i.e. the control partition.
2423 - ``first_part_header_bits``
2424 - Size in bits of the first partition header portion.
2426 - ``dct_part_sizes[8]``
2427 - DCT coefficients sizes.
2430 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2431 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2432 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2433 function to convert the struct :c:type:`timeval` in struct
2434 :c:type:`v4l2_buffer` to a __u64.
2436 - ``golden_frame_ts``
2437 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2438 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2439 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2440 function to convert the struct :c:type:`timeval` in struct
2441 :c:type:`v4l2_buffer` to a __u64.
2444 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
2445 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2446 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2447 function to convert the struct :c:type:`timeval` in struct
2448 :c:type:`v4l2_buffer` to a __u64.
2451 - See :ref:`Frame Header Flags <vp8_frame_header_flags>`
2453 .. _vp8_frame_header_flags:
2455 ``Frame Header Flags``
2457 .. cssclass:: longtable
2464 * - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
2466 - Indicates if the frame is a key frame.
2467 * - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
2469 - Experimental bitstream.
2470 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
2472 - Show frame flag, indicates if the frame is for display.
2473 * - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
2475 - Enable/disable skipping of macroblocks with no non-zero coefficients.
2476 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
2478 - Sign of motion vectors when the golden frame is referenced.
2479 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
2481 - Sign of motion vectors when the alt frame is referenced.
2483 .. c:type:: v4l2_vp8_entropy_coder_state
2485 .. cssclass:: longtable
2487 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2489 .. flat-table:: struct v4l2_vp8_entropy_coder_state
2505 - Applications and drivers must set this to zero.
2507 .. c:type:: v4l2_vp8_segment_header
2509 .. cssclass:: longtable
2511 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2513 .. flat-table:: struct v4l2_vp8_segment_header
2519 - ``quant_update[4]``
2520 - Signed quantizer value update.
2523 - Signed loop filter level value update.
2525 - ``segment_probs[3]``
2526 - Segment probabilities.
2529 - Applications and drivers must set this to zero.
2532 - See :ref:`Segment Header Flags <vp8_segment_header_flags>`
2534 .. _vp8_segment_header_flags:
2536 ``Segment Header Flags``
2538 .. cssclass:: longtable
2545 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
2547 - Enable/disable segment-based adjustments.
2548 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
2550 - Indicates if the macroblock segmentation map is updated in this frame.
2551 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
2553 - Indicates if the segment feature data is updated in this frame.
2554 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
2556 - If is set, the segment feature data mode is delta-value.
2557 If cleared, it's absolute-value.
2559 .. c:type:: v4l2_vp8_loopfilter_header
2561 .. cssclass:: longtable
2563 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2565 .. flat-table:: struct v4l2_vp8_loopfilter_header
2571 - ``ref_frm_delta[4]``
2572 - Reference adjustment (signed) delta value.
2574 - ``mb_mode_delta[4]``
2575 - Macroblock prediction mode adjustment (signed) delta value.
2577 - ``sharpness_level``
2584 - Applications and drivers must set this to zero.
2587 - See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
2589 .. _vp8_loopfilter_header_flags:
2591 ``Loopfilter Header Flags``
2593 .. cssclass:: longtable
2600 * - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
2602 - Enable/disable macroblock-level loop filter adjustment.
2603 * - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
2605 - Indicates if the delta values used in an adjustment are updated.
2606 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
2608 - If set, indicates the filter type is simple.
2609 If cleared, the filter type is normal.
2611 .. c:type:: v4l2_vp8_quantization_header
2613 .. cssclass:: longtable
2615 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2617 .. flat-table:: struct v4l2_vp8_quantization_header
2624 - Luma AC coefficient table index.
2627 - Luma DC delta vaue.
2630 - Y2 block DC delta value.
2633 - Y2 block AC delta value.
2636 - Chroma DC delta value.
2639 - Chroma AC delta value.
2642 - Applications and drivers must set this to zero.
2644 .. c:type:: v4l2_vp8_entropy_header
2646 .. cssclass:: longtable
2648 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2650 .. flat-table:: struct v4l2_vp8_entropy_header
2656 - ``coeff_probs[4][8][3][11]``
2657 - Coefficient update probabilities.
2659 - ``y_mode_probs[4]``
2660 - Luma mode update probabilities.
2662 - ``uv_mode_probs[3]``
2663 - Chroma mode update probabilities.
2665 - ``mv_probs[2][19]``
2666 - MV decoding update probabilities.
2669 - Applications and drivers must set this to zero.
2676 MFC 5.1 MPEG Controls
2677 =====================
2679 The following MPEG class controls deal with MPEG decoding and encoding
2680 settings that are specific to the Multi Format Codec 5.1 device present
2681 in the S5P family of SoCs by Samsung.
2684 .. _mfc51-control-id:
2689 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2690 If the display delay is enabled then the decoder is forced to return
2691 a CAPTURE buffer (decoded frame) after processing a certain number
2692 of OUTPUT buffers. The delay can be set through
2693 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2694 feature can be used for example for generating thumbnails of videos.
2695 Applicable to the H264 decoder.
2697 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2698 Display delay value for H264 decoder. The decoder is forced to
2699 return a decoded frame after the set 'display delay' number of
2700 frames. If this number is low it may result in frames returned out
2701 of display order, in addition the hardware may still be using the
2702 returned buffer as a reference picture for subsequent frames.
2704 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2705 The number of reference pictures used for encoding a P picture.
2706 Applicable to the H264 encoder.
2708 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2709 Padding enable in the encoder - use a color instead of repeating
2710 border pixels. Applicable to encoders.
2712 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2713 Padding color in the encoder. Applicable to encoders. The supplied
2714 32-bit integer is interpreted as follows (bit 0 = least significant
2724 - V chrominance information
2726 - U chrominance information
2728 - Y luminance information
2734 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2735 Reaction coefficient for MFC rate control. Applicable to encoders.
2739 #. Valid only when the frame level RC is enabled.
2741 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2742 VBR, this field must be large (ex. 100 ~ 1000).
2744 #. It is not recommended to use the greater number than
2745 FRAME_RATE * (10^9 / BIT_RATE).
2747 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2748 Adaptive rate control for dark region. Valid only when H.264 and
2749 macroblock level RC is enabled
2750 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2753 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2754 Adaptive rate control for smooth region. Valid only when H.264 and
2755 macroblock level RC is enabled
2756 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2759 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2760 Adaptive rate control for static region. Valid only when H.264 and
2761 macroblock level RC is enabled
2762 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2765 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
2766 Adaptive rate control for activity region. Valid only when H.264 and
2767 macroblock level RC is enabled
2768 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2771 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
2773 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2776 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2777 Indicates in what conditions the encoder should skip frames. If
2778 encoding a frame would cause the encoded stream to be larger then a
2779 chosen data limit then the frame will be skipped. Possible values
2783 .. tabularcolumns:: |p{9.2cm}|p{8.3cm}|
2793 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2794 - Frame skip mode is disabled.
2795 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2796 - Frame skip mode enabled and buffer limit is set by the chosen
2797 level and is defined by the standard.
2798 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2799 - Frame skip mode enabled and buffer limit is set by the VBV
2800 (MPEG1/2/4) or CPB (H264) buffer size control.
2806 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2807 Enable rate-control with fixed target bit. If this setting is
2808 enabled, then the rate control logic of the encoder will calculate
2809 the average bitrate for a GOP and keep it below or equal the set
2810 bitrate target. Otherwise the rate control logic calculates the
2811 overall average bitrate for the stream and keeps it below or equal
2812 to the set bitrate. In the first case the average bitrate for the
2813 whole stream will be smaller then the set bitrate. This is caused
2814 because the average is calculated for smaller number of frames, on
2815 the other hand enabling this setting will ensure that the stream
2816 will meet tight bandwidth constraints. Applicable to encoders.
2818 .. _v4l2-mpeg-mfc51-video-force-frame-type:
2820 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2823 enum v4l2_mpeg_mfc51_video_force_frame_type -
2824 Force a frame type for the next queued buffer. Applicable to
2825 encoders. Possible values are:
2827 .. tabularcolumns:: |p{9.5cm}|p{8.0cm}|
2833 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2834 - Forcing a specific frame type disabled.
2835 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2837 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2838 - Force a non-coded frame.
2843 ``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
2844 Specifies the fwht parameters (as extracted from the bitstream) for the
2845 associated FWHT data. This includes the necessary parameters for
2846 configuring a stateless hardware decoding pipeline for FWHT.
2850 This compound control is not yet part of the public kernel API and
2851 it is expected to change.
2853 .. c:type:: v4l2_ctrl_fwht_params
2855 .. cssclass:: longtable
2857 .. tabularcolumns:: |p{1.4cm}|p{4.3cm}|p{11.8cm}|
2859 .. flat-table:: struct v4l2_ctrl_fwht_params
2865 - ``backward_ref_ts``
2866 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2867 with P-coded frames. The timestamp refers to the
2868 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2869 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2870 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2873 - The version of the codec
2876 - The width of the frame
2879 - The height of the frame
2882 - The flags of the frame, see :ref:`fwht-flags`.
2885 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
2888 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
2891 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
2894 - The quantization range, from enum :c:type:`v4l2_quantization`.
2903 .. cssclass:: longtable
2905 .. tabularcolumns:: |p{6.8cm}|p{2.4cm}|p{8.3cm}|
2912 * - ``FWHT_FL_IS_INTERLACED``
2914 - Set if this is an interlaced format
2915 * - ``FWHT_FL_IS_BOTTOM_FIRST``
2917 - Set if this is a bottom-first (NTSC) interlaced format
2918 * - ``FWHT_FL_IS_ALTERNATE``
2920 - Set if each 'frame' contains just one field
2921 * - ``FWHT_FL_IS_BOTTOM_FIELD``
2923 - If FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
2924 bottom field, else it is the top field.
2925 * - ``FWHT_FL_LUMA_IS_UNCOMPRESSED``
2927 - Set if the luma plane is uncompressed
2928 * - ``FWHT_FL_CB_IS_UNCOMPRESSED``
2930 - Set if the cb plane is uncompressed
2931 * - ``FWHT_FL_CR_IS_UNCOMPRESSED``
2933 - Set if the cr plane is uncompressed
2934 * - ``FWHT_FL_CHROMA_FULL_HEIGHT``
2936 - Set if the chroma plane has the same height as the luma plane,
2937 else the chroma plane is half the height of the luma plane
2938 * - ``FWHT_FL_CHROMA_FULL_WIDTH``
2940 - Set if the chroma plane has the same width as the luma plane,
2941 else the chroma plane is half the width of the luma plane
2942 * - ``FWHT_FL_ALPHA_IS_UNCOMPRESSED``
2944 - Set if the alpha plane is uncompressed
2945 * - ``FWHT_FL_I_FRAME``
2947 - Set if this is an I-frame
2948 * - ``FWHT_FL_COMPONENTS_NUM_MSK``
2950 - A 4-values flag - the number of components - 1
2951 * - ``FWHT_FL_PIXENC_YUV``
2953 - Set if the pixel encoding is YUV
2954 * - ``FWHT_FL_PIXENC_RGB``
2956 - Set if the pixel encoding is RGB
2957 * - ``FWHT_FL_PIXENC_HSV``
2959 - Set if the pixel encoding is HSV
2962 CX2341x MPEG Controls
2963 =====================
2965 The following MPEG class controls deal with MPEG encoding settings that
2966 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
2969 .. _cx2341x-control-id:
2974 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
2976 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
2979 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
2980 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
2989 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
2990 - Choose the filter manually
2991 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
2992 - Choose the filter automatically
2996 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
2997 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
3000 .. _luma-spatial-filter-type:
3002 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
3005 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
3006 Select the algorithm to use for the Luma Spatial Filter (default
3007 ``1D_HOR``). Possible values:
3009 .. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
3019 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
3021 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
3022 - One-dimensional horizontal
3023 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
3024 - One-dimensional vertical
3025 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
3026 - Two-dimensional separable
3027 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
3028 - Two-dimensional symmetrical non-separable
3036 .. _chroma-spatial-filter-type:
3038 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
3041 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
3042 Select the algorithm for the Chroma Spatial Filter (default
3043 ``1D_HOR``). Possible values are:
3046 .. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
3052 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
3054 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
3055 - One-dimensional horizontal
3059 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
3061 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
3064 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
3065 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
3074 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
3075 - Choose the filter manually
3076 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
3077 - Choose the filter automatically
3081 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
3082 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
3083 is 8 for full-scale capturing and 0 for scaled capturing.)
3085 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
3087 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
3090 enum v4l2_mpeg_cx2341x_video_median_filter_type -
3091 Median Filter Type (default ``OFF``). Possible values are:
3099 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
3101 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
3103 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
3105 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
3106 - Horizontal and vertical filter
3107 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
3112 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3113 Threshold above which the luminance median filter is enabled
3116 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
3117 Threshold below which the luminance median filter is enabled
3120 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3121 Threshold above which the chroma median filter is enabled (default
3124 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
3125 Threshold below which the chroma median filter is enabled (default
3128 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
3129 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
3130 the stream between every four video frames. The packet size is 2048
3131 bytes, including the packet_start_code_prefix and stream_id
3132 fields. The stream_id is 0xBF (private stream 2). The payload
3133 consists of 0x00 bytes, to be filled in by the application. 0 = do
3134 not insert, 1 = insert packets.
3137 VPX Control Reference
3138 =====================
3140 The VPX controls include controls for encoding parameters of VPx video
3149 .. _v4l2-vpx-num-partitions:
3151 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
3154 enum v4l2_vp8_num_partitions -
3155 The number of token partitions to use in VP8 encoder. Possible
3164 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
3165 - 1 coefficient partition
3166 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
3167 - 2 coefficient partitions
3168 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
3169 - 4 coefficient partitions
3170 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
3171 - 8 coefficient partitions
3175 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
3176 Setting this prevents intra 4x4 mode in the intra mode decision.
3178 .. _v4l2-vpx-num-ref-frames:
3180 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
3183 enum v4l2_vp8_num_ref_frames -
3184 The number of reference pictures for encoding P frames. Possible
3187 .. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
3197 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
3198 - Last encoded frame will be searched
3199 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
3200 - Two frames will be searched among the last encoded frame, the
3201 golden frame and the alternate reference (altref) frame. The
3202 encoder implementation will decide which two are chosen.
3203 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
3204 - The last encoded frame, the golden frame and the altref frame will
3213 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
3214 Indicates the loop filter level. The adjustment of the loop filter
3215 level is done via a delta value against a baseline loop filter
3218 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
3219 This parameter affects the loop filter. Anything above zero weakens
3220 the deblocking effect on the loop filter.
3222 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
3223 Sets the refresh period for the golden frame. The period is defined
3224 in number of frames. For a value of 'n', every nth frame starting
3225 from the first key frame will be taken as a golden frame. For eg.
3226 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
3227 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
3228 taken as the golden frames as frame 0 is always a key frame.
3230 .. _v4l2-vpx-golden-frame-sel:
3232 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
3235 enum v4l2_vp8_golden_frame_sel -
3236 Selects the golden frame for encoding. Possible values are:
3242 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3248 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
3249 - Use the (n-2)th frame as a golden frame, current frame index being
3251 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
3252 - Use the previous specific frame indicated by
3253 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
3261 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
3262 Minimum quantization parameter for VP8.
3264 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
3265 Maximum quantization parameter for VP8.
3267 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
3268 Quantization parameter for an I frame for VP8.
3270 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
3271 Quantization parameter for a P frame for VP8.
3273 .. _v4l2-mpeg-video-vp8-profile:
3275 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
3278 enum v4l2_mpeg_video_vp8_profile -
3279 This control allows selecting the profile for VP8 encoder.
3280 This is also used to enumerate supported profiles by VP8 encoder or decoder.
3281 Possible values are:
3287 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
3289 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
3291 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
3293 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
3296 .. _v4l2-mpeg-video-vp9-profile:
3298 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
3301 enum v4l2_mpeg_video_vp9_profile -
3302 This control allows selecting the profile for VP9 encoder.
3303 This is also used to enumerate supported profiles by VP9 encoder or decoder.
3304 Possible values are:
3310 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
3312 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
3314 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
3316 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
3320 High Efficiency Video Coding (HEVC/H.265) Control Reference
3321 ===========================================================
3323 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
3327 .. _hevc-control-id:
3329 HEVC/H.265 Control IDs
3330 ----------------------
3332 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
3333 Minimum quantization parameter for HEVC.
3334 Valid range: from 0 to 51.
3336 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
3337 Maximum quantization parameter for HEVC.
3338 Valid range: from 0 to 51.
3340 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
3341 Quantization parameter for an I frame for HEVC.
3342 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3343 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3345 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
3346 Quantization parameter for a P frame for HEVC.
3347 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3348 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3350 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
3351 Quantization parameter for a B frame for HEVC.
3352 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3353 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3355 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
3356 HIERARCHICAL_QP allows the host to specify the quantization parameter
3357 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
3358 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
3359 control value to 1 enables setting of the QP values for the layers.
3361 .. _v4l2-hevc-hier-coding-type:
3363 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
3366 enum v4l2_mpeg_video_hevc_hier_coding_type -
3367 Selects the hierarchical coding type for encoding. Possible values are:
3373 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3379 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
3380 - Use the B frame for hierarchical coding.
3381 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
3382 - Use the P frame for hierarchical coding.
3389 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
3390 Selects the hierarchical coding layer. In normal encoding
3391 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
3392 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
3395 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
3396 Indicates quantization parameter for hierarchical coding layer 0.
3397 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3398 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3400 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
3401 Indicates quantization parameter for hierarchical coding layer 1.
3402 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3403 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3405 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
3406 Indicates quantization parameter for hierarchical coding layer 2.
3407 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3408 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3410 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
3411 Indicates quantization parameter for hierarchical coding layer 3.
3412 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3413 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3415 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
3416 Indicates quantization parameter for hierarchical coding layer 4.
3417 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3418 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3420 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
3421 Indicates quantization parameter for hierarchical coding layer 5.
3422 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3423 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3425 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
3426 Indicates quantization parameter for hierarchical coding layer 6.
3427 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3428 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3430 .. _v4l2-hevc-profile:
3432 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
3435 enum v4l2_mpeg_video_hevc_profile -
3436 Select the desired profile for HEVC encoder.
3442 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3448 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
3450 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
3451 - Main still picture profile.
3452 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
3460 .. _v4l2-hevc-level:
3462 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
3465 enum v4l2_mpeg_video_hevc_level -
3466 Selects the desired level for HEVC encoder.
3472 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3478 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
3480 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
3482 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
3484 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
3486 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
3488 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
3490 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
3492 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
3494 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
3496 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
3498 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
3500 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
3502 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
3510 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
3511 Indicates the number of evenly spaced subintervals, called ticks, within
3512 one second. This is a 16 bit unsigned integer and has a maximum value up to
3513 0xffff and a minimum value of 1.
3517 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
3520 enum v4l2_mpeg_video_hevc_tier -
3521 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
3522 were made to deal with applications that differ in terms of maximum bit
3523 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
3524 this flag to 1 indicates High tier. High tier is for applications requiring
3531 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3537 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
3539 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
3547 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
3548 Selects HEVC maximum coding unit depth.
3550 .. _v4l2-hevc-loop-filter-mode:
3552 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
3555 enum v4l2_mpeg_video_hevc_loop_filter_mode -
3556 Loop filter mode for HEVC encoder. Possible values are:
3562 .. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
3568 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
3569 - Loop filter is disabled.
3570 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
3571 - Loop filter is enabled.
3572 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
3573 - Loop filter is disabled at the slice boundary.
3580 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
3581 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
3583 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
3584 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
3586 .. _v4l2-hevc-refresh-type:
3588 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
3591 enum v4l2_mpeg_video_hevc_hier_refresh_type -
3592 Selects refresh type for HEVC encoder.
3593 Host has to specify the period into
3594 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
3600 .. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
3606 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
3607 - Use the B frame for hierarchical coding.
3608 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
3609 - Use CRA (Clean Random Access Unit) picture encoding.
3610 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
3611 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
3618 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
3619 Selects the refresh period for HEVC encoder.
3620 This specifies the number of I pictures between two CRA/IDR pictures.
3621 This is valid only if REFRESH_TYPE is not 0.
3623 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
3624 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
3625 encoding. Setting it to 1 enables lossless encoding.
3627 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
3628 Indicates constant intra prediction for HEVC encoder. Specifies the
3629 constrained intra prediction in which intra largest coding unit (LCU)
3630 prediction is performed by using residual data and decoded samples of
3631 neighboring intra LCU only. Setting the value to 1 enables constant intra
3632 prediction and setting the value to 0 disables constant intra prediction.
3634 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
3635 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
3636 disables the feature and setting it to 1 enables the wavefront parallel
3639 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
3640 Setting the value to 1 enables combination of P and B frame for HEVC
3643 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
3644 Indicates temporal identifier for HEVC encoder which is enabled by
3645 setting the value to 1.
3647 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
3648 Indicates bi-linear interpolation is conditionally used in the intra
3649 prediction filtering process in the CVS when set to 1. Indicates bi-linear
3650 interpolation is not used in the CVS when set to 0.
3652 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
3653 Indicates maximum number of merge candidate motion vectors.
3654 Values are from 0 to 4.
3656 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
3657 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
3658 1 enables the prediction. Setting it to 0 disables the prediction.
3660 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
3661 Specifies if HEVC generates a stream with a size of the length field
3662 instead of start code pattern. The size of the length field is configurable
3663 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
3664 the value to 0 disables encoding without startcode pattern. Setting the
3665 value to 1 will enables encoding without startcode pattern.
3667 .. _v4l2-hevc-size-of-length-field:
3669 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
3672 enum v4l2_mpeg_video_hevc_size_of_length_field -
3673 Indicates the size of length field.
3674 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
3680 .. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
3686 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
3687 - Generate start code pattern (Normal).
3688 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
3689 - Generate size of length field instead of start code pattern and length is 1.
3690 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
3691 - Generate size of length field instead of start code pattern and length is 2.
3692 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
3693 - Generate size of length field instead of start code pattern and length is 4.
3699 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
3700 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
3702 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
3703 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
3705 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
3706 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
3708 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
3709 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
3711 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
3712 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
3714 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
3715 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
3717 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
3718 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
3720 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
3721 Selects number of P reference pictures required for HEVC encoder.
3722 P-Frame can use 1 or 2 frames for reference.
3724 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
3725 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
3726 disables generating SPS and PPS at every IDR. Setting it to one enables
3727 generating SPS and PPS at every IDR.
3731 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)``
3732 Specifies the Sequence Parameter Set fields (as extracted from the
3733 bitstream) for the associated HEVC slice data.
3734 These bitstream parameters are defined according to :ref:`hevc`.
3735 They are described in section 7.4.3.2 "Sequence parameter set RBSP
3736 semantics" of the specification.
3738 .. c:type:: v4l2_ctrl_hevc_sps
3740 .. cssclass:: longtable
3742 .. flat-table:: struct v4l2_ctrl_hevc_sps
3748 - ``pic_width_in_luma_samples``
3751 - ``pic_height_in_luma_samples``
3754 - ``bit_depth_luma_minus8``
3757 - ``bit_depth_chroma_minus8``
3760 - ``log2_max_pic_order_cnt_lsb_minus4``
3763 - ``sps_max_dec_pic_buffering_minus1``
3766 - ``sps_max_num_reorder_pics``
3769 - ``sps_max_latency_increase_plus1``
3772 - ``log2_min_luma_coding_block_size_minus3``
3775 - ``log2_diff_max_min_luma_coding_block_size``
3778 - ``log2_min_luma_transform_block_size_minus2``
3781 - ``log2_diff_max_min_luma_transform_block_size``
3784 - ``max_transform_hierarchy_depth_inter``
3787 - ``max_transform_hierarchy_depth_intra``
3790 - ``pcm_sample_bit_depth_luma_minus1``
3793 - ``pcm_sample_bit_depth_chroma_minus1``
3796 - ``log2_min_pcm_luma_coding_block_size_minus3``
3799 - ``log2_diff_max_min_pcm_luma_coding_block_size``
3802 - ``num_short_term_ref_pic_sets``
3805 - ``num_long_term_ref_pics_sps``
3808 - ``chroma_format_idc``
3812 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
3816 ``Sequence Parameter Set Flags``
3818 .. cssclass:: longtable
3825 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
3828 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
3831 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
3834 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
3837 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
3840 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
3843 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
3846 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
3849 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
3853 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)``
3854 Specifies the Picture Parameter Set fields (as extracted from the
3855 bitstream) for the associated HEVC slice data.
3856 These bitstream parameters are defined according to :ref:`hevc`.
3857 They are described in section 7.4.3.3 "Picture parameter set RBSP
3858 semantics" of the specification.
3860 .. c:type:: v4l2_ctrl_hevc_pps
3862 .. cssclass:: longtable
3864 .. flat-table:: struct v4l2_ctrl_hevc_pps
3870 - ``num_extra_slice_header_bits``
3873 - ``init_qp_minus26``
3876 - ``diff_cu_qp_delta_depth``
3879 - ``pps_cb_qp_offset``
3882 - ``pps_cr_qp_offset``
3885 - ``num_tile_columns_minus1``
3888 - ``num_tile_rows_minus1``
3891 - ``column_width_minus1[20]``
3894 - ``row_height_minus1[22]``
3897 - ``pps_beta_offset_div2``
3900 - ``pps_tc_offset_div2``
3903 - ``log2_parallel_merge_level_minus2``
3907 - Applications and drivers must set this to zero.
3910 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
3914 ``Picture Parameter Set Flags``
3916 .. cssclass:: longtable
3923 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT``
3926 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
3929 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
3932 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
3935 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
3938 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
3941 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
3944 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
3947 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
3950 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
3953 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
3956 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
3959 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
3962 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
3965 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
3968 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
3971 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
3974 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
3977 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
3981 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
3982 Specifies various slice-specific parameters, especially from the NAL unit
3983 header, general slice segment header and weighted prediction parameter
3984 parts of the bitstream.
3985 These bitstream parameters are defined according to :ref:`hevc`.
3986 They are described in section 7.4.7 "General slice segment header
3987 semantics" of the specification.
3989 .. c:type:: v4l2_ctrl_hevc_slice_params
3991 .. cssclass:: longtable
3993 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
4000 - Size (in bits) of the current slice data.
4002 - ``data_bit_offset``
4003 - Offset (in bits) to the video data in the current slice data.
4008 - ``nuh_temporal_id_plus1``
4013 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
4014 V4L2_HEVC_SLICE_TYPE_B).
4016 - ``colour_plane_id``
4019 - ``slice_pic_order_cnt``
4022 - ``num_ref_idx_l0_active_minus1``
4025 - ``num_ref_idx_l1_active_minus1``
4028 - ``collocated_ref_idx``
4031 - ``five_minus_max_num_merge_cand``
4034 - ``slice_qp_delta``
4037 - ``slice_cb_qp_offset``
4040 - ``slice_cr_qp_offset``
4043 - ``slice_act_y_qp_offset``
4046 - ``slice_act_cb_qp_offset``
4049 - ``slice_act_cr_qp_offset``
4052 - ``slice_beta_offset_div2``
4055 - ``slice_tc_offset_div2``
4061 - ``num_active_dpb_entries``
4062 - The number of entries in ``dpb``.
4064 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4065 - The list of L0 reference elements as indices in the DPB.
4067 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4068 - The list of L1 reference elements as indices in the DPB.
4070 - ``num_rps_poc_st_curr_before``
4071 - The number of reference pictures in the short-term set that come before
4074 - ``num_rps_poc_st_curr_after``
4075 - The number of reference pictures in the short-term set that come after
4078 - ``num_rps_poc_lt_curr``
4079 - The number of reference pictures in the long-term set.
4082 - Applications and drivers must set this to zero.
4083 * - struct :c:type:`v4l2_hevc_dpb_entry`
4084 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4085 - The decoded picture buffer, for meta-data about reference frames.
4086 * - struct :c:type:`v4l2_hevc_pred_weight_table`
4087 - ``pred_weight_table``
4088 - The prediction weight coefficients for inter-picture prediction.
4091 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
4093 .. _hevc_slice_params_flags:
4095 ``Slice Parameters Flags``
4097 .. cssclass:: longtable
4104 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
4107 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
4110 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
4113 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
4116 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
4119 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
4122 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
4125 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
4128 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
4132 .. c:type:: v4l2_hevc_dpb_entry
4134 .. cssclass:: longtable
4136 .. flat-table:: struct v4l2_hevc_dpb_entry
4143 - Timestamp of the V4L2 capture buffer to use as reference, used
4144 with B-coded and P-coded frames. The timestamp refers to the
4145 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
4146 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
4147 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
4150 - The reference set for the reference frame
4151 (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
4152 V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
4153 V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
4156 - Whether the reference is a field picture or a frame.
4158 - ``pic_order_cnt[2]``
4159 - The picture order count of the reference. Only the first element of the
4160 array is used for frame pictures, while the first element identifies the
4161 top field and the second the bottom field in field-coded pictures.
4164 - Applications and drivers must set this to zero.
4166 .. c:type:: v4l2_hevc_pred_weight_table
4168 .. cssclass:: longtable
4170 .. flat-table:: struct v4l2_hevc_pred_weight_table
4176 - ``luma_log2_weight_denom``
4179 - ``delta_chroma_log2_weight_denom``
4182 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4185 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4188 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4191 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4194 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4197 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4200 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4203 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4207 - Applications and drivers must set this to zero.
4209 ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)``
4210 Specifies the decoding mode to use. Currently exposes slice-based and
4211 frame-based decoding but new modes might be added later on.
4212 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4213 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4214 are required to set this control in order to specify the decoding mode
4215 that is expected for the buffer.
4216 Drivers may expose a single or multiple decoding modes, depending
4217 on what they can support.
4221 This menu control is not yet part of the public kernel API and
4222 it is expected to change.
4224 .. c:type:: v4l2_mpeg_video_hevc_decode_mode
4226 .. cssclass:: longtable
4233 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED``
4235 - Decoding is done at the slice granularity.
4236 The OUTPUT buffer must contain a single slice.
4237 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED``
4239 - Decoding is done at the frame granularity.
4240 The OUTPUT buffer must contain all slices needed to decode the
4241 frame. The OUTPUT buffer must also contain both fields.
4243 ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)``
4244 Specifies the HEVC slice start code expected for each slice.
4245 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4246 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4247 are required to set this control in order to specify the start code
4248 that is expected for the buffer.
4249 Drivers may expose a single or multiple start codes, depending
4250 on what they can support.
4254 This menu control is not yet part of the public kernel API and
4255 it is expected to change.
4257 .. c:type:: v4l2_mpeg_video_hevc_start_code
4259 .. cssclass:: longtable
4266 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
4268 - Selecting this value specifies that HEVC slices are passed
4269 to the driver without any start code.
4270 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
4272 - Selecting this value specifies that HEVC slices are expected
4273 to be prefixed by Annex B start codes. According to :ref:`hevc`
4274 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.