1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
12 ***********************
13 Codec Control Reference
14 ***********************
16 Below all controls within the Codec control class are described. First
17 the generic controls, then controls specific for certain hardware.
21 These controls are applicable to all codecs and not just MPEG. The
22 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
23 were originally made for MPEG codecs and later extended to cover all
27 Generic Codec Controls
28 ======================
36 ``V4L2_CID_MPEG_CLASS (class)``
37 The Codec class descriptor. Calling
38 :ref:`VIDIOC_QUERYCTRL` for this control will
39 return a description of this control class. This description can be
40 used as the caption of a Tab page in a GUI, for example.
42 .. _v4l2-mpeg-stream-type:
44 ``V4L2_CID_MPEG_STREAM_TYPE``
47 enum v4l2_mpeg_stream_type -
48 The MPEG-1, -2 or -4 output stream type. One cannot assume anything
49 here. Each hardware MPEG encoder tends to support different subsets
50 of the available MPEG stream types. This control is specific to
51 multiplexed MPEG streams. The currently defined stream types are:
59 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
60 - MPEG-2 program stream
61 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
62 - MPEG-2 transport stream
63 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
64 - MPEG-1 system stream
65 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
66 - MPEG-2 DVD-compatible stream
67 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
68 - MPEG-1 VCD-compatible stream
69 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
70 - MPEG-2 SVCD-compatible stream
74 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
75 Program Map Table Packet ID for the MPEG transport stream (default
78 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
79 Audio Packet ID for the MPEG transport stream (default 256)
81 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
82 Video Packet ID for the MPEG transport stream (default 260)
84 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
85 Packet ID for the MPEG transport stream carrying PCR fields (default
88 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
91 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
94 .. _v4l2-mpeg-stream-vbi-fmt:
96 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
99 enum v4l2_mpeg_stream_vbi_fmt -
100 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
101 the MPEG stream. This control selects whether VBI data should be
102 embedded, and if so, what embedding method should be used. The list
103 of possible VBI formats depends on the driver. The currently defined
104 VBI format types are:
108 .. tabularcolumns:: |p{6 cm}|p{11.5cm}|
114 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
115 - No VBI in the MPEG stream
116 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
117 - VBI in private packets, IVTV format (documented in the kernel
119 ``Documentation/media/v4l-drivers/cx2341x.rst``)
123 .. _v4l2-mpeg-audio-sampling-freq:
125 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
128 enum v4l2_mpeg_audio_sampling_freq -
129 MPEG Audio sampling frequency. Possible values are:
137 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
139 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
141 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
146 .. _v4l2-mpeg-audio-encoding:
148 ``V4L2_CID_MPEG_AUDIO_ENCODING``
151 enum v4l2_mpeg_audio_encoding -
152 MPEG Audio encoding. This control is specific to multiplexed MPEG
153 streams. Possible values are:
161 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
162 - MPEG-1/2 Layer I encoding
163 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
164 - MPEG-1/2 Layer II encoding
165 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
166 - MPEG-1/2 Layer III encoding
167 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
168 - MPEG-2/4 AAC (Advanced Audio Coding)
169 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
170 - AC-3 aka ATSC A/52 encoding
174 .. _v4l2-mpeg-audio-l1-bitrate:
176 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
179 enum v4l2_mpeg_audio_l1_bitrate -
180 MPEG-1/2 Layer I bitrate. Possible values are:
188 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
190 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
192 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
194 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
196 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
198 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
200 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
202 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
204 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
206 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
208 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
210 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
212 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
214 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
219 .. _v4l2-mpeg-audio-l2-bitrate:
221 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
224 enum v4l2_mpeg_audio_l2_bitrate -
225 MPEG-1/2 Layer II bitrate. Possible values are:
233 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
235 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
237 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
239 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
241 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
243 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
245 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
247 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
249 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
251 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
253 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
255 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
257 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
259 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
264 .. _v4l2-mpeg-audio-l3-bitrate:
266 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
269 enum v4l2_mpeg_audio_l3_bitrate -
270 MPEG-1/2 Layer III bitrate. Possible values are:
278 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
280 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
282 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
284 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
286 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
288 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
290 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
292 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
294 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
296 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
298 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
300 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
302 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
304 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
309 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
310 AAC bitrate in bits per second.
312 .. _v4l2-mpeg-audio-ac3-bitrate:
314 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
317 enum v4l2_mpeg_audio_ac3_bitrate -
318 AC-3 bitrate. Possible values are:
326 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
328 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
330 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
332 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
334 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
336 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
338 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
340 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
342 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
344 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
346 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
348 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
350 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
352 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
354 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
356 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
358 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
360 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
362 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
367 .. _v4l2-mpeg-audio-mode:
369 ``V4L2_CID_MPEG_AUDIO_MODE``
372 enum v4l2_mpeg_audio_mode -
373 MPEG Audio mode. Possible values are:
381 * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
383 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
385 * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
387 * - ``V4L2_MPEG_AUDIO_MODE_MONO``
392 .. _v4l2-mpeg-audio-mode-extension:
394 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
397 enum v4l2_mpeg_audio_mode_extension -
398 Joint Stereo audio mode extension. In Layer I and II they indicate
399 which subbands are in intensity stereo. All other subbands are coded
400 in stereo. Layer III is not (yet) supported. Possible values are:
408 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
409 - Subbands 4-31 in intensity stereo
410 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
411 - Subbands 8-31 in intensity stereo
412 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
413 - Subbands 12-31 in intensity stereo
414 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
415 - Subbands 16-31 in intensity stereo
419 .. _v4l2-mpeg-audio-emphasis:
421 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
424 enum v4l2_mpeg_audio_emphasis -
425 Audio Emphasis. Possible values are:
433 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
435 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
436 - 50/15 microsecond emphasis
437 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
442 .. _v4l2-mpeg-audio-crc:
444 ``V4L2_CID_MPEG_AUDIO_CRC``
447 enum v4l2_mpeg_audio_crc -
448 CRC method. Possible values are:
456 * - ``V4L2_MPEG_AUDIO_CRC_NONE``
458 * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
459 - 16 bit parity check
463 ``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
464 Mutes the audio when capturing. This is not done by muting audio
465 hardware, which can still produce a slight hiss, but in the encoder
466 itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
469 .. _v4l2-mpeg-audio-dec-playback:
471 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
474 enum v4l2_mpeg_audio_dec_playback -
475 Determines how monolingual audio should be played back. Possible
480 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
486 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
487 - Automatically determines the best playback mode.
488 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
490 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
491 - Left channel playback.
492 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
493 - Right channel playback.
494 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
496 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
497 - Stereo playback with swapped left and right channels.
501 .. _v4l2-mpeg-audio-dec-multilingual-playback:
503 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
506 enum v4l2_mpeg_audio_dec_playback -
507 Determines how multilingual audio should be played back.
509 .. _v4l2-mpeg-video-encoding:
511 ``V4L2_CID_MPEG_VIDEO_ENCODING``
514 enum v4l2_mpeg_video_encoding -
515 MPEG Video encoding method. This control is specific to multiplexed
516 MPEG streams. Possible values are:
524 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
525 - MPEG-1 Video encoding
526 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
527 - MPEG-2 Video encoding
528 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
529 - MPEG-4 AVC (H.264) Video encoding
533 .. _v4l2-mpeg-video-aspect:
535 ``V4L2_CID_MPEG_VIDEO_ASPECT``
538 enum v4l2_mpeg_video_aspect -
539 Video aspect. Possible values are:
547 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
548 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
549 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
550 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
554 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
555 Number of B-Frames (default 2)
557 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
558 GOP size (default 12)
560 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
561 GOP closure (default 1)
563 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
564 Enable 3:2 pulldown (default 0)
566 .. _v4l2-mpeg-video-bitrate-mode:
568 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
571 enum v4l2_mpeg_video_bitrate_mode -
572 Video bitrate mode. Possible values are:
580 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
582 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
587 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
588 Video bitrate in bits per second.
590 ``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
591 Peak video bitrate in bits per second. Must be larger or equal to
592 the average video bitrate. It is ignored if the video bitrate mode
593 is set to constant bitrate.
595 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
596 For every captured frame, skip this many subsequent frames (default
599 ``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
600 "Mutes" the video to a fixed color when capturing. This is useful
601 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
604 ``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
605 Sets the "mute" color of the video. The supplied 32-bit integer is
606 interpreted as follows (bit 0 = least significant bit):
615 - V chrominance information
617 - U chrominance information
619 - Y luminance information
625 .. _v4l2-mpeg-video-dec-pts:
627 ``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
628 This read-only control returns the 33-bit video Presentation Time
629 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
630 currently displayed frame. This is the same PTS as is used in
631 :ref:`VIDIOC_DECODER_CMD`.
633 .. _v4l2-mpeg-video-dec-frame:
635 ``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
636 This read-only control returns the frame counter of the frame that
637 is currently displayed (decoded). This value is reset to 0 whenever
638 the decoder is started.
640 ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
641 If enabled the decoder expects to receive a single slice per buffer,
642 otherwise the decoder expects a single frame in per buffer.
643 Applicable to the decoder, all codecs.
645 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
646 Enable writing sample aspect ratio in the Video Usability
647 Information. Applicable to the H264 encoder.
649 .. _v4l2-mpeg-video-h264-vui-sar-idc:
651 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
654 enum v4l2_mpeg_video_h264_vui_sar_idc -
655 VUI sample aspect ratio indicator for H.264 encoding. The value is
656 defined in the table E-1 in the standard. Applicable to the H264
665 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
667 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
669 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
671 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
673 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
675 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
677 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
679 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
681 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
683 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
685 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
687 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
689 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
691 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
693 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
695 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
697 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
699 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
704 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
705 Extended sample aspect ratio width for H.264 VUI encoding.
706 Applicable to the H264 encoder.
708 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
709 Extended sample aspect ratio height for H.264 VUI encoding.
710 Applicable to the H264 encoder.
712 .. _v4l2-mpeg-video-h264-level:
714 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
717 enum v4l2_mpeg_video_h264_level -
718 The level information for the H264 video elementary stream.
719 Applicable to the H264 encoder. Possible values are:
727 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
729 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
731 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
733 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
735 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
737 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
739 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
741 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
743 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
745 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
747 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
749 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
751 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
753 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
755 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
757 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
762 .. _v4l2-mpeg-video-mpeg4-level:
764 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
767 enum v4l2_mpeg_video_mpeg4_level -
768 The level information for the MPEG4 elementary stream. Applicable to
769 the MPEG4 encoder. Possible values are:
777 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
779 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
781 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
783 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
785 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
787 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
789 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
791 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
796 .. _v4l2-mpeg-video-h264-profile:
798 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
801 enum v4l2_mpeg_video_h264_profile -
802 The profile information for H264. Applicable to the H264 encoder.
811 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
813 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
814 - Constrained Baseline profile
815 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
817 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
819 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
821 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
823 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
825 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
826 - High 444 Predictive profile
827 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
828 - High 10 Intra profile
829 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
830 - High 422 Intra profile
831 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
832 - High 444 Intra profile
833 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
834 - CAVLC 444 Intra profile
835 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
836 - Scalable Baseline profile
837 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
838 - Scalable High profile
839 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
840 - Scalable High Intra profile
841 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
842 - Stereo High profile
843 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
844 - Multiview High profile
848 .. _v4l2-mpeg-video-mpeg4-profile:
850 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
853 enum v4l2_mpeg_video_mpeg4_profile -
854 The profile information for MPEG4. Applicable to the MPEG4 encoder.
863 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
865 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
866 - Advanced Simple profile
867 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
869 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
870 - Simple Scalable profile
871 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
876 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
877 The maximum number of reference pictures used for encoding.
878 Applicable to the encoder.
880 .. _v4l2-mpeg-video-multi-slice-mode:
882 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
885 enum v4l2_mpeg_video_multi_slice_mode -
886 Determines how the encoder should handle division of frame into
887 slices. Applicable to the encoder. Possible values are:
891 .. tabularcolumns:: |p{8.7cm}|p{8.8cm}|
897 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
898 - Single slice per frame.
899 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
900 - Multiple slices with set maximum number of macroblocks per slice.
901 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
902 - Multiple slice with set maximum size in bytes per slice.
906 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
907 The maximum number of macroblocks in a slice. Used when
908 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
909 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
912 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
913 The maximum size of a slice in bytes. Used when
914 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
915 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
918 .. _v4l2-mpeg-video-h264-loop-filter-mode:
920 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
923 enum v4l2_mpeg_video_h264_loop_filter_mode -
924 Loop filter mode for H264 encoder. Possible values are:
928 .. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
934 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
935 - Loop filter is enabled.
936 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
937 - Loop filter is disabled.
938 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
939 - Loop filter is disabled at the slice boundary.
943 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
944 Loop filter alpha coefficient, defined in the H264 standard.
945 This value corresponds to the slice_alpha_c0_offset_div2 slice header
946 field, and should be in the range of -6 to +6, inclusive. The actual alpha
947 offset FilterOffsetA is twice this value.
948 Applicable to the H264 encoder.
950 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
951 Loop filter beta coefficient, defined in the H264 standard.
952 This corresponds to the slice_beta_offset_div2 slice header field, and
953 should be in the range of -6 to +6, inclusive. The actual beta offset
954 FilterOffsetB is twice this value.
955 Applicable to the H264 encoder.
957 .. _v4l2-mpeg-video-h264-entropy-mode:
959 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
962 enum v4l2_mpeg_video_h264_entropy_mode -
963 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
964 encoder. Possible values are:
972 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
973 - Use CAVLC entropy coding.
974 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
975 - Use CABAC entropy coding.
979 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
980 Enable 8X8 transform for H264. Applicable to the H264 encoder.
982 ``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
983 Enable constrained intra prediction for H264. Applicable to the H264
986 ``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
987 Specify the offset that should be added to the luma quantization
988 parameter to determine the chroma quantization parameter. Applicable
991 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
992 Cyclic intra macroblock refresh. This is the number of continuous
993 macroblocks refreshed every frame. Each frame a successive set of
994 macroblocks is refreshed until the cycle completes and starts from
995 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
997 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
998 Frame level rate control enable. If this control is disabled then
999 the quantization parameter for each frame type is constant and set
1000 with appropriate controls (e.g.
1001 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1002 enabled then quantization parameter is adjusted to meet the chosen
1003 bitrate. Minimum and maximum value for the quantization parameter
1004 can be set with appropriate controls (e.g.
1005 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1007 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1008 Macroblock level rate control enable. Applicable to the MPEG4 and
1011 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1012 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1015 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1016 Quantization parameter for an I frame for H263. Valid range: from 1
1019 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1020 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1022 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1023 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1025 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1026 Quantization parameter for an P frame for H263. Valid range: from 1
1029 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1030 Quantization parameter for an B frame for H263. Valid range: from 1
1033 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1034 Quantization parameter for an I frame for H264. Valid range: from 0
1037 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1038 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1040 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1041 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1043 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1044 Quantization parameter for an P frame for H264. Valid range: from 0
1047 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1048 Quantization parameter for an B frame for H264. Valid range: from 0
1051 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1052 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1055 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1056 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1058 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1059 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1061 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1062 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1065 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1066 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1069 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1070 The Video Buffer Verifier size in kilobytes, it is used as a
1071 limitation of frame skip. The VBV is defined in the standard as a
1072 mean to verify that the produced stream will be successfully
1073 decoded. The standard describes it as "Part of a hypothetical
1074 decoder that is conceptually connected to the output of the encoder.
1075 Its purpose is to provide a constraint on the variability of the
1076 data rate that an encoder or editing process may produce.".
1077 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1079 .. _v4l2-mpeg-video-vbv-delay:
1081 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1082 Sets the initial delay in milliseconds for VBV buffer control.
1084 .. _v4l2-mpeg-video-hor-search-range:
1086 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1087 Horizontal search range defines maximum horizontal search area in
1088 pixels to search and match for the present Macroblock (MB) in the
1089 reference picture. This V4L2 control macro is used to set horizontal
1090 search range for motion estimation module in video encoder.
1092 .. _v4l2-mpeg-video-vert-search-range:
1094 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1095 Vertical search range defines maximum vertical search area in pixels
1096 to search and match for the present Macroblock (MB) in the reference
1097 picture. This V4L2 control macro is used to set vertical search
1098 range for motion estimation module in video encoder.
1100 .. _v4l2-mpeg-video-force-key-frame:
1102 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1103 Force a key frame for the next queued buffer. Applicable to
1104 encoders. This is a general, codec-agnostic keyframe control.
1106 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1107 The Coded Picture Buffer size in kilobytes, it is used as a
1108 limitation of frame skip. The CPB is defined in the H264 standard as
1109 a mean to verify that the produced stream will be successfully
1110 decoded. Applicable to the H264 encoder.
1112 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1113 Period between I-frames in the open GOP for H264. In case of an open
1114 GOP this is the period between two I-frames. The period between IDR
1115 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1116 control. An IDR frame, which stands for Instantaneous Decoding
1117 Refresh is an I-frame after which no prior frames are referenced.
1118 This means that a stream can be restarted from an IDR frame without
1119 the need to store or decode any previous frames. Applicable to the
1122 .. _v4l2-mpeg-video-header-mode:
1124 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1127 enum v4l2_mpeg_video_header_mode -
1128 Determines whether the header is returned as the first buffer or is
1129 it returned together with the first frame. Applicable to encoders.
1130 Possible values are:
1134 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1140 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1141 - The stream header is returned separately in the first buffer.
1142 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1143 - The stream header is returned together with the first encoded
1148 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1149 Repeat the video sequence headers. Repeating these headers makes
1150 random access to the video stream easier. Applicable to the MPEG1, 2
1153 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1154 Enabled the deblocking post processing filter for MPEG4 decoder.
1155 Applicable to the MPEG4 decoder.
1157 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1158 vop_time_increment_resolution value for MPEG4. Applicable to the
1161 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1162 vop_time_increment value for MPEG4. Applicable to the MPEG4
1165 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1166 Enable generation of frame packing supplemental enhancement
1167 information in the encoded bitstream. The frame packing SEI message
1168 contains the arrangement of L and R planes for 3D viewing.
1169 Applicable to the H264 encoder.
1171 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1172 Sets current frame as frame0 in frame packing SEI. Applicable to the
1175 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1177 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1180 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1181 Frame packing arrangement type for H264 SEI. Applicable to the H264
1182 encoder. Possible values are:
1184 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
1190 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1191 - Pixels are alternatively from L and R.
1192 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1193 - L and R are interlaced by column.
1194 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1195 - L and R are interlaced by row.
1196 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1197 - L is on the left, R on the right.
1198 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1199 - L is on top, R on bottom.
1200 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1201 - One view per frame.
1205 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1206 Enables flexible macroblock ordering in the encoded bitstream. It is
1207 a technique used for restructuring the ordering of macroblocks in
1208 pictures. Applicable to the H264 encoder.
1210 .. _v4l2-mpeg-video-h264-fmo-map-type:
1212 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1215 enum v4l2_mpeg_video_h264_fmo_map_type -
1216 When using FMO, the map type divides the image in different scan
1217 patterns of macroblocks. Applicable to the H264 encoder. Possible
1220 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1226 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1227 - Slices are interleaved one after other with macroblocks in run
1229 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1230 - Scatters the macroblocks based on a mathematical function known to
1231 both encoder and decoder.
1232 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1233 - Macroblocks arranged in rectangular areas or regions of interest.
1234 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1235 - Slice groups grow in a cyclic way from centre to outwards.
1236 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1237 - Slice groups grow in raster scan pattern from left to right.
1238 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1239 - Slice groups grow in wipe scan pattern from top to bottom.
1240 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1241 - User defined map type.
1245 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1246 Number of slice groups in FMO. Applicable to the H264 encoder.
1248 .. _v4l2-mpeg-video-h264-fmo-change-direction:
1250 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1253 enum v4l2_mpeg_video_h264_fmo_change_dir -
1254 Specifies a direction of the slice group change for raster and wipe
1255 maps. Applicable to the H264 encoder. Possible values are:
1263 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1264 - Raster scan or wipe right.
1265 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1266 - Reverse raster scan or wipe left.
1270 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1271 Specifies the size of the first slice group for raster and wipe map.
1272 Applicable to the H264 encoder.
1274 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1275 Specifies the number of consecutive macroblocks for the interleaved
1276 map. Applicable to the H264 encoder.
1278 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1279 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1282 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1283 Specifies the slice order in ASO. Applicable to the H264 encoder.
1284 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1296 - Slice position or order
1300 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1301 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1303 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1305 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1308 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1309 Specifies the hierarchical coding type. Applicable to the H264
1310 encoder. Possible values are:
1318 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1319 - Hierarchical B coding.
1320 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1321 - Hierarchical P coding.
1325 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1326 Specifies the number of hierarchical coding layers. Applicable to
1329 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1330 Specifies a user defined QP for each layer. Applicable to the H264
1331 encoder. The supplied 32-bit integer is interpreted as follows (bit
1332 0 = least significant bit):
1347 .. _v4l2-mpeg-mpeg2:
1349 ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
1350 Specifies the slice parameters (as extracted from the bitstream) for the
1351 associated MPEG-2 slice data. This includes the necessary parameters for
1352 configuring a stateless hardware decoding pipeline for MPEG-2.
1353 The bitstream parameters are defined according to :ref:`mpeg2part2`.
1357 This compound control is not yet part of the public kernel API and
1358 it is expected to change.
1360 .. c:type:: v4l2_ctrl_mpeg2_slice_params
1362 .. cssclass:: longtable
1364 .. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
1371 - Size (in bits) of the current slice data.
1373 - ``data_bit_offset``
1374 - Offset (in bits) to the video data in the current slice data.
1375 * - struct :c:type:`v4l2_mpeg2_sequence`
1377 - Structure with MPEG-2 sequence metadata, merging relevant fields from
1378 the sequence header and sequence extension parts of the bitstream.
1379 * - struct :c:type:`v4l2_mpeg2_picture`
1381 - Structure with MPEG-2 picture metadata, merging relevant fields from
1382 the picture header and picture coding extension parts of the bitstream.
1384 - ``backward_ref_ts``
1385 - Timestamp of the V4L2 capture buffer to use as backward reference, used
1386 with B-coded and P-coded frames. The timestamp refers to the
1387 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1388 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1389 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1391 - ``forward_ref_ts``
1392 - Timestamp for the V4L2 capture buffer to use as forward reference, used
1393 with B-coded frames. The timestamp refers to the ``timestamp`` field in
1394 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
1395 function to convert the struct :c:type:`timeval` in struct
1396 :c:type:`v4l2_buffer` to a __u64.
1398 - ``quantiser_scale_code``
1399 - Code used to determine the quantization scale to use for the IDCT.
1401 .. c:type:: v4l2_mpeg2_sequence
1403 .. cssclass:: longtable
1405 .. flat-table:: struct v4l2_mpeg2_sequence
1411 - ``horizontal_size``
1412 - The width of the displayable part of the frame's luminance component.
1415 - The height of the displayable part of the frame's luminance component.
1417 - ``vbv_buffer_size``
1418 - Used to calculate the required size of the video buffering verifier,
1419 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
1421 - ``profile_and_level_indication``
1422 - The current profile and level indication as extracted from the
1425 - ``progressive_sequence``
1426 - Indication that all the frames for the sequence are progressive instead
1430 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
1432 .. c:type:: v4l2_mpeg2_picture
1434 .. cssclass:: longtable
1436 .. flat-table:: struct v4l2_mpeg2_picture
1442 - ``picture_coding_type``
1443 - Picture coding type for the frame covered by the current slice
1444 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
1445 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
1448 - Motion vector codes.
1450 - ``intra_dc_precision``
1451 - Precision of Discrete Cosine transform (0: 8 bits precision,
1452 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
1454 - ``picture_structure``
1455 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
1456 3: progressive frame).
1458 - ``top_field_first``
1459 - If set to 1 and interlaced stream, top field is output first.
1461 - ``frame_pred_frame_dct``
1462 - If set to 1, only frame-DCT and frame prediction are used.
1464 - ``concealment_motion_vectors``
1465 - If set to 1, motion vectors are coded for intra macroblocks.
1468 - This flag affects the inverse quantization process.
1470 - ``intra_vlc_format``
1471 - This flag affects the decoding of transform coefficient data.
1473 - ``alternate_scan``
1474 - This flag affects the decoding of transform coefficient data.
1476 - ``repeat_first_field``
1477 - This flag affects the decoding process of progressive frames.
1479 - ``progressive_frame``
1480 - Indicates whether the current frame is progressive.
1482 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
1483 Specifies quantization matrices (as extracted from the bitstream) for the
1484 associated MPEG-2 slice data.
1488 This compound control is not yet part of the public kernel API and
1489 it is expected to change.
1491 .. c:type:: v4l2_ctrl_mpeg2_quantization
1493 .. cssclass:: longtable
1495 .. flat-table:: struct v4l2_ctrl_mpeg2_quantization
1501 - ``load_intra_quantiser_matrix``
1502 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
1504 - ``load_non_intra_quantiser_matrix``
1505 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
1508 - ``load_chroma_intra_quantiser_matrix``
1509 - One bit to indicate whether to load the
1510 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
1513 - ``load_chroma_non_intra_quantiser_matrix``
1514 - One bit to indicate whether to load the
1515 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
1518 - ``intra_quantiser_matrix[64]``
1519 - The quantization matrix coefficients for intra-coded frames, in zigzag
1520 scanning order. It is relevant for both luma and chroma components,
1521 although it can be superseded by the chroma-specific matrix for
1522 non-4:2:0 YUV formats.
1524 - ``non_intra_quantiser_matrix[64]``
1525 - The quantization matrix coefficients for non-intra-coded frames, in
1526 zigzag scanning order. It is relevant for both luma and chroma
1527 components, although it can be superseded by the chroma-specific matrix
1528 for non-4:2:0 YUV formats.
1530 - ``chroma_intra_quantiser_matrix[64]``
1531 - The quantization matrix coefficients for the chominance component of
1532 intra-coded frames, in zigzag scanning order. Only relevant for
1533 non-4:2:0 YUV formats.
1535 - ``chroma_non_intra_quantiser_matrix[64]``
1536 - The quantization matrix coefficients for the chrominance component of
1537 non-intra-coded frames, in zigzag scanning order. Only relevant for
1538 non-4:2:0 YUV formats.
1540 MFC 5.1 MPEG Controls
1541 =====================
1543 The following MPEG class controls deal with MPEG decoding and encoding
1544 settings that are specific to the Multi Format Codec 5.1 device present
1545 in the S5P family of SoCs by Samsung.
1548 .. _mfc51-control-id:
1553 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
1554 If the display delay is enabled then the decoder is forced to return
1555 a CAPTURE buffer (decoded frame) after processing a certain number
1556 of OUTPUT buffers. The delay can be set through
1557 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
1558 feature can be used for example for generating thumbnails of videos.
1559 Applicable to the H264 decoder.
1561 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
1562 Display delay value for H264 decoder. The decoder is forced to
1563 return a decoded frame after the set 'display delay' number of
1564 frames. If this number is low it may result in frames returned out
1565 of display order, in addition the hardware may still be using the
1566 returned buffer as a reference picture for subsequent frames.
1568 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
1569 The number of reference pictures used for encoding a P picture.
1570 Applicable to the H264 encoder.
1572 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
1573 Padding enable in the encoder - use a color instead of repeating
1574 border pixels. Applicable to encoders.
1576 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
1577 Padding color in the encoder. Applicable to encoders. The supplied
1578 32-bit integer is interpreted as follows (bit 0 = least significant
1588 - V chrominance information
1590 - U chrominance information
1592 - Y luminance information
1598 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
1599 Reaction coefficient for MFC rate control. Applicable to encoders.
1603 #. Valid only when the frame level RC is enabled.
1605 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
1606 VBR, this field must be large (ex. 100 ~ 1000).
1608 #. It is not recommended to use the greater number than
1609 FRAME_RATE * (10^9 / BIT_RATE).
1611 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
1612 Adaptive rate control for dark region. Valid only when H.264 and
1613 macroblock level RC is enabled
1614 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1617 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
1618 Adaptive rate control for smooth region. Valid only when H.264 and
1619 macroblock level RC is enabled
1620 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1623 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
1624 Adaptive rate control for static region. Valid only when H.264 and
1625 macroblock level RC is enabled
1626 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1629 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
1630 Adaptive rate control for activity region. Valid only when H.264 and
1631 macroblock level RC is enabled
1632 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
1635 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
1637 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
1640 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
1641 Indicates in what conditions the encoder should skip frames. If
1642 encoding a frame would cause the encoded stream to be larger then a
1643 chosen data limit then the frame will be skipped. Possible values
1647 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1653 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
1654 - Frame skip mode is disabled.
1655 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
1656 - Frame skip mode enabled and buffer limit is set by the chosen
1657 level and is defined by the standard.
1658 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
1659 - Frame skip mode enabled and buffer limit is set by the VBV
1660 (MPEG1/2/4) or CPB (H264) buffer size control.
1664 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
1665 Enable rate-control with fixed target bit. If this setting is
1666 enabled, then the rate control logic of the encoder will calculate
1667 the average bitrate for a GOP and keep it below or equal the set
1668 bitrate target. Otherwise the rate control logic calculates the
1669 overall average bitrate for the stream and keeps it below or equal
1670 to the set bitrate. In the first case the average bitrate for the
1671 whole stream will be smaller then the set bitrate. This is caused
1672 because the average is calculated for smaller number of frames, on
1673 the other hand enabling this setting will ensure that the stream
1674 will meet tight bandwidth constraints. Applicable to encoders.
1676 .. _v4l2-mpeg-mfc51-video-force-frame-type:
1678 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
1681 enum v4l2_mpeg_mfc51_video_force_frame_type -
1682 Force a frame type for the next queued buffer. Applicable to
1683 encoders. Possible values are:
1691 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
1692 - Forcing a specific frame type disabled.
1693 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
1695 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
1696 - Force a non-coded frame.
1701 CX2341x MPEG Controls
1702 =====================
1704 The following MPEG class controls deal with MPEG encoding settings that
1705 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
1708 .. _cx2341x-control-id:
1713 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
1715 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
1718 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
1719 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
1728 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
1729 - Choose the filter manually
1730 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
1731 - Choose the filter automatically
1735 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
1736 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
1739 .. _luma-spatial-filter-type:
1741 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
1744 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
1745 Select the algorithm to use for the Luma Spatial Filter (default
1746 ``1D_HOR``). Possible values:
1750 .. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
1756 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
1758 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
1759 - One-dimensional horizontal
1760 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
1761 - One-dimensional vertical
1762 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
1763 - Two-dimensional separable
1764 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
1765 - Two-dimensional symmetrical non-separable
1769 .. _chroma-spatial-filter-type:
1771 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
1774 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
1775 Select the algorithm for the Chroma Spatial Filter (default
1776 ``1D_HOR``). Possible values are:
1784 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
1786 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
1787 - One-dimensional horizontal
1791 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
1793 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
1796 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
1797 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
1806 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
1807 - Choose the filter manually
1808 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
1809 - Choose the filter automatically
1813 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
1814 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
1815 is 8 for full-scale capturing and 0 for scaled capturing.)
1817 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
1819 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
1822 enum v4l2_mpeg_cx2341x_video_median_filter_type -
1823 Median Filter Type (default ``OFF``). Possible values are:
1831 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
1833 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
1835 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
1837 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
1838 - Horizontal and vertical filter
1839 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
1844 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1845 Threshold above which the luminance median filter is enabled
1848 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
1849 Threshold below which the luminance median filter is enabled
1852 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
1853 Threshold above which the chroma median filter is enabled (default
1856 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
1857 Threshold below which the chroma median filter is enabled (default
1860 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
1861 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
1862 the stream between every four video frames. The packet size is 2048
1863 bytes, including the packet_start_code_prefix and stream_id
1864 fields. The stream_id is 0xBF (private stream 2). The payload
1865 consists of 0x00 bytes, to be filled in by the application. 0 = do
1866 not insert, 1 = insert packets.
1869 VPX Control Reference
1870 =====================
1872 The VPX controls include controls for encoding parameters of VPx video
1881 .. _v4l2-vpx-num-partitions:
1883 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
1886 enum v4l2_vp8_num_partitions -
1887 The number of token partitions to use in VP8 encoder. Possible
1896 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
1897 - 1 coefficient partition
1898 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
1899 - 2 coefficient partitions
1900 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
1901 - 4 coefficient partitions
1902 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
1903 - 8 coefficient partitions
1907 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
1908 Setting this prevents intra 4x4 mode in the intra mode decision.
1910 .. _v4l2-vpx-num-ref-frames:
1912 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
1915 enum v4l2_vp8_num_ref_frames -
1916 The number of reference pictures for encoding P frames. Possible
1919 .. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
1925 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
1926 - Last encoded frame will be searched
1927 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
1928 - Two frames will be searched among the last encoded frame, the
1929 golden frame and the alternate reference (altref) frame. The
1930 encoder implementation will decide which two are chosen.
1931 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
1932 - The last encoded frame, the golden frame and the altref frame will
1937 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
1938 Indicates the loop filter level. The adjustment of the loop filter
1939 level is done via a delta value against a baseline loop filter
1942 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
1943 This parameter affects the loop filter. Anything above zero weakens
1944 the deblocking effect on the loop filter.
1946 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
1947 Sets the refresh period for the golden frame. The period is defined
1948 in number of frames. For a value of 'n', every nth frame starting
1949 from the first key frame will be taken as a golden frame. For eg.
1950 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
1951 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
1952 taken as the golden frames as frame 0 is always a key frame.
1954 .. _v4l2-vpx-golden-frame-sel:
1956 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
1959 enum v4l2_vp8_golden_frame_sel -
1960 Selects the golden frame for encoding. Possible values are:
1966 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
1972 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
1973 - Use the (n-2)th frame as a golden frame, current frame index being
1975 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
1976 - Use the previous specific frame indicated by
1977 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
1985 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
1986 Minimum quantization parameter for VP8.
1988 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
1989 Maximum quantization parameter for VP8.
1991 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
1992 Quantization parameter for an I frame for VP8.
1994 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
1995 Quantization parameter for a P frame for VP8.
1997 .. _v4l2-mpeg-video-vp8-profile:
1999 ``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
2002 enum v4l2_mpeg_video_vp8_profile -
2003 This control allows selecting the profile for VP8 encoder.
2004 This is also used to enumerate supported profiles by VP8 encoder or decoder.
2005 Possible values are:
2011 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
2013 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
2015 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
2017 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
2020 .. _v4l2-mpeg-video-vp9-profile:
2022 ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
2025 enum v4l2_mpeg_video_vp9_profile -
2026 This control allows selecting the profile for VP9 encoder.
2027 This is also used to enumerate supported profiles by VP9 encoder or decoder.
2028 Possible values are:
2034 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
2036 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
2038 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
2040 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
2044 High Efficiency Video Coding (HEVC/H.265) Control Reference
2045 ===========================================================
2047 The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
2051 .. _hevc-control-id:
2053 HEVC/H.265 Control IDs
2054 ----------------------
2056 ``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
2057 Minimum quantization parameter for HEVC.
2058 Valid range: from 0 to 51.
2060 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
2061 Maximum quantization parameter for HEVC.
2062 Valid range: from 0 to 51.
2064 ``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
2065 Quantization parameter for an I frame for HEVC.
2066 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2067 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2069 ``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
2070 Quantization parameter for a P frame for HEVC.
2071 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2072 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2074 ``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
2075 Quantization parameter for a B frame for HEVC.
2076 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2077 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2079 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
2080 HIERARCHICAL_QP allows the host to specify the quantization parameter
2081 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
2082 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
2083 control value to 1 enables setting of the QP values for the layers.
2085 .. _v4l2-hevc-hier-coding-type:
2087 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
2090 enum v4l2_mpeg_video_hevc_hier_coding_type -
2091 Selects the hierarchical coding type for encoding. Possible values are:
2097 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2103 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
2104 - Use the B frame for hierarchical coding.
2105 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
2106 - Use the P frame for hierarchical coding.
2113 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
2114 Selects the hierarchical coding layer. In normal encoding
2115 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
2116 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
2119 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
2120 Indicates quantization parameter for hierarchical coding layer 0.
2121 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2122 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2124 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
2125 Indicates quantization parameter for hierarchical coding layer 1.
2126 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2127 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2129 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
2130 Indicates quantization parameter for hierarchical coding layer 2.
2131 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2132 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2134 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
2135 Indicates quantization parameter for hierarchical coding layer 3.
2136 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2137 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2139 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
2140 Indicates quantization parameter for hierarchical coding layer 4.
2141 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2142 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2144 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
2145 Indicates quantization parameter for hierarchical coding layer 5.
2146 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2147 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2149 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
2150 Indicates quantization parameter for hierarchical coding layer 6.
2151 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
2152 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
2154 .. _v4l2-hevc-profile:
2156 ``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
2159 enum v4l2_mpeg_video_hevc_profile -
2160 Select the desired profile for HEVC encoder.
2166 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2172 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
2174 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
2175 - Main still picture profile.
2176 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
2184 .. _v4l2-hevc-level:
2186 ``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
2189 enum v4l2_mpeg_video_hevc_level -
2190 Selects the desired level for HEVC encoder.
2196 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2202 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
2204 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
2206 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
2208 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
2210 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
2212 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
2214 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
2216 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
2218 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
2220 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
2222 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
2224 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
2226 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
2234 ``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
2235 Indicates the number of evenly spaced subintervals, called ticks, within
2236 one second. This is a 16 bit unsigned integer and has a maximum value up to
2237 0xffff and a minimum value of 1.
2241 ``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
2244 enum v4l2_mpeg_video_hevc_tier -
2245 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
2246 were made to deal with applications that differ in terms of maximum bit
2247 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
2248 this flag to 1 indicates High tier. High tier is for applications requiring
2255 .. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
2261 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
2263 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
2271 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
2272 Selects HEVC maximum coding unit depth.
2274 .. _v4l2-hevc-loop-filter-mode:
2276 ``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
2279 enum v4l2_mpeg_video_hevc_loop_filter_mode -
2280 Loop filter mode for HEVC encoder. Possible values are:
2286 .. tabularcolumns:: |p{10.7cm}|p{6.3cm}|
2292 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
2293 - Loop filter is disabled.
2294 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
2295 - Loop filter is enabled.
2296 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
2297 - Loop filter is disabled at the slice boundary.
2304 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
2305 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
2307 ``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
2308 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
2310 .. _v4l2-hevc-refresh-type:
2312 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
2315 enum v4l2_mpeg_video_hevc_hier_refresh_type -
2316 Selects refresh type for HEVC encoder.
2317 Host has to specify the period into
2318 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
2324 .. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
2330 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
2331 - Use the B frame for hierarchical coding.
2332 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
2333 - Use CRA (Clean Random Access Unit) picture encoding.
2334 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
2335 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
2342 ``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
2343 Selects the refresh period for HEVC encoder.
2344 This specifies the number of I pictures between two CRA/IDR pictures.
2345 This is valid only if REFRESH_TYPE is not 0.
2347 ``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
2348 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
2349 encoding. Setting it to 1 enables lossless encoding.
2351 ``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
2352 Indicates constant intra prediction for HEVC encoder. Specifies the
2353 constrained intra prediction in which intra largest coding unit (LCU)
2354 prediction is performed by using residual data and decoded samples of
2355 neighboring intra LCU only. Setting the value to 1 enables constant intra
2356 prediction and setting the value to 0 disables constant intra prediction.
2358 ``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
2359 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
2360 disables the feature and setting it to 1 enables the wavefront parallel
2363 ``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
2364 Setting the value to 1 enables combination of P and B frame for HEVC
2367 ``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
2368 Indicates temporal identifier for HEVC encoder which is enabled by
2369 setting the value to 1.
2371 ``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
2372 Indicates bi-linear interpolation is conditionally used in the intra
2373 prediction filtering process in the CVS when set to 1. Indicates bi-linear
2374 interpolation is not used in the CVS when set to 0.
2376 ``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
2377 Indicates maximum number of merge candidate motion vectors.
2378 Values are from 0 to 4.
2380 ``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
2381 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
2382 1 enables the prediction. Setting it to 0 disables the prediction.
2384 ``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
2385 Specifies if HEVC generates a stream with a size of the length field
2386 instead of start code pattern. The size of the length field is configurable
2387 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
2388 the value to 0 disables encoding without startcode pattern. Setting the
2389 value to 1 will enables encoding without startcode pattern.
2391 .. _v4l2-hevc-size-of-length-field:
2393 ``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
2396 enum v4l2_mpeg_video_hevc_size_of_length_field -
2397 Indicates the size of length field.
2398 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
2404 .. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
2410 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
2411 - Generate start code pattern (Normal).
2412 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
2413 - Generate size of length field instead of start code pattern and length is 1.
2414 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
2415 - Generate size of length field instead of start code pattern and length is 2.
2416 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
2417 - Generate size of length field instead of start code pattern and length is 4.
2423 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
2424 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
2426 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
2427 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
2429 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
2430 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
2432 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
2433 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
2435 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
2436 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
2438 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
2439 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
2441 ``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
2442 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
2444 ``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
2445 Selects number of P reference pictures required for HEVC encoder.
2446 P-Frame can use 1 or 2 frames for reference.
2448 ``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
2449 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
2450 disables generating SPS and PPS at every IDR. Setting it to one enables
2451 generating SPS and PPS at every IDR.