brintos

brintos / linux-shallow public Read only

0
0
Text · 80.2 KiB · 4a379bd Raw
2675 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2 3.. _codec-controls:4 5***********************6Codec Control Reference7***********************8 9Below all controls within the Codec control class are described. First10the generic controls, then controls specific for certain hardware.11 12.. note::13 14   These controls are applicable to all codecs and not just MPEG. The15   defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls16   were originally made for MPEG codecs and later extended to cover all17   encoding formats.18 19 20Generic Codec Controls21======================22 23 24.. _mpeg-control-id:25 26Codec Control IDs27-----------------28 29``V4L2_CID_CODEC_CLASS (class)``30    The Codec class descriptor. Calling31    :ref:`VIDIOC_QUERYCTRL` for this control will32    return a description of this control class. This description can be33    used as the caption of a Tab page in a GUI, for example.34 35.. _v4l2-mpeg-stream-type:36 37``V4L2_CID_MPEG_STREAM_TYPE``38    (enum)39 40enum v4l2_mpeg_stream_type -41    The MPEG-1, -2 or -4 output stream type. One cannot assume anything42    here. Each hardware MPEG encoder tends to support different subsets43    of the available MPEG stream types. This control is specific to44    multiplexed MPEG streams. The currently defined stream types are:45 46 47 48.. flat-table::49    :header-rows:  050    :stub-columns: 051 52    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``53      - MPEG-2 program stream54    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``55      - MPEG-2 transport stream56    * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``57      - MPEG-1 system stream58    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``59      - MPEG-2 DVD-compatible stream60    * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``61      - MPEG-1 VCD-compatible stream62    * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``63      - MPEG-2 SVCD-compatible stream64 65 66 67``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``68    Program Map Table Packet ID for the MPEG transport stream (default69    16)70 71``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``72    Audio Packet ID for the MPEG transport stream (default 256)73 74``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``75    Video Packet ID for the MPEG transport stream (default 260)76 77``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``78    Packet ID for the MPEG transport stream carrying PCR fields (default79    259)80 81``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``82    Audio ID for MPEG PES83 84``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``85    Video ID for MPEG PES86 87.. _v4l2-mpeg-stream-vbi-fmt:88 89``V4L2_CID_MPEG_STREAM_VBI_FMT``90    (enum)91 92enum v4l2_mpeg_stream_vbi_fmt -93    Some cards can embed VBI data (e. g. Closed Caption, Teletext) into94    the MPEG stream. This control selects whether VBI data should be95    embedded, and if so, what embedding method should be used. The list96    of possible VBI formats depends on the driver. The currently defined97    VBI format types are:98 99 100 101.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|102 103.. flat-table::104    :header-rows:  0105    :stub-columns: 0106 107    * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``108      - No VBI in the MPEG stream109    * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``110      - VBI in private packets, IVTV format (documented in the kernel111	sources in the file112	``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``)113 114 115 116.. _v4l2-mpeg-audio-sampling-freq:117 118``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``119    (enum)120 121enum v4l2_mpeg_audio_sampling_freq -122    MPEG Audio sampling frequency. Possible values are:123 124 125 126.. flat-table::127    :header-rows:  0128    :stub-columns: 0129 130    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``131      - 44.1 kHz132    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``133      - 48 kHz134    * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``135      - 32 kHz136 137 138 139.. _v4l2-mpeg-audio-encoding:140 141``V4L2_CID_MPEG_AUDIO_ENCODING``142    (enum)143 144enum v4l2_mpeg_audio_encoding -145    MPEG Audio encoding. This control is specific to multiplexed MPEG146    streams. Possible values are:147 148 149 150.. flat-table::151    :header-rows:  0152    :stub-columns: 0153 154    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``155      - MPEG-1/2 Layer I encoding156    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``157      - MPEG-1/2 Layer II encoding158    * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``159      - MPEG-1/2 Layer III encoding160    * - ``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 encoding164 165 166 167.. _v4l2-mpeg-audio-l1-bitrate:168 169``V4L2_CID_MPEG_AUDIO_L1_BITRATE``170    (enum)171 172enum v4l2_mpeg_audio_l1_bitrate -173    MPEG-1/2 Layer I bitrate. Possible values are:174 175 176 177.. flat-table::178    :header-rows:  0179    :stub-columns: 0180 181    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``182      - 32 kbit/s183    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``184      - 64 kbit/s185    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``186      - 96 kbit/s187    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``188      - 128 kbit/s189    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``190      - 160 kbit/s191    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``192      - 192 kbit/s193    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``194      - 224 kbit/s195    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``196      - 256 kbit/s197    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``198      - 288 kbit/s199    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``200      - 320 kbit/s201    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``202      - 352 kbit/s203    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``204      - 384 kbit/s205    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``206      - 416 kbit/s207    * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``208      - 448 kbit/s209 210 211 212.. _v4l2-mpeg-audio-l2-bitrate:213 214``V4L2_CID_MPEG_AUDIO_L2_BITRATE``215    (enum)216 217enum v4l2_mpeg_audio_l2_bitrate -218    MPEG-1/2 Layer II bitrate. Possible values are:219 220 221 222.. flat-table::223    :header-rows:  0224    :stub-columns: 0225 226    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``227      - 32 kbit/s228    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``229      - 48 kbit/s230    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``231      - 56 kbit/s232    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``233      - 64 kbit/s234    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``235      - 80 kbit/s236    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``237      - 96 kbit/s238    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``239      - 112 kbit/s240    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``241      - 128 kbit/s242    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``243      - 160 kbit/s244    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``245      - 192 kbit/s246    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``247      - 224 kbit/s248    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``249      - 256 kbit/s250    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``251      - 320 kbit/s252    * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``253      - 384 kbit/s254 255 256 257.. _v4l2-mpeg-audio-l3-bitrate:258 259``V4L2_CID_MPEG_AUDIO_L3_BITRATE``260    (enum)261 262enum v4l2_mpeg_audio_l3_bitrate -263    MPEG-1/2 Layer III bitrate. Possible values are:264 265 266 267.. flat-table::268    :header-rows:  0269    :stub-columns: 0270 271    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``272      - 32 kbit/s273    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``274      - 40 kbit/s275    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``276      - 48 kbit/s277    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``278      - 56 kbit/s279    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``280      - 64 kbit/s281    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``282      - 80 kbit/s283    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``284      - 96 kbit/s285    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``286      - 112 kbit/s287    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``288      - 128 kbit/s289    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``290      - 160 kbit/s291    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``292      - 192 kbit/s293    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``294      - 224 kbit/s295    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``296      - 256 kbit/s297    * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``298      - 320 kbit/s299 300 301 302``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``303    AAC bitrate in bits per second.304 305.. _v4l2-mpeg-audio-ac3-bitrate:306 307``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``308    (enum)309 310enum v4l2_mpeg_audio_ac3_bitrate -311    AC-3 bitrate. Possible values are:312 313 314 315.. flat-table::316    :header-rows:  0317    :stub-columns: 0318 319    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``320      - 32 kbit/s321    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``322      - 40 kbit/s323    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``324      - 48 kbit/s325    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``326      - 56 kbit/s327    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``328      - 64 kbit/s329    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``330      - 80 kbit/s331    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``332      - 96 kbit/s333    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``334      - 112 kbit/s335    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``336      - 128 kbit/s337    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``338      - 160 kbit/s339    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``340      - 192 kbit/s341    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``342      - 224 kbit/s343    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``344      - 256 kbit/s345    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``346      - 320 kbit/s347    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``348      - 384 kbit/s349    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``350      - 448 kbit/s351    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``352      - 512 kbit/s353    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``354      - 576 kbit/s355    * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``356      - 640 kbit/s357 358 359 360.. _v4l2-mpeg-audio-mode:361 362``V4L2_CID_MPEG_AUDIO_MODE``363    (enum)364 365enum v4l2_mpeg_audio_mode -366    MPEG Audio mode. Possible values are:367 368 369 370.. flat-table::371    :header-rows:  0372    :stub-columns: 0373 374    * - ``V4L2_MPEG_AUDIO_MODE_STEREO``375      - Stereo376    * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``377      - Joint Stereo378    * - ``V4L2_MPEG_AUDIO_MODE_DUAL``379      - Bilingual380    * - ``V4L2_MPEG_AUDIO_MODE_MONO``381      - Mono382 383 384 385.. _v4l2-mpeg-audio-mode-extension:386 387``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``388    (enum)389 390enum v4l2_mpeg_audio_mode_extension -391    Joint Stereo audio mode extension. In Layer I and II they indicate392    which subbands are in intensity stereo. All other subbands are coded393    in stereo. Layer III is not (yet) supported. Possible values are:394 395.. tabularcolumns:: |p{9.1cm}|p{8.4cm}|396 397.. flat-table::398    :header-rows:  0399    :stub-columns: 0400 401    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``402      - Subbands 4-31 in intensity stereo403    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``404      - Subbands 8-31 in intensity stereo405    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``406      - Subbands 12-31 in intensity stereo407    * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``408      - Subbands 16-31 in intensity stereo409 410 411 412.. _v4l2-mpeg-audio-emphasis:413 414``V4L2_CID_MPEG_AUDIO_EMPHASIS``415    (enum)416 417enum v4l2_mpeg_audio_emphasis -418    Audio Emphasis. Possible values are:419 420 421 422.. flat-table::423    :header-rows:  0424    :stub-columns: 0425 426    * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``427      - None428    * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``429      - 50/15 microsecond emphasis430    * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``431      - CCITT J.17432 433 434 435.. _v4l2-mpeg-audio-crc:436 437``V4L2_CID_MPEG_AUDIO_CRC``438    (enum)439 440enum v4l2_mpeg_audio_crc -441    CRC method. Possible values are:442 443 444 445.. flat-table::446    :header-rows:  0447    :stub-columns: 0448 449    * - ``V4L2_MPEG_AUDIO_CRC_NONE``450      - None451    * - ``V4L2_MPEG_AUDIO_CRC_CRC16``452      - 16 bit parity check453 454 455 456``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``457    Mutes the audio when capturing. This is not done by muting audio458    hardware, which can still produce a slight hiss, but in the encoder459    itself, guaranteeing a fixed and reproducible audio bitstream. 0 =460    unmuted, 1 = muted.461 462.. _v4l2-mpeg-audio-dec-playback:463 464``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``465    (enum)466 467enum v4l2_mpeg_audio_dec_playback -468    Determines how monolingual audio should be played back. Possible469    values are:470 471 472 473.. tabularcolumns:: |p{9.8cm}|p{7.7cm}|474 475.. flat-table::476    :header-rows:  0477    :stub-columns: 0478 479    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``480      - Automatically determines the best playback mode.481    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``482      - Stereo playback.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``488      - Mono playback.489    * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``490      - Stereo playback with swapped left and right channels.491 492 493 494.. _v4l2-mpeg-audio-dec-multilingual-playback:495 496``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``497    (enum)498 499enum v4l2_mpeg_audio_dec_playback -500    Determines how multilingual audio should be played back.501 502.. _v4l2-mpeg-video-encoding:503 504``V4L2_CID_MPEG_VIDEO_ENCODING``505    (enum)506 507enum v4l2_mpeg_video_encoding -508    MPEG Video encoding method. This control is specific to multiplexed509    MPEG streams. Possible values are:510 511 512 513.. flat-table::514    :header-rows:  0515    :stub-columns: 0516 517    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``518      - MPEG-1 Video encoding519    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``520      - MPEG-2 Video encoding521    * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``522      - MPEG-4 AVC (H.264) Video encoding523 524 525 526.. _v4l2-mpeg-video-aspect:527 528``V4L2_CID_MPEG_VIDEO_ASPECT``529    (enum)530 531enum v4l2_mpeg_video_aspect -532    Video aspect. Possible values are:533 534 535 536.. flat-table::537    :header-rows:  0538    :stub-columns: 0539 540    * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``541    * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``542    * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``543    * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``544 545 546 547``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``548    Number of B-Frames (default 2)549 550``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``551    GOP size (default 12)552 553``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``554    GOP closure (default 1)555 556``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``557    Enable 3:2 pulldown (default 0)558 559.. _v4l2-mpeg-video-bitrate-mode:560 561``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``562    (enum)563 564enum v4l2_mpeg_video_bitrate_mode -565    Video bitrate mode. Possible values are:566 567 568 569.. flat-table::570    :header-rows:  0571    :stub-columns: 0572 573    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``574      - Variable bitrate575    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``576      - Constant bitrate577    * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``578      - Constant quality579 580 581 582``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``583    Average video bitrate in bits per second.584 585``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``586    Peak video bitrate in bits per second. Must be larger or equal to587    the average video bitrate. It is ignored if the video bitrate mode588    is set to constant bitrate.589 590``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)``591    Constant quality level control. This control is applicable when592    ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is593    ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100594    where 1 indicates lowest quality and 100 indicates highest quality.595    Encoder will decide the appropriate quantization parameter and596    bitrate to produce requested frame quality.597 598 599``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)``600 601enum v4l2_mpeg_video_frame_skip_mode -602    Indicates in what conditions the encoder should skip frames. If603    encoding a frame would cause the encoded stream to be larger then a604    chosen data limit then the frame will be skipped. Possible values605    are:606 607 608.. tabularcolumns:: |p{8.2cm}|p{9.3cm}|609 610.. raw:: latex611 612    \small613 614.. flat-table::615    :header-rows:  0616    :stub-columns: 0617 618    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED``619      - Frame skip mode is disabled.620    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``621      - Frame skip mode enabled and buffer limit is set by the chosen622        level and is defined by the standard.623    * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``624      - Frame skip mode enabled and buffer limit is set by the625        :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or626        :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control.627 628.. raw:: latex629 630    \normalsize631 632``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``633    For every captured frame, skip this many subsequent frames (default634    0).635 636``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``637    "Mutes" the video to a fixed color when capturing. This is useful638    for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =639    muted.640 641``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``642    Sets the "mute" color of the video. The supplied 32-bit integer is643    interpreted as follows (bit 0 = least significant bit):644 645 646 647.. flat-table::648    :header-rows:  0649    :stub-columns: 0650 651    * - Bit 0:7652      - V chrominance information653    * - Bit 8:15654      - U chrominance information655    * - Bit 16:23656      - Y luminance information657    * - Bit 24:31658      - Must be zero.659 660 661 662.. _v4l2-mpeg-video-dec-pts:663 664``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``665    This read-only control returns the 33-bit video Presentation Time666    Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the667    currently displayed frame. This is the same PTS as is used in668    :ref:`VIDIOC_DECODER_CMD`.669 670.. _v4l2-mpeg-video-dec-frame:671 672``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``673    This read-only control returns the frame counter of the frame that674    is currently displayed (decoded). This value is reset to 0 whenever675    the decoder is started.676 677``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)``678    This control sets the conceal color in YUV color space. It describes679    the client preference of the error conceal color in case of an error680    where the reference frame is missing. The decoder should fill the681    reference buffer with the preferred color and use it for future682    decoding. The control is using 16 bits per channel.683    Applicable to decoders.684 685.. flat-table::686    :header-rows:  0687    :stub-columns: 0688 689    * -690      - 8bit  format691      - 10bit format692      - 12bit format693    * - Y luminance694      - Bit 0:7695      - Bit 0:9696      - Bit 0:11697    * - Cb chrominance698      - Bit 16:23699      - Bit 16:25700      - Bit 16:27701    * - Cr chrominance702      - Bit 32:39703      - Bit 32:41704      - Bit 32:43705    * - Must be zero706      - Bit 48:63707      - Bit 48:63708      - Bit 48:63709 710``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``711    If enabled the decoder expects to receive a single slice per buffer,712    otherwise the decoder expects a single frame in per buffer.713    Applicable to the decoder, all codecs.714 715``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)``716    If the display delay is enabled then the decoder is forced to return717    a CAPTURE buffer (decoded frame) after processing a certain number718    of OUTPUT buffers. The delay can be set through719    ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This720    feature can be used for example for generating thumbnails of videos.721    Applicable to the decoder.722 723``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)``724    Display delay value for decoder. The decoder is forced to725    return a decoded frame after the set 'display delay' number of726    frames. If this number is low it may result in frames returned out727    of display order, in addition the hardware may still be using the728    returned buffer as a reference picture for subsequent frames.729 730``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)``731    If enabled then, AUD (Access Unit Delimiter) NALUs will be generated.732    That could be useful to find the start of a frame without having to733    fully parse each NALU. Applicable to the H264 and HEVC encoders.734 735``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``736    Enable writing sample aspect ratio in the Video Usability737    Information. Applicable to the H264 encoder.738 739.. _v4l2-mpeg-video-h264-vui-sar-idc:740 741``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``742    (enum)743 744enum v4l2_mpeg_video_h264_vui_sar_idc -745    VUI sample aspect ratio indicator for H.264 encoding. The value is746    defined in the table E-1 in the standard. Applicable to the H264747    encoder.748 749 750 751.. flat-table::752    :header-rows:  0753    :stub-columns: 0754 755    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``756      - Unspecified757    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``758      - 1x1759    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``760      - 12x11761    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``762      - 10x11763    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``764      - 16x11765    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``766      - 40x33767    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``768      - 24x11769    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``770      - 20x11771    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``772      - 32x11773    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``774      - 80x33775    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``776      - 18x11777    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``778      - 15x11779    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``780      - 64x33781    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``782      - 160x99783    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``784      - 4x3785    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``786      - 3x2787    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``788      - 2x1789    * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``790      - Extended SAR791 792 793 794``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``795    Extended sample aspect ratio width for H.264 VUI encoding.796    Applicable to the H264 encoder.797 798``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``799    Extended sample aspect ratio height for H.264 VUI encoding.800    Applicable to the H264 encoder.801 802.. _v4l2-mpeg-video-h264-level:803 804``V4L2_CID_MPEG_VIDEO_H264_LEVEL``805    (enum)806 807enum v4l2_mpeg_video_h264_level -808    The level information for the H264 video elementary stream.809    Applicable to the H264 encoder. Possible values are:810 811 812 813.. flat-table::814    :header-rows:  0815    :stub-columns: 0816 817    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``818      - Level 1.0819    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``820      - Level 1B821    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``822      - Level 1.1823    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``824      - Level 1.2825    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``826      - Level 1.3827    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``828      - Level 2.0829    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``830      - Level 2.1831    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``832      - Level 2.2833    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``834      - Level 3.0835    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``836      - Level 3.1837    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``838      - Level 3.2839    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``840      - Level 4.0841    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``842      - Level 4.1843    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``844      - Level 4.2845    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``846      - Level 5.0847    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``848      - Level 5.1849    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``850      - Level 5.2851    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``852      - Level 6.0853    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``854      - Level 6.1855    * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``856      - Level 6.2857 858 859 860.. _v4l2-mpeg-video-mpeg2-level:861 862``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``863    (enum)864 865enum v4l2_mpeg_video_mpeg2_level -866    The level information for the MPEG2 elementary stream. Applicable to867    MPEG2 codecs. Possible values are:868 869 870 871.. flat-table::872    :header-rows:  0873    :stub-columns: 0874 875    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``876      - Low Level (LL)877    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``878      - Main Level (ML)879    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``880      - High-1440 Level (H-14)881    * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``882      - High Level (HL)883 884 885 886.. _v4l2-mpeg-video-mpeg4-level:887 888``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``889    (enum)890 891enum v4l2_mpeg_video_mpeg4_level -892    The level information for the MPEG4 elementary stream. Applicable to893    the MPEG4 encoder. Possible values are:894 895 896 897.. flat-table::898    :header-rows:  0899    :stub-columns: 0900 901    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``902      - Level 0903    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``904      - Level 0b905    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``906      - Level 1907    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``908      - Level 2909    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``910      - Level 3911    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``912      - Level 3b913    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``914      - Level 4915    * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``916      - Level 5917 918 919 920.. _v4l2-mpeg-video-h264-profile:921 922``V4L2_CID_MPEG_VIDEO_H264_PROFILE``923    (enum)924 925enum v4l2_mpeg_video_h264_profile -926    The profile information for H264. Applicable to the H264 encoder.927    Possible values are:928 929.. raw:: latex930 931    \small932 933.. tabularcolumns:: |p{10.2cm}|p{7.3cm}|934 935.. flat-table::936    :header-rows:  0937    :stub-columns: 0938 939    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``940      - Baseline profile941    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``942      - Constrained Baseline profile943    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``944      - Main profile945    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``946      - Extended profile947    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``948      - High profile949    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``950      - High 10 profile951    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``952      - High 422 profile953    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``954      - High 444 Predictive profile955    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``956      - High 10 Intra profile957    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``958      - High 422 Intra profile959    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``960      - High 444 Intra profile961    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``962      - CAVLC 444 Intra profile963    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``964      - Scalable Baseline profile965    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``966      - Scalable High profile967    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``968      - Scalable High Intra profile969    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``970      - Stereo High profile971    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``972      - Multiview High profile973    * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``974      - Constrained High profile975 976.. raw:: latex977 978    \normalsize979 980.. _v4l2-mpeg-video-mpeg2-profile:981 982``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``983    (enum)984 985enum v4l2_mpeg_video_mpeg2_profile -986    The profile information for MPEG2. Applicable to MPEG2 codecs.987    Possible values are:988 989.. raw:: latex990 991    \small992 993.. tabularcolumns:: |p{10.2cm}|p{7.3cm}|994 995.. flat-table::996    :header-rows:  0997    :stub-columns: 0998 999    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``1000      - Simple profile (SP)1001    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``1002      - Main profile (MP)1003    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``1004      - SNR Scalable profile (SNR)1005    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``1006      - Spatially Scalable profile (Spt)1007    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``1008      - High profile (HP)1009    * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``1010      - Multi-view profile (MVP)1011 1012 1013.. raw:: latex1014 1015    \normalsize1016 1017.. _v4l2-mpeg-video-mpeg4-profile:1018 1019``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``1020    (enum)1021 1022enum v4l2_mpeg_video_mpeg4_profile -1023    The profile information for MPEG4. Applicable to the MPEG4 encoder.1024    Possible values are:1025 1026.. raw:: latex1027 1028    \small1029 1030.. tabularcolumns:: |p{11.8cm}|p{5.7cm}|1031 1032.. flat-table::1033    :header-rows:  01034    :stub-columns: 01035 1036    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``1037      - Simple profile1038    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``1039      - Advanced Simple profile1040    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``1041      - Core profile1042    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``1043      - Simple Scalable profile1044    * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``1045      - Advanced Coding Efficiency profile1046 1047.. raw:: latex1048 1049    \normalsize1050 1051``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``1052    The maximum number of reference pictures used for encoding.1053    Applicable to the encoder.1054 1055.. _v4l2-mpeg-video-multi-slice-mode:1056 1057``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``1058    (enum)1059 1060enum v4l2_mpeg_video_multi_slice_mode -1061    Determines how the encoder should handle division of frame into1062    slices. Applicable to the encoder. Possible values are:1063 1064 1065 1066.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|1067 1068.. flat-table::1069    :header-rows:  01070    :stub-columns: 01071 1072    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``1073      - Single slice per frame.1074    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``1075      - Multiple slices with set maximum number of macroblocks per slice.1076    * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``1077      - Multiple slice with set maximum size in bytes per slice.1078 1079 1080 1081``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``1082    The maximum number of macroblocks in a slice. Used when1083    ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to1084    ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the1085    encoder.1086 1087``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``1088    The maximum size of a slice in bytes. Used when1089    ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to1090    ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the1091    encoder.1092 1093.. _v4l2-mpeg-video-h264-loop-filter-mode:1094 1095``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``1096    (enum)1097 1098enum v4l2_mpeg_video_h264_loop_filter_mode -1099    Loop filter mode for H264 encoder. Possible values are:1100 1101.. raw:: latex1102 1103    \small1104 1105.. tabularcolumns:: |p{13.5cm}|p{4.0cm}|1106 1107.. flat-table::1108    :header-rows:  01109    :stub-columns: 01110 1111    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``1112      - Loop filter is enabled.1113    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``1114      - Loop filter is disabled.1115    * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``1116      - Loop filter is disabled at the slice boundary.1117 1118.. raw:: latex1119 1120    \normalsize1121 1122 1123``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``1124    Loop filter alpha coefficient, defined in the H264 standard.1125    This value corresponds to the slice_alpha_c0_offset_div2 slice header1126    field, and should be in the range of -6 to +6, inclusive. The actual alpha1127    offset FilterOffsetA is twice this value.1128    Applicable to the H264 encoder.1129 1130``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``1131    Loop filter beta coefficient, defined in the H264 standard.1132    This corresponds to the slice_beta_offset_div2 slice header field, and1133    should be in the range of -6 to +6, inclusive. The actual beta offset1134    FilterOffsetB is twice this value.1135    Applicable to the H264 encoder.1136 1137.. _v4l2-mpeg-video-h264-entropy-mode:1138 1139``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``1140    (enum)1141 1142enum v4l2_mpeg_video_h264_entropy_mode -1143    Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H2641144    encoder. Possible values are:1145 1146 1147.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|1148 1149 1150.. flat-table::1151    :header-rows:  01152    :stub-columns: 01153 1154    * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``1155      - Use CAVLC entropy coding.1156    * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``1157      - Use CABAC entropy coding.1158 1159 1160 1161``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``1162    Enable 8X8 transform for H264. Applicable to the H264 encoder.1163 1164``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``1165    Enable constrained intra prediction for H264. Applicable to the H2641166    encoder.1167 1168``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``1169    Specify the offset that should be added to the luma quantization1170    parameter to determine the chroma quantization parameter. Applicable1171    to the H264 encoder.1172 1173``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``1174    Cyclic intra macroblock refresh. This is the number of continuous1175    macroblocks refreshed every frame. Each frame a successive set of1176    macroblocks is refreshed until the cycle completes and starts from1177    the top of the frame. Setting this control to zero means that1178    macroblocks will not be refreshed.  Note that this control will not1179    take effect when ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`` control1180    is set to non zero value.1181    Applicable to H264, H263 and MPEG4 encoder.1182 1183``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (enum)``1184 1185enum v4l2_mpeg_video_intra_refresh_period_type -1186    Sets the type of intra refresh. The period to refresh1187    the whole frame is specified by V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD.1188    Note that if this control is not present, then it is undefined what1189    refresh type is used and it is up to the driver to decide.1190    Applicable to H264 and HEVC encoders. Possible values are:1191 1192.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|1193 1194.. flat-table::1195    :header-rows:  01196    :stub-columns: 01197 1198    * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM``1199      - The whole frame is completely refreshed randomly1200        after the specified period.1201    * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC``1202      - The whole frame MBs are completely refreshed in cyclic order1203        after the specified period.1204 1205``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (integer)``1206    Intra macroblock refresh period. This sets the period to refresh1207    the whole frame. In other words, this defines the number of frames1208    for which the whole frame will be intra-refreshed.  An example:1209    setting period to 1 means that the whole frame will be refreshed,1210    setting period to 2 means that the half of macroblocks will be1211    intra-refreshed on frameX and the other half of macroblocks1212    will be refreshed in frameX + 1 and so on. Setting the period to1213    zero means no period is specified.1214    Note that if the client sets this control to non zero value the1215    ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`` control shall be1216    ignored. Applicable to H264 and HEVC encoders.1217 1218``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``1219    Frame level rate control enable. If this control is disabled then1220    the quantization parameter for each frame type is constant and set1221    with appropriate controls (e.g.1222    ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is1223    enabled then quantization parameter is adjusted to meet the chosen1224    bitrate. Minimum and maximum value for the quantization parameter1225    can be set with appropriate controls (e.g.1226    ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.1227 1228``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``1229    Macroblock level rate control enable. Applicable to the MPEG4 and1230    H264 encoders.1231 1232``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``1233    Quarter pixel motion estimation for MPEG4. Applicable to the MPEG41234    encoder.1235 1236``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``1237    Quantization parameter for an I frame for H263. Valid range: from 11238    to 31.1239 1240``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``1241    Minimum quantization parameter for H263. Valid range: from 1 to 31.1242 1243``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``1244    Maximum quantization parameter for H263. Valid range: from 1 to 31.1245 1246``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``1247    Quantization parameter for an P frame for H263. Valid range: from 11248    to 31.1249 1250``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``1251    Quantization parameter for an B frame for H263. Valid range: from 11252    to 31.1253 1254``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``1255    Quantization parameter for an I frame for H264. Valid range: from 01256    to 51.1257 1258``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``1259    Minimum quantization parameter for H264. Valid range: from 0 to 51.1260 1261``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``1262    Maximum quantization parameter for H264. Valid range: from 0 to 51.1263 1264``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``1265    Quantization parameter for an P frame for H264. Valid range: from 01266    to 51.1267 1268``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``1269    Quantization parameter for an B frame for H264. Valid range: from 01270    to 51.1271 1272``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``1273    Minimum quantization parameter for the H264 I frame to limit I frame1274    quality to a range. Valid range: from 0 to 51. If1275    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter1276    should be chosen to meet both requirements.1277 1278``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``1279    Maximum quantization parameter for the H264 I frame to limit I frame1280    quality to a range. Valid range: from 0 to 51. If1281    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter1282    should be chosen to meet both requirements.1283 1284``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``1285    Minimum quantization parameter for the H264 P frame to limit P frame1286    quality to a range. Valid range: from 0 to 51. If1287    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter1288    should be chosen to meet both requirements.1289 1290``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``1291    Maximum quantization parameter for the H264 P frame to limit P frame1292    quality to a range. Valid range: from 0 to 51. If1293    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter1294    should be chosen to meet both requirements.1295 1296``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)``1297    Minimum quantization parameter for the H264 B frame to limit B frame1298    quality to a range. Valid range: from 0 to 51. If1299    V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter1300    should be chosen to meet both requirements.1301 1302``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)``1303    Maximum quantization parameter for the H264 B frame to limit B frame1304    quality to a range. Valid range: from 0 to 51. If1305    V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter1306    should be chosen to meet both requirements.1307 1308``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``1309    Quantization parameter for an I frame for MPEG4. Valid range: from 11310    to 31.1311 1312``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``1313    Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.1314 1315``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``1316    Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.1317 1318``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``1319    Quantization parameter for an P frame for MPEG4. Valid range: from 11320    to 31.1321 1322``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``1323    Quantization parameter for an B frame for MPEG4. Valid range: from 11324    to 31.1325 1326.. _v4l2-mpeg-video-vbv-size:1327 1328``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``1329    The Video Buffer Verifier size in kilobytes, it is used as a1330    limitation of frame skip. The VBV is defined in the standard as a1331    mean to verify that the produced stream will be successfully1332    decoded. The standard describes it as "Part of a hypothetical1333    decoder that is conceptually connected to the output of the encoder.1334    Its purpose is to provide a constraint on the variability of the1335    data rate that an encoder or editing process may produce.".1336    Applicable to the MPEG1, MPEG2, MPEG4 encoders.1337 1338.. _v4l2-mpeg-video-vbv-delay:1339 1340``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``1341    Sets the initial delay in milliseconds for VBV buffer control.1342 1343.. _v4l2-mpeg-video-hor-search-range:1344 1345``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``1346    Horizontal search range defines maximum horizontal search area in1347    pixels to search and match for the present Macroblock (MB) in the1348    reference picture. This V4L2 control macro is used to set horizontal1349    search range for motion estimation module in video encoder.1350 1351.. _v4l2-mpeg-video-vert-search-range:1352 1353``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``1354    Vertical search range defines maximum vertical search area in pixels1355    to search and match for the present Macroblock (MB) in the reference1356    picture. This V4L2 control macro is used to set vertical search1357    range for motion estimation module in video encoder.1358 1359.. _v4l2-mpeg-video-force-key-frame:1360 1361``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``1362    Force a key frame for the next queued buffer. Applicable to1363    encoders. This is a general, codec-agnostic keyframe control.1364 1365.. _v4l2-mpeg-video-h264-cpb-size:1366 1367``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``1368    The Coded Picture Buffer size in kilobytes, it is used as a1369    limitation of frame skip. The CPB is defined in the H264 standard as1370    a mean to verify that the produced stream will be successfully1371    decoded. Applicable to the H264 encoder.1372 1373``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``1374    Period between I-frames in the open GOP for H264. In case of an open1375    GOP this is the period between two I-frames. The period between IDR1376    (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE1377    control. An IDR frame, which stands for Instantaneous Decoding1378    Refresh is an I-frame after which no prior frames are referenced.1379    This means that a stream can be restarted from an IDR frame without1380    the need to store or decode any previous frames. Applicable to the1381    H264 encoder.1382 1383.. _v4l2-mpeg-video-header-mode:1384 1385``V4L2_CID_MPEG_VIDEO_HEADER_MODE``1386    (enum)1387 1388enum v4l2_mpeg_video_header_mode -1389    Determines whether the header is returned as the first buffer or is1390    it returned together with the first frame. Applicable to encoders.1391    Possible values are:1392 1393.. raw:: latex1394 1395    \small1396 1397.. tabularcolumns:: |p{10.3cm}|p{7.2cm}|1398 1399.. flat-table::1400    :header-rows:  01401    :stub-columns: 01402 1403    * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``1404      - The stream header is returned separately in the first buffer.1405    * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``1406      - The stream header is returned together with the first encoded1407	frame.1408 1409.. raw:: latex1410 1411    \normalsize1412 1413 1414``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``1415    Repeat the video sequence headers. Repeating these headers makes1416    random access to the video stream easier. Applicable to the MPEG1, 21417    and 4 encoder.1418 1419``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``1420    Enabled the deblocking post processing filter for MPEG4 decoder.1421    Applicable to the MPEG4 decoder.1422 1423``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``1424    vop_time_increment_resolution value for MPEG4. Applicable to the1425    MPEG4 encoder.1426 1427``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``1428    vop_time_increment value for MPEG4. Applicable to the MPEG41429    encoder.1430 1431``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``1432    Enable generation of frame packing supplemental enhancement1433    information in the encoded bitstream. The frame packing SEI message1434    contains the arrangement of L and R planes for 3D viewing.1435    Applicable to the H264 encoder.1436 1437``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``1438    Sets current frame as frame0 in frame packing SEI. Applicable to the1439    H264 encoder.1440 1441.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:1442 1443``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``1444    (enum)1445 1446enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -1447    Frame packing arrangement type for H264 SEI. Applicable to the H2641448    encoder. Possible values are:1449 1450.. raw:: latex1451 1452    \small1453 1454.. tabularcolumns:: |p{12cm}|p{5.5cm}|1455 1456.. flat-table::1457    :header-rows:  01458    :stub-columns: 01459 1460    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``1461      - Pixels are alternatively from L and R.1462    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``1463      - L and R are interlaced by column.1464    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``1465      - L and R are interlaced by row.1466    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``1467      - L is on the left, R on the right.1468    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``1469      - L is on top, R on bottom.1470    * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``1471      - One view per frame.1472 1473.. raw:: latex1474 1475    \normalsize1476 1477 1478 1479``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``1480    Enables flexible macroblock ordering in the encoded bitstream. It is1481    a technique used for restructuring the ordering of macroblocks in1482    pictures. Applicable to the H264 encoder.1483 1484.. _v4l2-mpeg-video-h264-fmo-map-type:1485 1486``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``1487   (enum)1488 1489enum v4l2_mpeg_video_h264_fmo_map_type -1490    When using FMO, the map type divides the image in different scan1491    patterns of macroblocks. Applicable to the H264 encoder. Possible1492    values are:1493 1494.. raw:: latex1495 1496    \small1497 1498.. tabularcolumns:: |p{12.5cm}|p{5.0cm}|1499 1500.. flat-table::1501    :header-rows:  01502    :stub-columns: 01503 1504    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``1505      - Slices are interleaved one after other with macroblocks in run1506	length order.1507    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``1508      - Scatters the macroblocks based on a mathematical function known to1509	both encoder and decoder.1510    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``1511      - Macroblocks arranged in rectangular areas or regions of interest.1512    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``1513      - Slice groups grow in a cyclic way from centre to outwards.1514    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``1515      - Slice groups grow in raster scan pattern from left to right.1516    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``1517      - Slice groups grow in wipe scan pattern from top to bottom.1518    * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``1519      - User defined map type.1520 1521.. raw:: latex1522 1523    \normalsize1524 1525 1526 1527``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``1528    Number of slice groups in FMO. Applicable to the H264 encoder.1529 1530.. _v4l2-mpeg-video-h264-fmo-change-direction:1531 1532``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``1533    (enum)1534 1535enum v4l2_mpeg_video_h264_fmo_change_dir -1536    Specifies a direction of the slice group change for raster and wipe1537    maps. Applicable to the H264 encoder. Possible values are:1538 1539.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|1540 1541.. flat-table::1542    :header-rows:  01543    :stub-columns: 01544 1545    * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``1546      - Raster scan or wipe right.1547    * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``1548      - Reverse raster scan or wipe left.1549 1550 1551 1552``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``1553    Specifies the size of the first slice group for raster and wipe map.1554    Applicable to the H264 encoder.1555 1556``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``1557    Specifies the number of consecutive macroblocks for the interleaved1558    map. Applicable to the H264 encoder.1559 1560``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``1561    Enables arbitrary slice ordering in encoded bitstream. Applicable to1562    the H264 encoder.1563 1564``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``1565    Specifies the slice order in ASO. Applicable to the H264 encoder.1566    The supplied 32-bit integer is interpreted as follows (bit 0 = least1567    significant bit):1568 1569 1570 1571.. flat-table::1572    :header-rows:  01573    :stub-columns: 01574 1575    * - Bit 0:151576      - Slice ID1577    * - Bit 16:321578      - Slice position or order1579 1580 1581 1582``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``1583    Enables H264 hierarchical coding. Applicable to the H264 encoder.1584 1585.. _v4l2-mpeg-video-h264-hierarchical-coding-type:1586 1587``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``1588    (enum)1589 1590enum v4l2_mpeg_video_h264_hierarchical_coding_type -1591    Specifies the hierarchical coding type. Applicable to the H2641592    encoder. Possible values are:1593 1594 1595 1596.. flat-table::1597    :header-rows:  01598    :stub-columns: 01599 1600    * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``1601      - Hierarchical B coding.1602    * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``1603      - Hierarchical P coding.1604 1605 1606 1607``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``1608    Specifies the number of hierarchical coding layers. Applicable to1609    the H264 encoder.1610 1611``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``1612    Specifies a user defined QP for each layer. Applicable to the H2641613    encoder. The supplied 32-bit integer is interpreted as follows (bit1614    0 = least significant bit):1615 1616 1617 1618.. flat-table::1619    :header-rows:  01620    :stub-columns: 01621 1622    * - Bit 0:151623      - QP value1624    * - Bit 16:321625      - Layer number1626 1627``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)``1628    Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder.1629 1630``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)``1631    Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder.1632 1633``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)``1634    Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder.1635 1636``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)``1637    Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder.1638 1639``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)``1640    Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder.1641 1642``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)``1643    Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder.1644 1645``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)``1646    Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder.1647 1648``V4L2_CID_FWHT_I_FRAME_QP (integer)``1649    Quantization parameter for an I frame for FWHT. Valid range: from 11650    to 31.1651 1652``V4L2_CID_FWHT_P_FRAME_QP (integer)``1653    Quantization parameter for a P frame for FWHT. Valid range: from 11654    to 31.1655 1656``V4L2_CID_MPEG_VIDEO_AVERAGE_QP (integer)``1657    This read-only control returns the average QP value of the currently1658    encoded frame. The value applies to the last dequeued capture buffer1659    (VIDIOC_DQBUF). Its valid range depends on the encoding format and parameters.1660    For H264, its valid range is from 0 to 51.1661    For HEVC, its valid range is from 0 to 51 for 8 bit and1662    from 0 to 63 for 10 bit.1663    For H263 and MPEG4, its valid range is from 1 to 31.1664    For VP8, its valid range is from 0 to 127.1665    For VP9, its valid range is from 0 to 255.1666    If the codec's MIN_QP and MAX_QP are set, then the QP will meet both requirements.1667    Codecs need to always use the specified range, rather then a HW custom range.1668    Applicable to encoders1669 1670.. raw:: latex1671 1672    \normalsize1673 1674 1675MFC 5.1 MPEG Controls1676=====================1677 1678The following MPEG class controls deal with MPEG decoding and encoding1679settings that are specific to the Multi Format Codec 5.1 device present1680in the S5P family of SoCs by Samsung.1681 1682 1683.. _mfc51-control-id:1684 1685MFC 5.1 Control IDs1686-------------------1687 1688``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``1689    If the display delay is enabled then the decoder is forced to return1690    a CAPTURE buffer (decoded frame) after processing a certain number1691    of OUTPUT buffers. The delay can be set through1692    ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This1693    feature can be used for example for generating thumbnails of videos.1694    Applicable to the H264 decoder.1695 1696    .. note::1697 1698       This control is deprecated. Use the standard1699       ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead.1700 1701``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``1702    Display delay value for H264 decoder. The decoder is forced to1703    return a decoded frame after the set 'display delay' number of1704    frames. If this number is low it may result in frames returned out1705    of display order, in addition the hardware may still be using the1706    returned buffer as a reference picture for subsequent frames.1707 1708    .. note::1709 1710       This control is deprecated. Use the standard1711       ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead.1712 1713``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``1714    The number of reference pictures used for encoding a P picture.1715    Applicable to the H264 encoder.1716 1717``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``1718    Padding enable in the encoder - use a color instead of repeating1719    border pixels. Applicable to encoders.1720 1721``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``1722    Padding color in the encoder. Applicable to encoders. The supplied1723    32-bit integer is interpreted as follows (bit 0 = least significant1724    bit):1725 1726 1727 1728.. flat-table::1729    :header-rows:  01730    :stub-columns: 01731 1732    * - Bit 0:71733      - V chrominance information1734    * - Bit 8:151735      - U chrominance information1736    * - Bit 16:231737      - Y luminance information1738    * - Bit 24:311739      - Must be zero.1740 1741 1742 1743``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``1744    Reaction coefficient for MFC rate control. Applicable to encoders.1745 1746    .. note::1747 1748       #. Valid only when the frame level RC is enabled.1749 1750       #. For tight CBR, this field must be small (ex. 2 ~ 10). For1751	  VBR, this field must be large (ex. 100 ~ 1000).1752 1753       #. It is not recommended to use the greater number than1754	  FRAME_RATE * (10^9 / BIT_RATE).1755 1756``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``1757    Adaptive rate control for dark region. Valid only when H.264 and1758    macroblock level RC is enabled1759    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H2641760    encoder.1761 1762``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``1763    Adaptive rate control for smooth region. Valid only when H.264 and1764    macroblock level RC is enabled1765    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H2641766    encoder.1767 1768``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``1769    Adaptive rate control for static region. Valid only when H.264 and1770    macroblock level RC is enabled1771    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H2641772    encoder.1773 1774``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``1775    Adaptive rate control for activity region. Valid only when H.264 and1776    macroblock level RC is enabled1777    (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H2641778    encoder.1779 1780.. _v4l2-mpeg-mfc51-video-frame-skip-mode:1781 1782``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``1783    (enum)1784 1785    .. note::1786 1787       This control is deprecated. Use the standard1788       ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead.1789 1790enum v4l2_mpeg_mfc51_video_frame_skip_mode -1791    Indicates in what conditions the encoder should skip frames. If1792    encoding a frame would cause the encoded stream to be larger then a1793    chosen data limit then the frame will be skipped. Possible values1794    are:1795 1796 1797.. tabularcolumns:: |p{9.4cm}|p{8.1cm}|1798 1799.. raw:: latex1800 1801    \small1802 1803.. flat-table::1804    :header-rows:  01805    :stub-columns: 01806 1807    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED``1808      - Frame skip mode is disabled.1809    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT``1810      - Frame skip mode enabled and buffer limit is set by the chosen1811	level and is defined by the standard.1812    * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT``1813      - Frame skip mode enabled and buffer limit is set by the VBV1814	(MPEG1/2/4) or CPB (H264) buffer size control.1815 1816.. raw:: latex1817 1818    \normalsize1819 1820``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``1821    Enable rate-control with fixed target bit. If this setting is1822    enabled, then the rate control logic of the encoder will calculate1823    the average bitrate for a GOP and keep it below or equal the set1824    bitrate target. Otherwise the rate control logic calculates the1825    overall average bitrate for the stream and keeps it below or equal1826    to the set bitrate. In the first case the average bitrate for the1827    whole stream will be smaller then the set bitrate. This is caused1828    because the average is calculated for smaller number of frames, on1829    the other hand enabling this setting will ensure that the stream1830    will meet tight bandwidth constraints. Applicable to encoders.1831 1832.. _v4l2-mpeg-mfc51-video-force-frame-type:1833 1834``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``1835    (enum)1836 1837enum v4l2_mpeg_mfc51_video_force_frame_type -1838    Force a frame type for the next queued buffer. Applicable to1839    encoders. Possible values are:1840 1841.. tabularcolumns:: |p{9.9cm}|p{7.6cm}|1842 1843.. flat-table::1844    :header-rows:  01845    :stub-columns: 01846 1847    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``1848      - Forcing a specific frame type disabled.1849    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``1850      - Force an I-frame.1851    * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``1852      - Force a non-coded frame.1853 1854 1855CX2341x MPEG Controls1856=====================1857 1858The following MPEG class controls deal with MPEG encoding settings that1859are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.1860 1861 1862.. _cx2341x-control-id:1863 1864CX2341x Control IDs1865-------------------1866 1867.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:1868 1869``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``1870    (enum)1871 1872enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -1873    Sets the Spatial Filter mode (default ``MANUAL``). Possible values1874    are:1875 1876 1877.. tabularcolumns:: |p{11.5cm}|p{6.0cm}|1878 1879.. flat-table::1880    :header-rows:  01881    :stub-columns: 01882 1883    * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``1884      - Choose the filter manually1885    * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``1886      - Choose the filter automatically1887 1888 1889 1890``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``1891    The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default1892    is 0.)1893 1894.. _luma-spatial-filter-type:1895 1896``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``1897    (enum)1898 1899enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -1900    Select the algorithm to use for the Luma Spatial Filter (default1901    ``1D_HOR``). Possible values:1902 1903.. tabularcolumns:: |p{13.1cm}|p{4.4cm}|1904 1905.. raw:: latex1906 1907    \footnotesize1908 1909.. flat-table::1910    :header-rows:  01911    :stub-columns: 01912 1913    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``1914      - No filter1915    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``1916      - One-dimensional horizontal1917    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``1918      - One-dimensional vertical1919    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``1920      - Two-dimensional separable1921    * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``1922      - Two-dimensional symmetrical non-separable1923 1924.. raw:: latex1925 1926    \normalsize1927 1928.. _chroma-spatial-filter-type:1929 1930``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``1931    (enum)1932 1933enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -1934    Select the algorithm for the Chroma Spatial Filter (default1935    ``1D_HOR``). Possible values are:1936 1937.. raw:: latex1938 1939    \footnotesize1940 1941.. tabularcolumns:: |p{11.0cm}|p{6.5cm}|1942 1943.. flat-table::1944    :header-rows:  01945    :stub-columns: 01946 1947    * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``1948      - No filter1949    * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``1950      - One-dimensional horizontal1951 1952.. raw:: latex1953 1954    \normalsize1955 1956.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:1957 1958``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``1959    (enum)1960 1961enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -1962    Sets the Temporal Filter mode (default ``MANUAL``). Possible values1963    are:1964 1965.. raw:: latex1966 1967    \footnotesize1968 1969.. flat-table::1970    :header-rows:  01971    :stub-columns: 01972 1973    * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``1974      - Choose the filter manually1975    * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``1976      - Choose the filter automatically1977 1978.. raw:: latex1979 1980    \normalsize1981 1982``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``1983    The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default1984    is 8 for full-scale capturing and 0 for scaled capturing.)1985 1986.. _v4l2-mpeg-cx2341x-video-median-filter-type:1987 1988``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``1989    (enum)1990 1991enum v4l2_mpeg_cx2341x_video_median_filter_type -1992    Median Filter Type (default ``OFF``). Possible values are:1993 1994 1995.. raw:: latex1996 1997    \small1998 1999.. tabularcolumns:: |p{11.0cm}|p{6.5cm}|2000 2001.. flat-table::2002    :header-rows:  02003    :stub-columns: 02004 2005    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``2006      - No filter2007    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``2008      - Horizontal filter2009    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``2010      - Vertical filter2011    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``2012      - Horizontal and vertical filter2013    * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``2014      - Diagonal filter2015 2016.. raw:: latex2017 2018    \normalsize2019 2020``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``2021    Threshold above which the luminance median filter is enabled2022    (default 0)2023 2024``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``2025    Threshold below which the luminance median filter is enabled2026    (default 255)2027 2028``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``2029    Threshold above which the chroma median filter is enabled (default2030    0)2031 2032``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``2033    Threshold below which the chroma median filter is enabled (default2034    255)2035 2036``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``2037    The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into2038    the stream between every four video frames. The packet size is 20482039    bytes, including the packet_start_code_prefix and stream_id2040    fields. The stream_id is 0xBF (private stream 2). The payload2041    consists of 0x00 bytes, to be filled in by the application. 0 = do2042    not insert, 1 = insert packets.2043 2044 2045VPX Control Reference2046=====================2047 2048The VPX controls include controls for encoding parameters of VPx video2049codec.2050 2051 2052.. _vpx-control-id:2053 2054VPX Control IDs2055---------------2056 2057.. _v4l2-vpx-num-partitions:2058 2059``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``2060    (enum)2061 2062enum v4l2_vp8_num_partitions -2063    The number of token partitions to use in VP8 encoder. Possible2064    values are:2065 2066 2067 2068.. flat-table::2069    :header-rows:  02070    :stub-columns: 02071 2072    * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``2073      - 1 coefficient partition2074    * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``2075      - 2 coefficient partitions2076    * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``2077      - 4 coefficient partitions2078    * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``2079      - 8 coefficient partitions2080 2081 2082 2083``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``2084    Setting this prevents intra 4x4 mode in the intra mode decision.2085 2086.. _v4l2-vpx-num-ref-frames:2087 2088``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``2089    (enum)2090 2091enum v4l2_vp8_num_ref_frames -2092    The number of reference pictures for encoding P frames. Possible2093    values are:2094 2095.. tabularcolumns:: |p{7.5cm}|p{7.5cm}|2096 2097.. raw:: latex2098 2099    \small2100 2101.. flat-table::2102    :header-rows:  02103    :stub-columns: 02104 2105    * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``2106      - Last encoded frame will be searched2107    * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``2108      - Two frames will be searched among the last encoded frame, the2109	golden frame and the alternate reference (altref) frame. The2110	encoder implementation will decide which two are chosen.2111    * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``2112      - The last encoded frame, the golden frame and the altref frame will2113	be searched.2114 2115.. raw:: latex2116 2117    \normalsize2118 2119 2120 2121``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``2122    Indicates the loop filter level. The adjustment of the loop filter2123    level is done via a delta value against a baseline loop filter2124    value.2125 2126``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``2127    This parameter affects the loop filter. Anything above zero weakens2128    the deblocking effect on the loop filter.2129 2130``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``2131    Sets the refresh period for the golden frame. The period is defined2132    in number of frames. For a value of 'n', every nth frame starting2133    from the first key frame will be taken as a golden frame. For eg.2134    for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden2135    frame refresh period is set as 4, the frames 0, 4, 8 etc will be2136    taken as the golden frames as frame 0 is always a key frame.2137 2138.. _v4l2-vpx-golden-frame-sel:2139 2140``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``2141    (enum)2142 2143enum v4l2_vp8_golden_frame_sel -2144    Selects the golden frame for encoding. Possible values are:2145 2146.. raw:: latex2147 2148    \scriptsize2149 2150.. tabularcolumns:: |p{8.6cm}|p{8.9cm}|2151 2152.. flat-table::2153    :header-rows:  02154    :stub-columns: 02155 2156    * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``2157      - Use the (n-2)th frame as a golden frame, current frame index being2158	'n'.2159    * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``2160      - Use the previous specific frame indicated by2161	``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a2162	golden frame.2163 2164.. raw:: latex2165 2166    \normalsize2167 2168 2169``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``2170    Minimum quantization parameter for VP8.2171 2172``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``2173    Maximum quantization parameter for VP8.2174 2175``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``2176    Quantization parameter for an I frame for VP8.2177 2178``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``2179    Quantization parameter for a P frame for VP8.2180 2181.. _v4l2-mpeg-video-vp8-profile:2182 2183``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``2184    (enum)2185 2186enum v4l2_mpeg_video_vp8_profile -2187    This control allows selecting the profile for VP8 encoder.2188    This is also used to enumerate supported profiles by VP8 encoder or decoder.2189    Possible values are:2190 2191.. flat-table::2192    :header-rows:  02193    :stub-columns: 02194 2195    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``2196      - Profile 02197    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``2198      - Profile 12199    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``2200      - Profile 22201    * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``2202      - Profile 32203 2204.. _v4l2-mpeg-video-vp9-profile:2205 2206``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``2207    (enum)2208 2209enum v4l2_mpeg_video_vp9_profile -2210    This control allows selecting the profile for VP9 encoder.2211    This is also used to enumerate supported profiles by VP9 encoder or decoder.2212    Possible values are:2213 2214.. flat-table::2215    :header-rows:  02216    :stub-columns: 02217 2218    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``2219      - Profile 02220    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``2221      - Profile 12222    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``2223      - Profile 22224    * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``2225      - Profile 32226 2227.. _v4l2-mpeg-video-vp9-level:2228 2229``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)``2230 2231enum v4l2_mpeg_video_vp9_level -2232    This control allows selecting the level for VP9 encoder.2233    This is also used to enumerate supported levels by VP9 encoder or decoder.2234    More information can be found at2235    `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are:2236 2237.. flat-table::2238    :header-rows:  02239    :stub-columns: 02240 2241    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0``2242      - Level 12243    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1``2244      - Level 1.12245    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0``2246      - Level 22247    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1``2248      - Level 2.12249    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0``2250      - Level 32251    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1``2252      - Level 3.12253    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0``2254      - Level 42255    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1``2256      - Level 4.12257    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0``2258      - Level 52259    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1``2260      - Level 5.12261    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2``2262      - Level 5.22263    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0``2264      - Level 62265    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1``2266      - Level 6.12267    * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2``2268      - Level 6.22269 2270 2271High Efficiency Video Coding (HEVC/H.265) Control Reference2272===========================================================2273 2274The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.2652275video codec.2276 2277 2278.. _hevc-control-id:2279 2280HEVC/H.265 Control IDs2281----------------------2282 2283``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``2284    Minimum quantization parameter for HEVC.2285    Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2286 2287``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``2288    Maximum quantization parameter for HEVC.2289    Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2290 2291``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``2292    Quantization parameter for an I frame for HEVC.2293    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2294    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2295 2296``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``2297    Quantization parameter for a P frame for HEVC.2298    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2299    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2300 2301``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``2302    Quantization parameter for a B frame for HEVC.2303    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2304    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2305 2306``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)``2307    Minimum quantization parameter for the HEVC I frame to limit I frame2308    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2309    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter2310    should be chosen to meet both requirements.2311 2312``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)``2313    Maximum quantization parameter for the HEVC I frame to limit I frame2314    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2315    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter2316    should be chosen to meet both requirements.2317 2318``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)``2319    Minimum quantization parameter for the HEVC P frame to limit P frame2320    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2321    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter2322    should be chosen to meet both requirements.2323 2324``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)``2325    Maximum quantization parameter for the HEVC P frame to limit P frame2326    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2327    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter2328    should be chosen to meet both requirements.2329 2330``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)``2331    Minimum quantization parameter for the HEVC B frame to limit B frame2332    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2333    If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter2334    should be chosen to meet both requirements.2335 2336``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)``2337    Maximum quantization parameter for the HEVC B frame to limit B frame2338    quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit.2339    If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter2340    should be chosen to meet both requirements.2341 2342``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``2343    HIERARCHICAL_QP allows the host to specify the quantization parameter2344    values for each temporal layer through HIERARCHICAL_QP_LAYER. This is2345    valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the2346    control value to 1 enables setting of the QP values for the layers.2347 2348.. _v4l2-hevc-hier-coding-type:2349 2350``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``2351    (enum)2352 2353enum v4l2_mpeg_video_hevc_hier_coding_type -2354    Selects the hierarchical coding type for encoding. Possible values are:2355 2356.. raw:: latex2357 2358    \footnotesize2359 2360.. tabularcolumns:: |p{8.2cm}|p{9.3cm}|2361 2362.. flat-table::2363    :header-rows:  02364    :stub-columns: 02365 2366    * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``2367      - Use the B frame for hierarchical coding.2368    * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``2369      - Use the P frame for hierarchical coding.2370 2371.. raw:: latex2372 2373    \normalsize2374 2375 2376``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``2377    Selects the hierarchical coding layer. In normal encoding2378    (non-hierarchial coding), it should be zero. Possible values are [0, 6].2379    0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING2380    LAYER 1 and so on.2381 2382``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``2383    Indicates quantization parameter for hierarchical coding layer 0.2384    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2385    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2386 2387``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``2388    Indicates quantization parameter for hierarchical coding layer 1.2389    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2390    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2391 2392``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``2393    Indicates quantization parameter for hierarchical coding layer 2.2394    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2395    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2396 2397``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``2398    Indicates quantization parameter for hierarchical coding layer 3.2399    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2400    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2401 2402``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``2403    Indicates quantization parameter for hierarchical coding layer 4.2404    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2405    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2406 2407``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``2408    Indicates quantization parameter for hierarchical coding layer 5.2409    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2410    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2411 2412``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``2413    Indicates quantization parameter for hierarchical coding layer 6.2414    Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,2415    V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].2416 2417.. _v4l2-hevc-profile:2418 2419``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``2420    (enum)2421 2422enum v4l2_mpeg_video_hevc_profile -2423    Select the desired profile for HEVC encoder.2424 2425.. raw:: latex2426 2427    \footnotesize2428 2429.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|2430 2431.. flat-table::2432    :header-rows:  02433    :stub-columns: 02434 2435    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``2436      - Main profile.2437    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``2438      - Main still picture profile.2439    * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``2440      - Main 10 profile.2441 2442.. raw:: latex2443 2444    \normalsize2445 2446 2447.. _v4l2-hevc-level:2448 2449``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``2450    (enum)2451 2452enum v4l2_mpeg_video_hevc_level -2453    Selects the desired level for HEVC encoder.2454 2455==================================	=========2456``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``	Level 1.02457``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``	Level 2.02458``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``	Level 2.12459``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``	Level 3.02460``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``	Level 3.12461``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``	Level 4.02462``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``	Level 4.12463``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``	Level 5.02464``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``	Level 5.12465``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``	Level 5.22466``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``	Level 6.02467``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``	Level 6.12468``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``	Level 6.22469==================================	=========2470 2471``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``2472    Indicates the number of evenly spaced subintervals, called ticks, within2473    one second. This is a 16 bit unsigned integer and has a maximum value up to2474    0xffff and a minimum value of 1.2475 2476.. _v4l2-hevc-tier:2477 2478``V4L2_CID_MPEG_VIDEO_HEVC_TIER``2479    (enum)2480 2481enum v4l2_mpeg_video_hevc_tier -2482    TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier2483    were made to deal with applications that differ in terms of maximum bit2484    rate. Setting the flag to 0 selects HEVC tier as Main tier and setting2485    this flag to 1 indicates High tier. High tier is for applications requiring2486    high bit rates.2487 2488==================================	==========2489``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``	Main tier.2490``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``	High tier.2491==================================	==========2492 2493 2494``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``2495    Selects HEVC maximum coding unit depth.2496 2497.. _v4l2-hevc-loop-filter-mode:2498 2499``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``2500    (enum)2501 2502enum v4l2_mpeg_video_hevc_loop_filter_mode -2503    Loop filter mode for HEVC encoder. Possible values are:2504 2505.. raw:: latex2506 2507    \footnotesize2508 2509.. tabularcolumns:: |p{12.1cm}|p{5.4cm}|2510 2511.. flat-table::2512    :header-rows:  02513    :stub-columns: 02514 2515    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``2516      - Loop filter is disabled.2517    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``2518      - Loop filter is enabled.2519    * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``2520      - Loop filter is disabled at the slice boundary.2521 2522.. raw:: latex2523 2524    \normalsize2525 2526 2527``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``2528    Selects HEVC loop filter beta offset. The valid range is [-6, +6].2529 2530``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``2531    Selects HEVC loop filter tc offset. The valid range is [-6, +6].2532 2533.. _v4l2-hevc-refresh-type:2534 2535``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``2536    (enum)2537 2538enum v4l2_mpeg_video_hevc_hier_refresh_type -2539    Selects refresh type for HEVC encoder.2540    Host has to specify the period into2541    V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.2542 2543.. raw:: latex2544 2545    \footnotesize2546 2547.. tabularcolumns:: |p{6.2cm}|p{11.3cm}|2548 2549.. flat-table::2550    :header-rows:  02551    :stub-columns: 02552 2553    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``2554      - Use the B frame for hierarchical coding.2555    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``2556      - Use CRA (Clean Random Access Unit) picture encoding.2557    * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``2558      - Use IDR (Instantaneous Decoding Refresh) picture encoding.2559 2560.. raw:: latex2561 2562    \normalsize2563 2564 2565``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``2566    Selects the refresh period for HEVC encoder.2567    This specifies the number of I pictures between two CRA/IDR pictures.2568    This is valid only if REFRESH_TYPE is not 0.2569 2570``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``2571    Indicates HEVC lossless encoding. Setting it to 0 disables lossless2572    encoding. Setting it to 1 enables lossless encoding.2573 2574``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``2575    Indicates constant intra prediction for HEVC encoder. Specifies the2576    constrained intra prediction in which intra largest coding unit (LCU)2577    prediction is performed by using residual data and decoded samples of2578    neighboring intra LCU only. Setting the value to 1 enables constant intra2579    prediction and setting the value to 0 disables constant intra prediction.2580 2581``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``2582    Indicates wavefront parallel processing for HEVC encoder. Setting it to 02583    disables the feature and setting it to 1 enables the wavefront parallel2584    processing.2585 2586``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``2587    Setting the value to 1 enables combination of P and B frame for HEVC2588    encoder.2589 2590``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``2591    Indicates temporal identifier for HEVC encoder which is enabled by2592    setting the value to 1.2593 2594``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``2595    Indicates bi-linear interpolation is conditionally used in the intra2596    prediction filtering process in the CVS when set to 1. Indicates bi-linear2597    interpolation is not used in the CVS when set to 0.2598 2599``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``2600    Indicates maximum number of merge candidate motion vectors.2601    Values are from 0 to 4.2602 2603``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``2604    Indicates temporal motion vector prediction for HEVC encoder. Setting it to2605    1 enables the prediction. Setting it to 0 disables the prediction.2606 2607``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``2608    Specifies if HEVC generates a stream with a size of the length field2609    instead of start code pattern. The size of the length field is configurable2610    through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting2611    the value to 0 disables encoding without startcode pattern. Setting the2612    value to 1 will enables encoding without startcode pattern.2613 2614.. _v4l2-hevc-size-of-length-field:2615 2616``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``2617(enum)2618 2619enum v4l2_mpeg_video_hevc_size_of_length_field -2620    Indicates the size of length field.2621    This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.2622 2623.. raw:: latex2624 2625    \footnotesize2626 2627.. tabularcolumns:: |p{5.5cm}|p{12.0cm}|2628 2629.. flat-table::2630    :header-rows:  02631    :stub-columns: 02632 2633    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``2634      - Generate start code pattern (Normal).2635    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``2636      - Generate size of length field instead of start code pattern and length is 1.2637    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``2638      - Generate size of length field instead of start code pattern and length is 2.2639    * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``2640      - Generate size of length field instead of start code pattern and length is 4.2641 2642.. raw:: latex2643 2644    \normalsize2645 2646``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``2647    Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.2648 2649``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``2650    Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.2651 2652``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``2653    Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.2654 2655``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``2656    Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.2657 2658``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``2659    Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.2660 2661``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``2662    Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.2663 2664``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``2665    Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.2666 2667``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``2668    Selects number of P reference pictures required for HEVC encoder.2669    P-Frame can use 1 or 2 frames for reference.2670 2671``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``2672    Indicates whether to generate SPS and PPS at every IDR. Setting it to 02673    disables generating SPS and PPS at every IDR. Setting it to one enables2674    generating SPS and PPS at every IDR.2675