1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
5 ***********************
6 Codec Control Reference
7 ***********************
9 Below all controls within the Codec control class are described. First
10 the generic controls, then controls specific for certain hardware.
14 These controls are applicable to all codecs and not just MPEG. The
15 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
16 were originally made for MPEG codecs and later extended to cover all
20 Generic Codec Controls
21 ======================
29 ``V4L2_CID_CODEC_CLASS (class)``
30 The Codec class descriptor. Calling
31 :ref:`VIDIOC_QUERYCTRL` for this control will
32 return a description of this control class. This description can be
33 used as the caption of a Tab page in a GUI, for example.
35 .. _v4l2-mpeg-stream-type:
37 ``V4L2_CID_MPEG_STREAM_TYPE``
40 enum v4l2_mpeg_stream_type -
41 The MPEG-1, -2 or -4 output stream type. One cannot assume anything
42 here. Each hardware MPEG encoder tends to support different subsets
43 of the available MPEG stream types. This control is specific to
44 multiplexed MPEG streams. The currently defined stream types are:
52 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
53 - MPEG-2 program stream
54 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
55 - MPEG-2 transport stream
56 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
57 - MPEG-1 system stream
58 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
59 - MPEG-2 DVD-compatible stream
60 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
61 - MPEG-1 VCD-compatible stream
62 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
63 - MPEG-2 SVCD-compatible stream
67 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
68 Program Map Table Packet ID for the MPEG transport stream (default
71 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
72 Audio Packet ID for the MPEG transport stream (default 256)
74 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
75 Video Packet ID for the MPEG transport stream (default 260)
77 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
78 Packet ID for the MPEG transport stream carrying PCR fields (default
81 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
84 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
87 .. _v4l2-mpeg-stream-vbi-fmt:
89 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
92 enum v4l2_mpeg_stream_vbi_fmt -
93 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
94 the MPEG stream. This control selects whether VBI data should be
95 embedded, and if so, what embedding method should be used. The list
96 of possible VBI formats depends on the driver. The currently defined
101 .. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|
107 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
108 - No VBI in the MPEG stream
109 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
110 - VBI in private packets, IVTV format (documented in the kernel
112 ``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``)
116 .. _v4l2-mpeg-audio-sampling-freq:
118 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
121 enum v4l2_mpeg_audio_sampling_freq -
122 MPEG Audio sampling frequency. Possible values are:
130 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
132 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
134 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
139 .. _v4l2-mpeg-audio-encoding:
141 ``V4L2_CID_MPEG_AUDIO_ENCODING``
144 enum v4l2_mpeg_audio_encoding -
145 MPEG Audio encoding. This control is specific to multiplexed MPEG
146 streams. Possible values are:
154 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
155 - MPEG-1/2 Layer I encoding
156 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
157 - MPEG-1/2 Layer II encoding
158 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
159 - MPEG-1/2 Layer III encoding
160 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
161 - MPEG-2/4 AAC (Advanced Audio Coding)
162 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
163 - AC-3 aka ATSC A/52 encoding
167 .. _v4l2-mpeg-audio-l1-bitrate:
169 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
172 enum v4l2_mpeg_audio_l1_bitrate -
173 MPEG-1/2 Layer I bitrate. Possible values are:
181 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
183 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
185 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
187 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
189 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
191 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
193 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
195 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
197 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
199 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
201 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
203 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
205 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
207 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
212 .. _v4l2-mpeg-audio-l2-bitrate:
214 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
217 enum v4l2_mpeg_audio_l2_bitrate -
218 MPEG-1/2 Layer II bitrate. Possible values are:
226 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
228 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
230 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
232 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
234 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
236 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
238 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
240 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
242 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
244 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
246 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
248 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
250 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
252 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
257 .. _v4l2-mpeg-audio-l3-bitrate:
259 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
262 enum v4l2_mpeg_audio_l3_bitrate -
263 MPEG-1/2 Layer III bitrate. Possible values are:
271 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
273 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
275 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
277 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
279 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
281 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
283 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
285 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
287 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
289 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
291 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
293 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
295 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
297 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
302 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
303 AAC bitrate in bits per second.
305 .. _v4l2-mpeg-audio-ac3-bitrate:
307 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
310 enum v4l2_mpeg_audio_ac3_bitrate -
311 AC-3 bitrate. Possible values are:
319 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
321 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
323 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
325 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
327 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
329 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
331 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
333 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
335 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
337 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
339 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
341 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
343 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
345 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
347 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
349 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
351 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
353 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
355 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
360 .. _v4l2-mpeg-audio-mode:
362 ``V4L2_CID_MPEG_AUDIO_MODE``
365 enum v4l2_mpeg_audio_mode -
366 MPEG Audio mode. Possible values are:
374 * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
376 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
378 * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
380 * - ``V4L2_MPEG_AUDIO_MODE_MONO``
385 .. _v4l2-mpeg-audio-mode-extension:
387 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
390 enum v4l2_mpeg_audio_mode_extension -
391 Joint Stereo audio mode extension. In Layer I and II they indicate
392 which subbands are in intensity stereo. All other subbands are coded
393 in stereo. Layer III is not (yet) supported. Possible values are:
395 .. tabularcolumns:: |p{9.1cm}|p{8.4cm}|
401 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
402 - Subbands 4-31 in intensity stereo
403 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
404 - Subbands 8-31 in intensity stereo
405 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
406 - Subbands 12-31 in intensity stereo
407 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
408 - Subbands 16-31 in intensity stereo
412 .. _v4l2-mpeg-audio-emphasis:
414 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
417 enum v4l2_mpeg_audio_emphasis -
418 Audio Emphasis. Possible values are:
426 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
428 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
429 - 50/15 microsecond emphasis
430 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
435 .. _v4l2-mpeg-audio-crc:
437 ``V4L2_CID_MPEG_AUDIO_CRC``
440 enum v4l2_mpeg_audio_crc -
441 CRC method. Possible values are:
449 * - ``V4L2_MPEG_AUDIO_CRC_NONE``
451 * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
452 - 16 bit parity check
456 ``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
457 Mutes the audio when capturing. This is not done by muting audio
458 hardware, which can still produce a slight hiss, but in the encoder
459 itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
462 .. _v4l2-mpeg-audio-dec-playback:
464 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
467 enum v4l2_mpeg_audio_dec_playback -
468 Determines how monolingual audio should be played back. Possible
473 .. tabularcolumns:: |p{9.8cm}|p{7.7cm}|
479 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
480 - Automatically determines the best playback mode.
481 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
483 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
484 - Left channel playback.
485 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
486 - Right channel playback.
487 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
489 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
490 - Stereo playback with swapped left and right channels.
494 .. _v4l2-mpeg-audio-dec-multilingual-playback:
496 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
499 enum v4l2_mpeg_audio_dec_playback -
500 Determines how multilingual audio should be played back.
502 .. _v4l2-mpeg-video-encoding:
504 ``V4L2_CID_MPEG_VIDEO_ENCODING``
507 enum v4l2_mpeg_video_encoding -
508 MPEG Video encoding method. This control is specific to multiplexed
509 MPEG streams. Possible values are:
517 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
518 - MPEG-1 Video encoding
519 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
520 - MPEG-2 Video encoding
521 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
522 - MPEG-4 AVC (H.264) Video encoding
526 .. _v4l2-mpeg-video-aspect:
528 ``V4L2_CID_MPEG_VIDEO_ASPECT``
531 enum v4l2_mpeg_video_aspect -
532 Video aspect. Possible values are:
540 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
541 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
542 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
543 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
547 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
548 Number of B-Frames (default 2)
550 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
551 GOP size (default 12)
553 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
554 GOP closure (default 1)
556 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
557 Enable 3:2 pulldown (default 0)
559 .. _v4l2-mpeg-video-bitrate-mode:
561 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
564 enum v4l2_mpeg_video_bitrate_mode -
565 Video bitrate mode. Possible values are:
573 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
575 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
577 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``
582 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
583 Video bitrate in bits per second.
585 ``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
586 Peak video bitrate in bits per second. Must be larger or equal to
587 the average video bitrate. It is ignored if the video bitrate mode
588 is set to constant bitrate.
590 ``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)``
591 Constant quality level control. This control is applicable when
592 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is
593 ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100
594 where 1 indicates lowest quality and 100 indicates highest quality.
595 Encoder will decide the appropriate quantization parameter and
596 bitrate to produce requested frame quality.
599 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)``
601 enum v4l2_mpeg_video_frame_skip_mode -
602 Indicates in what conditions the encoder should skip frames. If
603 encoding a frame would cause the encoded stream to be larger then a
604 chosen data limit then the frame will be skipped. Possible values
608 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
618 * - ``V4L2_MPEG_FRAME_SKIP_MODE_DISABLED``
619 - Frame skip mode is disabled.
620 * - ``V4L2_MPEG_FRAME_SKIP_MODE_LEVEL_LIMIT``
621 - Frame skip mode enabled and buffer limit is set by the chosen
622 level and is defined by the standard.
623 * - ``V4L2_MPEG_FRAME_SKIP_MODE_BUF_LIMIT``
624 - Frame skip mode enabled and buffer limit is set by the
625 :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or
626 :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control.
632 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
633 For every captured frame, skip this many subsequent frames (default
636 ``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
637 "Mutes" the video to a fixed color when capturing. This is useful
638 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
641 ``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
642 Sets the "mute" color of the video. The supplied 32-bit integer is
643 interpreted as follows (bit 0 = least significant bit):
652 - V chrominance information
654 - U chrominance information
656 - Y luminance information
662 .. _v4l2-mpeg-video-dec-pts:
664 ``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
665 This read-only control returns the 33-bit video Presentation Time
666 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
667 currently displayed frame. This is the same PTS as is used in
668 :ref:`VIDIOC_DECODER_CMD`.
670 .. _v4l2-mpeg-video-dec-frame:
672 ``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
673 This read-only control returns the frame counter of the frame that
674 is currently displayed (decoded). This value is reset to 0 whenever
675 the decoder is started.
677 ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
678 If enabled the decoder expects to receive a single slice per buffer,
679 otherwise the decoder expects a single frame in per buffer.
680 Applicable to the decoder, all codecs.
682 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)``
683 If the display delay is enabled then the decoder is forced to return
684 a CAPTURE buffer (decoded frame) after processing a certain number
685 of OUTPUT buffers. The delay can be set through
686 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This
687 feature can be used for example for generating thumbnails of videos.
688 Applicable to the decoder.
690 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)``
691 Display delay value for decoder. The decoder is forced to
692 return a decoded frame after the set 'display delay' number of
693 frames. If this number is low it may result in frames returned out
694 of display order, in addition the hardware may still be using the
695 returned buffer as a reference picture for subsequent frames.
697 ``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)``
698 If enabled then, AUD (Access Unit Delimiter) NALUs will be generated.
699 That could be useful to find the start of a frame without having to
700 fully parse each NALU. Applicable to the H264 and HEVC encoders.
702 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
703 Enable writing sample aspect ratio in the Video Usability
704 Information. Applicable to the H264 encoder.
706 .. _v4l2-mpeg-video-h264-vui-sar-idc:
708 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
711 enum v4l2_mpeg_video_h264_vui_sar_idc -
712 VUI sample aspect ratio indicator for H.264 encoding. The value is
713 defined in the table E-1 in the standard. Applicable to the H264
722 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
724 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
726 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
728 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
730 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
732 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
734 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
736 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
738 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
740 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
742 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
744 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
746 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
748 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
750 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
752 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
754 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
756 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
761 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
762 Extended sample aspect ratio width for H.264 VUI encoding.
763 Applicable to the H264 encoder.
765 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
766 Extended sample aspect ratio height for H.264 VUI encoding.
767 Applicable to the H264 encoder.
769 .. _v4l2-mpeg-video-h264-level:
771 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
774 enum v4l2_mpeg_video_h264_level -
775 The level information for the H264 video elementary stream.
776 Applicable to the H264 encoder. Possible values are:
784 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
786 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
788 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
790 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
792 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
794 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
796 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
798 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
800 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
802 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
804 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
806 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
808 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
810 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
812 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
814 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
816 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
818 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
820 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
822 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
827 .. _v4l2-mpeg-video-mpeg2-level:
829 ``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
832 enum v4l2_mpeg_video_mpeg2_level -
833 The level information for the MPEG2 elementary stream. Applicable to
834 MPEG2 codecs. Possible values are:
842 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
844 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
846 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
847 - High-1440 Level (H-14)
848 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
853 .. _v4l2-mpeg-video-mpeg4-level:
855 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
858 enum v4l2_mpeg_video_mpeg4_level -
859 The level information for the MPEG4 elementary stream. Applicable to
860 the MPEG4 encoder. Possible values are:
868 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
870 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
872 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
874 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
876 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
878 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
880 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
882 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
887 .. _v4l2-mpeg-video-h264-profile:
889 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
892 enum v4l2_mpeg_video_h264_profile -
893 The profile information for H264. Applicable to the H264 encoder.
900 .. tabularcolumns:: |p{10.2cm}|p{7.3cm}|
906 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
908 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
909 - Constrained Baseline profile
910 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
912 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
914 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
916 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
918 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
920 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
921 - High 444 Predictive profile
922 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
923 - High 10 Intra profile
924 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
925 - High 422 Intra profile
926 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
927 - High 444 Intra profile
928 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
929 - CAVLC 444 Intra profile
930 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
931 - Scalable Baseline profile
932 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
933 - Scalable High profile
934 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
935 - Scalable High Intra profile
936 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
937 - Stereo High profile
938 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
939 - Multiview High profile
940 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
941 - Constrained High profile
947 .. _v4l2-mpeg-video-mpeg2-profile:
949 ``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
952 enum v4l2_mpeg_video_mpeg2_profile -
953 The profile information for MPEG2. Applicable to MPEG2 codecs.
960 .. tabularcolumns:: |p{10.2cm}|p{7.3cm}|
966 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
967 - Simple profile (SP)
968 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
970 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
971 - SNR Scalable profile (SNR)
972 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
973 - Spatially Scalable profile (Spt)
974 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
976 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
977 - Multi-view profile (MVP)
984 .. _v4l2-mpeg-video-mpeg4-profile:
986 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
989 enum v4l2_mpeg_video_mpeg4_profile -
990 The profile information for MPEG4. Applicable to the MPEG4 encoder.
997 .. tabularcolumns:: |p{11.8cm}|p{5.7cm}|
1003 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
1005 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
1006 - Advanced Simple profile
1007 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
1009 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
1010 - Simple Scalable profile
1011 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
1012 - Advanced Coding Efficiency profile
1018 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
1019 The maximum number of reference pictures used for encoding.
1020 Applicable to the encoder.
1022 .. _v4l2-mpeg-video-multi-slice-mode:
1024 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
1027 enum v4l2_mpeg_video_multi_slice_mode -
1028 Determines how the encoder should handle division of frame into
1029 slices. Applicable to the encoder. Possible values are:
1033 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1039 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
1040 - Single slice per frame.
1041 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
1042 - Multiple slices with set maximum number of macroblocks per slice.
1043 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
1044 - Multiple slice with set maximum size in bytes per slice.
1048 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
1049 The maximum number of macroblocks in a slice. Used when
1050 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1051 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
1054 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
1055 The maximum size of a slice in bytes. Used when
1056 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1057 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
1060 .. _v4l2-mpeg-video-h264-loop-filter-mode:
1062 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
1065 enum v4l2_mpeg_video_h264_loop_filter_mode -
1066 Loop filter mode for H264 encoder. Possible values are:
1072 .. tabularcolumns:: |p{13.5cm}|p{4.0cm}|
1078 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1079 - Loop filter is enabled.
1080 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1081 - Loop filter is disabled.
1082 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1083 - Loop filter is disabled at the slice boundary.
1090 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1091 Loop filter alpha coefficient, defined in the H264 standard.
1092 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1093 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1094 offset FilterOffsetA is twice this value.
1095 Applicable to the H264 encoder.
1097 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1098 Loop filter beta coefficient, defined in the H264 standard.
1099 This corresponds to the slice_beta_offset_div2 slice header field, and
1100 should be in the range of -6 to +6, inclusive. The actual beta offset
1101 FilterOffsetB is twice this value.
1102 Applicable to the H264 encoder.
1104 .. _v4l2-mpeg-video-h264-entropy-mode:
1106 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1109 enum v4l2_mpeg_video_h264_entropy_mode -
1110 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1111 encoder. Possible values are:
1114 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1121 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1122 - Use CAVLC entropy coding.
1123 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1124 - Use CABAC entropy coding.
1128 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1129 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1131 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1132 Enable constrained intra prediction for H264. Applicable to the H264
1135 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1136 Specify the offset that should be added to the luma quantization
1137 parameter to determine the chroma quantization parameter. Applicable
1138 to the H264 encoder.
1140 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1141 Cyclic intra macroblock refresh. This is the number of continuous
1142 macroblocks refreshed every frame. Each frame a successive set of
1143 macroblocks is refreshed until the cycle completes and starts from
1144 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1146 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1147 Frame level rate control enable. If this control is disabled then
1148 the quantization parameter for each frame type is constant and set
1149 with appropriate controls (e.g.
1150 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1151 enabled then quantization parameter is adjusted to meet the chosen
1152 bitrate. Minimum and maximum value for the quantization parameter
1153 can be set with appropriate controls (e.g.
1154 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1156 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1157 Macroblock level rate control enable. Applicable to the MPEG4 and
1160 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1161 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1164 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1165 Quantization parameter for an I frame for H263. Valid range: from 1
1168 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1169 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1171 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1172 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1174 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1175 Quantization parameter for an P frame for H263. Valid range: from 1
1178 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1179 Quantization parameter for an B frame for H263. Valid range: from 1
1182 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1183 Quantization parameter for an I frame for H264. Valid range: from 0
1186 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1187 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1189 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1190 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1192 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1193 Quantization parameter for an P frame for H264. Valid range: from 0
1196 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1197 Quantization parameter for an B frame for H264. Valid range: from 0
1200 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1201 Minimum quantization parameter for the H264 I frame to limit I frame
1202 quality to a range. Valid range: from 0 to 51. If
1203 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1204 should be chosen to meet both requirements.
1206 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1207 Maximum quantization parameter for the H264 I frame to limit I frame
1208 quality to a range. Valid range: from 0 to 51. If
1209 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1210 should be chosen to meet both requirements.
1212 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1213 Minimum quantization parameter for the H264 P frame to limit P frame
1214 quality to a range. Valid range: from 0 to 51. If
1215 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1216 should be chosen to meet both requirements.
1218 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1219 Maximum quantization parameter for the H264 P frame to limit P frame
1220 quality to a range. Valid range: from 0 to 51. If
1221 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1222 should be chosen to meet both requirements.
1224 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)``
1225 Minimum quantization parameter for the H264 B frame to limit B frame
1226 quality to a range. Valid range: from 0 to 51. If
1227 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1228 should be chosen to meet both requirements.
1230 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)``
1231 Maximum quantization parameter for the H264 B frame to limit B frame
1232 quality to a range. Valid range: from 0 to 51. If
1233 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1234 should be chosen to meet both requirements.
1236 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1237 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1240 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1241 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1243 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1244 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1246 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1247 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1250 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1251 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1254 .. _v4l2-mpeg-video-vbv-size:
1256 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1257 The Video Buffer Verifier size in kilobytes, it is used as a
1258 limitation of frame skip. The VBV is defined in the standard as a
1259 mean to verify that the produced stream will be successfully
1260 decoded. The standard describes it as "Part of a hypothetical
1261 decoder that is conceptually connected to the output of the encoder.
1262 Its purpose is to provide a constraint on the variability of the
1263 data rate that an encoder or editing process may produce.".
1264 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1266 .. _v4l2-mpeg-video-vbv-delay:
1268 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1269 Sets the initial delay in milliseconds for VBV buffer control.
1271 .. _v4l2-mpeg-video-hor-search-range:
1273 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1274 Horizontal search range defines maximum horizontal search area in
1275 pixels to search and match for the present Macroblock (MB) in the
1276 reference picture. This V4L2 control macro is used to set horizontal
1277 search range for motion estimation module in video encoder.
1279 .. _v4l2-mpeg-video-vert-search-range:
1281 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1282 Vertical search range defines maximum vertical search area in pixels
1283 to search and match for the present Macroblock (MB) in the reference
1284 picture. This V4L2 control macro is used to set vertical search
1285 range for motion estimation module in video encoder.
1287 .. _v4l2-mpeg-video-force-key-frame:
1289 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1290 Force a key frame for the next queued buffer. Applicable to
1291 encoders. This is a general, codec-agnostic keyframe control.
1293 .. _v4l2-mpeg-video-h264-cpb-size:
1295 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1296 The Coded Picture Buffer size in kilobytes, it is used as a
1297 limitation of frame skip. The CPB is defined in the H264 standard as
1298 a mean to verify that the produced stream will be successfully
1299 decoded. Applicable to the H264 encoder.
1301 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1302 Period between I-frames in the open GOP for H264. In case of an open
1303 GOP this is the period between two I-frames. The period between IDR
1304 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1305 control. An IDR frame, which stands for Instantaneous Decoding
1306 Refresh is an I-frame after which no prior frames are referenced.
1307 This means that a stream can be restarted from an IDR frame without
1308 the need to store or decode any previous frames. Applicable to the
1311 .. _v4l2-mpeg-video-header-mode:
1313 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1316 enum v4l2_mpeg_video_header_mode -
1317 Determines whether the header is returned as the first buffer or is
1318 it returned together with the first frame. Applicable to encoders.
1319 Possible values are:
1325 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1331 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1332 - The stream header is returned separately in the first buffer.
1333 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1334 - The stream header is returned together with the first encoded
1342 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1343 Repeat the video sequence headers. Repeating these headers makes
1344 random access to the video stream easier. Applicable to the MPEG1, 2
1347 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1348 Enabled the deblocking post processing filter for MPEG4 decoder.
1349 Applicable to the MPEG4 decoder.
1351 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1352 vop_time_increment_resolution value for MPEG4. Applicable to the
1355 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1356 vop_time_increment value for MPEG4. Applicable to the MPEG4
1359 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1360 Enable generation of frame packing supplemental enhancement
1361 information in the encoded bitstream. The frame packing SEI message
1362 contains the arrangement of L and R planes for 3D viewing.
1363 Applicable to the H264 encoder.
1365 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1366 Sets current frame as frame0 in frame packing SEI. Applicable to the
1369 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1371 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1374 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1375 Frame packing arrangement type for H264 SEI. Applicable to the H264
1376 encoder. Possible values are:
1382 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1388 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1389 - Pixels are alternatively from L and R.
1390 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1391 - L and R are interlaced by column.
1392 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1393 - L and R are interlaced by row.
1394 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1395 - L is on the left, R on the right.
1396 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1397 - L is on top, R on bottom.
1398 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1399 - One view per frame.
1407 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1408 Enables flexible macroblock ordering in the encoded bitstream. It is
1409 a technique used for restructuring the ordering of macroblocks in
1410 pictures. Applicable to the H264 encoder.
1412 .. _v4l2-mpeg-video-h264-fmo-map-type:
1414 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1417 enum v4l2_mpeg_video_h264_fmo_map_type -
1418 When using FMO, the map type divides the image in different scan
1419 patterns of macroblocks. Applicable to the H264 encoder. Possible
1426 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1432 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1433 - Slices are interleaved one after other with macroblocks in run
1435 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1436 - Scatters the macroblocks based on a mathematical function known to
1437 both encoder and decoder.
1438 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1439 - Macroblocks arranged in rectangular areas or regions of interest.
1440 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1441 - Slice groups grow in a cyclic way from centre to outwards.
1442 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1443 - Slice groups grow in raster scan pattern from left to right.
1444 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1445 - Slice groups grow in wipe scan pattern from top to bottom.
1446 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1447 - User defined map type.
1455 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1456 Number of slice groups in FMO. Applicable to the H264 encoder.
1458 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1460 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1463 enum v4l2_mpeg_video_h264_fmo_change_dir -
1464 Specifies a direction of the slice group change for raster and wipe
1465 maps. Applicable to the H264 encoder. Possible values are:
1467 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1473 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1474 - Raster scan or wipe right.
1475 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1476 - Reverse raster scan or wipe left.
1480 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1481 Specifies the size of the first slice group for raster and wipe map.
1482 Applicable to the H264 encoder.
1484 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1485 Specifies the number of consecutive macroblocks for the interleaved
1486 map. Applicable to the H264 encoder.
1488 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1489 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1492 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1493 Specifies the slice order in ASO. Applicable to the H264 encoder.
1494 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1506 - Slice position or order
1510 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1511 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1513 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1515 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1518 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1519 Specifies the hierarchical coding type. Applicable to the H264
1520 encoder. Possible values are:
1528 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1529 - Hierarchical B coding.
1530 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1531 - Hierarchical P coding.
1535 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1536 Specifies the number of hierarchical coding layers. Applicable to
1539 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1540 Specifies a user defined QP for each layer. Applicable to the H264
1541 encoder. The supplied 32-bit integer is interpreted as follows (bit
1542 0 = least significant bit):
1555 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)``
1556 Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder.
1558 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)``
1559 Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder.
1561 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)``
1562 Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder.
1564 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)``
1565 Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder.
1567 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)``
1568 Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder.
1570 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)``
1571 Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder.
1573 ``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``
1574 Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.
1576 .. _v4l2-mpeg-mpeg2:
1578 ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
1579 Specifies the slice parameters (as extracted from the bitstream) for the
1580 associated MPEG-2 slice data. This includes the necessary parameters for
1581 configuring a stateless hardware decoding pipeline for MPEG-2.
1582 The bitstream parameters are defined according to :ref:`mpeg2part2`.
1586 This compound control is not yet part of the public kernel API and
1587 it is expected to change.
1589 .. c:type:: v4l2_ctrl_mpeg2_slice_params
1591 .. tabularcolumns:: |p{5.6cm}|p{4.6cm}|p{7.1cm}|
1593 .. cssclass:: longtable
1595 .. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
1602 - Size (in bits) of the current slice data.
1604 - ``data_bit_offset``
1605 - Offset (in bits) to the video data in the current slice data.
1606 * - struct :c:type:`v4l2_mpeg2_sequence`
1608 - Structure with MPEG-2 sequence metadata, merging relevant fields from
1609 the sequence header and sequence extension parts of the bitstream.
1610 * - struct :c:type:`v4l2_mpeg2_picture`
1612 - Structure with MPEG-2 picture metadata, merging relevant fields from
1613 the picture header and picture coding extension parts of the bitstream.
1615 - ``backward_ref_ts``
1616 - Timestamp of the V4L2 capture buffer to use as backward reference, used
1617 with B-coded and P-coded frames. The timestamp refers to the
1618 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1619 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1620 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1622 - ``forward_ref_ts``
1623 - Timestamp for the V4L2 capture buffer to use as forward reference, used
1624 with B-coded frames. The timestamp refers to the ``timestamp`` field in
1625 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1626 function to convert the struct :c:type:`timeval` in struct
1627 :c:type:`v4l2_buffer` to a __u64.
1629 - ``quantiser_scale_code``
1630 - Code used to determine the quantization scale to use for the IDCT.
1632 .. c:type:: v4l2_mpeg2_sequence
1634 .. cssclass:: longtable
1636 .. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
1638 .. flat-table:: struct v4l2_mpeg2_sequence
1644 - ``horizontal_size``
1645 - The width of the displayable part of the frame's luminance component.
1648 - The height of the displayable part of the frame's luminance component.
1650 - ``vbv_buffer_size``
1651 - Used to calculate the required size of the video buffering verifier,
1652 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
1654 - ``profile_and_level_indication``
1655 - The current profile and level indication as extracted from the
1658 - ``progressive_sequence``
1659 - Indication that all the frames for the sequence are progressive instead
1663 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
1665 .. c:type:: v4l2_mpeg2_picture
1671 .. cssclass:: longtable
1673 .. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
1675 .. flat-table:: struct v4l2_mpeg2_picture
1681 - ``picture_coding_type``
1682 - Picture coding type for the frame covered by the current slice
1683 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
1684 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
1687 - Motion vector codes.
1689 - ``intra_dc_precision``
1690 - Precision of Discrete Cosine transform (0: 8 bits precision,
1691 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
1693 - ``picture_structure``
1694 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
1695 3: progressive frame).
1697 - ``top_field_first``
1698 - If set to 1 and interlaced stream, top field is output first.
1700 - ``frame_pred_frame_dct``
1701 - If set to 1, only frame-DCT and frame prediction are used.
1703 - ``concealment_motion_vectors``
1704 - If set to 1, motion vectors are coded for intra macroblocks.
1707 - This flag affects the inverse quantization process.
1709 - ``intra_vlc_format``
1710 - This flag affects the decoding of transform coefficient data.
1712 - ``alternate_scan``
1713 - This flag affects the decoding of transform coefficient data.
1715 - ``repeat_first_field``
1716 - This flag affects the decoding process of progressive frames.
1718 - ``progressive_frame``
1719 - Indicates whether the current frame is progressive.
1725 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
1726 Specifies quantization matrices (as extracted from the bitstream) for the
1727 associated MPEG-2 slice data.
1731 This compound control is not yet part of the public kernel API and
1732 it is expected to change.
1734 .. c:type:: v4l2_ctrl_mpeg2_quantization
1736 .. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|
1738 .. cssclass:: longtable
1744 .. flat-table:: struct v4l2_ctrl_mpeg2_quantization
1750 - ``load_intra_quantiser_matrix``
1751 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
1753 - ``load_non_intra_quantiser_matrix``
1754 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
1757 - ``load_chroma_intra_quantiser_matrix``
1758 - One bit to indicate whether to load the
1759 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
1762 - ``load_chroma_non_intra_quantiser_matrix``
1763 - One bit to indicate whether to load the
1764 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
1767 - ``intra_quantiser_matrix[64]``
1768 - The quantization matrix coefficients for intra-coded frames, in zigzag
1769 scanning order. It is relevant for both luma and chroma components,
1770 although it can be superseded by the chroma-specific matrix for
1771 non-4:2:0 YUV formats.
1773 - ``non_intra_quantiser_matrix[64]``
1774 - The quantization matrix coefficients for non-intra-coded frames, in
1775 zigzag scanning order. It is relevant for both luma and chroma
1776 components, although it can be superseded by the chroma-specific matrix
1777 for non-4:2:0 YUV formats.
1779 - ``chroma_intra_quantiser_matrix[64]``
1780 - The quantization matrix coefficients for the chominance component of
1781 intra-coded frames, in zigzag scanning order. Only relevant for
1782 non-4:2:0 YUV formats.
1784 - ``chroma_non_intra_quantiser_matrix[64]``
1785 - The quantization matrix coefficients for the chrominance component of
1786 non-intra-coded frames, in zigzag scanning order. Only relevant for
1787 non-4:2:0 YUV formats.
1793 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
1794 Quantization parameter for an I frame for FWHT. Valid range: from 1
1797 ``V4L2_CID_FWHT_P_FRAME_QP (integer)``
1798 Quantization parameter for a P frame for FWHT. Valid range: from 1
1803 ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
1804 Specifies the frame parameters for the associated VP8 parsed frame data.
1805 This includes the necessary parameters for
1806 configuring a stateless hardware decoding pipeline for VP8.
1807 The bitstream parameters are defined according to :ref:`vp8`.
1811 This compound control is not yet part of the public kernel API and
1812 it is expected to change.
1814 .. c:type:: v4l2_ctrl_vp8_frame_header
1820 .. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|
1822 .. cssclass:: longtable
1824 .. flat-table:: struct v4l2_ctrl_vp8_frame_header
1829 * - struct :c:type:`v4l2_vp8_segment_header`
1830 - ``segment_header``
1831 - Structure with segment-based adjustments metadata.
1832 * - struct :c:type:`v4l2_vp8_loopfilter_header`
1833 - ``loopfilter_header``
1834 - Structure with loop filter level adjustments metadata.
1835 * - struct :c:type:`v4l2_vp8_quantization_header`
1837 - Structure with VP8 dequantization indices metadata.
1838 * - struct :c:type:`v4l2_vp8_entropy_header`
1839 - ``entropy_header``
1840 - Structure with VP8 entropy coder probabilities metadata.
1841 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
1843 - Structure with VP8 entropy coder state.
1846 - The width of the frame. Must be set for all frames.
1849 - The height of the frame. Must be set for all frames.
1851 - ``horizontal_scale``
1852 - Horizontal scaling factor.
1854 - ``vertical_scaling factor``
1858 - Bitstream version.
1860 - ``prob_skip_false``
1861 - Indicates the probability that the macroblock is not skipped.
1864 - Indicates the probability that a macroblock is intra-predicted.
1867 - Indicates the probability that the last reference frame is used
1868 for inter-prediction
1871 - Indicates the probability that the golden reference frame is used
1872 for inter-prediction
1875 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
1877 - ``first_part_size``
1878 - Size of the first partition, i.e. the control partition.
1880 - ``first_part_header_bits``
1881 - Size in bits of the first partition header portion.
1883 - ``dct_part_sizes[8]``
1884 - DCT coefficients sizes.
1887 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
1888 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1889 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1890 function to convert the struct :c:type:`timeval` in struct
1891 :c:type:`v4l2_buffer` to a __u64.
1893 - ``golden_frame_ts``
1894 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
1895 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1896 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1897 function to convert the struct :c:type:`timeval` in struct
1898 :c:type:`v4l2_buffer` to a __u64.
1901 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
1902 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
1903 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1904 function to convert the struct :c:type:`timeval` in struct
1905 :c:type:`v4l2_buffer` to a __u64.
1908 - See :ref:`Frame Header Flags <vp8_frame_header_flags>`
1914 .. _vp8_frame_header_flags:
1916 ``Frame Header Flags``
1918 .. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|
1920 .. cssclass:: longtable
1927 * - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
1929 - Indicates if the frame is a key frame.
1930 * - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
1932 - Experimental bitstream.
1933 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
1935 - Show frame flag, indicates if the frame is for display.
1936 * - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
1938 - Enable/disable skipping of macroblocks with no non-zero coefficients.
1939 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
1941 - Sign of motion vectors when the golden frame is referenced.
1942 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
1944 - Sign of motion vectors when the alt frame is referenced.
1946 .. c:type:: v4l2_vp8_entropy_coder_state
1948 .. cssclass:: longtable
1950 .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.3cm}|
1952 .. flat-table:: struct v4l2_vp8_entropy_coder_state
1968 - Applications and drivers must set this to zero.
1970 .. c:type:: v4l2_vp8_segment_header
1972 .. cssclass:: longtable
1974 .. tabularcolumns:: |p{1.2cm}|p{4.0cm}|p{12.1cm}|
1976 .. flat-table:: struct v4l2_vp8_segment_header
1982 - ``quant_update[4]``
1983 - Signed quantizer value update.
1986 - Signed loop filter level value update.
1988 - ``segment_probs[3]``
1989 - Segment probabilities.
1992 - Applications and drivers must set this to zero.
1995 - See :ref:`Segment Header Flags <vp8_segment_header_flags>`
1997 .. _vp8_segment_header_flags:
1999 ``Segment Header Flags``
2005 .. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|
2012 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
2014 - Enable/disable segment-based adjustments.
2015 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
2017 - Indicates if the macroblock segmentation map is updated in this frame.
2018 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
2020 - Indicates if the segment feature data is updated in this frame.
2021 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
2023 - If is set, the segment feature data mode is delta-value.
2024 If cleared, it's absolute-value.
2030 .. c:type:: v4l2_vp8_loopfilter_header
2032 .. cssclass:: longtable
2034 .. tabularcolumns:: |p{1.5cm}|p{3.9cm}|p{11.9cm}|
2036 .. flat-table:: struct v4l2_vp8_loopfilter_header
2042 - ``ref_frm_delta[4]``
2043 - Reference adjustment (signed) delta value.
2045 - ``mb_mode_delta[4]``
2046 - Macroblock prediction mode adjustment (signed) delta value.
2048 - ``sharpness_level``
2055 - Applications and drivers must set this to zero.
2058 - See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
2060 .. _vp8_loopfilter_header_flags:
2062 ``Loopfilter Header Flags``
2064 .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
2071 * - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
2073 - Enable/disable macroblock-level loop filter adjustment.
2074 * - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
2076 - Indicates if the delta values used in an adjustment are updated.
2077 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
2079 - If set, indicates the filter type is simple.
2080 If cleared, the filter type is normal.
2082 .. c:type:: v4l2_vp8_quantization_header
2084 .. tabularcolumns:: |p{1.5cm}|p{3.5cm}|p{12.3cm}|
2086 .. flat-table:: struct v4l2_vp8_quantization_header
2093 - Luma AC coefficient table index.
2096 - Luma DC delta vaue.
2099 - Y2 block DC delta value.
2102 - Y2 block AC delta value.
2105 - Chroma DC delta value.
2108 - Chroma AC delta value.
2111 - Applications and drivers must set this to zero.
2113 .. c:type:: v4l2_vp8_entropy_header
2115 .. cssclass:: longtable
2117 .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
2119 .. flat-table:: struct v4l2_vp8_entropy_header
2125 - ``coeff_probs[4][8][3][11]``
2126 - Coefficient update probabilities.
2128 - ``y_mode_probs[4]``
2129 - Luma mode update probabilities.
2131 - ``uv_mode_probs[3]``
2132 - Chroma mode update probabilities.
2134 - ``mv_probs[2][19]``
2135 - MV decoding update probabilities.
2138 - Applications and drivers must set this to zero.
2145 MFC 5.1 MPEG Controls
2146 =====================
2148 The following MPEG class controls deal with MPEG decoding and encoding
2149 settings that are specific to the Multi Format Codec 5.1 device present
2150 in the S5P family of SoCs by Samsung.
2153 .. _mfc51-control-id:
2158 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2159 If the display delay is enabled then the decoder is forced to return
2160 a CAPTURE buffer (decoded frame) after processing a certain number
2161 of OUTPUT buffers. The delay can be set through
2162 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2163 feature can be used for example for generating thumbnails of videos.
2164 Applicable to the H264 decoder.
2168 This control is deprecated. Use the standard
2169 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead.
2171 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2172 Display delay value for H264 decoder. The decoder is forced to
2173 return a decoded frame after the set 'display delay' number of
2174 frames. If this number is low it may result in frames returned out
2175 of display order, in addition the hardware may still be using the
2176 returned buffer as a reference picture for subsequent frames.
2180 This control is deprecated. Use the standard
2181 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead.
2183 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2184 The number of reference pictures used for encoding a P picture.
2185 Applicable to the H264 encoder.
2187 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2188 Padding enable in the encoder - use a color instead of repeating
2189 border pixels. Applicable to encoders.
2191 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2192 Padding color in the encoder. Applicable to encoders. The supplied
2193 32-bit integer is interpreted as follows (bit 0 = least significant
2203 - V chrominance information
2205 - U chrominance information
2207 - Y luminance information
2213 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2214 Reaction coefficient for MFC rate control. Applicable to encoders.
2218 #. Valid only when the frame level RC is enabled.
2220 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2221 VBR, this field must be large (ex. 100 ~ 1000).
2223 #. It is not recommended to use the greater number than
2224 FRAME_RATE * (10^9 / BIT_RATE).
2226 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2227 Adaptive rate control for dark region. Valid only when H.264 and
2228 macroblock level RC is enabled
2229 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2232 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2233 Adaptive rate control for smooth region. Valid only when H.264 and
2234 macroblock level RC is enabled
2235 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2238 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2239 Adaptive rate control for static region. Valid only when H.264 and
2240 macroblock level RC is enabled
2241 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2244 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
2245 Adaptive rate control for activity region. Valid only when H.264 and
2246 macroblock level RC is enabled
2247 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2250 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
2252 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2257 This control is deprecated. Use the standard
2258 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.
2260 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2261 Indicates in what conditions the encoder should skip frames. If
2262 encoding a frame would cause the encoded stream to be larger then a
2263 chosen data limit then the frame will be skipped. Possible values
2267 .. tabularcolumns:: |p{9.4cm}|p{8.1cm}|
2277 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2278 - Frame skip mode is disabled.
2279 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2280 - Frame skip mode enabled and buffer limit is set by the chosen
2281 level and is defined by the standard.
2282 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2283 - Frame skip mode enabled and buffer limit is set by the VBV
2284 (MPEG1/2/4) or CPB (H264) buffer size control.
2290 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2291 Enable rate-control with fixed target bit. If this setting is
2292 enabled, then the rate control logic of the encoder will calculate
2293 the average bitrate for a GOP and keep it below or equal the set
2294 bitrate target. Otherwise the rate control logic calculates the
2295 overall average bitrate for the stream and keeps it below or equal
2296 to the set bitrate. In the first case the average bitrate for the
2297 whole stream will be smaller then the set bitrate. This is caused
2298 because the average is calculated for smaller number of frames, on
2299 the other hand enabling this setting will ensure that the stream
2300 will meet tight bandwidth constraints. Applicable to encoders.
2302 .. _v4l2-mpeg-mfc51-video-force-frame-type:
2304 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2307 enum v4l2_mpeg_mfc51_video_force_frame_type -
2308 Force a frame type for the next queued buffer. Applicable to
2309 encoders. Possible values are:
2311 .. tabularcolumns:: |p{9.9cm}|p{7.6cm}|
2317 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2318 - Forcing a specific frame type disabled.
2319 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2321 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2322 - Force a non-coded frame.
2325 CX2341x MPEG Controls
2326 =====================
2328 The following MPEG class controls deal with MPEG encoding settings that
2329 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
2332 .. _cx2341x-control-id:
2337 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
2339 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
2342 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
2343 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
2347 .. tabularcolumns:: |p{11.5cm}|p{6.0cm}|
2353 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
2354 - Choose the filter manually
2355 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
2356 - Choose the filter automatically
2360 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
2361 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
2364 .. _luma-spatial-filter-type:
2366 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
2369 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
2370 Select the algorithm to use for the Luma Spatial Filter (default
2371 ``1D_HOR``). Possible values:
2373 .. tabularcolumns:: |p{13.1cm}|p{4.4cm}|
2383 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
2385 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
2386 - One-dimensional horizontal
2387 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
2388 - One-dimensional vertical
2389 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
2390 - Two-dimensional separable
2391 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
2392 - Two-dimensional symmetrical non-separable
2398 .. _chroma-spatial-filter-type:
2400 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
2403 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
2404 Select the algorithm for the Chroma Spatial Filter (default
2405 ``1D_HOR``). Possible values are:
2411 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
2417 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
2419 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
2420 - One-dimensional horizontal
2426 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
2428 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
2431 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
2432 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
2443 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
2444 - Choose the filter manually
2445 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
2446 - Choose the filter automatically
2452 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
2453 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
2454 is 8 for full-scale capturing and 0 for scaled capturing.)
2456 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
2458 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
2461 enum v4l2_mpeg_cx2341x_video_median_filter_type -
2462 Median Filter Type (default ``OFF``). Possible values are:
2469 .. tabularcolumns:: |p{11.0cm}|p{6.5cm}|
2475 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
2477 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
2479 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
2481 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
2482 - Horizontal and vertical filter
2483 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
2490 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2491 Threshold above which the luminance median filter is enabled
2494 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
2495 Threshold below which the luminance median filter is enabled
2498 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2499 Threshold above which the chroma median filter is enabled (default
2502 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
2503 Threshold below which the chroma median filter is enabled (default
2506 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
2507 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
2508 the stream between every four video frames. The packet size is 2048
2509 bytes, including the packet_start_code_prefix and stream_id
2510 fields. The stream_id is 0xBF (private stream 2). The payload
2511 consists of 0x00 bytes, to be filled in by the application. 0 = do
2512 not insert, 1 = insert packets.
2515 VPX Control Reference
2516 =====================
2518 The VPX controls include controls for encoding parameters of VPx video
2527 .. _v4l2-vpx-num-partitions:
2529 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
2532 enum v4l2_vp8_num_partitions -
2533 The number of token partitions to use in VP8 encoder. Possible
2542 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
2543 - 1 coefficient partition
2544 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
2545 - 2 coefficient partitions
2546 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
2547 - 4 coefficient partitions
2548 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
2549 - 8 coefficient partitions
2553 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
2554 Setting this prevents intra 4x4 mode in the intra mode decision.
2556 .. _v4l2-vpx-num-ref-frames:
2558 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
2561 enum v4l2_vp8_num_ref_frames -
2562 The number of reference pictures for encoding P frames. Possible
2565 .. tabularcolumns:: |p{7.5cm}|p{7.5cm}|
2575 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
2576 - Last encoded frame will be searched
2577 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
2578 - Two frames will be searched among the last encoded frame, the
2579 golden frame and the alternate reference (altref) frame. The
2580 encoder implementation will decide which two are chosen.
2581 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
2582 - The last encoded frame, the golden frame and the altref frame will
2591 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
2592 Indicates the loop filter level. The adjustment of the loop filter
2593 level is done via a delta value against a baseline loop filter
2596 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
2597 This parameter affects the loop filter. Anything above zero weakens
2598 the deblocking effect on the loop filter.
2600 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
2601 Sets the refresh period for the golden frame. The period is defined
2602 in number of frames. For a value of 'n', every nth frame starting
2603 from the first key frame will be taken as a golden frame. For eg.
2604 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
2605 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
2606 taken as the golden frames as frame 0 is always a key frame.
2608 .. _v4l2-vpx-golden-frame-sel:
2610 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
2613 enum v4l2_vp8_golden_frame_sel -
2614 Selects the golden frame for encoding. Possible values are:
2620 .. tabularcolumns:: |p{8.6cm}|p{8.9cm}|
2626 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
2627 - Use the (n-2)th frame as a golden frame, current frame index being
2629 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
2630 - Use the previous specific frame indicated by
2631 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
2639 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
2640 Minimum quantization parameter for VP8.
2642 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
2643 Maximum quantization parameter for VP8.
2645 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
2646 Quantization parameter for an I frame for VP8.
2648 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
2649 Quantization parameter for a P frame for VP8.
2651 .. _v4l2-mpeg-video-vp8-profile:
2653 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
2656 enum v4l2_mpeg_video_vp8_profile -
2657 This control allows selecting the profile for VP8 encoder.
2658 This is also used to enumerate supported profiles by VP8 encoder or decoder.
2659 Possible values are:
2665 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
2667 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
2669 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
2671 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
2674 .. _v4l2-mpeg-video-vp9-profile:
2676 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
2679 enum v4l2_mpeg_video_vp9_profile -
2680 This control allows selecting the profile for VP9 encoder.
2681 This is also used to enumerate supported profiles by VP9 encoder or decoder.
2682 Possible values are:
2688 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
2690 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
2692 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
2694 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
2697 .. _v4l2-mpeg-video-vp9-level:
2699 ``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``
2701 enum v4l2_mpeg_video_vp9_level -
2702 This control allows selecting the level for VP9 encoder.
2703 This is also used to enumerate supported levels by VP9 encoder or decoder.
2704 More information can be found at
2705 `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:
2711 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``
2713 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``
2715 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``
2717 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``
2719 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``
2721 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``
2723 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``
2725 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``
2727 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``
2729 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``
2731 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``
2733 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``
2735 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``
2737 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``
2741 High Efficiency Video Coding (HEVC/H.265) Control Reference
2742 ===========================================================
2744 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
2748 .. _hevc-control-id:
2750 HEVC/H.265 Control IDs
2751 ----------------------
2753 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
2754 Minimum quantization parameter for HEVC.
2755 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2757 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
2758 Maximum quantization parameter for HEVC.
2759 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2761 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
2762 Quantization parameter for an I frame for HEVC.
2763 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2764 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2766 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
2767 Quantization parameter for a P frame for HEVC.
2768 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2769 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2771 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
2772 Quantization parameter for a B frame for HEVC.
2773 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2774 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2776 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)``
2777 Minimum quantization parameter for the HEVC I frame to limit I frame
2778 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2779 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2780 should be chosen to meet both requirements.
2782 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)``
2783 Maximum quantization parameter for the HEVC I frame to limit I frame
2784 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2785 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2786 should be chosen to meet both requirements.
2788 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)``
2789 Minimum quantization parameter for the HEVC P frame to limit P frame
2790 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2791 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2792 should be chosen to meet both requirements.
2794 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)``
2795 Maximum quantization parameter for the HEVC P frame to limit P frame
2796 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2797 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2798 should be chosen to meet both requirements.
2800 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)``
2801 Minimum quantization parameter for the HEVC B frame to limit B frame
2802 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2803 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter
2804 should be chosen to meet both requirements.
2806 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)``
2807 Maximum quantization parameter for the HEVC B frame to limit B frame
2808 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.
2809 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter
2810 should be chosen to meet both requirements.
2812 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
2813 HIERARCHICAL_QP allows the host to specify the quantization parameter
2814 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
2815 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
2816 control value to 1 enables setting of the QP values for the layers.
2818 .. _v4l2-hevc-hier-coding-type:
2820 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
2823 enum v4l2_mpeg_video_hevc_hier_coding_type -
2824 Selects the hierarchical coding type for encoding. Possible values are:
2830 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
2836 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
2837 - Use the B frame for hierarchical coding.
2838 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
2839 - Use the P frame for hierarchical coding.
2846 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
2847 Selects the hierarchical coding layer. In normal encoding
2848 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
2849 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
2852 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
2853 Indicates quantization parameter for hierarchical coding layer 0.
2854 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2855 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2857 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
2858 Indicates quantization parameter for hierarchical coding layer 1.
2859 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2860 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2862 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
2863 Indicates quantization parameter for hierarchical coding layer 2.
2864 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2865 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2867 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
2868 Indicates quantization parameter for hierarchical coding layer 3.
2869 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2870 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2872 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
2873 Indicates quantization parameter for hierarchical coding layer 4.
2874 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2875 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2877 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
2878 Indicates quantization parameter for hierarchical coding layer 5.
2879 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2880 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2882 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
2883 Indicates quantization parameter for hierarchical coding layer 6.
2884 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2885 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2887 .. _v4l2-hevc-profile:
2889 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
2892 enum v4l2_mpeg_video_hevc_profile -
2893 Select the desired profile for HEVC encoder.
2899 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
2905 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
2907 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
2908 - Main still picture profile.
2909 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
2917 .. _v4l2-hevc-level:
2919 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
2922 enum v4l2_mpeg_video_hevc_level -
2923 Selects the desired level for HEVC encoder.
2925 ================================== =========
2926 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1`` Level 1.0
2927 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2`` Level 2.0
2928 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1`` Level 2.1
2929 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3`` Level 3.0
2930 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1`` Level 3.1
2931 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4`` Level 4.0
2932 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1`` Level 4.1
2933 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5`` Level 5.0
2934 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1`` Level 5.1
2935 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2`` Level 5.2
2936 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6`` Level 6.0
2937 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1`` Level 6.1
2938 ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2`` Level 6.2
2939 ================================== =========
2941 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
2942 Indicates the number of evenly spaced subintervals, called ticks, within
2943 one second. This is a 16 bit unsigned integer and has a maximum value up to
2944 0xffff and a minimum value of 1.
2948 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
2951 enum v4l2_mpeg_video_hevc_tier -
2952 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
2953 were made to deal with applications that differ in terms of maximum bit
2954 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
2955 this flag to 1 indicates High tier. High tier is for applications requiring
2958 ================================== ==========
2959 ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN`` Main tier.
2960 ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH`` High tier.
2961 ================================== ==========
2964 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
2965 Selects HEVC maximum coding unit depth.
2967 .. _v4l2-hevc-loop-filter-mode:
2969 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
2972 enum v4l2_mpeg_video_hevc_loop_filter_mode -
2973 Loop filter mode for HEVC encoder. Possible values are:
2979 .. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
2985 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
2986 - Loop filter is disabled.
2987 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
2988 - Loop filter is enabled.
2989 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
2990 - Loop filter is disabled at the slice boundary.
2997 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
2998 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
3000 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
3001 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
3003 .. _v4l2-hevc-refresh-type:
3005 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
3008 enum v4l2_mpeg_video_hevc_hier_refresh_type -
3009 Selects refresh type for HEVC encoder.
3010 Host has to specify the period into
3011 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
3017 .. tabularcolumns:: |p{6.2cm}|p{11.3cm}|
3023 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
3024 - Use the B frame for hierarchical coding.
3025 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
3026 - Use CRA (Clean Random Access Unit) picture encoding.
3027 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
3028 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
3035 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
3036 Selects the refresh period for HEVC encoder.
3037 This specifies the number of I pictures between two CRA/IDR pictures.
3038 This is valid only if REFRESH_TYPE is not 0.
3040 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
3041 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
3042 encoding. Setting it to 1 enables lossless encoding.
3044 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
3045 Indicates constant intra prediction for HEVC encoder. Specifies the
3046 constrained intra prediction in which intra largest coding unit (LCU)
3047 prediction is performed by using residual data and decoded samples of
3048 neighboring intra LCU only. Setting the value to 1 enables constant intra
3049 prediction and setting the value to 0 disables constant intra prediction.
3051 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
3052 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
3053 disables the feature and setting it to 1 enables the wavefront parallel
3056 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
3057 Setting the value to 1 enables combination of P and B frame for HEVC
3060 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
3061 Indicates temporal identifier for HEVC encoder which is enabled by
3062 setting the value to 1.
3064 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
3065 Indicates bi-linear interpolation is conditionally used in the intra
3066 prediction filtering process in the CVS when set to 1. Indicates bi-linear
3067 interpolation is not used in the CVS when set to 0.
3069 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
3070 Indicates maximum number of merge candidate motion vectors.
3071 Values are from 0 to 4.
3073 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
3074 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
3075 1 enables the prediction. Setting it to 0 disables the prediction.
3077 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
3078 Specifies if HEVC generates a stream with a size of the length field
3079 instead of start code pattern. The size of the length field is configurable
3080 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
3081 the value to 0 disables encoding without startcode pattern. Setting the
3082 value to 1 will enables encoding without startcode pattern.
3084 .. _v4l2-hevc-size-of-length-field:
3086 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
3089 enum v4l2_mpeg_video_hevc_size_of_length_field -
3090 Indicates the size of length field.
3091 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
3097 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
3103 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
3104 - Generate start code pattern (Normal).
3105 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
3106 - Generate size of length field instead of start code pattern and length is 1.
3107 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
3108 - Generate size of length field instead of start code pattern and length is 2.
3109 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
3110 - Generate size of length field instead of start code pattern and length is 4.
3116 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
3117 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
3119 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
3120 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
3122 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
3123 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
3125 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
3126 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
3128 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
3129 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
3131 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
3132 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
3134 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
3135 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
3137 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
3138 Selects number of P reference pictures required for HEVC encoder.
3139 P-Frame can use 1 or 2 frames for reference.
3141 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
3142 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
3143 disables generating SPS and PPS at every IDR. Setting it to one enables
3144 generating SPS and PPS at every IDR.
3148 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)``
3149 Specifies the Sequence Parameter Set fields (as extracted from the
3150 bitstream) for the associated HEVC slice data.
3151 These bitstream parameters are defined according to :ref:`hevc`.
3152 They are described in section 7.4.3.2 "Sequence parameter set RBSP
3153 semantics" of the specification.
3155 .. c:type:: v4l2_ctrl_hevc_sps
3161 .. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|
3163 .. cssclass:: longtable
3165 .. flat-table:: struct v4l2_ctrl_hevc_sps
3171 - ``pic_width_in_luma_samples``
3174 - ``pic_height_in_luma_samples``
3177 - ``bit_depth_luma_minus8``
3180 - ``bit_depth_chroma_minus8``
3183 - ``log2_max_pic_order_cnt_lsb_minus4``
3186 - ``sps_max_dec_pic_buffering_minus1``
3189 - ``sps_max_num_reorder_pics``
3192 - ``sps_max_latency_increase_plus1``
3195 - ``log2_min_luma_coding_block_size_minus3``
3198 - ``log2_diff_max_min_luma_coding_block_size``
3201 - ``log2_min_luma_transform_block_size_minus2``
3204 - ``log2_diff_max_min_luma_transform_block_size``
3207 - ``max_transform_hierarchy_depth_inter``
3210 - ``max_transform_hierarchy_depth_intra``
3213 - ``pcm_sample_bit_depth_luma_minus1``
3216 - ``pcm_sample_bit_depth_chroma_minus1``
3219 - ``log2_min_pcm_luma_coding_block_size_minus3``
3222 - ``log2_diff_max_min_pcm_luma_coding_block_size``
3225 - ``num_short_term_ref_pic_sets``
3228 - ``num_long_term_ref_pics_sps``
3231 - ``chroma_format_idc``
3235 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
3243 ``Sequence Parameter Set Flags``
3249 .. cssclass:: longtable
3256 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
3259 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
3262 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
3265 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
3268 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
3271 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
3274 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
3277 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
3280 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
3288 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)``
3289 Specifies the Picture Parameter Set fields (as extracted from the
3290 bitstream) for the associated HEVC slice data.
3291 These bitstream parameters are defined according to :ref:`hevc`.
3292 They are described in section 7.4.3.3 "Picture parameter set RBSP
3293 semantics" of the specification.
3295 .. c:type:: v4l2_ctrl_hevc_pps
3297 .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
3299 .. cssclass:: longtable
3301 .. flat-table:: struct v4l2_ctrl_hevc_pps
3307 - ``num_extra_slice_header_bits``
3310 - ``init_qp_minus26``
3313 - ``diff_cu_qp_delta_depth``
3316 - ``pps_cb_qp_offset``
3319 - ``pps_cr_qp_offset``
3322 - ``num_tile_columns_minus1``
3325 - ``num_tile_rows_minus1``
3328 - ``column_width_minus1[20]``
3331 - ``row_height_minus1[22]``
3334 - ``pps_beta_offset_div2``
3337 - ``pps_tc_offset_div2``
3340 - ``log2_parallel_merge_level_minus2``
3344 - Applications and drivers must set this to zero.
3347 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
3351 ``Picture Parameter Set Flags``
3362 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT``
3365 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
3368 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
3371 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
3374 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
3377 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
3380 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
3383 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
3386 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
3389 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
3392 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
3395 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
3398 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
3401 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
3404 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
3407 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
3410 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
3413 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
3416 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
3424 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
3425 Specifies various slice-specific parameters, especially from the NAL unit
3426 header, general slice segment header and weighted prediction parameter
3427 parts of the bitstream.
3428 These bitstream parameters are defined according to :ref:`hevc`.
3429 They are described in section 7.4.7 "General slice segment header
3430 semantics" of the specification.
3432 .. c:type:: v4l2_ctrl_hevc_slice_params
3438 .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
3440 .. cssclass:: longtable
3442 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
3449 - Size (in bits) of the current slice data.
3451 - ``data_bit_offset``
3452 - Offset (in bits) to the video data in the current slice data.
3457 - ``nuh_temporal_id_plus1``
3462 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
3463 V4L2_HEVC_SLICE_TYPE_B).
3465 - ``colour_plane_id``
3468 - ``slice_pic_order_cnt``
3471 - ``num_ref_idx_l0_active_minus1``
3474 - ``num_ref_idx_l1_active_minus1``
3477 - ``collocated_ref_idx``
3480 - ``five_minus_max_num_merge_cand``
3483 - ``slice_qp_delta``
3486 - ``slice_cb_qp_offset``
3489 - ``slice_cr_qp_offset``
3492 - ``slice_act_y_qp_offset``
3495 - ``slice_act_cb_qp_offset``
3498 - ``slice_act_cr_qp_offset``
3501 - ``slice_beta_offset_div2``
3504 - ``slice_tc_offset_div2``
3510 - ``num_active_dpb_entries``
3511 - The number of entries in ``dpb``.
3513 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3514 - The list of L0 reference elements as indices in the DPB.
3516 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3517 - The list of L1 reference elements as indices in the DPB.
3519 - ``num_rps_poc_st_curr_before``
3520 - The number of reference pictures in the short-term set that come before
3523 - ``num_rps_poc_st_curr_after``
3524 - The number of reference pictures in the short-term set that come after
3527 - ``num_rps_poc_lt_curr``
3528 - The number of reference pictures in the long-term set.
3531 - Applications and drivers must set this to zero.
3532 * - struct :c:type:`v4l2_hevc_dpb_entry`
3533 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3534 - The decoded picture buffer, for meta-data about reference frames.
3535 * - struct :c:type:`v4l2_hevc_pred_weight_table`
3536 - ``pred_weight_table``
3537 - The prediction weight coefficients for inter-picture prediction.
3540 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
3546 .. _hevc_slice_params_flags:
3548 ``Slice Parameters Flags``
3559 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
3562 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
3565 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
3568 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
3571 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
3574 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
3577 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
3580 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
3583 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
3591 .. c:type:: v4l2_hevc_dpb_entry
3597 .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|
3599 .. flat-table:: struct v4l2_hevc_dpb_entry
3606 - Timestamp of the V4L2 capture buffer to use as reference, used
3607 with B-coded and P-coded frames. The timestamp refers to the
3608 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
3609 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
3610 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
3613 - The reference set for the reference frame
3614 (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
3615 V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
3616 V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
3619 - Whether the reference is a field picture or a frame.
3621 - ``pic_order_cnt[2]``
3622 - The picture order count of the reference. Only the first element of the
3623 array is used for frame pictures, while the first element identifies the
3624 top field and the second the bottom field in field-coded pictures.
3627 - Applications and drivers must set this to zero.
3633 .. c:type:: v4l2_hevc_pred_weight_table
3639 .. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|
3641 .. flat-table:: struct v4l2_hevc_pred_weight_table
3647 - ``luma_log2_weight_denom``
3650 - ``delta_chroma_log2_weight_denom``
3653 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3656 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3659 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3662 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3665 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3668 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
3671 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3674 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
3678 - Applications and drivers must set this to zero.
3684 ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)``
3685 Specifies the decoding mode to use. Currently exposes slice-based and
3686 frame-based decoding but new modes might be added later on.
3687 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
3688 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
3689 are required to set this control in order to specify the decoding mode
3690 that is expected for the buffer.
3691 Drivers may expose a single or multiple decoding modes, depending
3692 on what they can support.
3696 This menu control is not yet part of the public kernel API and
3697 it is expected to change.
3699 .. c:type:: v4l2_mpeg_video_hevc_decode_mode
3705 .. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|
3712 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED``
3714 - Decoding is done at the slice granularity.
3715 The OUTPUT buffer must contain a single slice.
3716 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED``
3718 - Decoding is done at the frame granularity.
3719 The OUTPUT buffer must contain all slices needed to decode the
3720 frame. The OUTPUT buffer must also contain both fields.
3726 ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)``
3727 Specifies the HEVC slice start code expected for each slice.
3728 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
3729 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
3730 are required to set this control in order to specify the start code
3731 that is expected for the buffer.
3732 Drivers may expose a single or multiple start codes, depending
3733 on what they can support.
3737 This menu control is not yet part of the public kernel API and
3738 it is expected to change.
3740 .. c:type:: v4l2_mpeg_video_hevc_start_code
3742 .. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|
3749 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
3751 - Selecting this value specifies that HEVC slices are passed
3752 to the driver without any start code. The bitstream data should be
3753 according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
3754 contains emulation prevention bytes when required.
3755 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
3757 - Selecting this value specifies that HEVC slices are expected
3758 to be prefixed by Annex B start codes. According to :ref:`hevc`
3759 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
3761 ``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``
3762 Specifies a priority identifier for the NAL unit, which will be applied to
3763 the base layer. By default this value is set to 0 for the base layer,
3764 and the next layer will have the priority ID assigned as 1, 2, 3 and so on.
3765 The video encoder can't decide the priority id to be applied to a layer,
3766 so this has to come from client.
3767 This is applicable to H264 and valid Range is from 0 to 63.
3768 Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.