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_MPEG_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:
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{9.2cm}|p{8.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_H264_VUI_SAR_ENABLE (boolean)``
683 Enable writing sample aspect ratio in the Video Usability
684 Information. Applicable to the H264 encoder.
686 .. _v4l2-mpeg-video-h264-vui-sar-idc:
688 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
691 enum v4l2_mpeg_video_h264_vui_sar_idc -
692 VUI sample aspect ratio indicator for H.264 encoding. The value is
693 defined in the table E-1 in the standard. Applicable to the H264
702 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
704 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
706 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
708 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
710 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
712 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
714 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
716 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
718 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
720 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
722 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
724 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
726 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
728 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
730 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
732 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
734 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
736 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
741 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
742 Extended sample aspect ratio width for H.264 VUI encoding.
743 Applicable to the H264 encoder.
745 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
746 Extended sample aspect ratio height for H.264 VUI encoding.
747 Applicable to the H264 encoder.
749 .. _v4l2-mpeg-video-h264-level:
751 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
754 enum v4l2_mpeg_video_h264_level -
755 The level information for the H264 video elementary stream.
756 Applicable to the H264 encoder. Possible values are:
764 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
766 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
768 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
770 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
772 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
774 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
776 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
778 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
780 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
782 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
784 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
786 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
788 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
790 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
792 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
794 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
796 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
798 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
800 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
802 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
807 .. _v4l2-mpeg-video-mpeg2-level:
809 ``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
812 enum v4l2_mpeg_video_mpeg2_level -
813 The level information for the MPEG2 elementary stream. Applicable to
814 MPEG2 codecs. Possible values are:
822 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
824 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
826 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
827 - High-1440 Level (H-14)
828 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
833 .. _v4l2-mpeg-video-mpeg4-level:
835 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
838 enum v4l2_mpeg_video_mpeg4_level -
839 The level information for the MPEG4 elementary stream. Applicable to
840 the MPEG4 encoder. Possible values are:
848 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
850 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
852 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
854 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
856 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
858 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
860 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
862 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
867 .. _v4l2-mpeg-video-h264-profile:
869 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
872 enum v4l2_mpeg_video_h264_profile -
873 The profile information for H264. Applicable to the H264 encoder.
882 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
884 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
885 - Constrained Baseline profile
886 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
888 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
890 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
892 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
894 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
896 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
897 - High 444 Predictive profile
898 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
899 - High 10 Intra profile
900 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
901 - High 422 Intra profile
902 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
903 - High 444 Intra profile
904 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
905 - CAVLC 444 Intra profile
906 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
907 - Scalable Baseline profile
908 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
909 - Scalable High profile
910 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
911 - Scalable High Intra profile
912 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
913 - Stereo High profile
914 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
915 - Multiview High profile
916 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
917 - Constrained High profile
921 .. _v4l2-mpeg-video-mpeg2-profile:
923 ``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
926 enum v4l2_mpeg_video_mpeg2_profile -
927 The profile information for MPEG2. Applicable to MPEG2 codecs.
936 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
937 - Simple profile (SP)
938 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
940 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
941 - SNR Scalable profile (SNR)
942 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
943 - Spatially Scalable profile (Spt)
944 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
946 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
947 - Multi-view profile (MVP)
951 .. _v4l2-mpeg-video-mpeg4-profile:
953 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
956 enum v4l2_mpeg_video_mpeg4_profile -
957 The profile information for MPEG4. Applicable to the MPEG4 encoder.
966 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
968 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
969 - Advanced Simple profile
970 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
972 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
973 - Simple Scalable profile
974 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
979 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
980 The maximum number of reference pictures used for encoding.
981 Applicable to the encoder.
983 .. _v4l2-mpeg-video-multi-slice-mode:
985 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
988 enum v4l2_mpeg_video_multi_slice_mode -
989 Determines how the encoder should handle division of frame into
990 slices. Applicable to the encoder. Possible values are:
994 .. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
1000 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
1001 - Single slice per frame.
1002 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
1003 - Multiple slices with set maximum number of macroblocks per slice.
1004 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
1005 - Multiple slice with set maximum size in bytes per slice.
1009 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
1010 The maximum number of macroblocks in a slice. Used when
1011 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1012 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
1015 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
1016 The maximum size of a slice in bytes. Used when
1017 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1018 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
1021 .. _v4l2-mpeg-video-h264-loop-filter-mode:
1023 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
1026 enum v4l2_mpeg_video_h264_loop_filter_mode -
1027 Loop filter mode for H264 encoder. Possible values are:
1033 .. tabularcolumns:: |p{13.6cm}|p{3.9cm}|
1039 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1040 - Loop filter is enabled.
1041 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1042 - Loop filter is disabled.
1043 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1044 - Loop filter is disabled at the slice boundary.
1051 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1052 Loop filter alpha coefficient, defined in the H264 standard.
1053 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1054 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1055 offset FilterOffsetA is twice this value.
1056 Applicable to the H264 encoder.
1058 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1059 Loop filter beta coefficient, defined in the H264 standard.
1060 This corresponds to the slice_beta_offset_div2 slice header field, and
1061 should be in the range of -6 to +6, inclusive. The actual beta offset
1062 FilterOffsetB is twice this value.
1063 Applicable to the H264 encoder.
1065 .. _v4l2-mpeg-video-h264-entropy-mode:
1067 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1070 enum v4l2_mpeg_video_h264_entropy_mode -
1071 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1072 encoder. Possible values are:
1075 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1082 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1083 - Use CAVLC entropy coding.
1084 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1085 - Use CABAC entropy coding.
1089 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1090 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1092 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1093 Enable constrained intra prediction for H264. Applicable to the H264
1096 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1097 Specify the offset that should be added to the luma quantization
1098 parameter to determine the chroma quantization parameter. Applicable
1099 to the H264 encoder.
1101 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1102 Cyclic intra macroblock refresh. This is the number of continuous
1103 macroblocks refreshed every frame. Each frame a successive set of
1104 macroblocks is refreshed until the cycle completes and starts from
1105 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1107 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1108 Frame level rate control enable. If this control is disabled then
1109 the quantization parameter for each frame type is constant and set
1110 with appropriate controls (e.g.
1111 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1112 enabled then quantization parameter is adjusted to meet the chosen
1113 bitrate. Minimum and maximum value for the quantization parameter
1114 can be set with appropriate controls (e.g.
1115 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1117 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1118 Macroblock level rate control enable. Applicable to the MPEG4 and
1121 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1122 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1125 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1126 Quantization parameter for an I frame for H263. Valid range: from 1
1129 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1130 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1132 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1133 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1135 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1136 Quantization parameter for an P frame for H263. Valid range: from 1
1139 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1140 Quantization parameter for an B frame for H263. Valid range: from 1
1143 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1144 Quantization parameter for an I frame for H264. Valid range: from 0
1147 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1148 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1150 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1151 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1153 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1154 Quantization parameter for an P frame for H264. Valid range: from 0
1157 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1158 Quantization parameter for an B frame for H264. Valid range: from 0
1161 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1162 Minimum quantization parameter for the H264 I frame to limit I frame
1163 quality to a range. Valid range: from 0 to 51. If
1164 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1165 should be chosen to meet both requirements.
1167 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1168 Maximum quantization parameter for the H264 I frame to limit I frame
1169 quality to a range. Valid range: from 0 to 51. If
1170 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1171 should be chosen to meet both requirements.
1173 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1174 Minimum quantization parameter for the H264 P frame to limit P frame
1175 quality to a range. Valid range: from 0 to 51. If
1176 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1177 should be chosen to meet both requirements.
1179 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1180 Maximum quantization parameter for the H264 P frame to limit P frame
1181 quality to a range. Valid range: from 0 to 51. If
1182 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1183 should be chosen to meet both requirements.
1185 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1186 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1189 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1190 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1192 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1193 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1195 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1196 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1199 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1200 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1203 .. _v4l2-mpeg-video-vbv-size:
1205 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1206 The Video Buffer Verifier size in kilobytes, it is used as a
1207 limitation of frame skip. The VBV is defined in the standard as a
1208 mean to verify that the produced stream will be successfully
1209 decoded. The standard describes it as "Part of a hypothetical
1210 decoder that is conceptually connected to the output of the encoder.
1211 Its purpose is to provide a constraint on the variability of the
1212 data rate that an encoder or editing process may produce.".
1213 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1215 .. _v4l2-mpeg-video-vbv-delay:
1217 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1218 Sets the initial delay in milliseconds for VBV buffer control.
1220 .. _v4l2-mpeg-video-hor-search-range:
1222 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1223 Horizontal search range defines maximum horizontal search area in
1224 pixels to search and match for the present Macroblock (MB) in the
1225 reference picture. This V4L2 control macro is used to set horizontal
1226 search range for motion estimation module in video encoder.
1228 .. _v4l2-mpeg-video-vert-search-range:
1230 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1231 Vertical search range defines maximum vertical search area in pixels
1232 to search and match for the present Macroblock (MB) in the reference
1233 picture. This V4L2 control macro is used to set vertical search
1234 range for motion estimation module in video encoder.
1236 .. _v4l2-mpeg-video-force-key-frame:
1238 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1239 Force a key frame for the next queued buffer. Applicable to
1240 encoders. This is a general, codec-agnostic keyframe control.
1242 .. _v4l2-mpeg-video-h264-cpb-size:
1244 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1245 The Coded Picture Buffer size in kilobytes, it is used as a
1246 limitation of frame skip. The CPB is defined in the H264 standard as
1247 a mean to verify that the produced stream will be successfully
1248 decoded. Applicable to the H264 encoder.
1250 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1251 Period between I-frames in the open GOP for H264. In case of an open
1252 GOP this is the period between two I-frames. The period between IDR
1253 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1254 control. An IDR frame, which stands for Instantaneous Decoding
1255 Refresh is an I-frame after which no prior frames are referenced.
1256 This means that a stream can be restarted from an IDR frame without
1257 the need to store or decode any previous frames. Applicable to the
1260 .. _v4l2-mpeg-video-header-mode:
1262 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1265 enum v4l2_mpeg_video_header_mode -
1266 Determines whether the header is returned as the first buffer or is
1267 it returned together with the first frame. Applicable to encoders.
1268 Possible values are:
1274 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1280 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1281 - The stream header is returned separately in the first buffer.
1282 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1283 - The stream header is returned together with the first encoded
1291 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1292 Repeat the video sequence headers. Repeating these headers makes
1293 random access to the video stream easier. Applicable to the MPEG1, 2
1296 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1297 Enabled the deblocking post processing filter for MPEG4 decoder.
1298 Applicable to the MPEG4 decoder.
1300 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1301 vop_time_increment_resolution value for MPEG4. Applicable to the
1304 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1305 vop_time_increment value for MPEG4. Applicable to the MPEG4
1308 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1309 Enable generation of frame packing supplemental enhancement
1310 information in the encoded bitstream. The frame packing SEI message
1311 contains the arrangement of L and R planes for 3D viewing.
1312 Applicable to the H264 encoder.
1314 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1315 Sets current frame as frame0 in frame packing SEI. Applicable to the
1318 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1320 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1323 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1324 Frame packing arrangement type for H264 SEI. Applicable to the H264
1325 encoder. Possible values are:
1331 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1337 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1338 - Pixels are alternatively from L and R.
1339 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1340 - L and R are interlaced by column.
1341 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1342 - L and R are interlaced by row.
1343 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1344 - L is on the left, R on the right.
1345 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1346 - L is on top, R on bottom.
1347 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1348 - One view per frame.
1356 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1357 Enables flexible macroblock ordering in the encoded bitstream. It is
1358 a technique used for restructuring the ordering of macroblocks in
1359 pictures. Applicable to the H264 encoder.
1361 .. _v4l2-mpeg-video-h264-fmo-map-type:
1363 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1366 enum v4l2_mpeg_video_h264_fmo_map_type -
1367 When using FMO, the map type divides the image in different scan
1368 patterns of macroblocks. Applicable to the H264 encoder. Possible
1375 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1381 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1382 - Slices are interleaved one after other with macroblocks in run
1384 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1385 - Scatters the macroblocks based on a mathematical function known to
1386 both encoder and decoder.
1387 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1388 - Macroblocks arranged in rectangular areas or regions of interest.
1389 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1390 - Slice groups grow in a cyclic way from centre to outwards.
1391 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1392 - Slice groups grow in raster scan pattern from left to right.
1393 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1394 - Slice groups grow in wipe scan pattern from top to bottom.
1395 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1396 - User defined map type.
1404 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1405 Number of slice groups in FMO. Applicable to the H264 encoder.
1407 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1409 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1412 enum v4l2_mpeg_video_h264_fmo_change_dir -
1413 Specifies a direction of the slice group change for raster and wipe
1414 maps. Applicable to the H264 encoder. Possible values are:
1422 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1423 - Raster scan or wipe right.
1424 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1425 - Reverse raster scan or wipe left.
1429 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1430 Specifies the size of the first slice group for raster and wipe map.
1431 Applicable to the H264 encoder.
1433 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1434 Specifies the number of consecutive macroblocks for the interleaved
1435 map. Applicable to the H264 encoder.
1437 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1438 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1441 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1442 Specifies the slice order in ASO. Applicable to the H264 encoder.
1443 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1455 - Slice position or order
1459 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1460 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1462 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1464 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1467 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1468 Specifies the hierarchical coding type. Applicable to the H264
1469 encoder. Possible values are:
1477 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1478 - Hierarchical B coding.
1479 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1480 - Hierarchical P coding.
1484 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1485 Specifies the number of hierarchical coding layers. Applicable to
1488 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1489 Specifies a user defined QP for each layer. Applicable to the H264
1490 encoder. The supplied 32-bit integer is interpreted as follows (bit
1491 0 = least significant bit):
1507 ``V4L2_CID_MPEG_VIDEO_H264_SPS (struct)``
1508 Specifies the sequence parameter set (as extracted from the
1509 bitstream) for the associated H264 slice data. This includes the
1510 necessary parameters for configuring a stateless hardware decoding
1511 pipeline for H264. The bitstream parameters are defined according
1512 to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
1513 Semantics". For further documentation, refer to the above
1514 specification, unless there is an explicit comment stating
1519 This compound control is not yet part of the public kernel API and
1520 it is expected to change.
1522 .. c:type:: v4l2_ctrl_h264_sps
1524 .. cssclass:: longtable
1526 .. flat-table:: struct v4l2_ctrl_h264_sps
1535 - ``constraint_set_flags``
1536 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
1541 - ``seq_parameter_set_id``
1544 - ``chroma_format_idc``
1547 - ``bit_depth_luma_minus8``
1550 - ``bit_depth_chroma_minus8``
1553 - ``log2_max_frame_num_minus4``
1556 - ``pic_order_cnt_type``
1559 - ``log2_max_pic_order_cnt_lsb_minus4``
1562 - ``max_num_ref_frames``
1565 - ``num_ref_frames_in_pic_order_cnt_cycle``
1568 - ``offset_for_ref_frame[255]``
1571 - ``offset_for_non_ref_pic``
1574 - ``offset_for_top_to_bottom_field``
1577 - ``pic_width_in_mbs_minus1``
1580 - ``pic_height_in_map_units_minus1``
1584 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
1586 .. _h264_sps_constraints_set_flags:
1588 ``Sequence Parameter Set Constraints Set Flags``
1590 .. cssclass:: longtable
1597 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
1600 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
1603 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
1606 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
1609 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
1612 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
1618 ``Sequence Parameter Set Flags``
1620 .. cssclass:: longtable
1627 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
1630 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
1633 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
1636 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
1639 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
1642 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
1645 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
1649 ``V4L2_CID_MPEG_VIDEO_H264_PPS (struct)``
1650 Specifies the picture parameter set (as extracted from the
1651 bitstream) for the associated H264 slice data. This includes the
1652 necessary parameters for configuring a stateless hardware decoding
1653 pipeline for H264. The bitstream parameters are defined according
1654 to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
1655 Semantics". For further documentation, refer to the above
1656 specification, unless there is an explicit comment stating
1661 This compound control is not yet part of the public kernel API and
1662 it is expected to change.
1664 .. c:type:: v4l2_ctrl_h264_pps
1666 .. cssclass:: longtable
1668 .. flat-table:: struct v4l2_ctrl_h264_pps
1674 - ``pic_parameter_set_id``
1677 - ``seq_parameter_set_id``
1680 - ``num_slice_groups_minus1``
1683 - ``num_ref_idx_l0_default_active_minus1``
1686 - ``num_ref_idx_l1_default_active_minus1``
1689 - ``weighted_bipred_idc``
1692 - ``pic_init_qp_minus26``
1695 - ``pic_init_qs_minus26``
1698 - ``chroma_qp_index_offset``
1701 - ``second_chroma_qp_index_offset``
1705 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
1709 ``Picture Parameter Set Flags``
1711 .. cssclass:: longtable
1718 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
1721 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
1724 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
1727 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
1730 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
1733 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
1736 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
1739 * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
1741 - Indicates that ``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX``
1742 must be used for this picture.
1744 ``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX (struct)``
1745 Specifies the scaling matrix (as extracted from the bitstream) for
1746 the associated H264 slice data. The bitstream parameters are
1747 defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
1748 List Semantics". For further documentation, refer to the above
1749 specification, unless there is an explicit comment stating
1754 This compound control is not yet part of the public kernel API and
1755 it is expected to change.
1757 .. c:type:: v4l2_ctrl_h264_scaling_matrix
1759 .. cssclass:: longtable
1761 .. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
1767 - ``scaling_list_4x4[6][16]``
1768 - Scaling matrix after applying the inverse scanning process.
1769 Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
1770 Inter Cb, Inter Cr. The values on each scaling list are
1771 expected in raster scan order.
1773 - ``scaling_list_8x8[6][64]``
1774 - Scaling matrix after applying the inverse scanning process.
1775 Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
1776 Intra Cr, Inter Cr. The values on each scaling list are
1777 expected in raster scan order.
1779 ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS (struct)``
1780 Specifies the slice parameters (as extracted from the bitstream)
1781 for the associated H264 slice data. This includes the necessary
1782 parameters for configuring a stateless hardware decoding pipeline
1783 for H264. The bitstream parameters are defined according to
1784 :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
1785 documentation, refer to the above specification, unless there is
1786 an explicit comment stating otherwise.
1790 This compound control is not yet part of the public kernel API
1791 and it is expected to change.
1793 .. c:type:: v4l2_ctrl_h264_slice_params
1795 .. cssclass:: longtable
1797 .. flat-table:: struct v4l2_ctrl_h264_slice_params
1803 - ``header_bit_size``
1804 - Offset in bits to slice_data() from the beginning of this slice.
1806 - ``first_mb_in_slice``
1812 - ``colour_plane_id``
1815 - ``redundant_pic_cnt``
1818 - ``cabac_init_idc``
1821 - ``slice_qp_delta``
1824 - ``slice_qs_delta``
1827 - ``disable_deblocking_filter_idc``
1830 - ``slice_alpha_c0_offset_div2``
1833 - ``slice_beta_offset_div2``
1836 - ``num_ref_idx_l0_active_minus1``
1837 - If num_ref_idx_active_override_flag is not set, this field must be
1838 set to the value of num_ref_idx_l0_default_active_minus1.
1840 - ``num_ref_idx_l1_active_minus1``
1841 - If num_ref_idx_active_override_flag is not set, this field must be
1842 set to the value of num_ref_idx_l1_default_active_minus1.
1845 - Applications and drivers must set this to zero.
1846 * - struct :c:type:`v4l2_h264_reference`
1847 - ``ref_pic_list0[32]``
1848 - Reference picture list after applying the per-slice modifications
1849 * - struct :c:type:`v4l2_h264_reference`
1850 - ``ref_pic_list1[32]``
1851 - Reference picture list after applying the per-slice modifications
1854 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
1856 .. _h264_slice_flags:
1858 ``Slice Parameter Set Flags``
1860 .. cssclass:: longtable
1867 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
1870 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
1874 ``V4L2_CID_MPEG_VIDEO_H264_PRED_WEIGHTS (struct)``
1875 Prediction weight table defined according to :ref:`h264`,
1876 section 7.4.3.2 "Prediction Weight Table Semantics".
1877 The prediction weight table must be passed by applications
1878 under the conditions explained in section 7.3.3 "Slice header
1883 This compound control is not yet part of the public kernel API and
1884 it is expected to change.
1886 .. c:type:: v4l2_ctrl_h264_pred_weights
1888 .. cssclass:: longtable
1890 .. flat-table:: struct v4l2_ctrl_h264_pred_weights
1896 - ``luma_log2_weight_denom``
1899 - ``chroma_log2_weight_denom``
1901 * - struct :c:type:`v4l2_h264_weight_factors`
1902 - ``weight_factors[2]``
1903 - The weight factors at index 0 are the weight factors for the reference
1904 list 0, the one at index 1 for the reference list 1.
1906 .. c:type:: v4l2_h264_weight_factors
1908 .. cssclass:: longtable
1910 .. flat-table:: struct v4l2_h264_weight_factors
1916 - ``luma_weight[32]``
1919 - ``luma_offset[32]``
1922 - ``chroma_weight[32][2]``
1925 - ``chroma_offset[32][2]``
1928 ``Picture Reference``
1930 .. c:type:: v4l2_h264_reference
1932 .. cssclass:: longtable
1934 .. flat-table:: struct v4l2_h264_reference
1941 - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
1944 - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.
1946 .. _h264_ref_fields:
1948 ``Reference Fields``
1950 .. cssclass:: longtable
1957 * - ``V4L2_H264_TOP_FIELD_REF``
1959 - The top field in field pair is used for short-term reference.
1960 * - ``V4L2_H264_BOTTOM_FIELD_REF``
1962 - The bottom field in field pair is used for short-term reference.
1963 * - ``V4L2_H264_FRAME_REF``
1965 - The frame (or the top/bottom fields, if it's a field pair)
1966 is used for short-term reference.
1968 ``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS (struct)``
1969 Specifies the decode parameters (as extracted from the bitstream)
1970 for the associated H264 slice data. This includes the necessary
1971 parameters for configuring a stateless hardware decoding pipeline
1972 for H264. The bitstream parameters are defined according to
1973 :ref:`h264`. For further documentation, refer to the above
1974 specification, unless there is an explicit comment stating
1979 This compound control is not yet part of the public kernel API and
1980 it is expected to change.
1982 .. c:type:: v4l2_ctrl_h264_decode_params
1984 .. cssclass:: longtable
1986 .. flat-table:: struct v4l2_ctrl_h264_decode_params
1991 * - struct :c:type:`v4l2_h264_dpb_entry`
1996 - NAL reference ID value coming from the NAL Unit header
2001 - ``top_field_order_cnt``
2002 - Picture Order Count for the coded top field
2004 - ``bottom_field_order_cnt``
2005 - Picture Order Count for the coded bottom field
2010 - ``pic_order_cnt_lsb``
2013 - ``delta_pic_order_cnt_bottom``
2016 - ``delta_pic_order_cnt0``
2019 - ``delta_pic_order_cnt1``
2022 - ``dec_ref_pic_marking_bit_size``
2023 - Size in bits of the dec_ref_pic_marking() syntax element.
2025 - ``pic_order_cnt_bit_size``
2026 - Combined size in bits of the picture order count related syntax
2027 elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,
2028 delta_pic_order_cnt0, and delta_pic_order_cnt1.
2030 - ``slice_group_change_cycle``
2034 - Applications and drivers must set this to zero.
2037 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
2039 .. _h264_decode_params_flags:
2041 ``Decode Parameters Flags``
2043 .. cssclass:: longtable
2050 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
2052 - That picture is an IDR picture
2053 * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
2056 * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
2060 .. c:type:: v4l2_h264_dpb_entry
2062 .. cssclass:: longtable
2064 .. flat-table:: struct v4l2_h264_dpb_entry
2071 - Timestamp of the V4L2 capture buffer to use as reference, used
2072 with B-coded and P-coded frames. The timestamp refers to the
2073 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2074 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2075 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2084 - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
2087 - Applications and drivers must set this to zero.
2089 - ``top_field_order_cnt``
2092 - ``bottom_field_order_cnt``
2096 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
2100 ``DPB Entries Flags``
2102 .. cssclass:: longtable
2109 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
2111 - The DPB entry is valid (non-empty) and should be considered.
2112 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
2114 - The DPB entry is used for reference.
2115 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
2117 - The DPB entry is used for long-term reference.
2118 * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
2120 - The DPB entry is a single field or a complementary field pair.
2122 ``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
2123 Specifies the decoding mode to use. Currently exposes slice-based and
2124 frame-based decoding but new modes might be added later on.
2125 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2126 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2127 are required to set this control in order to specify the decoding mode
2128 that is expected for the buffer.
2129 Drivers may expose a single or multiple decoding modes, depending
2130 on what they can support.
2134 This menu control is not yet part of the public kernel API and
2135 it is expected to change.
2137 .. c:type:: v4l2_mpeg_video_h264_decode_mode
2139 .. cssclass:: longtable
2146 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED``
2148 - Decoding is done at the slice granularity.
2149 The OUTPUT buffer must contain a single slice.
2150 When this mode is selected, the ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS``
2151 control shall be set. When multiple slices compose a frame,
2152 use of ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` flag
2154 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED``
2156 - Decoding is done at the frame granularity,
2157 The OUTPUT buffer must contain all slices needed to decode the
2158 frame. The OUTPUT buffer must also contain both fields.
2159 This mode will be supported by devices that
2160 parse the slice(s) header(s) in hardware. When this mode is
2161 selected, the ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS``
2162 control shall not be set.
2164 ``V4L2_CID_MPEG_VIDEO_H264_START_CODE (enum)``
2165 Specifies the H264 slice start code expected for each slice.
2166 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2167 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2168 are required to set this control in order to specify the start code
2169 that is expected for the buffer.
2170 Drivers may expose a single or multiple start codes, depending
2171 on what they can support.
2175 This menu control is not yet part of the public kernel API and
2176 it is expected to change.
2178 .. c:type:: v4l2_mpeg_video_h264_start_code
2180 .. cssclass:: longtable
2187 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_NONE``
2189 - Selecting this value specifies that H264 slices are passed
2190 to the driver without any start code.
2191 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B``
2193 - Selecting this value specifies that H264 slices are expected
2194 to be prefixed by Annex B start codes. According to :ref:`h264`
2195 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
2197 .. _v4l2-mpeg-mpeg2:
2199 ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
2200 Specifies the slice parameters (as extracted from the bitstream) for the
2201 associated MPEG-2 slice data. This includes the necessary parameters for
2202 configuring a stateless hardware decoding pipeline for MPEG-2.
2203 The bitstream parameters are defined according to :ref:`mpeg2part2`.
2207 This compound control is not yet part of the public kernel API and
2208 it is expected to change.
2210 .. c:type:: v4l2_ctrl_mpeg2_slice_params
2212 .. cssclass:: longtable
2214 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2216 .. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
2223 - Size (in bits) of the current slice data.
2225 - ``data_bit_offset``
2226 - Offset (in bits) to the video data in the current slice data.
2227 * - struct :c:type:`v4l2_mpeg2_sequence`
2229 - Structure with MPEG-2 sequence metadata, merging relevant fields from
2230 the sequence header and sequence extension parts of the bitstream.
2231 * - struct :c:type:`v4l2_mpeg2_picture`
2233 - Structure with MPEG-2 picture metadata, merging relevant fields from
2234 the picture header and picture coding extension parts of the bitstream.
2236 - ``backward_ref_ts``
2237 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2238 with B-coded and P-coded frames. The timestamp refers to the
2239 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2240 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2241 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2243 - ``forward_ref_ts``
2244 - Timestamp for the V4L2 capture buffer to use as forward reference, used
2245 with B-coded frames. The timestamp refers to the ``timestamp`` field in
2246 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2247 function to convert the struct :c:type:`timeval` in struct
2248 :c:type:`v4l2_buffer` to a __u64.
2250 - ``quantiser_scale_code``
2251 - Code used to determine the quantization scale to use for the IDCT.
2253 .. c:type:: v4l2_mpeg2_sequence
2255 .. cssclass:: longtable
2257 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2259 .. flat-table:: struct v4l2_mpeg2_sequence
2265 - ``horizontal_size``
2266 - The width of the displayable part of the frame's luminance component.
2269 - The height of the displayable part of the frame's luminance component.
2271 - ``vbv_buffer_size``
2272 - Used to calculate the required size of the video buffering verifier,
2273 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
2275 - ``profile_and_level_indication``
2276 - The current profile and level indication as extracted from the
2279 - ``progressive_sequence``
2280 - Indication that all the frames for the sequence are progressive instead
2284 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
2286 .. c:type:: v4l2_mpeg2_picture
2288 .. cssclass:: longtable
2290 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2292 .. flat-table:: struct v4l2_mpeg2_picture
2298 - ``picture_coding_type``
2299 - Picture coding type for the frame covered by the current slice
2300 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
2301 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
2304 - Motion vector codes.
2306 - ``intra_dc_precision``
2307 - Precision of Discrete Cosine transform (0: 8 bits precision,
2308 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
2310 - ``picture_structure``
2311 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
2312 3: progressive frame).
2314 - ``top_field_first``
2315 - If set to 1 and interlaced stream, top field is output first.
2317 - ``frame_pred_frame_dct``
2318 - If set to 1, only frame-DCT and frame prediction are used.
2320 - ``concealment_motion_vectors``
2321 - If set to 1, motion vectors are coded for intra macroblocks.
2324 - This flag affects the inverse quantization process.
2326 - ``intra_vlc_format``
2327 - This flag affects the decoding of transform coefficient data.
2329 - ``alternate_scan``
2330 - This flag affects the decoding of transform coefficient data.
2332 - ``repeat_first_field``
2333 - This flag affects the decoding process of progressive frames.
2335 - ``progressive_frame``
2336 - Indicates whether the current frame is progressive.
2338 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
2339 Specifies quantization matrices (as extracted from the bitstream) for the
2340 associated MPEG-2 slice data.
2344 This compound control is not yet part of the public kernel API and
2345 it is expected to change.
2347 .. c:type:: v4l2_ctrl_mpeg2_quantization
2349 .. cssclass:: longtable
2351 .. tabularcolumns:: |p{1.2cm}|p{8.0cm}|p{7.4cm}|
2357 .. flat-table:: struct v4l2_ctrl_mpeg2_quantization
2363 - ``load_intra_quantiser_matrix``
2364 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
2366 - ``load_non_intra_quantiser_matrix``
2367 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
2370 - ``load_chroma_intra_quantiser_matrix``
2371 - One bit to indicate whether to load the
2372 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
2375 - ``load_chroma_non_intra_quantiser_matrix``
2376 - One bit to indicate whether to load the
2377 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
2380 - ``intra_quantiser_matrix[64]``
2381 - The quantization matrix coefficients for intra-coded frames, in zigzag
2382 scanning order. It is relevant for both luma and chroma components,
2383 although it can be superseded by the chroma-specific matrix for
2384 non-4:2:0 YUV formats.
2386 - ``non_intra_quantiser_matrix[64]``
2387 - The quantization matrix coefficients for non-intra-coded frames, in
2388 zigzag scanning order. It is relevant for both luma and chroma
2389 components, although it can be superseded by the chroma-specific matrix
2390 for non-4:2:0 YUV formats.
2392 - ``chroma_intra_quantiser_matrix[64]``
2393 - The quantization matrix coefficients for the chominance component of
2394 intra-coded frames, in zigzag scanning order. Only relevant for
2395 non-4:2:0 YUV formats.
2397 - ``chroma_non_intra_quantiser_matrix[64]``
2398 - The quantization matrix coefficients for the chrominance component of
2399 non-intra-coded frames, in zigzag scanning order. Only relevant for
2400 non-4:2:0 YUV formats.
2402 ``V4L2_CID_FWHT_I_FRAME_QP (integer)``
2403 Quantization parameter for an I frame for FWHT. Valid range: from 1
2406 ``V4L2_CID_FWHT_P_FRAME_QP (integer)``
2407 Quantization parameter for a P frame for FWHT. Valid range: from 1
2412 ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
2413 Specifies the frame parameters for the associated VP8 parsed frame data.
2414 This includes the necessary parameters for
2415 configuring a stateless hardware decoding pipeline for VP8.
2416 The bitstream parameters are defined according to :ref:`vp8`.
2420 This compound control is not yet part of the public kernel API and
2421 it is expected to change.
2423 .. c:type:: v4l2_ctrl_vp8_frame_header
2425 .. cssclass:: longtable
2427 .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2429 .. flat-table:: struct v4l2_ctrl_vp8_frame_header
2434 * - struct :c:type:`v4l2_vp8_segment_header`
2435 - ``segment_header``
2436 - Structure with segment-based adjustments metadata.
2437 * - struct :c:type:`v4l2_vp8_loopfilter_header`
2438 - ``loopfilter_header``
2439 - Structure with loop filter level adjustments metadata.
2440 * - struct :c:type:`v4l2_vp8_quantization_header`
2442 - Structure with VP8 dequantization indices metadata.
2443 * - struct :c:type:`v4l2_vp8_entropy_header`
2444 - ``entropy_header``
2445 - Structure with VP8 entropy coder probabilities metadata.
2446 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
2448 - Structure with VP8 entropy coder state.
2451 - The width of the frame. Must be set for all frames.
2454 - The height of the frame. Must be set for all frames.
2456 - ``horizontal_scale``
2457 - Horizontal scaling factor.
2459 - ``vertical_scaling factor``
2463 - Bitstream version.
2465 - ``prob_skip_false``
2466 - Indicates the probability that the macroblock is not skipped.
2469 - Indicates the probability that a macroblock is intra-predicted.
2472 - Indicates the probability that the last reference frame is used
2473 for inter-prediction
2476 - Indicates the probability that the golden reference frame is used
2477 for inter-prediction
2480 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
2482 - ``first_part_size``
2483 - Size of the first partition, i.e. the control partition.
2485 - ``first_part_header_bits``
2486 - Size in bits of the first partition header portion.
2488 - ``dct_part_sizes[8]``
2489 - DCT coefficients sizes.
2492 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2493 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2494 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2495 function to convert the struct :c:type:`timeval` in struct
2496 :c:type:`v4l2_buffer` to a __u64.
2498 - ``golden_frame_ts``
2499 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2500 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2501 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2502 function to convert the struct :c:type:`timeval` in struct
2503 :c:type:`v4l2_buffer` to a __u64.
2506 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
2507 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2508 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2509 function to convert the struct :c:type:`timeval` in struct
2510 :c:type:`v4l2_buffer` to a __u64.
2513 - See :ref:`Frame Header Flags <vp8_frame_header_flags>`
2515 .. _vp8_frame_header_flags:
2517 ``Frame Header Flags``
2519 .. cssclass:: longtable
2526 * - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
2528 - Indicates if the frame is a key frame.
2529 * - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
2531 - Experimental bitstream.
2532 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
2534 - Show frame flag, indicates if the frame is for display.
2535 * - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
2537 - Enable/disable skipping of macroblocks with no non-zero coefficients.
2538 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
2540 - Sign of motion vectors when the golden frame is referenced.
2541 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
2543 - Sign of motion vectors when the alt frame is referenced.
2545 .. c:type:: v4l2_vp8_entropy_coder_state
2547 .. cssclass:: longtable
2549 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2551 .. flat-table:: struct v4l2_vp8_entropy_coder_state
2567 - Applications and drivers must set this to zero.
2569 .. c:type:: v4l2_vp8_segment_header
2571 .. cssclass:: longtable
2573 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2575 .. flat-table:: struct v4l2_vp8_segment_header
2581 - ``quant_update[4]``
2582 - Signed quantizer value update.
2585 - Signed loop filter level value update.
2587 - ``segment_probs[3]``
2588 - Segment probabilities.
2591 - Applications and drivers must set this to zero.
2594 - See :ref:`Segment Header Flags <vp8_segment_header_flags>`
2596 .. _vp8_segment_header_flags:
2598 ``Segment Header Flags``
2600 .. cssclass:: longtable
2607 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
2609 - Enable/disable segment-based adjustments.
2610 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
2612 - Indicates if the macroblock segmentation map is updated in this frame.
2613 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
2615 - Indicates if the segment feature data is updated in this frame.
2616 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
2618 - If is set, the segment feature data mode is delta-value.
2619 If cleared, it's absolute-value.
2621 .. c:type:: v4l2_vp8_loopfilter_header
2623 .. cssclass:: longtable
2625 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2627 .. flat-table:: struct v4l2_vp8_loopfilter_header
2633 - ``ref_frm_delta[4]``
2634 - Reference adjustment (signed) delta value.
2636 - ``mb_mode_delta[4]``
2637 - Macroblock prediction mode adjustment (signed) delta value.
2639 - ``sharpness_level``
2646 - Applications and drivers must set this to zero.
2649 - See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
2651 .. _vp8_loopfilter_header_flags:
2653 ``Loopfilter Header Flags``
2655 .. cssclass:: longtable
2662 * - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
2664 - Enable/disable macroblock-level loop filter adjustment.
2665 * - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
2667 - Indicates if the delta values used in an adjustment are updated.
2668 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
2670 - If set, indicates the filter type is simple.
2671 If cleared, the filter type is normal.
2673 .. c:type:: v4l2_vp8_quantization_header
2675 .. cssclass:: longtable
2677 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2679 .. flat-table:: struct v4l2_vp8_quantization_header
2686 - Luma AC coefficient table index.
2689 - Luma DC delta vaue.
2692 - Y2 block DC delta value.
2695 - Y2 block AC delta value.
2698 - Chroma DC delta value.
2701 - Chroma AC delta value.
2704 - Applications and drivers must set this to zero.
2706 .. c:type:: v4l2_vp8_entropy_header
2708 .. cssclass:: longtable
2710 .. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2712 .. flat-table:: struct v4l2_vp8_entropy_header
2718 - ``coeff_probs[4][8][3][11]``
2719 - Coefficient update probabilities.
2721 - ``y_mode_probs[4]``
2722 - Luma mode update probabilities.
2724 - ``uv_mode_probs[3]``
2725 - Chroma mode update probabilities.
2727 - ``mv_probs[2][19]``
2728 - MV decoding update probabilities.
2731 - Applications and drivers must set this to zero.
2738 MFC 5.1 MPEG Controls
2739 =====================
2741 The following MPEG class controls deal with MPEG decoding and encoding
2742 settings that are specific to the Multi Format Codec 5.1 device present
2743 in the S5P family of SoCs by Samsung.
2746 .. _mfc51-control-id:
2751 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2752 If the display delay is enabled then the decoder is forced to return
2753 a CAPTURE buffer (decoded frame) after processing a certain number
2754 of OUTPUT buffers. The delay can be set through
2755 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2756 feature can be used for example for generating thumbnails of videos.
2757 Applicable to the H264 decoder.
2759 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2760 Display delay value for H264 decoder. The decoder is forced to
2761 return a decoded frame after the set 'display delay' number of
2762 frames. If this number is low it may result in frames returned out
2763 of display order, in addition the hardware may still be using the
2764 returned buffer as a reference picture for subsequent frames.
2766 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2767 The number of reference pictures used for encoding a P picture.
2768 Applicable to the H264 encoder.
2770 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2771 Padding enable in the encoder - use a color instead of repeating
2772 border pixels. Applicable to encoders.
2774 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2775 Padding color in the encoder. Applicable to encoders. The supplied
2776 32-bit integer is interpreted as follows (bit 0 = least significant
2786 - V chrominance information
2788 - U chrominance information
2790 - Y luminance information
2796 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2797 Reaction coefficient for MFC rate control. Applicable to encoders.
2801 #. Valid only when the frame level RC is enabled.
2803 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2804 VBR, this field must be large (ex. 100 ~ 1000).
2806 #. It is not recommended to use the greater number than
2807 FRAME_RATE * (10^9 / BIT_RATE).
2809 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2810 Adaptive rate control for dark region. Valid only when H.264 and
2811 macroblock level RC is enabled
2812 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2815 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2816 Adaptive rate control for smooth region. Valid only when H.264 and
2817 macroblock level RC is enabled
2818 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2821 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2822 Adaptive rate control for static region. Valid only when H.264 and
2823 macroblock level RC is enabled
2824 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2827 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
2828 Adaptive rate control for activity region. Valid only when H.264 and
2829 macroblock level RC is enabled
2830 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2833 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
2835 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2840 This control is deprecated. Use the standard
2841 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.
2843 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2844 Indicates in what conditions the encoder should skip frames. If
2845 encoding a frame would cause the encoded stream to be larger then a
2846 chosen data limit then the frame will be skipped. Possible values
2850 .. tabularcolumns:: |p{9.2cm}|p{8.3cm}|
2860 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2861 - Frame skip mode is disabled.
2862 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2863 - Frame skip mode enabled and buffer limit is set by the chosen
2864 level and is defined by the standard.
2865 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2866 - Frame skip mode enabled and buffer limit is set by the VBV
2867 (MPEG1/2/4) or CPB (H264) buffer size control.
2873 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2874 Enable rate-control with fixed target bit. If this setting is
2875 enabled, then the rate control logic of the encoder will calculate
2876 the average bitrate for a GOP and keep it below or equal the set
2877 bitrate target. Otherwise the rate control logic calculates the
2878 overall average bitrate for the stream and keeps it below or equal
2879 to the set bitrate. In the first case the average bitrate for the
2880 whole stream will be smaller then the set bitrate. This is caused
2881 because the average is calculated for smaller number of frames, on
2882 the other hand enabling this setting will ensure that the stream
2883 will meet tight bandwidth constraints. Applicable to encoders.
2885 .. _v4l2-mpeg-mfc51-video-force-frame-type:
2887 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2890 enum v4l2_mpeg_mfc51_video_force_frame_type -
2891 Force a frame type for the next queued buffer. Applicable to
2892 encoders. Possible values are:
2894 .. tabularcolumns:: |p{9.5cm}|p{8.0cm}|
2900 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2901 - Forcing a specific frame type disabled.
2902 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2904 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2905 - Force a non-coded frame.
2910 ``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
2911 Specifies the fwht parameters (as extracted from the bitstream) for the
2912 associated FWHT data. This includes the necessary parameters for
2913 configuring a stateless hardware decoding pipeline for FWHT.
2917 This compound control is not yet part of the public kernel API and
2918 it is expected to change.
2920 .. c:type:: v4l2_ctrl_fwht_params
2922 .. cssclass:: longtable
2924 .. tabularcolumns:: |p{1.4cm}|p{4.3cm}|p{11.8cm}|
2926 .. flat-table:: struct v4l2_ctrl_fwht_params
2932 - ``backward_ref_ts``
2933 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2934 with P-coded frames. The timestamp refers to the
2935 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2936 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2937 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2940 - The version of the codec
2943 - The width of the frame
2946 - The height of the frame
2949 - The flags of the frame, see :ref:`fwht-flags`.
2952 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
2955 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
2958 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
2961 - The quantization range, from enum :c:type:`v4l2_quantization`.
2970 .. cssclass:: longtable
2972 .. tabularcolumns:: |p{6.8cm}|p{2.4cm}|p{8.3cm}|
2979 * - ``FWHT_FL_IS_INTERLACED``
2981 - Set if this is an interlaced format
2982 * - ``FWHT_FL_IS_BOTTOM_FIRST``
2984 - Set if this is a bottom-first (NTSC) interlaced format
2985 * - ``FWHT_FL_IS_ALTERNATE``
2987 - Set if each 'frame' contains just one field
2988 * - ``FWHT_FL_IS_BOTTOM_FIELD``
2990 - If FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
2991 bottom field, else it is the top field.
2992 * - ``FWHT_FL_LUMA_IS_UNCOMPRESSED``
2994 - Set if the luma plane is uncompressed
2995 * - ``FWHT_FL_CB_IS_UNCOMPRESSED``
2997 - Set if the cb plane is uncompressed
2998 * - ``FWHT_FL_CR_IS_UNCOMPRESSED``
3000 - Set if the cr plane is uncompressed
3001 * - ``FWHT_FL_CHROMA_FULL_HEIGHT``
3003 - Set if the chroma plane has the same height as the luma plane,
3004 else the chroma plane is half the height of the luma plane
3005 * - ``FWHT_FL_CHROMA_FULL_WIDTH``
3007 - Set if the chroma plane has the same width as the luma plane,
3008 else the chroma plane is half the width of the luma plane
3009 * - ``FWHT_FL_ALPHA_IS_UNCOMPRESSED``
3011 - Set if the alpha plane is uncompressed
3012 * - ``FWHT_FL_I_FRAME``
3014 - Set if this is an I-frame
3015 * - ``FWHT_FL_COMPONENTS_NUM_MSK``
3017 - A 4-values flag - the number of components - 1
3018 * - ``FWHT_FL_PIXENC_YUV``
3020 - Set if the pixel encoding is YUV
3021 * - ``FWHT_FL_PIXENC_RGB``
3023 - Set if the pixel encoding is RGB
3024 * - ``FWHT_FL_PIXENC_HSV``
3026 - Set if the pixel encoding is HSV
3029 CX2341x MPEG Controls
3030 =====================
3032 The following MPEG class controls deal with MPEG encoding settings that
3033 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
3036 .. _cx2341x-control-id:
3041 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
3043 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
3046 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
3047 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
3056 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
3057 - Choose the filter manually
3058 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
3059 - Choose the filter automatically
3063 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
3064 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
3067 .. _luma-spatial-filter-type:
3069 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
3072 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
3073 Select the algorithm to use for the Luma Spatial Filter (default
3074 ``1D_HOR``). Possible values:
3076 .. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
3086 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
3088 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
3089 - One-dimensional horizontal
3090 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
3091 - One-dimensional vertical
3092 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
3093 - Two-dimensional separable
3094 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
3095 - Two-dimensional symmetrical non-separable
3103 .. _chroma-spatial-filter-type:
3105 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
3108 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
3109 Select the algorithm for the Chroma Spatial Filter (default
3110 ``1D_HOR``). Possible values are:
3113 .. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
3119 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
3121 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
3122 - One-dimensional horizontal
3126 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
3128 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
3131 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
3132 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
3141 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
3142 - Choose the filter manually
3143 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
3144 - Choose the filter automatically
3148 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
3149 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
3150 is 8 for full-scale capturing and 0 for scaled capturing.)
3152 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
3154 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
3157 enum v4l2_mpeg_cx2341x_video_median_filter_type -
3158 Median Filter Type (default ``OFF``). Possible values are:
3166 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
3168 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
3170 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
3172 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
3173 - Horizontal and vertical filter
3174 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
3179 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3180 Threshold above which the luminance median filter is enabled
3183 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
3184 Threshold below which the luminance median filter is enabled
3187 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3188 Threshold above which the chroma median filter is enabled (default
3191 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
3192 Threshold below which the chroma median filter is enabled (default
3195 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
3196 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
3197 the stream between every four video frames. The packet size is 2048
3198 bytes, including the packet_start_code_prefix and stream_id
3199 fields. The stream_id is 0xBF (private stream 2). The payload
3200 consists of 0x00 bytes, to be filled in by the application. 0 = do
3201 not insert, 1 = insert packets.
3204 VPX Control Reference
3205 =====================
3207 The VPX controls include controls for encoding parameters of VPx video
3216 .. _v4l2-vpx-num-partitions:
3218 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
3221 enum v4l2_vp8_num_partitions -
3222 The number of token partitions to use in VP8 encoder. Possible
3231 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
3232 - 1 coefficient partition
3233 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
3234 - 2 coefficient partitions
3235 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
3236 - 4 coefficient partitions
3237 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
3238 - 8 coefficient partitions
3242 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
3243 Setting this prevents intra 4x4 mode in the intra mode decision.
3245 .. _v4l2-vpx-num-ref-frames:
3247 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
3250 enum v4l2_vp8_num_ref_frames -
3251 The number of reference pictures for encoding P frames. Possible
3254 .. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
3264 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
3265 - Last encoded frame will be searched
3266 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
3267 - Two frames will be searched among the last encoded frame, the
3268 golden frame and the alternate reference (altref) frame. The
3269 encoder implementation will decide which two are chosen.
3270 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
3271 - The last encoded frame, the golden frame and the altref frame will
3280 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
3281 Indicates the loop filter level. The adjustment of the loop filter
3282 level is done via a delta value against a baseline loop filter
3285 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
3286 This parameter affects the loop filter. Anything above zero weakens
3287 the deblocking effect on the loop filter.
3289 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
3290 Sets the refresh period for the golden frame. The period is defined
3291 in number of frames. For a value of 'n', every nth frame starting
3292 from the first key frame will be taken as a golden frame. For eg.
3293 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
3294 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
3295 taken as the golden frames as frame 0 is always a key frame.
3297 .. _v4l2-vpx-golden-frame-sel:
3299 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
3302 enum v4l2_vp8_golden_frame_sel -
3303 Selects the golden frame for encoding. Possible values are:
3309 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3315 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
3316 - Use the (n-2)th frame as a golden frame, current frame index being
3318 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
3319 - Use the previous specific frame indicated by
3320 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
3328 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
3329 Minimum quantization parameter for VP8.
3331 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
3332 Maximum quantization parameter for VP8.
3334 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
3335 Quantization parameter for an I frame for VP8.
3337 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
3338 Quantization parameter for a P frame for VP8.
3340 .. _v4l2-mpeg-video-vp8-profile:
3342 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
3345 enum v4l2_mpeg_video_vp8_profile -
3346 This control allows selecting the profile for VP8 encoder.
3347 This is also used to enumerate supported profiles by VP8 encoder or decoder.
3348 Possible values are:
3354 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
3356 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
3358 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
3360 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
3363 .. _v4l2-mpeg-video-vp9-profile:
3365 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
3368 enum v4l2_mpeg_video_vp9_profile -
3369 This control allows selecting the profile for VP9 encoder.
3370 This is also used to enumerate supported profiles by VP9 encoder or decoder.
3371 Possible values are:
3377 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
3379 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
3381 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
3383 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
3386 .. _v4l2-mpeg-video-vp9-level:
3388 ``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``
3390 enum v4l2_mpeg_video_vp9_level -
3391 This control allows selecting the level for VP9 encoder.
3392 This is also used to enumerate supported levels by VP9 encoder or decoder.
3393 More information can be found at
3394 `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:
3400 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``
3402 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``
3404 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``
3406 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``
3408 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``
3410 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``
3412 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``
3414 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``
3416 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``
3418 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``
3420 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``
3422 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``
3424 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``
3426 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``
3430 High Efficiency Video Coding (HEVC/H.265) Control Reference
3431 ===========================================================
3433 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
3437 .. _hevc-control-id:
3439 HEVC/H.265 Control IDs
3440 ----------------------
3442 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
3443 Minimum quantization parameter for HEVC.
3444 Valid range: from 0 to 51.
3446 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
3447 Maximum quantization parameter for HEVC.
3448 Valid range: from 0 to 51.
3450 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
3451 Quantization parameter for an I frame for HEVC.
3452 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3453 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3455 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
3456 Quantization parameter for a P frame for HEVC.
3457 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3458 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3460 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
3461 Quantization parameter for a B frame for HEVC.
3462 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3463 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3465 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
3466 HIERARCHICAL_QP allows the host to specify the quantization parameter
3467 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
3468 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
3469 control value to 1 enables setting of the QP values for the layers.
3471 .. _v4l2-hevc-hier-coding-type:
3473 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
3476 enum v4l2_mpeg_video_hevc_hier_coding_type -
3477 Selects the hierarchical coding type for encoding. Possible values are:
3483 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3489 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
3490 - Use the B frame for hierarchical coding.
3491 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
3492 - Use the P frame for hierarchical coding.
3499 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
3500 Selects the hierarchical coding layer. In normal encoding
3501 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
3502 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
3505 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
3506 Indicates quantization parameter for hierarchical coding layer 0.
3507 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3508 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3510 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
3511 Indicates quantization parameter for hierarchical coding layer 1.
3512 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3513 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3515 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
3516 Indicates quantization parameter for hierarchical coding layer 2.
3517 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3518 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3520 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
3521 Indicates quantization parameter for hierarchical coding layer 3.
3522 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3523 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3525 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
3526 Indicates quantization parameter for hierarchical coding layer 4.
3527 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3528 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3530 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
3531 Indicates quantization parameter for hierarchical coding layer 5.
3532 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3533 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3535 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
3536 Indicates quantization parameter for hierarchical coding layer 6.
3537 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3538 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3540 .. _v4l2-hevc-profile:
3542 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
3545 enum v4l2_mpeg_video_hevc_profile -
3546 Select the desired profile for HEVC encoder.
3552 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3558 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
3560 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
3561 - Main still picture profile.
3562 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
3570 .. _v4l2-hevc-level:
3572 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
3575 enum v4l2_mpeg_video_hevc_level -
3576 Selects the desired level for HEVC encoder.
3582 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3588 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
3590 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
3592 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
3594 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
3596 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
3598 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
3600 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
3602 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
3604 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
3606 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
3608 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
3610 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
3612 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
3620 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
3621 Indicates the number of evenly spaced subintervals, called ticks, within
3622 one second. This is a 16 bit unsigned integer and has a maximum value up to
3623 0xffff and a minimum value of 1.
3627 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
3630 enum v4l2_mpeg_video_hevc_tier -
3631 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
3632 were made to deal with applications that differ in terms of maximum bit
3633 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
3634 this flag to 1 indicates High tier. High tier is for applications requiring
3641 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3647 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
3649 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
3657 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
3658 Selects HEVC maximum coding unit depth.
3660 .. _v4l2-hevc-loop-filter-mode:
3662 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
3665 enum v4l2_mpeg_video_hevc_loop_filter_mode -
3666 Loop filter mode for HEVC encoder. Possible values are:
3672 .. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
3678 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
3679 - Loop filter is disabled.
3680 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
3681 - Loop filter is enabled.
3682 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
3683 - Loop filter is disabled at the slice boundary.
3690 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
3691 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
3693 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
3694 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
3696 .. _v4l2-hevc-refresh-type:
3698 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
3701 enum v4l2_mpeg_video_hevc_hier_refresh_type -
3702 Selects refresh type for HEVC encoder.
3703 Host has to specify the period into
3704 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
3710 .. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
3716 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
3717 - Use the B frame for hierarchical coding.
3718 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
3719 - Use CRA (Clean Random Access Unit) picture encoding.
3720 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
3721 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
3728 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
3729 Selects the refresh period for HEVC encoder.
3730 This specifies the number of I pictures between two CRA/IDR pictures.
3731 This is valid only if REFRESH_TYPE is not 0.
3733 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
3734 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
3735 encoding. Setting it to 1 enables lossless encoding.
3737 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
3738 Indicates constant intra prediction for HEVC encoder. Specifies the
3739 constrained intra prediction in which intra largest coding unit (LCU)
3740 prediction is performed by using residual data and decoded samples of
3741 neighboring intra LCU only. Setting the value to 1 enables constant intra
3742 prediction and setting the value to 0 disables constant intra prediction.
3744 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
3745 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
3746 disables the feature and setting it to 1 enables the wavefront parallel
3749 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
3750 Setting the value to 1 enables combination of P and B frame for HEVC
3753 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
3754 Indicates temporal identifier for HEVC encoder which is enabled by
3755 setting the value to 1.
3757 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
3758 Indicates bi-linear interpolation is conditionally used in the intra
3759 prediction filtering process in the CVS when set to 1. Indicates bi-linear
3760 interpolation is not used in the CVS when set to 0.
3762 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
3763 Indicates maximum number of merge candidate motion vectors.
3764 Values are from 0 to 4.
3766 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
3767 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
3768 1 enables the prediction. Setting it to 0 disables the prediction.
3770 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
3771 Specifies if HEVC generates a stream with a size of the length field
3772 instead of start code pattern. The size of the length field is configurable
3773 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
3774 the value to 0 disables encoding without startcode pattern. Setting the
3775 value to 1 will enables encoding without startcode pattern.
3777 .. _v4l2-hevc-size-of-length-field:
3779 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
3782 enum v4l2_mpeg_video_hevc_size_of_length_field -
3783 Indicates the size of length field.
3784 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
3790 .. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
3796 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
3797 - Generate start code pattern (Normal).
3798 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
3799 - Generate size of length field instead of start code pattern and length is 1.
3800 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
3801 - Generate size of length field instead of start code pattern and length is 2.
3802 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
3803 - Generate size of length field instead of start code pattern and length is 4.
3809 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
3810 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
3812 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
3813 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
3815 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
3816 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
3818 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
3819 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
3821 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
3822 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
3824 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
3825 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
3827 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
3828 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
3830 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
3831 Selects number of P reference pictures required for HEVC encoder.
3832 P-Frame can use 1 or 2 frames for reference.
3834 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
3835 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
3836 disables generating SPS and PPS at every IDR. Setting it to one enables
3837 generating SPS and PPS at every IDR.
3841 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)``
3842 Specifies the Sequence Parameter Set fields (as extracted from the
3843 bitstream) for the associated HEVC slice data.
3844 These bitstream parameters are defined according to :ref:`hevc`.
3845 They are described in section 7.4.3.2 "Sequence parameter set RBSP
3846 semantics" of the specification.
3848 .. c:type:: v4l2_ctrl_hevc_sps
3850 .. cssclass:: longtable
3852 .. flat-table:: struct v4l2_ctrl_hevc_sps
3858 - ``pic_width_in_luma_samples``
3861 - ``pic_height_in_luma_samples``
3864 - ``bit_depth_luma_minus8``
3867 - ``bit_depth_chroma_minus8``
3870 - ``log2_max_pic_order_cnt_lsb_minus4``
3873 - ``sps_max_dec_pic_buffering_minus1``
3876 - ``sps_max_num_reorder_pics``
3879 - ``sps_max_latency_increase_plus1``
3882 - ``log2_min_luma_coding_block_size_minus3``
3885 - ``log2_diff_max_min_luma_coding_block_size``
3888 - ``log2_min_luma_transform_block_size_minus2``
3891 - ``log2_diff_max_min_luma_transform_block_size``
3894 - ``max_transform_hierarchy_depth_inter``
3897 - ``max_transform_hierarchy_depth_intra``
3900 - ``pcm_sample_bit_depth_luma_minus1``
3903 - ``pcm_sample_bit_depth_chroma_minus1``
3906 - ``log2_min_pcm_luma_coding_block_size_minus3``
3909 - ``log2_diff_max_min_pcm_luma_coding_block_size``
3912 - ``num_short_term_ref_pic_sets``
3915 - ``num_long_term_ref_pics_sps``
3918 - ``chroma_format_idc``
3922 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
3926 ``Sequence Parameter Set Flags``
3928 .. cssclass:: longtable
3935 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
3938 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
3941 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
3944 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
3947 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
3950 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
3953 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
3956 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
3959 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
3963 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)``
3964 Specifies the Picture Parameter Set fields (as extracted from the
3965 bitstream) for the associated HEVC slice data.
3966 These bitstream parameters are defined according to :ref:`hevc`.
3967 They are described in section 7.4.3.3 "Picture parameter set RBSP
3968 semantics" of the specification.
3970 .. c:type:: v4l2_ctrl_hevc_pps
3972 .. cssclass:: longtable
3974 .. flat-table:: struct v4l2_ctrl_hevc_pps
3980 - ``num_extra_slice_header_bits``
3983 - ``init_qp_minus26``
3986 - ``diff_cu_qp_delta_depth``
3989 - ``pps_cb_qp_offset``
3992 - ``pps_cr_qp_offset``
3995 - ``num_tile_columns_minus1``
3998 - ``num_tile_rows_minus1``
4001 - ``column_width_minus1[20]``
4004 - ``row_height_minus1[22]``
4007 - ``pps_beta_offset_div2``
4010 - ``pps_tc_offset_div2``
4013 - ``log2_parallel_merge_level_minus2``
4017 - Applications and drivers must set this to zero.
4020 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
4024 ``Picture Parameter Set Flags``
4026 .. cssclass:: longtable
4033 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT``
4036 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
4039 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
4042 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
4045 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
4048 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
4051 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
4054 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
4057 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
4060 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
4063 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
4066 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
4069 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
4072 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
4075 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
4078 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
4081 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
4084 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
4087 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
4091 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
4092 Specifies various slice-specific parameters, especially from the NAL unit
4093 header, general slice segment header and weighted prediction parameter
4094 parts of the bitstream.
4095 These bitstream parameters are defined according to :ref:`hevc`.
4096 They are described in section 7.4.7 "General slice segment header
4097 semantics" of the specification.
4099 .. c:type:: v4l2_ctrl_hevc_slice_params
4101 .. cssclass:: longtable
4103 .. flat-table:: struct v4l2_ctrl_hevc_slice_params
4110 - Size (in bits) of the current slice data.
4112 - ``data_bit_offset``
4113 - Offset (in bits) to the video data in the current slice data.
4118 - ``nuh_temporal_id_plus1``
4123 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
4124 V4L2_HEVC_SLICE_TYPE_B).
4126 - ``colour_plane_id``
4129 - ``slice_pic_order_cnt``
4132 - ``num_ref_idx_l0_active_minus1``
4135 - ``num_ref_idx_l1_active_minus1``
4138 - ``collocated_ref_idx``
4141 - ``five_minus_max_num_merge_cand``
4144 - ``slice_qp_delta``
4147 - ``slice_cb_qp_offset``
4150 - ``slice_cr_qp_offset``
4153 - ``slice_act_y_qp_offset``
4156 - ``slice_act_cb_qp_offset``
4159 - ``slice_act_cr_qp_offset``
4162 - ``slice_beta_offset_div2``
4165 - ``slice_tc_offset_div2``
4171 - ``num_active_dpb_entries``
4172 - The number of entries in ``dpb``.
4174 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4175 - The list of L0 reference elements as indices in the DPB.
4177 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4178 - The list of L1 reference elements as indices in the DPB.
4180 - ``num_rps_poc_st_curr_before``
4181 - The number of reference pictures in the short-term set that come before
4184 - ``num_rps_poc_st_curr_after``
4185 - The number of reference pictures in the short-term set that come after
4188 - ``num_rps_poc_lt_curr``
4189 - The number of reference pictures in the long-term set.
4192 - Applications and drivers must set this to zero.
4193 * - struct :c:type:`v4l2_hevc_dpb_entry`
4194 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4195 - The decoded picture buffer, for meta-data about reference frames.
4196 * - struct :c:type:`v4l2_hevc_pred_weight_table`
4197 - ``pred_weight_table``
4198 - The prediction weight coefficients for inter-picture prediction.
4201 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
4203 .. _hevc_slice_params_flags:
4205 ``Slice Parameters Flags``
4207 .. cssclass:: longtable
4214 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
4217 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
4220 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
4223 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
4226 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
4229 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
4232 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
4235 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
4238 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
4242 .. c:type:: v4l2_hevc_dpb_entry
4244 .. cssclass:: longtable
4246 .. flat-table:: struct v4l2_hevc_dpb_entry
4253 - Timestamp of the V4L2 capture buffer to use as reference, used
4254 with B-coded and P-coded frames. The timestamp refers to the
4255 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
4256 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
4257 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
4260 - The reference set for the reference frame
4261 (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
4262 V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
4263 V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
4266 - Whether the reference is a field picture or a frame.
4268 - ``pic_order_cnt[2]``
4269 - The picture order count of the reference. Only the first element of the
4270 array is used for frame pictures, while the first element identifies the
4271 top field and the second the bottom field in field-coded pictures.
4274 - Applications and drivers must set this to zero.
4276 .. c:type:: v4l2_hevc_pred_weight_table
4278 .. cssclass:: longtable
4280 .. flat-table:: struct v4l2_hevc_pred_weight_table
4286 - ``luma_log2_weight_denom``
4289 - ``delta_chroma_log2_weight_denom``
4292 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4295 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4298 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4301 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4304 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4307 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4310 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4313 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4317 - Applications and drivers must set this to zero.
4319 ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)``
4320 Specifies the decoding mode to use. Currently exposes slice-based and
4321 frame-based decoding but new modes might be added later on.
4322 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4323 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4324 are required to set this control in order to specify the decoding mode
4325 that is expected for the buffer.
4326 Drivers may expose a single or multiple decoding modes, depending
4327 on what they can support.
4331 This menu control is not yet part of the public kernel API and
4332 it is expected to change.
4334 .. c:type:: v4l2_mpeg_video_hevc_decode_mode
4336 .. cssclass:: longtable
4343 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED``
4345 - Decoding is done at the slice granularity.
4346 The OUTPUT buffer must contain a single slice.
4347 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED``
4349 - Decoding is done at the frame granularity.
4350 The OUTPUT buffer must contain all slices needed to decode the
4351 frame. The OUTPUT buffer must also contain both fields.
4353 ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)``
4354 Specifies the HEVC slice start code expected for each slice.
4355 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4356 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4357 are required to set this control in order to specify the start code
4358 that is expected for the buffer.
4359 Drivers may expose a single or multiple start codes, depending
4360 on what they can support.
4364 This menu control is not yet part of the public kernel API and
4365 it is expected to change.
4367 .. c:type:: v4l2_mpeg_video_hevc_start_code
4369 .. cssclass:: longtable
4376 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
4378 - Selecting this value specifies that HEVC slices are passed
4379 to the driver without any start code.
4380 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
4382 - Selecting this value specifies that HEVC slices are expected
4383 to be prefixed by Annex B start codes. According to :ref:`hevc`
4384 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.