1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2.. c:namespace:: V4L 3 4.. _codec-controls: 5 6*********************** 7Codec Control Reference 8*********************** 9 10Below all controls within the Codec control class are described. First 11the generic controls, then controls specific for certain hardware. 12 13.. note:: 14 15 These controls are applicable to all codecs and not just MPEG. The 16 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls 17 were originally made for MPEG codecs and later extended to cover all 18 encoding formats. 19 20 21Generic Codec Controls 22====================== 23 24 25.. _mpeg-control-id: 26 27Codec Control IDs 28----------------- 29 30``V4L2_CID_CODEC_CLASS (class)`` 31 The Codec class descriptor. Calling 32 :ref:`VIDIOC_QUERYCTRL` for this control will 33 return a description of this control class. This description can be 34 used as the caption of a Tab page in a GUI, for example. 35 36.. _v4l2-mpeg-stream-type: 37 38``V4L2_CID_MPEG_STREAM_TYPE`` 39 (enum) 40 41enum v4l2_mpeg_stream_type - 42 The MPEG-1, -2 or -4 output stream type. One cannot assume anything 43 here. Each hardware MPEG encoder tends to support different subsets 44 of the available MPEG stream types. This control is specific to 45 multiplexed MPEG streams. The currently defined stream types are: 46 47 48 49.. flat-table:: 50 :header-rows: 0 51 :stub-columns: 0 52 53 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS`` 54 - MPEG-2 program stream 55 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS`` 56 - MPEG-2 transport stream 57 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS`` 58 - MPEG-1 system stream 59 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD`` 60 - MPEG-2 DVD-compatible stream 61 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD`` 62 - MPEG-1 VCD-compatible stream 63 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD`` 64 - MPEG-2 SVCD-compatible stream 65 66 67 68``V4L2_CID_MPEG_STREAM_PID_PMT (integer)`` 69 Program Map Table Packet ID for the MPEG transport stream (default 70 16) 71 72``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)`` 73 Audio Packet ID for the MPEG transport stream (default 256) 74 75``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)`` 76 Video Packet ID for the MPEG transport stream (default 260) 77 78``V4L2_CID_MPEG_STREAM_PID_PCR (integer)`` 79 Packet ID for the MPEG transport stream carrying PCR fields (default 80 259) 81 82``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)`` 83 Audio ID for MPEG PES 84 85``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)`` 86 Video ID for MPEG PES 87 88.. _v4l2-mpeg-stream-vbi-fmt: 89 90``V4L2_CID_MPEG_STREAM_VBI_FMT`` 91 (enum) 92 93enum v4l2_mpeg_stream_vbi_fmt - 94 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into 95 the MPEG stream. This control selects whether VBI data should be 96 embedded, and if so, what embedding method should be used. The list 97 of possible VBI formats depends on the driver. The currently defined 98 VBI format types are: 99 100 101 102.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}| 103 104.. flat-table:: 105 :header-rows: 0 106 :stub-columns: 0 107 108 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE`` 109 - No VBI in the MPEG stream 110 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV`` 111 - VBI in private packets, IVTV format (documented in the kernel 112 sources in the file 113 ``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``) 114 115 116 117.. _v4l2-mpeg-audio-sampling-freq: 118 119``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ`` 120 (enum) 121 122enum v4l2_mpeg_audio_sampling_freq - 123 MPEG Audio sampling frequency. Possible values are: 124 125 126 127.. flat-table:: 128 :header-rows: 0 129 :stub-columns: 0 130 131 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100`` 132 - 44.1 kHz 133 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000`` 134 - 48 kHz 135 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000`` 136 - 32 kHz 137 138 139 140.. _v4l2-mpeg-audio-encoding: 141 142``V4L2_CID_MPEG_AUDIO_ENCODING`` 143 (enum) 144 145enum v4l2_mpeg_audio_encoding - 146 MPEG Audio encoding. This control is specific to multiplexed MPEG 147 streams. Possible values are: 148 149 150 151.. flat-table:: 152 :header-rows: 0 153 :stub-columns: 0 154 155 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1`` 156 - MPEG-1/2 Layer I encoding 157 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2`` 158 - MPEG-1/2 Layer II encoding 159 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3`` 160 - MPEG-1/2 Layer III encoding 161 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC`` 162 - MPEG-2/4 AAC (Advanced Audio Coding) 163 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3`` 164 - AC-3 aka ATSC A/52 encoding 165 166 167 168.. _v4l2-mpeg-audio-l1-bitrate: 169 170``V4L2_CID_MPEG_AUDIO_L1_BITRATE`` 171 (enum) 172 173enum v4l2_mpeg_audio_l1_bitrate - 174 MPEG-1/2 Layer I bitrate. Possible values are: 175 176 177 178.. flat-table:: 179 :header-rows: 0 180 :stub-columns: 0 181 182 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K`` 183 - 32 kbit/s 184 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K`` 185 - 64 kbit/s 186 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K`` 187 - 96 kbit/s 188 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K`` 189 - 128 kbit/s 190 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K`` 191 - 160 kbit/s 192 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K`` 193 - 192 kbit/s 194 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K`` 195 - 224 kbit/s 196 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K`` 197 - 256 kbit/s 198 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K`` 199 - 288 kbit/s 200 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K`` 201 - 320 kbit/s 202 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K`` 203 - 352 kbit/s 204 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K`` 205 - 384 kbit/s 206 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K`` 207 - 416 kbit/s 208 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K`` 209 - 448 kbit/s 210 211 212 213.. _v4l2-mpeg-audio-l2-bitrate: 214 215``V4L2_CID_MPEG_AUDIO_L2_BITRATE`` 216 (enum) 217 218enum v4l2_mpeg_audio_l2_bitrate - 219 MPEG-1/2 Layer II bitrate. Possible values are: 220 221 222 223.. flat-table:: 224 :header-rows: 0 225 :stub-columns: 0 226 227 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K`` 228 - 32 kbit/s 229 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K`` 230 - 48 kbit/s 231 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K`` 232 - 56 kbit/s 233 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K`` 234 - 64 kbit/s 235 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K`` 236 - 80 kbit/s 237 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K`` 238 - 96 kbit/s 239 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K`` 240 - 112 kbit/s 241 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K`` 242 - 128 kbit/s 243 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K`` 244 - 160 kbit/s 245 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K`` 246 - 192 kbit/s 247 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K`` 248 - 224 kbit/s 249 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K`` 250 - 256 kbit/s 251 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K`` 252 - 320 kbit/s 253 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K`` 254 - 384 kbit/s 255 256 257 258.. _v4l2-mpeg-audio-l3-bitrate: 259 260``V4L2_CID_MPEG_AUDIO_L3_BITRATE`` 261 (enum) 262 263enum v4l2_mpeg_audio_l3_bitrate - 264 MPEG-1/2 Layer III bitrate. Possible values are: 265 266 267 268.. flat-table:: 269 :header-rows: 0 270 :stub-columns: 0 271 272 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K`` 273 - 32 kbit/s 274 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K`` 275 - 40 kbit/s 276 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K`` 277 - 48 kbit/s 278 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K`` 279 - 56 kbit/s 280 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K`` 281 - 64 kbit/s 282 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K`` 283 - 80 kbit/s 284 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K`` 285 - 96 kbit/s 286 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K`` 287 - 112 kbit/s 288 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K`` 289 - 128 kbit/s 290 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K`` 291 - 160 kbit/s 292 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K`` 293 - 192 kbit/s 294 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K`` 295 - 224 kbit/s 296 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K`` 297 - 256 kbit/s 298 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K`` 299 - 320 kbit/s 300 301 302 303``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)`` 304 AAC bitrate in bits per second. 305 306.. _v4l2-mpeg-audio-ac3-bitrate: 307 308``V4L2_CID_MPEG_AUDIO_AC3_BITRATE`` 309 (enum) 310 311enum v4l2_mpeg_audio_ac3_bitrate - 312 AC-3 bitrate. Possible values are: 313 314 315 316.. flat-table:: 317 :header-rows: 0 318 :stub-columns: 0 319 320 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K`` 321 - 32 kbit/s 322 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K`` 323 - 40 kbit/s 324 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K`` 325 - 48 kbit/s 326 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K`` 327 - 56 kbit/s 328 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K`` 329 - 64 kbit/s 330 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K`` 331 - 80 kbit/s 332 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K`` 333 - 96 kbit/s 334 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K`` 335 - 112 kbit/s 336 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K`` 337 - 128 kbit/s 338 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K`` 339 - 160 kbit/s 340 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K`` 341 - 192 kbit/s 342 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K`` 343 - 224 kbit/s 344 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K`` 345 - 256 kbit/s 346 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K`` 347 - 320 kbit/s 348 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K`` 349 - 384 kbit/s 350 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K`` 351 - 448 kbit/s 352 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K`` 353 - 512 kbit/s 354 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K`` 355 - 576 kbit/s 356 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K`` 357 - 640 kbit/s 358 359 360 361.. _v4l2-mpeg-audio-mode: 362 363``V4L2_CID_MPEG_AUDIO_MODE`` 364 (enum) 365 366enum v4l2_mpeg_audio_mode - 367 MPEG Audio mode. Possible values are: 368 369 370 371.. flat-table:: 372 :header-rows: 0 373 :stub-columns: 0 374 375 * - ``V4L2_MPEG_AUDIO_MODE_STEREO`` 376 - Stereo 377 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO`` 378 - Joint Stereo 379 * - ``V4L2_MPEG_AUDIO_MODE_DUAL`` 380 - Bilingual 381 * - ``V4L2_MPEG_AUDIO_MODE_MONO`` 382 - Mono 383 384 385 386.. _v4l2-mpeg-audio-mode-extension: 387 388``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION`` 389 (enum) 390 391enum v4l2_mpeg_audio_mode_extension - 392 Joint Stereo audio mode extension. In Layer I and II they indicate 393 which subbands are in intensity stereo. All other subbands are coded 394 in stereo. Layer III is not (yet) supported. Possible values are: 395 396.. tabularcolumns:: |p{9.1cm}|p{8.4cm}| 397 398.. flat-table:: 399 :header-rows: 0 400 :stub-columns: 0 401 402 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4`` 403 - Subbands 4-31 in intensity stereo 404 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8`` 405 - Subbands 8-31 in intensity stereo 406 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12`` 407 - Subbands 12-31 in intensity stereo 408 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16`` 409 - Subbands 16-31 in intensity stereo 410 411 412 413.. _v4l2-mpeg-audio-emphasis: 414 415``V4L2_CID_MPEG_AUDIO_EMPHASIS`` 416 (enum) 417 418enum v4l2_mpeg_audio_emphasis - 419 Audio Emphasis. Possible values are: 420 421 422 423.. flat-table:: 424 :header-rows: 0 425 :stub-columns: 0 426 427 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE`` 428 - None 429 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS`` 430 - 50/15 microsecond emphasis 431 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17`` 432 - CCITT J.17 433 434 435 436.. _v4l2-mpeg-audio-crc: 437 438``V4L2_CID_MPEG_AUDIO_CRC`` 439 (enum) 440 441enum v4l2_mpeg_audio_crc - 442 CRC method. Possible values are: 443 444 445 446.. flat-table:: 447 :header-rows: 0 448 :stub-columns: 0 449 450 * - ``V4L2_MPEG_AUDIO_CRC_NONE`` 451 - None 452 * - ``V4L2_MPEG_AUDIO_CRC_CRC16`` 453 - 16 bit parity check 454 455 456 457``V4L2_CID_MPEG_AUDIO_MUTE (boolean)`` 458 Mutes the audio when capturing. This is not done by muting audio 459 hardware, which can still produce a slight hiss, but in the encoder 460 itself, guaranteeing a fixed and reproducible audio bitstream. 0 = 461 unmuted, 1 = muted. 462 463.. _v4l2-mpeg-audio-dec-playback: 464 465``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` 466 (enum) 467 468enum v4l2_mpeg_audio_dec_playback - 469 Determines how monolingual audio should be played back. Possible 470 values are: 471 472 473 474.. tabularcolumns:: |p{9.8cm}|p{7.7cm}| 475 476.. flat-table:: 477 :header-rows: 0 478 :stub-columns: 0 479 480 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO`` 481 - Automatically determines the best playback mode. 482 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO`` 483 - Stereo playback. 484 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT`` 485 - Left channel playback. 486 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT`` 487 - Right channel playback. 488 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO`` 489 - Mono playback. 490 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO`` 491 - Stereo playback with swapped left and right channels. 492 493 494 495.. _v4l2-mpeg-audio-dec-multilingual-playback: 496 497``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` 498 (enum) 499 500enum v4l2_mpeg_audio_dec_playback - 501 Determines how multilingual audio should be played back. 502 503.. _v4l2-mpeg-video-encoding: 504 505``V4L2_CID_MPEG_VIDEO_ENCODING`` 506 (enum) 507 508enum v4l2_mpeg_video_encoding - 509 MPEG Video encoding method. This control is specific to multiplexed 510 MPEG streams. Possible values are: 511 512 513 514.. flat-table:: 515 :header-rows: 0 516 :stub-columns: 0 517 518 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1`` 519 - MPEG-1 Video encoding 520 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2`` 521 - MPEG-2 Video encoding 522 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` 523 - MPEG-4 AVC (H.264) Video encoding 524 525 526 527.. _v4l2-mpeg-video-aspect: 528 529``V4L2_CID_MPEG_VIDEO_ASPECT`` 530 (enum) 531 532enum v4l2_mpeg_video_aspect - 533 Video aspect. Possible values are: 534 535 536 537.. flat-table:: 538 :header-rows: 0 539 :stub-columns: 0 540 541 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1`` 542 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3`` 543 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9`` 544 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100`` 545 546 547 548``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)`` 549 Number of B-Frames (default 2) 550 551``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)`` 552 GOP size (default 12) 553 554``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)`` 555 GOP closure (default 1) 556 557``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)`` 558 Enable 3:2 pulldown (default 0) 559 560.. _v4l2-mpeg-video-bitrate-mode: 561 562``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` 563 (enum) 564 565enum v4l2_mpeg_video_bitrate_mode - 566 Video bitrate mode. Possible values are: 567 568 569 570.. flat-table:: 571 :header-rows: 0 572 :stub-columns: 0 573 574 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR`` 575 - Variable bitrate 576 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`` 577 - Constant bitrate 578 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ`` 579 - Constant quality 580 581 582 583``V4L2_CID_MPEG_VIDEO_BITRATE (integer)`` 584 Average video bitrate in bits per second. 585 586``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)`` 587 Peak video bitrate in bits per second. Must be larger or equal to 588 the average video bitrate. It is ignored if the video bitrate mode 589 is set to constant bitrate. 590 591``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)`` 592 Constant quality level control. This control is applicable when 593 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is 594 ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100 595 where 1 indicates lowest quality and 100 indicates highest quality. 596 Encoder will decide the appropriate quantization parameter and 597 bitrate to produce requested frame quality. 598 599 600``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)`` 601 602enum v4l2_mpeg_video_frame_skip_mode - 603 Indicates in what conditions the encoder should skip frames. If 604 encoding a frame would cause the encoded stream to be larger then a 605 chosen data limit then the frame will be skipped. Possible values 606 are: 607 608 609.. tabularcolumns:: |p{8.2cm}|p{9.3cm}| 610 611.. raw:: latex 612 613 \small 614 615.. flat-table:: 616 :header-rows: 0 617 :stub-columns: 0 618 619 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED`` 620 - Frame skip mode is disabled. 621 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT`` 622 - Frame skip mode enabled and buffer limit is set by the chosen 623 level and is defined by the standard. 624 * - ``V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT`` 625 - Frame skip mode enabled and buffer limit is set by the 626 :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or 627 :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control. 628 629.. raw:: latex 630 631 \normalsize 632 633``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)`` 634 For every captured frame, skip this many subsequent frames (default 635 0). 636 637``V4L2_CID_MPEG_VIDEO_MUTE (boolean)`` 638 "Mutes" the video to a fixed color when capturing. This is useful 639 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 = 640 muted. 641 642``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)`` 643 Sets the "mute" color of the video. The supplied 32-bit integer is 644 interpreted as follows (bit 0 = least significant bit): 645 646 647 648.. flat-table:: 649 :header-rows: 0 650 :stub-columns: 0 651 652 * - Bit 0:7 653 - V chrominance information 654 * - Bit 8:15 655 - U chrominance information 656 * - Bit 16:23 657 - Y luminance information 658 * - Bit 24:31 659 - Must be zero. 660 661 662 663.. _v4l2-mpeg-video-dec-pts: 664 665``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)`` 666 This read-only control returns the 33-bit video Presentation Time 667 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the 668 currently displayed frame. This is the same PTS as is used in 669 :ref:`VIDIOC_DECODER_CMD`. 670 671.. _v4l2-mpeg-video-dec-frame: 672 673``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)`` 674 This read-only control returns the frame counter of the frame that 675 is currently displayed (decoded). This value is reset to 0 whenever 676 the decoder is started. 677 678``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)`` 679 This control sets the conceal color in YUV color space. It describes 680 the client preference of the error conceal color in case of an error 681 where the reference frame is missing. The decoder should fill the 682 reference buffer with the preferred color and use it for future 683 decoding. The control is using 16 bits per channel. 684 Applicable to decoders. 685 686.. flat-table:: 687 :header-rows: 0 688 :stub-columns: 0 689 690 * - 691 - 8bit format 692 - 10bit format 693 - 12bit format 694 * - Y luminance 695 - Bit 0:7 696 - Bit 0:9 697 - Bit 0:11 698 * - Cb chrominance 699 - Bit 16:23 700 - Bit 16:25 701 - Bit 16:27 702 * - Cr chrominance 703 - Bit 32:39 704 - Bit 32:41 705 - Bit 32:43 706 * - Must be zero 707 - Bit 48:63 708 - Bit 48:63 709 - Bit 48:63 710 711``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)`` 712 If enabled the decoder expects to receive a single slice per buffer, 713 otherwise the decoder expects a single frame in per buffer. 714 Applicable to the decoder, all codecs. 715 716``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)`` 717 If the display delay is enabled then the decoder is forced to return 718 a CAPTURE buffer (decoded frame) after processing a certain number 719 of OUTPUT buffers. The delay can be set through 720 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This 721 feature can be used for example for generating thumbnails of videos. 722 Applicable to the decoder. 723 724``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)`` 725 Display delay value for decoder. The decoder is forced to 726 return a decoded frame after the set 'display delay' number of 727 frames. If this number is low it may result in frames returned out 728 of display order, in addition the hardware may still be using the 729 returned buffer as a reference picture for subsequent frames. 730 731``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)`` 732 If enabled then, AUD (Access Unit Delimiter) NALUs will be generated. 733 That could be useful to find the start of a frame without having to 734 fully parse each NALU. Applicable to the H264 and HEVC encoders. 735 736``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)`` 737 Enable writing sample aspect ratio in the Video Usability 738 Information. Applicable to the H264 encoder. 739 740``V4L2_CID_MPEG_VIDEO_BACKGROUND_DETECTION (boolean)`` 741 If enabled, the encoder detect a background region in frame and 742 use low bits or skip mode to encode the background region. 743 If a lot of scenes are stationary or background, It may help to 744 reduce the video bitrate. Applicable to the encoder. 745 746.. _v4l2-mpeg-video-h264-vui-sar-idc: 747 748``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC`` 749 (enum) 750 751enum v4l2_mpeg_video_h264_vui_sar_idc - 752 VUI sample aspect ratio indicator for H.264 encoding. The value is 753 defined in the table E-1 in the standard. Applicable to the H264 754 encoder. 755 756 757 758.. flat-table:: 759 :header-rows: 0 760 :stub-columns: 0 761 762 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED`` 763 - Unspecified 764 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1`` 765 - 1x1 766 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11`` 767 - 12x11 768 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11`` 769 - 10x11 770 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11`` 771 - 16x11 772 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33`` 773 - 40x33 774 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11`` 775 - 24x11 776 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11`` 777 - 20x11 778 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11`` 779 - 32x11 780 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33`` 781 - 80x33 782 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11`` 783 - 18x11 784 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11`` 785 - 15x11 786 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33`` 787 - 64x33 788 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99`` 789 - 160x99 790 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3`` 791 - 4x3 792 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2`` 793 - 3x2 794 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1`` 795 - 2x1 796 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED`` 797 - Extended SAR 798 799 800 801``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)`` 802 Extended sample aspect ratio width for H.264 VUI encoding. 803 Applicable to the H264 encoder. 804 805``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)`` 806 Extended sample aspect ratio height for H.264 VUI encoding. 807 Applicable to the H264 encoder. 808 809.. _v4l2-mpeg-video-h264-level: 810 811``V4L2_CID_MPEG_VIDEO_H264_LEVEL`` 812 (enum) 813 814enum v4l2_mpeg_video_h264_level - 815 The level information for the H264 video elementary stream. 816 Applicable to the H264 encoder. Possible values are: 817 818 819 820.. flat-table:: 821 :header-rows: 0 822 :stub-columns: 0 823 824 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0`` 825 - Level 1.0 826 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B`` 827 - Level 1B 828 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1`` 829 - Level 1.1 830 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2`` 831 - Level 1.2 832 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3`` 833 - Level 1.3 834 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0`` 835 - Level 2.0 836 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1`` 837 - Level 2.1 838 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2`` 839 - Level 2.2 840 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0`` 841 - Level 3.0 842 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1`` 843 - Level 3.1 844 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2`` 845 - Level 3.2 846 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0`` 847 - Level 4.0 848 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1`` 849 - Level 4.1 850 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2`` 851 - Level 4.2 852 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0`` 853 - Level 5.0 854 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1`` 855 - Level 5.1 856 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2`` 857 - Level 5.2 858 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0`` 859 - Level 6.0 860 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1`` 861 - Level 6.1 862 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2`` 863 - Level 6.2 864 865 866 867.. _v4l2-mpeg-video-mpeg2-level: 868 869``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL`` 870 (enum) 871 872enum v4l2_mpeg_video_mpeg2_level - 873 The level information for the MPEG2 elementary stream. Applicable to 874 MPEG2 codecs. Possible values are: 875 876 877 878.. flat-table:: 879 :header-rows: 0 880 :stub-columns: 0 881 882 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW`` 883 - Low Level (LL) 884 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN`` 885 - Main Level (ML) 886 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440`` 887 - High-1440 Level (H-14) 888 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH`` 889 - High Level (HL) 890 891 892 893.. _v4l2-mpeg-video-mpeg4-level: 894 895``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL`` 896 (enum) 897 898enum v4l2_mpeg_video_mpeg4_level - 899 The level information for the MPEG4 elementary stream. Applicable to 900 the MPEG4 encoder. Possible values are: 901 902 903 904.. flat-table:: 905 :header-rows: 0 906 :stub-columns: 0 907 908 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0`` 909 - Level 0 910 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B`` 911 - Level 0b 912 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1`` 913 - Level 1 914 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2`` 915 - Level 2 916 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3`` 917 - Level 3 918 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B`` 919 - Level 3b 920 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4`` 921 - Level 4 922 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5`` 923 - Level 5 924 925 926 927.. _v4l2-mpeg-video-h264-profile: 928 929``V4L2_CID_MPEG_VIDEO_H264_PROFILE`` 930 (enum) 931 932enum v4l2_mpeg_video_h264_profile - 933 The profile information for H264. Applicable to the H264 encoder. 934 Possible values are: 935 936.. raw:: latex 937 938 \small 939 940.. tabularcolumns:: |p{10.2cm}|p{7.3cm}| 941 942.. flat-table:: 943 :header-rows: 0 944 :stub-columns: 0 945 946 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE`` 947 - Baseline profile 948 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE`` 949 - Constrained Baseline profile 950 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN`` 951 - Main profile 952 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED`` 953 - Extended profile 954 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH`` 955 - High profile 956 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10`` 957 - High 10 profile 958 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422`` 959 - High 422 profile 960 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE`` 961 - High 444 Predictive profile 962 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA`` 963 - High 10 Intra profile 964 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA`` 965 - High 422 Intra profile 966 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA`` 967 - High 444 Intra profile 968 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA`` 969 - CAVLC 444 Intra profile 970 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE`` 971 - Scalable Baseline profile 972 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH`` 973 - Scalable High profile 974 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA`` 975 - Scalable High Intra profile 976 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH`` 977 - Stereo High profile 978 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH`` 979 - Multiview High profile 980 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH`` 981 - Constrained High profile 982 983.. raw:: latex 984 985 \normalsize 986 987.. _v4l2-mpeg-video-mpeg2-profile: 988 989``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE`` 990 (enum) 991 992enum v4l2_mpeg_video_mpeg2_profile - 993 The profile information for MPEG2. Applicable to MPEG2 codecs. 994 Possible values are: 995 996.. raw:: latex 997 998 \small 999 1000.. tabularcolumns:: |p{10.2cm}|p{7.3cm}| 1001 1002.. flat-table:: 1003 :header-rows: 0 1004 :stub-columns: 0 1005 1006 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE`` 1007 - Simple profile (SP) 1008 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN`` 1009 - Main profile (MP) 1010 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE`` 1011 - SNR Scalable profile (SNR) 1012 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE`` 1013 - Spatially Scalable profile (Spt) 1014 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH`` 1015 - High profile (HP) 1016 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW`` 1017 - Multi-view profile (MVP) 1018 1019 1020.. raw:: latex 1021 1022 \normalsize 1023 1024.. _v4l2-mpeg-video-mpeg4-profile: 1025 1026``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE`` 1027 (enum) 1028 1029enum v4l2_mpeg_video_mpeg4_profile - 1030 The profile information for MPEG4. Applicable to the MPEG4 encoder. 1031 Possible values are: 1032 1033.. raw:: latex 1034 1035 \small 1036 1037.. tabularcolumns:: |p{11.8cm}|p{5.7cm}| 1038 1039.. flat-table:: 1040 :header-rows: 0 1041 :stub-columns: 0 1042 1043 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE`` 1044 - Simple profile 1045 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE`` 1046 - Advanced Simple profile 1047 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE`` 1048 - Core profile 1049 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE`` 1050 - Simple Scalable profile 1051 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY`` 1052 - Advanced Coding Efficiency profile 1053 1054.. raw:: latex 1055 1056 \normalsize 1057 1058``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)`` 1059 The maximum number of reference pictures used for encoding. 1060 Applicable to the encoder. 1061 1062.. _v4l2-mpeg-video-multi-slice-mode: 1063 1064``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` 1065 (enum) 1066 1067enum v4l2_mpeg_video_multi_slice_mode - 1068 Determines how the encoder should handle division of frame into 1069 slices. Applicable to the encoder. Possible values are: 1070 1071 1072 1073.. tabularcolumns:: |p{9.6cm}|p{7.9cm}| 1074 1075.. flat-table:: 1076 :header-rows: 0 1077 :stub-columns: 0 1078 1079 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE`` 1080 - Single slice per frame. 1081 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB`` 1082 - Multiple slices with set maximum number of macroblocks per slice. 1083 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES`` 1084 - Multiple slice with set maximum size in bytes per slice. 1085 1086 1087 1088``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)`` 1089 The maximum number of macroblocks in a slice. Used when 1090 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to 1091 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the 1092 encoder. 1093 1094``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)`` 1095 The maximum size of a slice in bytes. Used when 1096 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to 1097 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the 1098 encoder. 1099 1100.. _v4l2-mpeg-video-h264-loop-filter-mode: 1101 1102``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE`` 1103 (enum) 1104 1105enum v4l2_mpeg_video_h264_loop_filter_mode - 1106 Loop filter mode for H264 encoder. Possible values are: 1107 1108.. raw:: latex 1109 1110 \small 1111 1112.. tabularcolumns:: |p{13.5cm}|p{4.0cm}| 1113 1114.. flat-table:: 1115 :header-rows: 0 1116 :stub-columns: 0 1117 1118 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED`` 1119 - Loop filter is enabled. 1120 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED`` 1121 - Loop filter is disabled. 1122 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` 1123 - Loop filter is disabled at the slice boundary. 1124 1125.. raw:: latex 1126 1127 \normalsize 1128 1129 1130``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)`` 1131 Loop filter alpha coefficient, defined in the H264 standard. 1132 This value corresponds to the slice_alpha_c0_offset_div2 slice header 1133 field, and should be in the range of -6 to +6, inclusive. The actual alpha 1134 offset FilterOffsetA is twice this value. 1135 Applicable to the H264 encoder. 1136 1137``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)`` 1138 Loop filter beta coefficient, defined in the H264 standard. 1139 This corresponds to the slice_beta_offset_div2 slice header field, and 1140 should be in the range of -6 to +6, inclusive. The actual beta offset 1141 FilterOffsetB is twice this value. 1142 Applicable to the H264 encoder. 1143 1144.. _v4l2-mpeg-video-h264-entropy-mode: 1145 1146``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE`` 1147 (enum) 1148 1149enum v4l2_mpeg_video_h264_entropy_mode - 1150 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264 1151 encoder. Possible values are: 1152 1153 1154.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| 1155 1156 1157.. flat-table:: 1158 :header-rows: 0 1159 :stub-columns: 0 1160 1161 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC`` 1162 - Use CAVLC entropy coding. 1163 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC`` 1164 - Use CABAC entropy coding. 1165 1166 1167 1168``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)`` 1169 Enable 8X8 transform for H264. Applicable to the H264 encoder. 1170 1171``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)`` 1172 Enable constrained intra prediction for H264. Applicable to the H264 1173 encoder. 1174 1175``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)`` 1176 Specify the offset that should be added to the luma quantization 1177 parameter to determine the chroma quantization parameter. Applicable 1178 to the H264 encoder. 1179 1180``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)`` 1181 Cyclic intra macroblock refresh. This is the number of continuous 1182 macroblocks refreshed every frame. Each frame a successive set of 1183 macroblocks is refreshed until the cycle completes and starts from 1184 the top of the frame. Setting this control to zero means that 1185 macroblocks will not be refreshed. Note that this control will not 1186 take effect when ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`` control 1187 is set to non zero value. 1188 Applicable to H264, H263 and MPEG4 encoder. 1189 1190``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (enum)`` 1191 1192enum v4l2_mpeg_video_intra_refresh_period_type - 1193 Sets the type of intra refresh. The period to refresh 1194 the whole frame is specified by V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD. 1195 Note that if this control is not present, then it is undefined what 1196 refresh type is used and it is up to the driver to decide. 1197 Applicable to H264 and HEVC encoders. Possible values are: 1198 1199.. tabularcolumns:: |p{9.6cm}|p{7.9cm}| 1200 1201.. flat-table:: 1202 :header-rows: 0 1203 :stub-columns: 0 1204 1205 * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM`` 1206 - The whole frame is completely refreshed randomly 1207 after the specified period. 1208 * - ``V4L2_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC`` 1209 - The whole frame MBs are completely refreshed in cyclic order 1210 after the specified period. 1211 1212``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (integer)`` 1213 Intra macroblock refresh period. This sets the period to refresh 1214 the whole frame. In other words, this defines the number of frames 1215 for which the whole frame will be intra-refreshed. An example: 1216 setting period to 1 means that the whole frame will be refreshed, 1217 setting period to 2 means that the half of macroblocks will be 1218 intra-refreshed on frameX and the other half of macroblocks 1219 will be refreshed in frameX + 1 and so on. Setting the period to 1220 zero means no period is specified. 1221 Note that if the client sets this control to non zero value the 1222 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`` control shall be 1223 ignored. Applicable to H264 and HEVC encoders. 1224 1225``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)`` 1226 Frame level rate control enable. If this control is disabled then 1227 the quantization parameter for each frame type is constant and set 1228 with appropriate controls (e.g. 1229 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is 1230 enabled then quantization parameter is adjusted to meet the chosen 1231 bitrate. Minimum and maximum value for the quantization parameter 1232 can be set with appropriate controls (e.g. 1233 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders. 1234 1235``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)`` 1236 Macroblock level rate control enable. Applicable to the MPEG4 and 1237 H264 encoders. 1238 1239``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)`` 1240 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4 1241 encoder. 1242 1243``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)`` 1244 Quantization parameter for an I frame for H263. Valid range: from 1 1245 to 31. 1246 1247``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)`` 1248 Minimum quantization parameter for H263. Valid range: from 1 to 31. 1249 1250``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)`` 1251 Maximum quantization parameter for H263. Valid range: from 1 to 31. 1252 1253``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)`` 1254 Quantization parameter for an P frame for H263. Valid range: from 1 1255 to 31. 1256 1257``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)`` 1258 Quantization parameter for an B frame for H263. Valid range: from 1 1259 to 31. 1260 1261``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)`` 1262 Quantization parameter for an I frame for H264. Valid range: from 0 1263 to 51. 1264 1265``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)`` 1266 Minimum quantization parameter for H264. Valid range: from 0 to 51. 1267 1268``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)`` 1269 Maximum quantization parameter for H264. Valid range: from 0 to 51. 1270 1271``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)`` 1272 Quantization parameter for an P frame for H264. Valid range: from 0 1273 to 51. 1274 1275``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)`` 1276 Quantization parameter for an B frame for H264. Valid range: from 0 1277 to 51. 1278 1279``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)`` 1280 Minimum quantization parameter for the H264 I frame to limit I frame 1281 quality to a range. Valid range: from 0 to 51. If 1282 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1283 should be chosen to meet both requirements. 1284 1285``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)`` 1286 Maximum quantization parameter for the H264 I frame to limit I frame 1287 quality to a range. Valid range: from 0 to 51. If 1288 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1289 should be chosen to meet both requirements. 1290 1291``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)`` 1292 Minimum quantization parameter for the H264 P frame to limit P frame 1293 quality to a range. Valid range: from 0 to 51. If 1294 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1295 should be chosen to meet both requirements. 1296 1297``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)`` 1298 Maximum quantization parameter for the H264 P frame to limit P frame 1299 quality to a range. Valid range: from 0 to 51. If 1300 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1301 should be chosen to meet both requirements. 1302 1303``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)`` 1304 Minimum quantization parameter for the H264 B frame to limit B frame 1305 quality to a range. Valid range: from 0 to 51. If 1306 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1307 should be chosen to meet both requirements. 1308 1309``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)`` 1310 Maximum quantization parameter for the H264 B frame to limit B frame 1311 quality to a range. Valid range: from 0 to 51. If 1312 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1313 should be chosen to meet both requirements. 1314 1315``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)`` 1316 Quantization parameter for an I frame for MPEG4. Valid range: from 1 1317 to 31. 1318 1319``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)`` 1320 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31. 1321 1322``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)`` 1323 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31. 1324 1325``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)`` 1326 Quantization parameter for an P frame for MPEG4. Valid range: from 1 1327 to 31. 1328 1329``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)`` 1330 Quantization parameter for an B frame for MPEG4. Valid range: from 1 1331 to 31. 1332 1333.. _v4l2-mpeg-video-vbv-size: 1334 1335``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)`` 1336 The Video Buffer Verifier size in kilobytes, it is used as a 1337 limitation of frame skip. The VBV is defined in the standard as a 1338 mean to verify that the produced stream will be successfully 1339 decoded. The standard describes it as "Part of a hypothetical 1340 decoder that is conceptually connected to the output of the encoder. 1341 Its purpose is to provide a constraint on the variability of the 1342 data rate that an encoder or editing process may produce.". 1343 Applicable to the MPEG1, MPEG2, MPEG4 encoders. 1344 1345.. _v4l2-mpeg-video-vbv-delay: 1346 1347``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)`` 1348 Sets the initial delay in milliseconds for VBV buffer control. 1349 1350.. _v4l2-mpeg-video-hor-search-range: 1351 1352``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)`` 1353 Horizontal search range defines maximum horizontal search area in 1354 pixels to search and match for the present Macroblock (MB) in the 1355 reference picture. This V4L2 control macro is used to set horizontal 1356 search range for motion estimation module in video encoder. 1357 1358.. _v4l2-mpeg-video-vert-search-range: 1359 1360``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)`` 1361 Vertical search range defines maximum vertical search area in pixels 1362 to search and match for the present Macroblock (MB) in the reference 1363 picture. This V4L2 control macro is used to set vertical search 1364 range for motion estimation module in video encoder. 1365 1366.. _v4l2-mpeg-video-force-key-frame: 1367 1368``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)`` 1369 Force a key frame for the next queued buffer. Applicable to 1370 encoders. This is a general, codec-agnostic keyframe control. 1371 1372.. _v4l2-mpeg-video-h264-cpb-size: 1373 1374``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)`` 1375 The Coded Picture Buffer size in kilobytes, it is used as a 1376 limitation of frame skip. The CPB is defined in the H264 standard as 1377 a mean to verify that the produced stream will be successfully 1378 decoded. Applicable to the H264 encoder. 1379 1380``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)`` 1381 Period between I-frames in the open GOP for H264. In case of an open 1382 GOP this is the period between two I-frames. The period between IDR 1383 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE 1384 control. An IDR frame, which stands for Instantaneous Decoding 1385 Refresh is an I-frame after which no prior frames are referenced. 1386 This means that a stream can be restarted from an IDR frame without 1387 the need to store or decode any previous frames. Applicable to the 1388 H264 encoder. 1389 1390.. _v4l2-mpeg-video-header-mode: 1391 1392``V4L2_CID_MPEG_VIDEO_HEADER_MODE`` 1393 (enum) 1394 1395enum v4l2_mpeg_video_header_mode - 1396 Determines whether the header is returned as the first buffer or is 1397 it returned together with the first frame. Applicable to encoders. 1398 Possible values are: 1399 1400.. raw:: latex 1401 1402 \small 1403 1404.. tabularcolumns:: |p{10.3cm}|p{7.2cm}| 1405 1406.. flat-table:: 1407 :header-rows: 0 1408 :stub-columns: 0 1409 1410 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE`` 1411 - The stream header is returned separately in the first buffer. 1412 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME`` 1413 - The stream header is returned together with the first encoded 1414 frame. 1415 1416.. raw:: latex 1417 1418 \normalsize 1419 1420 1421``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)`` 1422 Repeat the video sequence headers. Repeating these headers makes 1423 random access to the video stream easier. Applicable to the MPEG1, 2 1424 and 4 encoder. 1425 1426``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)`` 1427 Enabled the deblocking post processing filter for MPEG4 decoder. 1428 Applicable to the MPEG4 decoder. 1429 1430``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)`` 1431 vop_time_increment_resolution value for MPEG4. Applicable to the 1432 MPEG4 encoder. 1433 1434``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)`` 1435 vop_time_increment value for MPEG4. Applicable to the MPEG4 1436 encoder. 1437 1438``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)`` 1439 Enable generation of frame packing supplemental enhancement 1440 information in the encoded bitstream. The frame packing SEI message 1441 contains the arrangement of L and R planes for 3D viewing. 1442 Applicable to the H264 encoder. 1443 1444``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)`` 1445 Sets current frame as frame0 in frame packing SEI. Applicable to the 1446 H264 encoder. 1447 1448.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type: 1449 1450``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE`` 1451 (enum) 1452 1453enum v4l2_mpeg_video_h264_sei_fp_arrangement_type - 1454 Frame packing arrangement type for H264 SEI. Applicable to the H264 1455 encoder. Possible values are: 1456 1457.. raw:: latex 1458 1459 \small 1460 1461.. tabularcolumns:: |p{12cm}|p{5.5cm}| 1462 1463.. flat-table:: 1464 :header-rows: 0 1465 :stub-columns: 0 1466 1467 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD`` 1468 - Pixels are alternatively from L and R. 1469 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN`` 1470 - L and R are interlaced by column. 1471 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW`` 1472 - L and R are interlaced by row. 1473 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE`` 1474 - L is on the left, R on the right. 1475 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM`` 1476 - L is on top, R on bottom. 1477 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL`` 1478 - One view per frame. 1479 1480.. raw:: latex 1481 1482 \normalsize 1483 1484 1485 1486``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)`` 1487 Enables flexible macroblock ordering in the encoded bitstream. It is 1488 a technique used for restructuring the ordering of macroblocks in 1489 pictures. Applicable to the H264 encoder. 1490 1491.. _v4l2-mpeg-video-h264-fmo-map-type: 1492 1493``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE`` 1494 (enum) 1495 1496enum v4l2_mpeg_video_h264_fmo_map_type - 1497 When using FMO, the map type divides the image in different scan 1498 patterns of macroblocks. Applicable to the H264 encoder. Possible 1499 values are: 1500 1501.. raw:: latex 1502 1503 \small 1504 1505.. tabularcolumns:: |p{12.5cm}|p{5.0cm}| 1506 1507.. flat-table:: 1508 :header-rows: 0 1509 :stub-columns: 0 1510 1511 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES`` 1512 - Slices are interleaved one after other with macroblocks in run 1513 length order. 1514 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES`` 1515 - Scatters the macroblocks based on a mathematical function known to 1516 both encoder and decoder. 1517 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER`` 1518 - Macroblocks arranged in rectangular areas or regions of interest. 1519 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT`` 1520 - Slice groups grow in a cyclic way from centre to outwards. 1521 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN`` 1522 - Slice groups grow in raster scan pattern from left to right. 1523 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN`` 1524 - Slice groups grow in wipe scan pattern from top to bottom. 1525 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT`` 1526 - User defined map type. 1527 1528.. raw:: latex 1529 1530 \normalsize 1531 1532 1533 1534``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)`` 1535 Number of slice groups in FMO. Applicable to the H264 encoder. 1536 1537.. _v4l2-mpeg-video-h264-fmo-change-direction: 1538 1539``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION`` 1540 (enum) 1541 1542enum v4l2_mpeg_video_h264_fmo_change_dir - 1543 Specifies a direction of the slice group change for raster and wipe 1544 maps. Applicable to the H264 encoder. Possible values are: 1545 1546.. tabularcolumns:: |p{9.6cm}|p{7.9cm}| 1547 1548.. flat-table:: 1549 :header-rows: 0 1550 :stub-columns: 0 1551 1552 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT`` 1553 - Raster scan or wipe right. 1554 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT`` 1555 - Reverse raster scan or wipe left. 1556 1557 1558 1559``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)`` 1560 Specifies the size of the first slice group for raster and wipe map. 1561 Applicable to the H264 encoder. 1562 1563``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)`` 1564 Specifies the number of consecutive macroblocks for the interleaved 1565 map. Applicable to the H264 encoder. 1566 1567``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)`` 1568 Enables arbitrary slice ordering in encoded bitstream. Applicable to 1569 the H264 encoder. 1570 1571``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)`` 1572 Specifies the slice order in ASO. Applicable to the H264 encoder. 1573 The supplied 32-bit integer is interpreted as follows (bit 0 = least 1574 significant bit): 1575 1576 1577 1578.. flat-table:: 1579 :header-rows: 0 1580 :stub-columns: 0 1581 1582 * - Bit 0:15 1583 - Slice ID 1584 * - Bit 16:32 1585 - Slice position or order 1586 1587 1588 1589``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)`` 1590 Enables H264 hierarchical coding. Applicable to the H264 encoder. 1591 1592.. _v4l2-mpeg-video-h264-hierarchical-coding-type: 1593 1594``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE`` 1595 (enum) 1596 1597enum v4l2_mpeg_video_h264_hierarchical_coding_type - 1598 Specifies the hierarchical coding type. Applicable to the H264 1599 encoder. Possible values are: 1600 1601 1602 1603.. flat-table:: 1604 :header-rows: 0 1605 :stub-columns: 0 1606 1607 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B`` 1608 - Hierarchical B coding. 1609 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P`` 1610 - Hierarchical P coding. 1611 1612 1613 1614``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)`` 1615 Specifies the number of hierarchical coding layers. Applicable to 1616 the H264 encoder. 1617 1618``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)`` 1619 Specifies a user defined QP for each layer. Applicable to the H264 1620 encoder. The supplied 32-bit integer is interpreted as follows (bit 1621 0 = least significant bit): 1622 1623 1624 1625.. flat-table:: 1626 :header-rows: 0 1627 :stub-columns: 0 1628 1629 * - Bit 0:15 1630 - QP value 1631 * - Bit 16:32 1632 - Layer number 1633 1634``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)`` 1635 Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder. 1636 1637``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)`` 1638 Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder. 1639 1640``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)`` 1641 Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder. 1642 1643``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)`` 1644 Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder. 1645 1646``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)`` 1647 Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder. 1648 1649``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)`` 1650 Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder. 1651 1652``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)`` 1653 Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder. 1654 1655``V4L2_CID_FWHT_I_FRAME_QP (integer)`` 1656 Quantization parameter for an I frame for FWHT. Valid range: from 1 1657 to 31. 1658 1659``V4L2_CID_FWHT_P_FRAME_QP (integer)`` 1660 Quantization parameter for a P frame for FWHT. Valid range: from 1 1661 to 31. 1662 1663``V4L2_CID_MPEG_VIDEO_AVERAGE_QP (integer)`` 1664 This read-only control returns the average QP value of the currently 1665 encoded frame. The value applies to the last dequeued capture buffer 1666 (VIDIOC_DQBUF). Its valid range depends on the encoding format and parameters. 1667 For H264, its valid range is from 0 to 51. 1668 For HEVC, its valid range is from 0 to 51 for 8 bit and 1669 from 0 to 63 for 10 bit. 1670 For H263 and MPEG4, its valid range is from 1 to 31. 1671 For VP8, its valid range is from 0 to 127. 1672 For VP9, its valid range is from 0 to 255. 1673 If the codec's MIN_QP and MAX_QP are set, then the QP will meet both requirements. 1674 Codecs need to always use the specified range, rather then a HW custom range. 1675 Applicable to encoders 1676 1677.. raw:: latex 1678 1679 \normalsize 1680 1681 1682MFC 5.1 MPEG Controls 1683===================== 1684 1685The following MPEG class controls deal with MPEG decoding and encoding 1686settings that are specific to the Multi Format Codec 5.1 device present 1687in the S5P family of SoCs by Samsung. 1688 1689 1690.. _mfc51-control-id: 1691 1692MFC 5.1 Control IDs 1693------------------- 1694 1695``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)`` 1696 If the display delay is enabled then the decoder is forced to return 1697 a CAPTURE buffer (decoded frame) after processing a certain number 1698 of OUTPUT buffers. The delay can be set through 1699 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This 1700 feature can be used for example for generating thumbnails of videos. 1701 Applicable to the H264 decoder. 1702 1703 .. note:: 1704 1705 This control is deprecated. Use the standard 1706 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead. 1707 1708``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)`` 1709 Display delay value for H264 decoder. The decoder is forced to 1710 return a decoded frame after the set 'display delay' number of 1711 frames. If this number is low it may result in frames returned out 1712 of display order, in addition the hardware may still be using the 1713 returned buffer as a reference picture for subsequent frames. 1714 1715 .. note:: 1716 1717 This control is deprecated. Use the standard 1718 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead. 1719 1720``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)`` 1721 The number of reference pictures used for encoding a P picture. 1722 Applicable to the H264 encoder. 1723 1724``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)`` 1725 Padding enable in the encoder - use a color instead of repeating 1726 border pixels. Applicable to encoders. 1727 1728``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)`` 1729 Padding color in the encoder. Applicable to encoders. The supplied 1730 32-bit integer is interpreted as follows (bit 0 = least significant 1731 bit): 1732 1733 1734 1735.. flat-table:: 1736 :header-rows: 0 1737 :stub-columns: 0 1738 1739 * - Bit 0:7 1740 - V chrominance information 1741 * - Bit 8:15 1742 - U chrominance information 1743 * - Bit 16:23 1744 - Y luminance information 1745 * - Bit 24:31 1746 - Must be zero. 1747 1748 1749 1750``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)`` 1751 Reaction coefficient for MFC rate control. Applicable to encoders. 1752 1753 .. note:: 1754 1755 #. Valid only when the frame level RC is enabled. 1756 1757 #. For tight CBR, this field must be small (ex. 2 ~ 10). For 1758 VBR, this field must be large (ex. 100 ~ 1000). 1759 1760 #. It is not recommended to use the greater number than 1761 FRAME_RATE * (10^9 / BIT_RATE). 1762 1763``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)`` 1764 Adaptive rate control for dark region. Valid only when H.264 and 1765 macroblock level RC is enabled 1766 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1767 encoder. 1768 1769``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)`` 1770 Adaptive rate control for smooth region. Valid only when H.264 and 1771 macroblock level RC is enabled 1772 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1773 encoder. 1774 1775``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)`` 1776 Adaptive rate control for static region. Valid only when H.264 and 1777 macroblock level RC is enabled 1778 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1779 encoder. 1780 1781``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)`` 1782 Adaptive rate control for activity region. Valid only when H.264 and 1783 macroblock level RC is enabled 1784 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1785 encoder. 1786 1787.. _v4l2-mpeg-mfc51-video-frame-skip-mode: 1788 1789``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE`` 1790 (enum) 1791 1792 .. note:: 1793 1794 This control is deprecated. Use the standard 1795 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead. 1796 1797enum v4l2_mpeg_mfc51_video_frame_skip_mode - 1798 Indicates in what conditions the encoder should skip frames. If 1799 encoding a frame would cause the encoded stream to be larger then a 1800 chosen data limit then the frame will be skipped. Possible values 1801 are: 1802 1803 1804.. tabularcolumns:: |p{9.4cm}|p{8.1cm}| 1805 1806.. raw:: latex 1807 1808 \small 1809 1810.. flat-table:: 1811 :header-rows: 0 1812 :stub-columns: 0 1813 1814 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED`` 1815 - Frame skip mode is disabled. 1816 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT`` 1817 - Frame skip mode enabled and buffer limit is set by the chosen 1818 level and is defined by the standard. 1819 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT`` 1820 - Frame skip mode enabled and buffer limit is set by the VBV 1821 (MPEG1/2/4) or CPB (H264) buffer size control. 1822 1823.. raw:: latex 1824 1825 \normalsize 1826 1827``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)`` 1828 Enable rate-control with fixed target bit. If this setting is 1829 enabled, then the rate control logic of the encoder will calculate 1830 the average bitrate for a GOP and keep it below or equal the set 1831 bitrate target. Otherwise the rate control logic calculates the 1832 overall average bitrate for the stream and keeps it below or equal 1833 to the set bitrate. In the first case the average bitrate for the 1834 whole stream will be smaller then the set bitrate. This is caused 1835 because the average is calculated for smaller number of frames, on 1836 the other hand enabling this setting will ensure that the stream 1837 will meet tight bandwidth constraints. Applicable to encoders. 1838 1839.. _v4l2-mpeg-mfc51-video-force-frame-type: 1840 1841``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE`` 1842 (enum) 1843 1844enum v4l2_mpeg_mfc51_video_force_frame_type - 1845 Force a frame type for the next queued buffer. Applicable to 1846 encoders. Possible values are: 1847 1848.. tabularcolumns:: |p{9.9cm}|p{7.6cm}| 1849 1850.. flat-table:: 1851 :header-rows: 0 1852 :stub-columns: 0 1853 1854 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED`` 1855 - Forcing a specific frame type disabled. 1856 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME`` 1857 - Force an I-frame. 1858 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED`` 1859 - Force a non-coded frame. 1860 1861 1862CX2341x MPEG Controls 1863===================== 1864 1865The following MPEG class controls deal with MPEG encoding settings that 1866are specific to the Conexant CX23415 and CX23416 MPEG encoding chips. 1867 1868 1869.. _cx2341x-control-id: 1870 1871CX2341x Control IDs 1872------------------- 1873 1874.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode: 1875 1876``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE`` 1877 (enum) 1878 1879enum v4l2_mpeg_cx2341x_video_spatial_filter_mode - 1880 Sets the Spatial Filter mode (default ``MANUAL``). Possible values 1881 are: 1882 1883 1884.. tabularcolumns:: |p{11.5cm}|p{6.0cm}| 1885 1886.. flat-table:: 1887 :header-rows: 0 1888 :stub-columns: 0 1889 1890 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL`` 1891 - Choose the filter manually 1892 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO`` 1893 - Choose the filter automatically 1894 1895 1896 1897``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))`` 1898 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default 1899 is 0.) 1900 1901.. _luma-spatial-filter-type: 1902 1903``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE`` 1904 (enum) 1905 1906enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type - 1907 Select the algorithm to use for the Luma Spatial Filter (default 1908 ``1D_HOR``). Possible values: 1909 1910.. tabularcolumns:: |p{13.1cm}|p{4.4cm}| 1911 1912.. raw:: latex 1913 1914 \footnotesize 1915 1916.. flat-table:: 1917 :header-rows: 0 1918 :stub-columns: 0 1919 1920 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF`` 1921 - No filter 1922 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR`` 1923 - One-dimensional horizontal 1924 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT`` 1925 - One-dimensional vertical 1926 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE`` 1927 - Two-dimensional separable 1928 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE`` 1929 - Two-dimensional symmetrical non-separable 1930 1931.. raw:: latex 1932 1933 \normalsize 1934 1935.. _chroma-spatial-filter-type: 1936 1937``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE`` 1938 (enum) 1939 1940enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type - 1941 Select the algorithm for the Chroma Spatial Filter (default 1942 ``1D_HOR``). Possible values are: 1943 1944.. raw:: latex 1945 1946 \footnotesize 1947 1948.. tabularcolumns:: |p{11.0cm}|p{6.5cm}| 1949 1950.. flat-table:: 1951 :header-rows: 0 1952 :stub-columns: 0 1953 1954 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF`` 1955 - No filter 1956 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR`` 1957 - One-dimensional horizontal 1958 1959.. raw:: latex 1960 1961 \normalsize 1962 1963.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode: 1964 1965``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE`` 1966 (enum) 1967 1968enum v4l2_mpeg_cx2341x_video_temporal_filter_mode - 1969 Sets the Temporal Filter mode (default ``MANUAL``). Possible values 1970 are: 1971 1972.. raw:: latex 1973 1974 \footnotesize 1975 1976.. flat-table:: 1977 :header-rows: 0 1978 :stub-columns: 0 1979 1980 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL`` 1981 - Choose the filter manually 1982 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO`` 1983 - Choose the filter automatically 1984 1985.. raw:: latex 1986 1987 \normalsize 1988 1989``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))`` 1990 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default 1991 is 8 for full-scale capturing and 0 for scaled capturing.) 1992 1993.. _v4l2-mpeg-cx2341x-video-median-filter-type: 1994 1995``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE`` 1996 (enum) 1997 1998enum v4l2_mpeg_cx2341x_video_median_filter_type - 1999 Median Filter Type (default ``OFF``). Possible values are: 2000 2001 2002.. raw:: latex 2003 2004 \small 2005 2006.. tabularcolumns:: |p{11.0cm}|p{6.5cm}| 2007 2008.. flat-table:: 2009 :header-rows: 0 2010 :stub-columns: 0 2011 2012 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF`` 2013 - No filter 2014 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR`` 2015 - Horizontal filter 2016 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT`` 2017 - Vertical filter 2018 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT`` 2019 - Horizontal and vertical filter 2020 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG`` 2021 - Diagonal filter 2022 2023.. raw:: latex 2024 2025 \normalsize 2026 2027``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))`` 2028 Threshold above which the luminance median filter is enabled 2029 (default 0) 2030 2031``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))`` 2032 Threshold below which the luminance median filter is enabled 2033 (default 255) 2034 2035``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))`` 2036 Threshold above which the chroma median filter is enabled (default 2037 0) 2038 2039``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))`` 2040 Threshold below which the chroma median filter is enabled (default 2041 255) 2042 2043``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)`` 2044 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into 2045 the stream between every four video frames. The packet size is 2048 2046 bytes, including the packet_start_code_prefix and stream_id 2047 fields. The stream_id is 0xBF (private stream 2). The payload 2048 consists of 0x00 bytes, to be filled in by the application. 0 = do 2049 not insert, 1 = insert packets. 2050 2051 2052VPX Control Reference 2053===================== 2054 2055The VPX controls include controls for encoding parameters of VPx video 2056codec. 2057 2058 2059.. _vpx-control-id: 2060 2061VPX Control IDs 2062--------------- 2063 2064.. _v4l2-vpx-num-partitions: 2065 2066``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS`` 2067 (enum) 2068 2069enum v4l2_vp8_num_partitions - 2070 The number of token partitions to use in VP8 encoder. Possible 2071 values are: 2072 2073 2074 2075.. flat-table:: 2076 :header-rows: 0 2077 :stub-columns: 0 2078 2079 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION`` 2080 - 1 coefficient partition 2081 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS`` 2082 - 2 coefficient partitions 2083 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS`` 2084 - 4 coefficient partitions 2085 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS`` 2086 - 8 coefficient partitions 2087 2088 2089 2090``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)`` 2091 Setting this prevents intra 4x4 mode in the intra mode decision. 2092 2093.. _v4l2-vpx-num-ref-frames: 2094 2095``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES`` 2096 (enum) 2097 2098enum v4l2_vp8_num_ref_frames - 2099 The number of reference pictures for encoding P frames. Possible 2100 values are: 2101 2102.. tabularcolumns:: |p{7.5cm}|p{7.5cm}| 2103 2104.. raw:: latex 2105 2106 \small 2107 2108.. flat-table:: 2109 :header-rows: 0 2110 :stub-columns: 0 2111 2112 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME`` 2113 - Last encoded frame will be searched 2114 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME`` 2115 - Two frames will be searched among the last encoded frame, the 2116 golden frame and the alternate reference (altref) frame. The 2117 encoder implementation will decide which two are chosen. 2118 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME`` 2119 - The last encoded frame, the golden frame and the altref frame will 2120 be searched. 2121 2122.. raw:: latex 2123 2124 \normalsize 2125 2126 2127 2128``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)`` 2129 Indicates the loop filter level. The adjustment of the loop filter 2130 level is done via a delta value against a baseline loop filter 2131 value. 2132 2133``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)`` 2134 This parameter affects the loop filter. Anything above zero weakens 2135 the deblocking effect on the loop filter. 2136 2137``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)`` 2138 Sets the refresh period for the golden frame. The period is defined 2139 in number of frames. For a value of 'n', every nth frame starting 2140 from the first key frame will be taken as a golden frame. For eg. 2141 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden 2142 frame refresh period is set as 4, the frames 0, 4, 8 etc will be 2143 taken as the golden frames as frame 0 is always a key frame. 2144 2145.. _v4l2-vpx-golden-frame-sel: 2146 2147``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL`` 2148 (enum) 2149 2150enum v4l2_vp8_golden_frame_sel - 2151 Selects the golden frame for encoding. Possible values are: 2152 2153.. raw:: latex 2154 2155 \scriptsize 2156 2157.. tabularcolumns:: |p{8.6cm}|p{8.9cm}| 2158 2159.. flat-table:: 2160 :header-rows: 0 2161 :stub-columns: 0 2162 2163 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV`` 2164 - Use the (n-2)th frame as a golden frame, current frame index being 2165 'n'. 2166 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD`` 2167 - Use the previous specific frame indicated by 2168 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a 2169 golden frame. 2170 2171.. raw:: latex 2172 2173 \normalsize 2174 2175 2176``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)`` 2177 Minimum quantization parameter for VP8. 2178 2179``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)`` 2180 Maximum quantization parameter for VP8. 2181 2182``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)`` 2183 Quantization parameter for an I frame for VP8. 2184 2185``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)`` 2186 Quantization parameter for a P frame for VP8. 2187 2188.. _v4l2-mpeg-video-vp8-profile: 2189 2190``V4L2_CID_MPEG_VIDEO_VP8_PROFILE`` 2191 (enum) 2192 2193enum v4l2_mpeg_video_vp8_profile - 2194 This control allows selecting the profile for VP8 encoder. 2195 This is also used to enumerate supported profiles by VP8 encoder or decoder. 2196 Possible values are: 2197 2198.. flat-table:: 2199 :header-rows: 0 2200 :stub-columns: 0 2201 2202 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0`` 2203 - Profile 0 2204 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1`` 2205 - Profile 1 2206 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2`` 2207 - Profile 2 2208 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3`` 2209 - Profile 3 2210 2211.. _v4l2-mpeg-video-vp9-profile: 2212 2213``V4L2_CID_MPEG_VIDEO_VP9_PROFILE`` 2214 (enum) 2215 2216enum v4l2_mpeg_video_vp9_profile - 2217 This control allows selecting the profile for VP9 encoder. 2218 This is also used to enumerate supported profiles by VP9 encoder or decoder. 2219 Possible values are: 2220 2221.. flat-table:: 2222 :header-rows: 0 2223 :stub-columns: 0 2224 2225 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0`` 2226 - Profile 0 2227 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1`` 2228 - Profile 1 2229 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2`` 2230 - Profile 2 2231 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3`` 2232 - Profile 3 2233 2234.. _v4l2-mpeg-video-vp9-level: 2235 2236``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)`` 2237 2238enum v4l2_mpeg_video_vp9_level - 2239 This control allows selecting the level for VP9 encoder. 2240 This is also used to enumerate supported levels by VP9 encoder or decoder. 2241 More information can be found at 2242 `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are: 2243 2244.. flat-table:: 2245 :header-rows: 0 2246 :stub-columns: 0 2247 2248 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0`` 2249 - Level 1 2250 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1`` 2251 - Level 1.1 2252 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0`` 2253 - Level 2 2254 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1`` 2255 - Level 2.1 2256 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0`` 2257 - Level 3 2258 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1`` 2259 - Level 3.1 2260 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0`` 2261 - Level 4 2262 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1`` 2263 - Level 4.1 2264 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0`` 2265 - Level 5 2266 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1`` 2267 - Level 5.1 2268 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2`` 2269 - Level 5.2 2270 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0`` 2271 - Level 6 2272 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1`` 2273 - Level 6.1 2274 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2`` 2275 - Level 6.2 2276 2277 2278High Efficiency Video Coding (HEVC/H.265) Control Reference 2279=========================================================== 2280 2281The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265 2282video codec. 2283 2284 2285.. _hevc-control-id: 2286 2287HEVC/H.265 Control IDs 2288---------------------- 2289 2290``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)`` 2291 Minimum quantization parameter for HEVC. 2292 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2293 2294``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)`` 2295 Maximum quantization parameter for HEVC. 2296 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2297 2298``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)`` 2299 Quantization parameter for an I frame for HEVC. 2300 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2301 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2302 2303``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)`` 2304 Quantization parameter for a P frame for HEVC. 2305 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2306 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2307 2308``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)`` 2309 Quantization parameter for a B frame for HEVC. 2310 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2311 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2312 2313``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)`` 2314 Minimum quantization parameter for the HEVC I frame to limit I frame 2315 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2316 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2317 should be chosen to meet both requirements. 2318 2319``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)`` 2320 Maximum quantization parameter for the HEVC I frame to limit I frame 2321 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2322 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2323 should be chosen to meet both requirements. 2324 2325``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)`` 2326 Minimum quantization parameter for the HEVC P frame to limit P frame 2327 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2328 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2329 should be chosen to meet both requirements. 2330 2331``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)`` 2332 Maximum quantization parameter for the HEVC P frame to limit P frame 2333 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2334 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2335 should be chosen to meet both requirements. 2336 2337``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)`` 2338 Minimum quantization parameter for the HEVC B frame to limit B frame 2339 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2340 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2341 should be chosen to meet both requirements. 2342 2343``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)`` 2344 Maximum quantization parameter for the HEVC B frame to limit B frame 2345 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2346 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2347 should be chosen to meet both requirements. 2348 2349``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)`` 2350 HIERARCHICAL_QP allows the host to specify the quantization parameter 2351 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is 2352 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the 2353 control value to 1 enables setting of the QP values for the layers. 2354 2355.. _v4l2-hevc-hier-coding-type: 2356 2357``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE`` 2358 (enum) 2359 2360enum v4l2_mpeg_video_hevc_hier_coding_type - 2361 Selects the hierarchical coding type for encoding. Possible values are: 2362 2363.. raw:: latex 2364 2365 \footnotesize 2366 2367.. tabularcolumns:: |p{8.2cm}|p{9.3cm}| 2368 2369.. flat-table:: 2370 :header-rows: 0 2371 :stub-columns: 0 2372 2373 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B`` 2374 - Use the B frame for hierarchical coding. 2375 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P`` 2376 - Use the P frame for hierarchical coding. 2377 2378.. raw:: latex 2379 2380 \normalsize 2381 2382 2383``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)`` 2384 Selects the hierarchical coding layer. In normal encoding 2385 (non-hierarchial coding), it should be zero. Possible values are [0, 6]. 2386 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING 2387 LAYER 1 and so on. 2388 2389``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)`` 2390 Indicates quantization parameter for hierarchical coding layer 0. 2391 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2392 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2393 2394``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)`` 2395 Indicates quantization parameter for hierarchical coding layer 1. 2396 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2397 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2398 2399``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)`` 2400 Indicates quantization parameter for hierarchical coding layer 2. 2401 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2402 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2403 2404``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)`` 2405 Indicates quantization parameter for hierarchical coding layer 3. 2406 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2407 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2408 2409``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)`` 2410 Indicates quantization parameter for hierarchical coding layer 4. 2411 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2412 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2413 2414``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)`` 2415 Indicates quantization parameter for hierarchical coding layer 5. 2416 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2417 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2418 2419``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)`` 2420 Indicates quantization parameter for hierarchical coding layer 6. 2421 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2422 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2423 2424.. _v4l2-hevc-profile: 2425 2426``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE`` 2427 (enum) 2428 2429enum v4l2_mpeg_video_hevc_profile - 2430 Select the desired profile for HEVC encoder. 2431 2432.. raw:: latex 2433 2434 \footnotesize 2435 2436.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| 2437 2438.. flat-table:: 2439 :header-rows: 0 2440 :stub-columns: 0 2441 2442 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN`` 2443 - Main profile. 2444 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE`` 2445 - Main still picture profile. 2446 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10`` 2447 - Main 10 profile. 2448 2449.. raw:: latex 2450 2451 \normalsize 2452 2453 2454.. _v4l2-hevc-level: 2455 2456``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL`` 2457 (enum) 2458 2459enum v4l2_mpeg_video_hevc_level - 2460 Selects the desired level for HEVC encoder. 2461 2462================================== ========= 2463``V4L2_MPEG_VIDEO_HEVC_LEVEL_1`` Level 1.0 2464``V4L2_MPEG_VIDEO_HEVC_LEVEL_2`` Level 2.0 2465``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1`` Level 2.1 2466``V4L2_MPEG_VIDEO_HEVC_LEVEL_3`` Level 3.0 2467``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1`` Level 3.1 2468``V4L2_MPEG_VIDEO_HEVC_LEVEL_4`` Level 4.0 2469``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1`` Level 4.1 2470``V4L2_MPEG_VIDEO_HEVC_LEVEL_5`` Level 5.0 2471``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1`` Level 5.1 2472``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2`` Level 5.2 2473``V4L2_MPEG_VIDEO_HEVC_LEVEL_6`` Level 6.0 2474``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1`` Level 6.1 2475``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2`` Level 6.2 2476================================== ========= 2477 2478``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)`` 2479 Indicates the number of evenly spaced subintervals, called ticks, within 2480 one second. This is a 16 bit unsigned integer and has a maximum value up to 2481 0xffff and a minimum value of 1. 2482 2483.. _v4l2-hevc-tier: 2484 2485``V4L2_CID_MPEG_VIDEO_HEVC_TIER`` 2486 (enum) 2487 2488enum v4l2_mpeg_video_hevc_tier - 2489 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier 2490 were made to deal with applications that differ in terms of maximum bit 2491 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting 2492 this flag to 1 indicates High tier. High tier is for applications requiring 2493 high bit rates. 2494 2495================================== ========== 2496``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN`` Main tier. 2497``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH`` High tier. 2498================================== ========== 2499 2500 2501``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)`` 2502 Selects HEVC maximum coding unit depth. 2503 2504.. _v4l2-hevc-loop-filter-mode: 2505 2506``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE`` 2507 (enum) 2508 2509enum v4l2_mpeg_video_hevc_loop_filter_mode - 2510 Loop filter mode for HEVC encoder. Possible values are: 2511 2512.. raw:: latex 2513 2514 \footnotesize 2515 2516.. tabularcolumns:: |p{12.1cm}|p{5.4cm}| 2517 2518.. flat-table:: 2519 :header-rows: 0 2520 :stub-columns: 0 2521 2522 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED`` 2523 - Loop filter is disabled. 2524 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED`` 2525 - Loop filter is enabled. 2526 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` 2527 - Loop filter is disabled at the slice boundary. 2528 2529.. raw:: latex 2530 2531 \normalsize 2532 2533 2534``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)`` 2535 Selects HEVC loop filter beta offset. The valid range is [-6, +6]. 2536 2537``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)`` 2538 Selects HEVC loop filter tc offset. The valid range is [-6, +6]. 2539 2540.. _v4l2-hevc-refresh-type: 2541 2542``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE`` 2543 (enum) 2544 2545enum v4l2_mpeg_video_hevc_hier_refresh_type - 2546 Selects refresh type for HEVC encoder. 2547 Host has to specify the period into 2548 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD. 2549 2550.. raw:: latex 2551 2552 \footnotesize 2553 2554.. tabularcolumns:: |p{6.2cm}|p{11.3cm}| 2555 2556.. flat-table:: 2557 :header-rows: 0 2558 :stub-columns: 0 2559 2560 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE`` 2561 - Use the B frame for hierarchical coding. 2562 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA`` 2563 - Use CRA (Clean Random Access Unit) picture encoding. 2564 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR`` 2565 - Use IDR (Instantaneous Decoding Refresh) picture encoding. 2566 2567.. raw:: latex 2568 2569 \normalsize 2570 2571 2572``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)`` 2573 Selects the refresh period for HEVC encoder. 2574 This specifies the number of I pictures between two CRA/IDR pictures. 2575 This is valid only if REFRESH_TYPE is not 0. 2576 2577``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)`` 2578 Indicates HEVC lossless encoding. Setting it to 0 disables lossless 2579 encoding. Setting it to 1 enables lossless encoding. 2580 2581``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)`` 2582 Indicates constant intra prediction for HEVC encoder. Specifies the 2583 constrained intra prediction in which intra largest coding unit (LCU) 2584 prediction is performed by using residual data and decoded samples of 2585 neighboring intra LCU only. Setting the value to 1 enables constant intra 2586 prediction and setting the value to 0 disables constant intra prediction. 2587 2588``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)`` 2589 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0 2590 disables the feature and setting it to 1 enables the wavefront parallel 2591 processing. 2592 2593``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)`` 2594 Setting the value to 1 enables combination of P and B frame for HEVC 2595 encoder. 2596 2597``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)`` 2598 Indicates temporal identifier for HEVC encoder which is enabled by 2599 setting the value to 1. 2600 2601``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)`` 2602 Indicates bi-linear interpolation is conditionally used in the intra 2603 prediction filtering process in the CVS when set to 1. Indicates bi-linear 2604 interpolation is not used in the CVS when set to 0. 2605 2606``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)`` 2607 Indicates maximum number of merge candidate motion vectors. 2608 Values are from 0 to 4. 2609 2610``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)`` 2611 Indicates temporal motion vector prediction for HEVC encoder. Setting it to 2612 1 enables the prediction. Setting it to 0 disables the prediction. 2613 2614``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)`` 2615 Specifies if HEVC generates a stream with a size of the length field 2616 instead of start code pattern. The size of the length field is configurable 2617 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting 2618 the value to 0 disables encoding without startcode pattern. Setting the 2619 value to 1 will enables encoding without startcode pattern. 2620 2621.. _v4l2-hevc-size-of-length-field: 2622 2623``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD`` 2624(enum) 2625 2626enum v4l2_mpeg_video_hevc_size_of_length_field - 2627 Indicates the size of length field. 2628 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled. 2629 2630.. raw:: latex 2631 2632 \footnotesize 2633 2634.. tabularcolumns:: |p{5.5cm}|p{12.0cm}| 2635 2636.. flat-table:: 2637 :header-rows: 0 2638 :stub-columns: 0 2639 2640 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0`` 2641 - Generate start code pattern (Normal). 2642 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1`` 2643 - Generate size of length field instead of start code pattern and length is 1. 2644 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2`` 2645 - Generate size of length field instead of start code pattern and length is 2. 2646 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4`` 2647 - Generate size of length field instead of start code pattern and length is 4. 2648 2649.. raw:: latex 2650 2651 \normalsize 2652 2653``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)`` 2654 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder. 2655 2656``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)`` 2657 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder. 2658 2659``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)`` 2660 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder. 2661 2662``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)`` 2663 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder. 2664 2665``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)`` 2666 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder. 2667 2668``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)`` 2669 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder. 2670 2671``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)`` 2672 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder. 2673 2674``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)`` 2675 Selects number of P reference pictures required for HEVC encoder. 2676 P-Frame can use 1 or 2 frames for reference. 2677 2678``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)`` 2679 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0 2680 disables generating SPS and PPS at every IDR. Setting it to one enables 2681 generating SPS and PPS at every IDR. 2682