1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 3.. _codec-controls: 4 5*********************** 6Codec Control Reference 7*********************** 8 9Below all controls within the Codec control class are described. First 10the generic controls, then controls specific for certain hardware. 11 12.. note:: 13 14 These controls are applicable to all codecs and not just MPEG. The 15 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls 16 were originally made for MPEG codecs and later extended to cover all 17 encoding formats. 18 19 20Generic Codec Controls 21====================== 22 23 24.. _mpeg-control-id: 25 26Codec Control IDs 27----------------- 28 29``V4L2_CID_CODEC_CLASS (class)`` 30 The Codec class descriptor. Calling 31 :ref:`VIDIOC_QUERYCTRL` for this control will 32 return a description of this control class. This description can be 33 used as the caption of a Tab page in a GUI, for example. 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 anything 42 here. Each hardware MPEG encoder tends to support different subsets 43 of the available MPEG stream types. This control is specific to 44 multiplexed MPEG streams. The currently defined stream types are: 45 46 47 48.. flat-table:: 49 :header-rows: 0 50 :stub-columns: 0 51 52 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS`` 53 - MPEG-2 program stream 54 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS`` 55 - MPEG-2 transport stream 56 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS`` 57 - MPEG-1 system stream 58 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD`` 59 - MPEG-2 DVD-compatible stream 60 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD`` 61 - MPEG-1 VCD-compatible stream 62 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD`` 63 - MPEG-2 SVCD-compatible stream 64 65 66 67``V4L2_CID_MPEG_STREAM_PID_PMT (integer)`` 68 Program Map Table Packet ID for the MPEG transport stream (default 69 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 (default 79 259) 80 81``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)`` 82 Audio ID for MPEG PES 83 84``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)`` 85 Video ID for MPEG PES 86 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) into 94 the MPEG stream. This control selects whether VBI data should be 95 embedded, and if so, what embedding method should be used. The list 96 of possible VBI formats depends on the driver. The currently defined 97 VBI format types are: 98 99 100 101.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}| 102 103.. flat-table:: 104 :header-rows: 0 105 :stub-columns: 0 106 107 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE`` 108 - No VBI in the MPEG stream 109 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV`` 110 - VBI in private packets, IVTV format (documented in the kernel 111 sources in the file 112 ``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: 0 128 :stub-columns: 0 129 130 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100`` 131 - 44.1 kHz 132 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000`` 133 - 48 kHz 134 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000`` 135 - 32 kHz 136 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 MPEG 146 streams. Possible values are: 147 148 149 150.. flat-table:: 151 :header-rows: 0 152 :stub-columns: 0 153 154 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1`` 155 - MPEG-1/2 Layer I encoding 156 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2`` 157 - MPEG-1/2 Layer II encoding 158 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3`` 159 - MPEG-1/2 Layer III encoding 160 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC`` 161 - MPEG-2/4 AAC (Advanced Audio Coding) 162 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3`` 163 - AC-3 aka ATSC A/52 encoding 164 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: 0 179 :stub-columns: 0 180 181 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K`` 182 - 32 kbit/s 183 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K`` 184 - 64 kbit/s 185 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K`` 186 - 96 kbit/s 187 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K`` 188 - 128 kbit/s 189 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K`` 190 - 160 kbit/s 191 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K`` 192 - 192 kbit/s 193 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K`` 194 - 224 kbit/s 195 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K`` 196 - 256 kbit/s 197 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K`` 198 - 288 kbit/s 199 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K`` 200 - 320 kbit/s 201 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K`` 202 - 352 kbit/s 203 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K`` 204 - 384 kbit/s 205 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K`` 206 - 416 kbit/s 207 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K`` 208 - 448 kbit/s 209 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: 0 224 :stub-columns: 0 225 226 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K`` 227 - 32 kbit/s 228 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K`` 229 - 48 kbit/s 230 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K`` 231 - 56 kbit/s 232 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K`` 233 - 64 kbit/s 234 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K`` 235 - 80 kbit/s 236 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K`` 237 - 96 kbit/s 238 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K`` 239 - 112 kbit/s 240 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K`` 241 - 128 kbit/s 242 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K`` 243 - 160 kbit/s 244 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K`` 245 - 192 kbit/s 246 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K`` 247 - 224 kbit/s 248 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K`` 249 - 256 kbit/s 250 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K`` 251 - 320 kbit/s 252 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K`` 253 - 384 kbit/s 254 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: 0 269 :stub-columns: 0 270 271 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K`` 272 - 32 kbit/s 273 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K`` 274 - 40 kbit/s 275 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K`` 276 - 48 kbit/s 277 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K`` 278 - 56 kbit/s 279 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K`` 280 - 64 kbit/s 281 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K`` 282 - 80 kbit/s 283 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K`` 284 - 96 kbit/s 285 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K`` 286 - 112 kbit/s 287 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K`` 288 - 128 kbit/s 289 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K`` 290 - 160 kbit/s 291 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K`` 292 - 192 kbit/s 293 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K`` 294 - 224 kbit/s 295 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K`` 296 - 256 kbit/s 297 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K`` 298 - 320 kbit/s 299 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: 0 317 :stub-columns: 0 318 319 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K`` 320 - 32 kbit/s 321 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K`` 322 - 40 kbit/s 323 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K`` 324 - 48 kbit/s 325 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K`` 326 - 56 kbit/s 327 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K`` 328 - 64 kbit/s 329 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K`` 330 - 80 kbit/s 331 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K`` 332 - 96 kbit/s 333 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K`` 334 - 112 kbit/s 335 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K`` 336 - 128 kbit/s 337 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K`` 338 - 160 kbit/s 339 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K`` 340 - 192 kbit/s 341 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K`` 342 - 224 kbit/s 343 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K`` 344 - 256 kbit/s 345 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K`` 346 - 320 kbit/s 347 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K`` 348 - 384 kbit/s 349 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K`` 350 - 448 kbit/s 351 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K`` 352 - 512 kbit/s 353 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K`` 354 - 576 kbit/s 355 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K`` 356 - 640 kbit/s 357 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: 0 372 :stub-columns: 0 373 374 * - ``V4L2_MPEG_AUDIO_MODE_STEREO`` 375 - Stereo 376 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO`` 377 - Joint Stereo 378 * - ``V4L2_MPEG_AUDIO_MODE_DUAL`` 379 - Bilingual 380 * - ``V4L2_MPEG_AUDIO_MODE_MONO`` 381 - Mono 382 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 indicate 392 which subbands are in intensity stereo. All other subbands are coded 393 in stereo. Layer III is not (yet) supported. Possible values are: 394 395.. tabularcolumns:: |p{9.1cm}|p{8.4cm}| 396 397.. flat-table:: 398 :header-rows: 0 399 :stub-columns: 0 400 401 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4`` 402 - Subbands 4-31 in intensity stereo 403 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8`` 404 - Subbands 8-31 in intensity stereo 405 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12`` 406 - Subbands 12-31 in intensity stereo 407 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16`` 408 - Subbands 16-31 in intensity stereo 409 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: 0 424 :stub-columns: 0 425 426 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE`` 427 - None 428 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS`` 429 - 50/15 microsecond emphasis 430 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17`` 431 - CCITT J.17 432 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: 0 447 :stub-columns: 0 448 449 * - ``V4L2_MPEG_AUDIO_CRC_NONE`` 450 - None 451 * - ``V4L2_MPEG_AUDIO_CRC_CRC16`` 452 - 16 bit parity check 453 454 455 456``V4L2_CID_MPEG_AUDIO_MUTE (boolean)`` 457 Mutes the audio when capturing. This is not done by muting audio 458 hardware, which can still produce a slight hiss, but in the encoder 459 itself, guaranteeing a fixed and reproducible audio bitstream. 0 = 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. Possible 469 values are: 470 471 472 473.. tabularcolumns:: |p{9.8cm}|p{7.7cm}| 474 475.. flat-table:: 476 :header-rows: 0 477 :stub-columns: 0 478 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 multiplexed 509 MPEG streams. Possible values are: 510 511 512 513.. flat-table:: 514 :header-rows: 0 515 :stub-columns: 0 516 517 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1`` 518 - MPEG-1 Video encoding 519 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2`` 520 - MPEG-2 Video encoding 521 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` 522 - MPEG-4 AVC (H.264) Video encoding 523 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: 0 538 :stub-columns: 0 539 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: 0 571 :stub-columns: 0 572 573 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR`` 574 - Variable bitrate 575 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`` 576 - Constant bitrate 577 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ`` 578 - Constant quality 579 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 to 587 the average video bitrate. It is ignored if the video bitrate mode 588 is set to constant bitrate. 589 590``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)`` 591 Constant quality level control. This control is applicable when 592 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is 593 ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100 594 where 1 indicates lowest quality and 100 indicates highest quality. 595 Encoder will decide the appropriate quantization parameter and 596 bitrate to produce requested frame quality. 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. If 603 encoding a frame would cause the encoded stream to be larger then a 604 chosen data limit then the frame will be skipped. Possible values 605 are: 606 607 608.. tabularcolumns:: |p{8.2cm}|p{9.3cm}| 609 610.. raw:: latex 611 612 \small 613 614.. flat-table:: 615 :header-rows: 0 616 :stub-columns: 0 617 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 chosen 622 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 the 625 :ref:`VBV (MPEG1/2/4) <v4l2-mpeg-video-vbv-size>` or 626 :ref:`CPB (H264) buffer size <v4l2-mpeg-video-h264-cpb-size>` control. 627 628.. raw:: latex 629 630 \normalsize 631 632``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)`` 633 For every captured frame, skip this many subsequent frames (default 634 0). 635 636``V4L2_CID_MPEG_VIDEO_MUTE (boolean)`` 637 "Mutes" the video to a fixed color when capturing. This is useful 638 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 = 639 muted. 640 641``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)`` 642 Sets the "mute" color of the video. The supplied 32-bit integer is 643 interpreted as follows (bit 0 = least significant bit): 644 645 646 647.. flat-table:: 648 :header-rows: 0 649 :stub-columns: 0 650 651 * - Bit 0:7 652 - V chrominance information 653 * - Bit 8:15 654 - U chrominance information 655 * - Bit 16:23 656 - Y luminance information 657 * - Bit 24:31 658 - 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 Time 666 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the 667 currently displayed frame. This is the same PTS as is used in 668 :ref:`VIDIOC_DECODER_CMD`. 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 that 674 is currently displayed (decoded). This value is reset to 0 whenever 675 the decoder is started. 676 677``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)`` 678 If enabled the decoder expects to receive a single slice per buffer, 679 otherwise the decoder expects a single frame in per buffer. 680 Applicable to the decoder, all codecs. 681 682``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)`` 683 If the display delay is enabled then the decoder is forced to return 684 a CAPTURE buffer (decoded frame) after processing a certain number 685 of OUTPUT buffers. The delay can be set through 686 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This 687 feature can be used for example for generating thumbnails of videos. 688 Applicable to the decoder. 689 690``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)`` 691 Display delay value for decoder. The decoder is forced to 692 return a decoded frame after the set 'display delay' number of 693 frames. If this number is low it may result in frames returned out 694 of display order, in addition the hardware may still be using the 695 returned buffer as a reference picture for subsequent frames. 696 697``V4L2_CID_MPEG_VIDEO_AU_DELIMITER (boolean)`` 698 If enabled then, AUD (Access Unit Delimiter) NALUs will be generated. 699 That could be useful to find the start of a frame without having to 700 fully parse each NALU. Applicable to the H264 and HEVC encoders. 701 702``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)`` 703 Enable writing sample aspect ratio in the Video Usability 704 Information. Applicable to the H264 encoder. 705 706.. _v4l2-mpeg-video-h264-vui-sar-idc: 707 708``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC`` 709 (enum) 710 711enum v4l2_mpeg_video_h264_vui_sar_idc - 712 VUI sample aspect ratio indicator for H.264 encoding. The value is 713 defined in the table E-1 in the standard. Applicable to the H264 714 encoder. 715 716 717 718.. flat-table:: 719 :header-rows: 0 720 :stub-columns: 0 721 722 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED`` 723 - Unspecified 724 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1`` 725 - 1x1 726 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11`` 727 - 12x11 728 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11`` 729 - 10x11 730 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11`` 731 - 16x11 732 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33`` 733 - 40x33 734 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11`` 735 - 24x11 736 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11`` 737 - 20x11 738 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11`` 739 - 32x11 740 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33`` 741 - 80x33 742 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11`` 743 - 18x11 744 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11`` 745 - 15x11 746 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33`` 747 - 64x33 748 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99`` 749 - 160x99 750 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3`` 751 - 4x3 752 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2`` 753 - 3x2 754 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1`` 755 - 2x1 756 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED`` 757 - Extended SAR 758 759 760 761``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)`` 762 Extended sample aspect ratio width for H.264 VUI encoding. 763 Applicable to the H264 encoder. 764 765``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)`` 766 Extended sample aspect ratio height for H.264 VUI encoding. 767 Applicable to the H264 encoder. 768 769.. _v4l2-mpeg-video-h264-level: 770 771``V4L2_CID_MPEG_VIDEO_H264_LEVEL`` 772 (enum) 773 774enum v4l2_mpeg_video_h264_level - 775 The level information for the H264 video elementary stream. 776 Applicable to the H264 encoder. Possible values are: 777 778 779 780.. flat-table:: 781 :header-rows: 0 782 :stub-columns: 0 783 784 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0`` 785 - Level 1.0 786 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B`` 787 - Level 1B 788 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1`` 789 - Level 1.1 790 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2`` 791 - Level 1.2 792 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3`` 793 - Level 1.3 794 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0`` 795 - Level 2.0 796 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1`` 797 - Level 2.1 798 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2`` 799 - Level 2.2 800 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0`` 801 - Level 3.0 802 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1`` 803 - Level 3.1 804 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2`` 805 - Level 3.2 806 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0`` 807 - Level 4.0 808 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1`` 809 - Level 4.1 810 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2`` 811 - Level 4.2 812 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0`` 813 - Level 5.0 814 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1`` 815 - Level 5.1 816 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2`` 817 - Level 5.2 818 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0`` 819 - Level 6.0 820 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1`` 821 - Level 6.1 822 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2`` 823 - Level 6.2 824 825 826 827.. _v4l2-mpeg-video-mpeg2-level: 828 829``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL`` 830 (enum) 831 832enum v4l2_mpeg_video_mpeg2_level - 833 The level information for the MPEG2 elementary stream. Applicable to 834 MPEG2 codecs. Possible values are: 835 836 837 838.. flat-table:: 839 :header-rows: 0 840 :stub-columns: 0 841 842 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW`` 843 - Low Level (LL) 844 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN`` 845 - Main Level (ML) 846 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440`` 847 - High-1440 Level (H-14) 848 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH`` 849 - High Level (HL) 850 851 852 853.. _v4l2-mpeg-video-mpeg4-level: 854 855``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL`` 856 (enum) 857 858enum v4l2_mpeg_video_mpeg4_level - 859 The level information for the MPEG4 elementary stream. Applicable to 860 the MPEG4 encoder. Possible values are: 861 862 863 864.. flat-table:: 865 :header-rows: 0 866 :stub-columns: 0 867 868 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0`` 869 - Level 0 870 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B`` 871 - Level 0b 872 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1`` 873 - Level 1 874 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2`` 875 - Level 2 876 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3`` 877 - Level 3 878 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B`` 879 - Level 3b 880 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4`` 881 - Level 4 882 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5`` 883 - Level 5 884 885 886 887.. _v4l2-mpeg-video-h264-profile: 888 889``V4L2_CID_MPEG_VIDEO_H264_PROFILE`` 890 (enum) 891 892enum v4l2_mpeg_video_h264_profile - 893 The profile information for H264. Applicable to the H264 encoder. 894 Possible values are: 895 896.. raw:: latex 897 898 \small 899 900.. tabularcolumns:: |p{10.2cm}|p{7.3cm}| 901 902.. flat-table:: 903 :header-rows: 0 904 :stub-columns: 0 905 906 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE`` 907 - Baseline profile 908 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE`` 909 - Constrained Baseline profile 910 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN`` 911 - Main profile 912 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED`` 913 - Extended profile 914 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH`` 915 - High profile 916 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10`` 917 - High 10 profile 918 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422`` 919 - High 422 profile 920 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE`` 921 - High 444 Predictive profile 922 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA`` 923 - High 10 Intra profile 924 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA`` 925 - High 422 Intra profile 926 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA`` 927 - High 444 Intra profile 928 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA`` 929 - CAVLC 444 Intra profile 930 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE`` 931 - Scalable Baseline profile 932 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH`` 933 - Scalable High profile 934 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA`` 935 - Scalable High Intra profile 936 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH`` 937 - Stereo High profile 938 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH`` 939 - Multiview High profile 940 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH`` 941 - Constrained High profile 942 943.. raw:: latex 944 945 \normalsize 946 947.. _v4l2-mpeg-video-mpeg2-profile: 948 949``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE`` 950 (enum) 951 952enum v4l2_mpeg_video_mpeg2_profile - 953 The profile information for MPEG2. Applicable to MPEG2 codecs. 954 Possible values are: 955 956.. raw:: latex 957 958 \small 959 960.. tabularcolumns:: |p{10.2cm}|p{7.3cm}| 961 962.. flat-table:: 963 :header-rows: 0 964 :stub-columns: 0 965 966 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE`` 967 - Simple profile (SP) 968 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN`` 969 - Main profile (MP) 970 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE`` 971 - SNR Scalable profile (SNR) 972 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE`` 973 - Spatially Scalable profile (Spt) 974 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH`` 975 - High profile (HP) 976 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW`` 977 - Multi-view profile (MVP) 978 979 980.. raw:: latex 981 982 \normalsize 983 984.. _v4l2-mpeg-video-mpeg4-profile: 985 986``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE`` 987 (enum) 988 989enum v4l2_mpeg_video_mpeg4_profile - 990 The profile information for MPEG4. Applicable to the MPEG4 encoder. 991 Possible values are: 992 993.. raw:: latex 994 995 \small 996 997.. tabularcolumns:: |p{11.8cm}|p{5.7cm}| 998 999.. flat-table:: 1000 :header-rows: 0 1001 :stub-columns: 0 1002 1003 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE`` 1004 - Simple profile 1005 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE`` 1006 - Advanced Simple profile 1007 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE`` 1008 - Core profile 1009 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE`` 1010 - Simple Scalable profile 1011 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY`` 1012 - Advanced Coding Efficiency profile 1013 1014.. raw:: latex 1015 1016 \normalsize 1017 1018``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)`` 1019 The maximum number of reference pictures used for encoding. 1020 Applicable to the encoder. 1021 1022.. _v4l2-mpeg-video-multi-slice-mode: 1023 1024``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` 1025 (enum) 1026 1027enum v4l2_mpeg_video_multi_slice_mode - 1028 Determines how the encoder should handle division of frame into 1029 slices. Applicable to the encoder. Possible values are: 1030 1031 1032 1033.. tabularcolumns:: |p{9.6cm}|p{7.9cm}| 1034 1035.. flat-table:: 1036 :header-rows: 0 1037 :stub-columns: 0 1038 1039 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE`` 1040 - Single slice per frame. 1041 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB`` 1042 - Multiple slices with set maximum number of macroblocks per slice. 1043 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES`` 1044 - Multiple slice with set maximum size in bytes per slice. 1045 1046 1047 1048``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)`` 1049 The maximum number of macroblocks in a slice. Used when 1050 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to 1051 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the 1052 encoder. 1053 1054``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)`` 1055 The maximum size of a slice in bytes. Used when 1056 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to 1057 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the 1058 encoder. 1059 1060.. _v4l2-mpeg-video-h264-loop-filter-mode: 1061 1062``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE`` 1063 (enum) 1064 1065enum v4l2_mpeg_video_h264_loop_filter_mode - 1066 Loop filter mode for H264 encoder. Possible values are: 1067 1068.. raw:: latex 1069 1070 \small 1071 1072.. tabularcolumns:: |p{13.5cm}|p{4.0cm}| 1073 1074.. flat-table:: 1075 :header-rows: 0 1076 :stub-columns: 0 1077 1078 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED`` 1079 - Loop filter is enabled. 1080 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED`` 1081 - Loop filter is disabled. 1082 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` 1083 - Loop filter is disabled at the slice boundary. 1084 1085.. raw:: latex 1086 1087 \normalsize 1088 1089 1090``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)`` 1091 Loop filter alpha coefficient, defined in the H264 standard. 1092 This value corresponds to the slice_alpha_c0_offset_div2 slice header 1093 field, and should be in the range of -6 to +6, inclusive. The actual alpha 1094 offset FilterOffsetA is twice this value. 1095 Applicable to the H264 encoder. 1096 1097``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)`` 1098 Loop filter beta coefficient, defined in the H264 standard. 1099 This corresponds to the slice_beta_offset_div2 slice header field, and 1100 should be in the range of -6 to +6, inclusive. The actual beta offset 1101 FilterOffsetB is twice this value. 1102 Applicable to the H264 encoder. 1103 1104.. _v4l2-mpeg-video-h264-entropy-mode: 1105 1106``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE`` 1107 (enum) 1108 1109enum v4l2_mpeg_video_h264_entropy_mode - 1110 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264 1111 encoder. Possible values are: 1112 1113 1114.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| 1115 1116 1117.. flat-table:: 1118 :header-rows: 0 1119 :stub-columns: 0 1120 1121 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC`` 1122 - Use CAVLC entropy coding. 1123 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC`` 1124 - Use CABAC entropy coding. 1125 1126 1127 1128``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)`` 1129 Enable 8X8 transform for H264. Applicable to the H264 encoder. 1130 1131``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)`` 1132 Enable constrained intra prediction for H264. Applicable to the H264 1133 encoder. 1134 1135``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)`` 1136 Specify the offset that should be added to the luma quantization 1137 parameter to determine the chroma quantization parameter. Applicable 1138 to the H264 encoder. 1139 1140``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)`` 1141 Cyclic intra macroblock refresh. This is the number of continuous 1142 macroblocks refreshed every frame. Each frame a successive set of 1143 macroblocks is refreshed until the cycle completes and starts from 1144 the top of the frame. Applicable to H264, H263 and MPEG4 encoder. 1145 1146``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)`` 1147 Frame level rate control enable. If this control is disabled then 1148 the quantization parameter for each frame type is constant and set 1149 with appropriate controls (e.g. 1150 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is 1151 enabled then quantization parameter is adjusted to meet the chosen 1152 bitrate. Minimum and maximum value for the quantization parameter 1153 can be set with appropriate controls (e.g. 1154 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders. 1155 1156``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)`` 1157 Macroblock level rate control enable. Applicable to the MPEG4 and 1158 H264 encoders. 1159 1160``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)`` 1161 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4 1162 encoder. 1163 1164``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)`` 1165 Quantization parameter for an I frame for H263. Valid range: from 1 1166 to 31. 1167 1168``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)`` 1169 Minimum quantization parameter for H263. Valid range: from 1 to 31. 1170 1171``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)`` 1172 Maximum quantization parameter for H263. Valid range: from 1 to 31. 1173 1174``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)`` 1175 Quantization parameter for an P frame for H263. Valid range: from 1 1176 to 31. 1177 1178``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)`` 1179 Quantization parameter for an B frame for H263. Valid range: from 1 1180 to 31. 1181 1182``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)`` 1183 Quantization parameter for an I frame for H264. Valid range: from 0 1184 to 51. 1185 1186``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)`` 1187 Minimum quantization parameter for H264. Valid range: from 0 to 51. 1188 1189``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)`` 1190 Maximum quantization parameter for H264. Valid range: from 0 to 51. 1191 1192``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)`` 1193 Quantization parameter for an P frame for H264. Valid range: from 0 1194 to 51. 1195 1196``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)`` 1197 Quantization parameter for an B frame for H264. Valid range: from 0 1198 to 51. 1199 1200``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)`` 1201 Minimum quantization parameter for the H264 I frame to limit I frame 1202 quality to a range. Valid range: from 0 to 51. If 1203 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1204 should be chosen to meet both requirements. 1205 1206``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)`` 1207 Maximum quantization parameter for the H264 I frame to limit I frame 1208 quality to a range. Valid range: from 0 to 51. If 1209 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1210 should be chosen to meet both requirements. 1211 1212``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)`` 1213 Minimum quantization parameter for the H264 P frame to limit P frame 1214 quality to a range. Valid range: from 0 to 51. If 1215 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1216 should be chosen to meet both requirements. 1217 1218``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)`` 1219 Maximum quantization parameter for the H264 P frame to limit P frame 1220 quality to a range. Valid range: from 0 to 51. If 1221 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1222 should be chosen to meet both requirements. 1223 1224``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (integer)`` 1225 Minimum quantization parameter for the H264 B frame to limit B frame 1226 quality to a range. Valid range: from 0 to 51. If 1227 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter 1228 should be chosen to meet both requirements. 1229 1230``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (integer)`` 1231 Maximum quantization parameter for the H264 B frame to limit B frame 1232 quality to a range. Valid range: from 0 to 51. If 1233 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter 1234 should be chosen to meet both requirements. 1235 1236``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)`` 1237 Quantization parameter for an I frame for MPEG4. Valid range: from 1 1238 to 31. 1239 1240``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)`` 1241 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31. 1242 1243``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)`` 1244 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31. 1245 1246``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)`` 1247 Quantization parameter for an P frame for MPEG4. Valid range: from 1 1248 to 31. 1249 1250``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)`` 1251 Quantization parameter for an B frame for MPEG4. Valid range: from 1 1252 to 31. 1253 1254.. _v4l2-mpeg-video-vbv-size: 1255 1256``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)`` 1257 The Video Buffer Verifier size in kilobytes, it is used as a 1258 limitation of frame skip. The VBV is defined in the standard as a 1259 mean to verify that the produced stream will be successfully 1260 decoded. The standard describes it as "Part of a hypothetical 1261 decoder that is conceptually connected to the output of the encoder. 1262 Its purpose is to provide a constraint on the variability of the 1263 data rate that an encoder or editing process may produce.". 1264 Applicable to the MPEG1, MPEG2, MPEG4 encoders. 1265 1266.. _v4l2-mpeg-video-vbv-delay: 1267 1268``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)`` 1269 Sets the initial delay in milliseconds for VBV buffer control. 1270 1271.. _v4l2-mpeg-video-hor-search-range: 1272 1273``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)`` 1274 Horizontal search range defines maximum horizontal search area in 1275 pixels to search and match for the present Macroblock (MB) in the 1276 reference picture. This V4L2 control macro is used to set horizontal 1277 search range for motion estimation module in video encoder. 1278 1279.. _v4l2-mpeg-video-vert-search-range: 1280 1281``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)`` 1282 Vertical search range defines maximum vertical search area in pixels 1283 to search and match for the present Macroblock (MB) in the reference 1284 picture. This V4L2 control macro is used to set vertical search 1285 range for motion estimation module in video encoder. 1286 1287.. _v4l2-mpeg-video-force-key-frame: 1288 1289``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)`` 1290 Force a key frame for the next queued buffer. Applicable to 1291 encoders. This is a general, codec-agnostic keyframe control. 1292 1293.. _v4l2-mpeg-video-h264-cpb-size: 1294 1295``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)`` 1296 The Coded Picture Buffer size in kilobytes, it is used as a 1297 limitation of frame skip. The CPB is defined in the H264 standard as 1298 a mean to verify that the produced stream will be successfully 1299 decoded. Applicable to the H264 encoder. 1300 1301``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)`` 1302 Period between I-frames in the open GOP for H264. In case of an open 1303 GOP this is the period between two I-frames. The period between IDR 1304 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE 1305 control. An IDR frame, which stands for Instantaneous Decoding 1306 Refresh is an I-frame after which no prior frames are referenced. 1307 This means that a stream can be restarted from an IDR frame without 1308 the need to store or decode any previous frames. Applicable to the 1309 H264 encoder. 1310 1311.. _v4l2-mpeg-video-header-mode: 1312 1313``V4L2_CID_MPEG_VIDEO_HEADER_MODE`` 1314 (enum) 1315 1316enum v4l2_mpeg_video_header_mode - 1317 Determines whether the header is returned as the first buffer or is 1318 it returned together with the first frame. Applicable to encoders. 1319 Possible values are: 1320 1321.. raw:: latex 1322 1323 \small 1324 1325.. tabularcolumns:: |p{10.3cm}|p{7.2cm}| 1326 1327.. flat-table:: 1328 :header-rows: 0 1329 :stub-columns: 0 1330 1331 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE`` 1332 - The stream header is returned separately in the first buffer. 1333 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME`` 1334 - The stream header is returned together with the first encoded 1335 frame. 1336 1337.. raw:: latex 1338 1339 \normalsize 1340 1341 1342``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)`` 1343 Repeat the video sequence headers. Repeating these headers makes 1344 random access to the video stream easier. Applicable to the MPEG1, 2 1345 and 4 encoder. 1346 1347``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)`` 1348 Enabled the deblocking post processing filter for MPEG4 decoder. 1349 Applicable to the MPEG4 decoder. 1350 1351``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)`` 1352 vop_time_increment_resolution value for MPEG4. Applicable to the 1353 MPEG4 encoder. 1354 1355``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)`` 1356 vop_time_increment value for MPEG4. Applicable to the MPEG4 1357 encoder. 1358 1359``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)`` 1360 Enable generation of frame packing supplemental enhancement 1361 information in the encoded bitstream. The frame packing SEI message 1362 contains the arrangement of L and R planes for 3D viewing. 1363 Applicable to the H264 encoder. 1364 1365``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)`` 1366 Sets current frame as frame0 in frame packing SEI. Applicable to the 1367 H264 encoder. 1368 1369.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type: 1370 1371``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE`` 1372 (enum) 1373 1374enum v4l2_mpeg_video_h264_sei_fp_arrangement_type - 1375 Frame packing arrangement type for H264 SEI. Applicable to the H264 1376 encoder. Possible values are: 1377 1378.. raw:: latex 1379 1380 \small 1381 1382.. tabularcolumns:: |p{12cm}|p{5.5cm}| 1383 1384.. flat-table:: 1385 :header-rows: 0 1386 :stub-columns: 0 1387 1388 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD`` 1389 - Pixels are alternatively from L and R. 1390 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN`` 1391 - L and R are interlaced by column. 1392 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW`` 1393 - L and R are interlaced by row. 1394 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE`` 1395 - L is on the left, R on the right. 1396 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM`` 1397 - L is on top, R on bottom. 1398 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL`` 1399 - One view per frame. 1400 1401.. raw:: latex 1402 1403 \normalsize 1404 1405 1406 1407``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)`` 1408 Enables flexible macroblock ordering in the encoded bitstream. It is 1409 a technique used for restructuring the ordering of macroblocks in 1410 pictures. Applicable to the H264 encoder. 1411 1412.. _v4l2-mpeg-video-h264-fmo-map-type: 1413 1414``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE`` 1415 (enum) 1416 1417enum v4l2_mpeg_video_h264_fmo_map_type - 1418 When using FMO, the map type divides the image in different scan 1419 patterns of macroblocks. Applicable to the H264 encoder. Possible 1420 values are: 1421 1422.. raw:: latex 1423 1424 \small 1425 1426.. tabularcolumns:: |p{12.5cm}|p{5.0cm}| 1427 1428.. flat-table:: 1429 :header-rows: 0 1430 :stub-columns: 0 1431 1432 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES`` 1433 - Slices are interleaved one after other with macroblocks in run 1434 length order. 1435 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES`` 1436 - Scatters the macroblocks based on a mathematical function known to 1437 both encoder and decoder. 1438 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER`` 1439 - Macroblocks arranged in rectangular areas or regions of interest. 1440 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT`` 1441 - Slice groups grow in a cyclic way from centre to outwards. 1442 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN`` 1443 - Slice groups grow in raster scan pattern from left to right. 1444 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN`` 1445 - Slice groups grow in wipe scan pattern from top to bottom. 1446 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT`` 1447 - User defined map type. 1448 1449.. raw:: latex 1450 1451 \normalsize 1452 1453 1454 1455``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)`` 1456 Number of slice groups in FMO. Applicable to the H264 encoder. 1457 1458.. _v4l2-mpeg-video-h264-fmo-change-direction: 1459 1460``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION`` 1461 (enum) 1462 1463enum v4l2_mpeg_video_h264_fmo_change_dir - 1464 Specifies a direction of the slice group change for raster and wipe 1465 maps. Applicable to the H264 encoder. Possible values are: 1466 1467.. tabularcolumns:: |p{9.6cm}|p{7.9cm}| 1468 1469.. flat-table:: 1470 :header-rows: 0 1471 :stub-columns: 0 1472 1473 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT`` 1474 - Raster scan or wipe right. 1475 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT`` 1476 - Reverse raster scan or wipe left. 1477 1478 1479 1480``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)`` 1481 Specifies the size of the first slice group for raster and wipe map. 1482 Applicable to the H264 encoder. 1483 1484``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)`` 1485 Specifies the number of consecutive macroblocks for the interleaved 1486 map. Applicable to the H264 encoder. 1487 1488``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)`` 1489 Enables arbitrary slice ordering in encoded bitstream. Applicable to 1490 the H264 encoder. 1491 1492``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)`` 1493 Specifies the slice order in ASO. Applicable to the H264 encoder. 1494 The supplied 32-bit integer is interpreted as follows (bit 0 = least 1495 significant bit): 1496 1497 1498 1499.. flat-table:: 1500 :header-rows: 0 1501 :stub-columns: 0 1502 1503 * - Bit 0:15 1504 - Slice ID 1505 * - Bit 16:32 1506 - Slice position or order 1507 1508 1509 1510``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)`` 1511 Enables H264 hierarchical coding. Applicable to the H264 encoder. 1512 1513.. _v4l2-mpeg-video-h264-hierarchical-coding-type: 1514 1515``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE`` 1516 (enum) 1517 1518enum v4l2_mpeg_video_h264_hierarchical_coding_type - 1519 Specifies the hierarchical coding type. Applicable to the H264 1520 encoder. Possible values are: 1521 1522 1523 1524.. flat-table:: 1525 :header-rows: 0 1526 :stub-columns: 0 1527 1528 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B`` 1529 - Hierarchical B coding. 1530 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P`` 1531 - Hierarchical P coding. 1532 1533 1534 1535``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)`` 1536 Specifies the number of hierarchical coding layers. Applicable to 1537 the H264 encoder. 1538 1539``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)`` 1540 Specifies a user defined QP for each layer. Applicable to the H264 1541 encoder. The supplied 32-bit integer is interpreted as follows (bit 1542 0 = least significant bit): 1543 1544 1545 1546.. flat-table:: 1547 :header-rows: 0 1548 :stub-columns: 0 1549 1550 * - Bit 0:15 1551 - QP value 1552 * - Bit 16:32 1553 - Layer number 1554 1555``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (integer)`` 1556 Indicates bit rate (bps) for hierarchical coding layer 0 for H264 encoder. 1557 1558``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (integer)`` 1559 Indicates bit rate (bps) for hierarchical coding layer 1 for H264 encoder. 1560 1561``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (integer)`` 1562 Indicates bit rate (bps) for hierarchical coding layer 2 for H264 encoder. 1563 1564``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (integer)`` 1565 Indicates bit rate (bps) for hierarchical coding layer 3 for H264 encoder. 1566 1567``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (integer)`` 1568 Indicates bit rate (bps) for hierarchical coding layer 4 for H264 encoder. 1569 1570``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (integer)`` 1571 Indicates bit rate (bps) for hierarchical coding layer 5 for H264 encoder. 1572 1573``V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (integer)`` 1574 Indicates bit rate (bps) for hierarchical coding layer 6 for H264 encoder. 1575 1576.. _v4l2-mpeg-mpeg2: 1577 1578``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)`` 1579 Specifies the slice parameters (as extracted from the bitstream) for the 1580 associated MPEG-2 slice data. This includes the necessary parameters for 1581 configuring a stateless hardware decoding pipeline for MPEG-2. 1582 The bitstream parameters are defined according to :ref:`mpeg2part2`. 1583 1584 .. note:: 1585 1586 This compound control is not yet part of the public kernel API and 1587 it is expected to change. 1588 1589.. c:type:: v4l2_ctrl_mpeg2_slice_params 1590 1591.. tabularcolumns:: |p{5.6cm}|p{4.6cm}|p{7.1cm}| 1592 1593.. cssclass:: longtable 1594 1595.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params 1596 :header-rows: 0 1597 :stub-columns: 0 1598 :widths: 1 1 2 1599 1600 * - __u32 1601 - ``bit_size`` 1602 - Size (in bits) of the current slice data. 1603 * - __u32 1604 - ``data_bit_offset`` 1605 - Offset (in bits) to the video data in the current slice data. 1606 * - struct :c:type:`v4l2_mpeg2_sequence` 1607 - ``sequence`` 1608 - Structure with MPEG-2 sequence metadata, merging relevant fields from 1609 the sequence header and sequence extension parts of the bitstream. 1610 * - struct :c:type:`v4l2_mpeg2_picture` 1611 - ``picture`` 1612 - Structure with MPEG-2 picture metadata, merging relevant fields from 1613 the picture header and picture coding extension parts of the bitstream. 1614 * - __u64 1615 - ``backward_ref_ts`` 1616 - Timestamp of the V4L2 capture buffer to use as backward reference, used 1617 with B-coded and P-coded frames. The timestamp refers to the 1618 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the 1619 :c:func:`v4l2_timeval_to_ns()` function to convert the struct 1620 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64. 1621 * - __u64 1622 - ``forward_ref_ts`` 1623 - Timestamp for the V4L2 capture buffer to use as forward reference, used 1624 with B-coded frames. The timestamp refers to the ``timestamp`` field in 1625 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()` 1626 function to convert the struct :c:type:`timeval` in struct 1627 :c:type:`v4l2_buffer` to a __u64. 1628 * - __u32 1629 - ``quantiser_scale_code`` 1630 - Code used to determine the quantization scale to use for the IDCT. 1631 1632.. c:type:: v4l2_mpeg2_sequence 1633 1634.. cssclass:: longtable 1635 1636.. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}| 1637 1638.. flat-table:: struct v4l2_mpeg2_sequence 1639 :header-rows: 0 1640 :stub-columns: 0 1641 :widths: 1 1 2 1642 1643 * - __u16 1644 - ``horizontal_size`` 1645 - The width of the displayable part of the frame's luminance component. 1646 * - __u16 1647 - ``vertical_size`` 1648 - The height of the displayable part of the frame's luminance component. 1649 * - __u32 1650 - ``vbv_buffer_size`` 1651 - Used to calculate the required size of the video buffering verifier, 1652 defined (in bits) as: 16 * 1024 * vbv_buffer_size. 1653 * - __u16 1654 - ``profile_and_level_indication`` 1655 - The current profile and level indication as extracted from the 1656 bitstream. 1657 * - __u8 1658 - ``progressive_sequence`` 1659 - Indication that all the frames for the sequence are progressive instead 1660 of interlaced. 1661 * - __u8 1662 - ``chroma_format`` 1663 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4). 1664 1665.. c:type:: v4l2_mpeg2_picture 1666 1667.. raw:: latex 1668 1669 \small 1670 1671.. cssclass:: longtable 1672 1673.. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}| 1674 1675.. flat-table:: struct v4l2_mpeg2_picture 1676 :header-rows: 0 1677 :stub-columns: 0 1678 :widths: 1 1 2 1679 1680 * - __u8 1681 - ``picture_coding_type`` 1682 - Picture coding type for the frame covered by the current slice 1683 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or 1684 V4L2_MPEG2_PICTURE_CODING_TYPE_B). 1685 * - __u8 1686 - ``f_code[2][2]`` 1687 - Motion vector codes. 1688 * - __u8 1689 - ``intra_dc_precision`` 1690 - Precision of Discrete Cosine transform (0: 8 bits precision, 1691 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision). 1692 * - __u8 1693 - ``picture_structure`` 1694 - Picture structure (1: interlaced top field, 2: interlaced bottom field, 1695 3: progressive frame). 1696 * - __u8 1697 - ``top_field_first`` 1698 - If set to 1 and interlaced stream, top field is output first. 1699 * - __u8 1700 - ``frame_pred_frame_dct`` 1701 - If set to 1, only frame-DCT and frame prediction are used. 1702 * - __u8 1703 - ``concealment_motion_vectors`` 1704 - If set to 1, motion vectors are coded for intra macroblocks. 1705 * - __u8 1706 - ``q_scale_type`` 1707 - This flag affects the inverse quantization process. 1708 * - __u8 1709 - ``intra_vlc_format`` 1710 - This flag affects the decoding of transform coefficient data. 1711 * - __u8 1712 - ``alternate_scan`` 1713 - This flag affects the decoding of transform coefficient data. 1714 * - __u8 1715 - ``repeat_first_field`` 1716 - This flag affects the decoding process of progressive frames. 1717 * - __u16 1718 - ``progressive_frame`` 1719 - Indicates whether the current frame is progressive. 1720 1721.. raw:: latex 1722 1723 \normalsize 1724 1725``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)`` 1726 Specifies quantization matrices (as extracted from the bitstream) for the 1727 associated MPEG-2 slice data. 1728 1729 .. note:: 1730 1731 This compound control is not yet part of the public kernel API and 1732 it is expected to change. 1733 1734.. c:type:: v4l2_ctrl_mpeg2_quantization 1735 1736.. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}| 1737 1738.. cssclass:: longtable 1739 1740.. raw:: latex 1741 1742 \small 1743 1744.. flat-table:: struct v4l2_ctrl_mpeg2_quantization 1745 :header-rows: 0 1746 :stub-columns: 0 1747 :widths: 1 1 2 1748 1749 * - __u8 1750 - ``load_intra_quantiser_matrix`` 1751 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data. 1752 * - __u8 1753 - ``load_non_intra_quantiser_matrix`` 1754 - One bit to indicate whether to load the ``non_intra_quantiser_matrix`` 1755 data. 1756 * - __u8 1757 - ``load_chroma_intra_quantiser_matrix`` 1758 - One bit to indicate whether to load the 1759 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV 1760 formats. 1761 * - __u8 1762 - ``load_chroma_non_intra_quantiser_matrix`` 1763 - One bit to indicate whether to load the 1764 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0 1765 YUV formats. 1766 * - __u8 1767 - ``intra_quantiser_matrix[64]`` 1768 - The quantization matrix coefficients for intra-coded frames, in zigzag 1769 scanning order. It is relevant for both luma and chroma components, 1770 although it can be superseded by the chroma-specific matrix for 1771 non-4:2:0 YUV formats. 1772 * - __u8 1773 - ``non_intra_quantiser_matrix[64]`` 1774 - The quantization matrix coefficients for non-intra-coded frames, in 1775 zigzag scanning order. It is relevant for both luma and chroma 1776 components, although it can be superseded by the chroma-specific matrix 1777 for non-4:2:0 YUV formats. 1778 * - __u8 1779 - ``chroma_intra_quantiser_matrix[64]`` 1780 - The quantization matrix coefficients for the chominance component of 1781 intra-coded frames, in zigzag scanning order. Only relevant for 1782 non-4:2:0 YUV formats. 1783 * - __u8 1784 - ``chroma_non_intra_quantiser_matrix[64]`` 1785 - The quantization matrix coefficients for the chrominance component of 1786 non-intra-coded frames, in zigzag scanning order. Only relevant for 1787 non-4:2:0 YUV formats. 1788 1789.. raw:: latex 1790 1791 \normalsize 1792 1793``V4L2_CID_FWHT_I_FRAME_QP (integer)`` 1794 Quantization parameter for an I frame for FWHT. Valid range: from 1 1795 to 31. 1796 1797``V4L2_CID_FWHT_P_FRAME_QP (integer)`` 1798 Quantization parameter for a P frame for FWHT. Valid range: from 1 1799 to 31. 1800 1801.. raw:: latex 1802 1803 \normalsize 1804 1805 1806MFC 5.1 MPEG Controls 1807===================== 1808 1809The following MPEG class controls deal with MPEG decoding and encoding 1810settings that are specific to the Multi Format Codec 5.1 device present 1811in the S5P family of SoCs by Samsung. 1812 1813 1814.. _mfc51-control-id: 1815 1816MFC 5.1 Control IDs 1817------------------- 1818 1819``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)`` 1820 If the display delay is enabled then the decoder is forced to return 1821 a CAPTURE buffer (decoded frame) after processing a certain number 1822 of OUTPUT buffers. The delay can be set through 1823 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This 1824 feature can be used for example for generating thumbnails of videos. 1825 Applicable to the H264 decoder. 1826 1827 .. note:: 1828 1829 This control is deprecated. Use the standard 1830 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead. 1831 1832``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)`` 1833 Display delay value for H264 decoder. The decoder is forced to 1834 return a decoded frame after the set 'display delay' number of 1835 frames. If this number is low it may result in frames returned out 1836 of display order, in addition the hardware may still be using the 1837 returned buffer as a reference picture for subsequent frames. 1838 1839 .. note:: 1840 1841 This control is deprecated. Use the standard 1842 ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead. 1843 1844``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)`` 1845 The number of reference pictures used for encoding a P picture. 1846 Applicable to the H264 encoder. 1847 1848``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)`` 1849 Padding enable in the encoder - use a color instead of repeating 1850 border pixels. Applicable to encoders. 1851 1852``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)`` 1853 Padding color in the encoder. Applicable to encoders. The supplied 1854 32-bit integer is interpreted as follows (bit 0 = least significant 1855 bit): 1856 1857 1858 1859.. flat-table:: 1860 :header-rows: 0 1861 :stub-columns: 0 1862 1863 * - Bit 0:7 1864 - V chrominance information 1865 * - Bit 8:15 1866 - U chrominance information 1867 * - Bit 16:23 1868 - Y luminance information 1869 * - Bit 24:31 1870 - Must be zero. 1871 1872 1873 1874``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)`` 1875 Reaction coefficient for MFC rate control. Applicable to encoders. 1876 1877 .. note:: 1878 1879 #. Valid only when the frame level RC is enabled. 1880 1881 #. For tight CBR, this field must be small (ex. 2 ~ 10). For 1882 VBR, this field must be large (ex. 100 ~ 1000). 1883 1884 #. It is not recommended to use the greater number than 1885 FRAME_RATE * (10^9 / BIT_RATE). 1886 1887``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)`` 1888 Adaptive rate control for dark region. Valid only when H.264 and 1889 macroblock level RC is enabled 1890 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1891 encoder. 1892 1893``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)`` 1894 Adaptive rate control for smooth region. Valid only when H.264 and 1895 macroblock level RC is enabled 1896 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1897 encoder. 1898 1899``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)`` 1900 Adaptive rate control for static region. Valid only when H.264 and 1901 macroblock level RC is enabled 1902 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1903 encoder. 1904 1905``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)`` 1906 Adaptive rate control for activity region. Valid only when H.264 and 1907 macroblock level RC is enabled 1908 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264 1909 encoder. 1910 1911.. _v4l2-mpeg-mfc51-video-frame-skip-mode: 1912 1913``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE`` 1914 (enum) 1915 1916 .. note:: 1917 1918 This control is deprecated. Use the standard 1919 ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead. 1920 1921enum v4l2_mpeg_mfc51_video_frame_skip_mode - 1922 Indicates in what conditions the encoder should skip frames. If 1923 encoding a frame would cause the encoded stream to be larger then a 1924 chosen data limit then the frame will be skipped. Possible values 1925 are: 1926 1927 1928.. tabularcolumns:: |p{9.4cm}|p{8.1cm}| 1929 1930.. raw:: latex 1931 1932 \small 1933 1934.. flat-table:: 1935 :header-rows: 0 1936 :stub-columns: 0 1937 1938 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED`` 1939 - Frame skip mode is disabled. 1940 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT`` 1941 - Frame skip mode enabled and buffer limit is set by the chosen 1942 level and is defined by the standard. 1943 * - ``V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT`` 1944 - Frame skip mode enabled and buffer limit is set by the VBV 1945 (MPEG1/2/4) or CPB (H264) buffer size control. 1946 1947.. raw:: latex 1948 1949 \normalsize 1950 1951``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)`` 1952 Enable rate-control with fixed target bit. If this setting is 1953 enabled, then the rate control logic of the encoder will calculate 1954 the average bitrate for a GOP and keep it below or equal the set 1955 bitrate target. Otherwise the rate control logic calculates the 1956 overall average bitrate for the stream and keeps it below or equal 1957 to the set bitrate. In the first case the average bitrate for the 1958 whole stream will be smaller then the set bitrate. This is caused 1959 because the average is calculated for smaller number of frames, on 1960 the other hand enabling this setting will ensure that the stream 1961 will meet tight bandwidth constraints. Applicable to encoders. 1962 1963.. _v4l2-mpeg-mfc51-video-force-frame-type: 1964 1965``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE`` 1966 (enum) 1967 1968enum v4l2_mpeg_mfc51_video_force_frame_type - 1969 Force a frame type for the next queued buffer. Applicable to 1970 encoders. Possible values are: 1971 1972.. tabularcolumns:: |p{9.9cm}|p{7.6cm}| 1973 1974.. flat-table:: 1975 :header-rows: 0 1976 :stub-columns: 0 1977 1978 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED`` 1979 - Forcing a specific frame type disabled. 1980 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME`` 1981 - Force an I-frame. 1982 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED`` 1983 - Force a non-coded frame. 1984 1985 1986CX2341x MPEG Controls 1987===================== 1988 1989The following MPEG class controls deal with MPEG encoding settings that 1990are specific to the Conexant CX23415 and CX23416 MPEG encoding chips. 1991 1992 1993.. _cx2341x-control-id: 1994 1995CX2341x Control IDs 1996------------------- 1997 1998.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode: 1999 2000``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE`` 2001 (enum) 2002 2003enum v4l2_mpeg_cx2341x_video_spatial_filter_mode - 2004 Sets the Spatial Filter mode (default ``MANUAL``). Possible values 2005 are: 2006 2007 2008.. tabularcolumns:: |p{11.5cm}|p{6.0cm}| 2009 2010.. flat-table:: 2011 :header-rows: 0 2012 :stub-columns: 0 2013 2014 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL`` 2015 - Choose the filter manually 2016 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO`` 2017 - Choose the filter automatically 2018 2019 2020 2021``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))`` 2022 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default 2023 is 0.) 2024 2025.. _luma-spatial-filter-type: 2026 2027``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE`` 2028 (enum) 2029 2030enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type - 2031 Select the algorithm to use for the Luma Spatial Filter (default 2032 ``1D_HOR``). Possible values: 2033 2034.. tabularcolumns:: |p{13.1cm}|p{4.4cm}| 2035 2036.. raw:: latex 2037 2038 \footnotesize 2039 2040.. flat-table:: 2041 :header-rows: 0 2042 :stub-columns: 0 2043 2044 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF`` 2045 - No filter 2046 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR`` 2047 - One-dimensional horizontal 2048 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT`` 2049 - One-dimensional vertical 2050 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE`` 2051 - Two-dimensional separable 2052 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE`` 2053 - Two-dimensional symmetrical non-separable 2054 2055.. raw:: latex 2056 2057 \normalsize 2058 2059.. _chroma-spatial-filter-type: 2060 2061``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE`` 2062 (enum) 2063 2064enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type - 2065 Select the algorithm for the Chroma Spatial Filter (default 2066 ``1D_HOR``). Possible values are: 2067 2068.. raw:: latex 2069 2070 \footnotesize 2071 2072.. tabularcolumns:: |p{11.0cm}|p{6.5cm}| 2073 2074.. flat-table:: 2075 :header-rows: 0 2076 :stub-columns: 0 2077 2078 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF`` 2079 - No filter 2080 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR`` 2081 - One-dimensional horizontal 2082 2083.. raw:: latex 2084 2085 \normalsize 2086 2087.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode: 2088 2089``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE`` 2090 (enum) 2091 2092enum v4l2_mpeg_cx2341x_video_temporal_filter_mode - 2093 Sets the Temporal Filter mode (default ``MANUAL``). Possible values 2094 are: 2095 2096.. raw:: latex 2097 2098 \footnotesize 2099 2100.. flat-table:: 2101 :header-rows: 0 2102 :stub-columns: 0 2103 2104 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL`` 2105 - Choose the filter manually 2106 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO`` 2107 - Choose the filter automatically 2108 2109.. raw:: latex 2110 2111 \normalsize 2112 2113``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))`` 2114 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default 2115 is 8 for full-scale capturing and 0 for scaled capturing.) 2116 2117.. _v4l2-mpeg-cx2341x-video-median-filter-type: 2118 2119``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE`` 2120 (enum) 2121 2122enum v4l2_mpeg_cx2341x_video_median_filter_type - 2123 Median Filter Type (default ``OFF``). Possible values are: 2124 2125 2126.. raw:: latex 2127 2128 \small 2129 2130.. tabularcolumns:: |p{11.0cm}|p{6.5cm}| 2131 2132.. flat-table:: 2133 :header-rows: 0 2134 :stub-columns: 0 2135 2136 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF`` 2137 - No filter 2138 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR`` 2139 - Horizontal filter 2140 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT`` 2141 - Vertical filter 2142 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT`` 2143 - Horizontal and vertical filter 2144 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG`` 2145 - Diagonal filter 2146 2147.. raw:: latex 2148 2149 \normalsize 2150 2151``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))`` 2152 Threshold above which the luminance median filter is enabled 2153 (default 0) 2154 2155``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))`` 2156 Threshold below which the luminance median filter is enabled 2157 (default 255) 2158 2159``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))`` 2160 Threshold above which the chroma median filter is enabled (default 2161 0) 2162 2163``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))`` 2164 Threshold below which the chroma median filter is enabled (default 2165 255) 2166 2167``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)`` 2168 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into 2169 the stream between every four video frames. The packet size is 2048 2170 bytes, including the packet_start_code_prefix and stream_id 2171 fields. The stream_id is 0xBF (private stream 2). The payload 2172 consists of 0x00 bytes, to be filled in by the application. 0 = do 2173 not insert, 1 = insert packets. 2174 2175 2176VPX Control Reference 2177===================== 2178 2179The VPX controls include controls for encoding parameters of VPx video 2180codec. 2181 2182 2183.. _vpx-control-id: 2184 2185VPX Control IDs 2186--------------- 2187 2188.. _v4l2-vpx-num-partitions: 2189 2190``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS`` 2191 (enum) 2192 2193enum v4l2_vp8_num_partitions - 2194 The number of token partitions to use in VP8 encoder. Possible 2195 values are: 2196 2197 2198 2199.. flat-table:: 2200 :header-rows: 0 2201 :stub-columns: 0 2202 2203 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION`` 2204 - 1 coefficient partition 2205 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS`` 2206 - 2 coefficient partitions 2207 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS`` 2208 - 4 coefficient partitions 2209 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS`` 2210 - 8 coefficient partitions 2211 2212 2213 2214``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)`` 2215 Setting this prevents intra 4x4 mode in the intra mode decision. 2216 2217.. _v4l2-vpx-num-ref-frames: 2218 2219``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES`` 2220 (enum) 2221 2222enum v4l2_vp8_num_ref_frames - 2223 The number of reference pictures for encoding P frames. Possible 2224 values are: 2225 2226.. tabularcolumns:: |p{7.5cm}|p{7.5cm}| 2227 2228.. raw:: latex 2229 2230 \small 2231 2232.. flat-table:: 2233 :header-rows: 0 2234 :stub-columns: 0 2235 2236 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME`` 2237 - Last encoded frame will be searched 2238 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME`` 2239 - Two frames will be searched among the last encoded frame, the 2240 golden frame and the alternate reference (altref) frame. The 2241 encoder implementation will decide which two are chosen. 2242 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME`` 2243 - The last encoded frame, the golden frame and the altref frame will 2244 be searched. 2245 2246.. raw:: latex 2247 2248 \normalsize 2249 2250 2251 2252``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)`` 2253 Indicates the loop filter level. The adjustment of the loop filter 2254 level is done via a delta value against a baseline loop filter 2255 value. 2256 2257``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)`` 2258 This parameter affects the loop filter. Anything above zero weakens 2259 the deblocking effect on the loop filter. 2260 2261``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)`` 2262 Sets the refresh period for the golden frame. The period is defined 2263 in number of frames. For a value of 'n', every nth frame starting 2264 from the first key frame will be taken as a golden frame. For eg. 2265 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden 2266 frame refresh period is set as 4, the frames 0, 4, 8 etc will be 2267 taken as the golden frames as frame 0 is always a key frame. 2268 2269.. _v4l2-vpx-golden-frame-sel: 2270 2271``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL`` 2272 (enum) 2273 2274enum v4l2_vp8_golden_frame_sel - 2275 Selects the golden frame for encoding. Possible values are: 2276 2277.. raw:: latex 2278 2279 \scriptsize 2280 2281.. tabularcolumns:: |p{8.6cm}|p{8.9cm}| 2282 2283.. flat-table:: 2284 :header-rows: 0 2285 :stub-columns: 0 2286 2287 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV`` 2288 - Use the (n-2)th frame as a golden frame, current frame index being 2289 'n'. 2290 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD`` 2291 - Use the previous specific frame indicated by 2292 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a 2293 golden frame. 2294 2295.. raw:: latex 2296 2297 \normalsize 2298 2299 2300``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)`` 2301 Minimum quantization parameter for VP8. 2302 2303``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)`` 2304 Maximum quantization parameter for VP8. 2305 2306``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)`` 2307 Quantization parameter for an I frame for VP8. 2308 2309``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)`` 2310 Quantization parameter for a P frame for VP8. 2311 2312.. _v4l2-mpeg-video-vp8-profile: 2313 2314``V4L2_CID_MPEG_VIDEO_VP8_PROFILE`` 2315 (enum) 2316 2317enum v4l2_mpeg_video_vp8_profile - 2318 This control allows selecting the profile for VP8 encoder. 2319 This is also used to enumerate supported profiles by VP8 encoder or decoder. 2320 Possible values are: 2321 2322.. flat-table:: 2323 :header-rows: 0 2324 :stub-columns: 0 2325 2326 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0`` 2327 - Profile 0 2328 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1`` 2329 - Profile 1 2330 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2`` 2331 - Profile 2 2332 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3`` 2333 - Profile 3 2334 2335.. _v4l2-mpeg-video-vp9-profile: 2336 2337``V4L2_CID_MPEG_VIDEO_VP9_PROFILE`` 2338 (enum) 2339 2340enum v4l2_mpeg_video_vp9_profile - 2341 This control allows selecting the profile for VP9 encoder. 2342 This is also used to enumerate supported profiles by VP9 encoder or decoder. 2343 Possible values are: 2344 2345.. flat-table:: 2346 :header-rows: 0 2347 :stub-columns: 0 2348 2349 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0`` 2350 - Profile 0 2351 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1`` 2352 - Profile 1 2353 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2`` 2354 - Profile 2 2355 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3`` 2356 - Profile 3 2357 2358.. _v4l2-mpeg-video-vp9-level: 2359 2360``V4L2_CID_MPEG_VIDEO_VP9_LEVEL (enum)`` 2361 2362enum v4l2_mpeg_video_vp9_level - 2363 This control allows selecting the level for VP9 encoder. 2364 This is also used to enumerate supported levels by VP9 encoder or decoder. 2365 More information can be found at 2366 `webmproject <https://www.webmproject.org/vp9/levels/>`__. Possible values are: 2367 2368.. flat-table:: 2369 :header-rows: 0 2370 :stub-columns: 0 2371 2372 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_0`` 2373 - Level 1 2374 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_1_1`` 2375 - Level 1.1 2376 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_0`` 2377 - Level 2 2378 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_2_1`` 2379 - Level 2.1 2380 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_0`` 2381 - Level 3 2382 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_3_1`` 2383 - Level 3.1 2384 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_0`` 2385 - Level 4 2386 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_4_1`` 2387 - Level 4.1 2388 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_0`` 2389 - Level 5 2390 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_1`` 2391 - Level 5.1 2392 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_5_2`` 2393 - Level 5.2 2394 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_0`` 2395 - Level 6 2396 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_1`` 2397 - Level 6.1 2398 * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2`` 2399 - Level 6.2 2400 2401 2402High Efficiency Video Coding (HEVC/H.265) Control Reference 2403=========================================================== 2404 2405The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265 2406video codec. 2407 2408 2409.. _hevc-control-id: 2410 2411HEVC/H.265 Control IDs 2412---------------------- 2413 2414``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)`` 2415 Minimum quantization parameter for HEVC. 2416 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2417 2418``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)`` 2419 Maximum quantization parameter for HEVC. 2420 Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2421 2422``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)`` 2423 Quantization parameter for an I frame for HEVC. 2424 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2425 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2426 2427``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)`` 2428 Quantization parameter for a P frame for HEVC. 2429 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2430 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2431 2432``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)`` 2433 Quantization parameter for a B frame for HEVC. 2434 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2435 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2436 2437``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (integer)`` 2438 Minimum quantization parameter for the HEVC I frame to limit I frame 2439 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2440 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2441 should be chosen to meet both requirements. 2442 2443``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (integer)`` 2444 Maximum quantization parameter for the HEVC I frame to limit I frame 2445 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2446 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2447 should be chosen to meet both requirements. 2448 2449``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (integer)`` 2450 Minimum quantization parameter for the HEVC P frame to limit P frame 2451 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2452 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2453 should be chosen to meet both requirements. 2454 2455``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (integer)`` 2456 Maximum quantization parameter for the HEVC P frame to limit P frame 2457 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2458 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2459 should be chosen to meet both requirements. 2460 2461``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (integer)`` 2462 Minimum quantization parameter for the HEVC B frame to limit B frame 2463 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2464 If V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP is also set, the quantization parameter 2465 should be chosen to meet both requirements. 2466 2467``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (integer)`` 2468 Maximum quantization parameter for the HEVC B frame to limit B frame 2469 quality to a range. Valid range: from 0 to 51 for 8 bit and from 0 to 63 for 10 bit. 2470 If V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP is also set, the quantization parameter 2471 should be chosen to meet both requirements. 2472 2473``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)`` 2474 HIERARCHICAL_QP allows the host to specify the quantization parameter 2475 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is 2476 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the 2477 control value to 1 enables setting of the QP values for the layers. 2478 2479.. _v4l2-hevc-hier-coding-type: 2480 2481``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE`` 2482 (enum) 2483 2484enum v4l2_mpeg_video_hevc_hier_coding_type - 2485 Selects the hierarchical coding type for encoding. Possible values are: 2486 2487.. raw:: latex 2488 2489 \footnotesize 2490 2491.. tabularcolumns:: |p{8.2cm}|p{9.3cm}| 2492 2493.. flat-table:: 2494 :header-rows: 0 2495 :stub-columns: 0 2496 2497 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B`` 2498 - Use the B frame for hierarchical coding. 2499 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P`` 2500 - Use the P frame for hierarchical coding. 2501 2502.. raw:: latex 2503 2504 \normalsize 2505 2506 2507``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)`` 2508 Selects the hierarchical coding layer. In normal encoding 2509 (non-hierarchial coding), it should be zero. Possible values are [0, 6]. 2510 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING 2511 LAYER 1 and so on. 2512 2513``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)`` 2514 Indicates quantization parameter for hierarchical coding layer 0. 2515 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2516 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2517 2518``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)`` 2519 Indicates quantization parameter for hierarchical coding layer 1. 2520 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2521 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2522 2523``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)`` 2524 Indicates quantization parameter for hierarchical coding layer 2. 2525 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2526 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2527 2528``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)`` 2529 Indicates quantization parameter for hierarchical coding layer 3. 2530 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2531 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2532 2533``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)`` 2534 Indicates quantization parameter for hierarchical coding layer 4. 2535 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2536 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2537 2538``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)`` 2539 Indicates quantization parameter for hierarchical coding layer 5. 2540 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2541 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2542 2543``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)`` 2544 Indicates quantization parameter for hierarchical coding layer 6. 2545 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, 2546 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. 2547 2548.. _v4l2-hevc-profile: 2549 2550``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE`` 2551 (enum) 2552 2553enum v4l2_mpeg_video_hevc_profile - 2554 Select the desired profile for HEVC encoder. 2555 2556.. raw:: latex 2557 2558 \footnotesize 2559 2560.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| 2561 2562.. flat-table:: 2563 :header-rows: 0 2564 :stub-columns: 0 2565 2566 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN`` 2567 - Main profile. 2568 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE`` 2569 - Main still picture profile. 2570 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10`` 2571 - Main 10 profile. 2572 2573.. raw:: latex 2574 2575 \normalsize 2576 2577 2578.. _v4l2-hevc-level: 2579 2580``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL`` 2581 (enum) 2582 2583enum v4l2_mpeg_video_hevc_level - 2584 Selects the desired level for HEVC encoder. 2585 2586================================== ========= 2587``V4L2_MPEG_VIDEO_HEVC_LEVEL_1`` Level 1.0 2588``V4L2_MPEG_VIDEO_HEVC_LEVEL_2`` Level 2.0 2589``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1`` Level 2.1 2590``V4L2_MPEG_VIDEO_HEVC_LEVEL_3`` Level 3.0 2591``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1`` Level 3.1 2592``V4L2_MPEG_VIDEO_HEVC_LEVEL_4`` Level 4.0 2593``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1`` Level 4.1 2594``V4L2_MPEG_VIDEO_HEVC_LEVEL_5`` Level 5.0 2595``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1`` Level 5.1 2596``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2`` Level 5.2 2597``V4L2_MPEG_VIDEO_HEVC_LEVEL_6`` Level 6.0 2598``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1`` Level 6.1 2599``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2`` Level 6.2 2600================================== ========= 2601 2602``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)`` 2603 Indicates the number of evenly spaced subintervals, called ticks, within 2604 one second. This is a 16 bit unsigned integer and has a maximum value up to 2605 0xffff and a minimum value of 1. 2606 2607.. _v4l2-hevc-tier: 2608 2609``V4L2_CID_MPEG_VIDEO_HEVC_TIER`` 2610 (enum) 2611 2612enum v4l2_mpeg_video_hevc_tier - 2613 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier 2614 were made to deal with applications that differ in terms of maximum bit 2615 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting 2616 this flag to 1 indicates High tier. High tier is for applications requiring 2617 high bit rates. 2618 2619================================== ========== 2620``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN`` Main tier. 2621``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH`` High tier. 2622================================== ========== 2623 2624 2625``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)`` 2626 Selects HEVC maximum coding unit depth. 2627 2628.. _v4l2-hevc-loop-filter-mode: 2629 2630``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE`` 2631 (enum) 2632 2633enum v4l2_mpeg_video_hevc_loop_filter_mode - 2634 Loop filter mode for HEVC encoder. Possible values are: 2635 2636.. raw:: latex 2637 2638 \footnotesize 2639 2640.. tabularcolumns:: |p{12.1cm}|p{5.4cm}| 2641 2642.. flat-table:: 2643 :header-rows: 0 2644 :stub-columns: 0 2645 2646 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED`` 2647 - Loop filter is disabled. 2648 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED`` 2649 - Loop filter is enabled. 2650 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` 2651 - Loop filter is disabled at the slice boundary. 2652 2653.. raw:: latex 2654 2655 \normalsize 2656 2657 2658``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)`` 2659 Selects HEVC loop filter beta offset. The valid range is [-6, +6]. 2660 2661``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)`` 2662 Selects HEVC loop filter tc offset. The valid range is [-6, +6]. 2663 2664.. _v4l2-hevc-refresh-type: 2665 2666``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE`` 2667 (enum) 2668 2669enum v4l2_mpeg_video_hevc_hier_refresh_type - 2670 Selects refresh type for HEVC encoder. 2671 Host has to specify the period into 2672 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD. 2673 2674.. raw:: latex 2675 2676 \footnotesize 2677 2678.. tabularcolumns:: |p{6.2cm}|p{11.3cm}| 2679 2680.. flat-table:: 2681 :header-rows: 0 2682 :stub-columns: 0 2683 2684 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE`` 2685 - Use the B frame for hierarchical coding. 2686 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA`` 2687 - Use CRA (Clean Random Access Unit) picture encoding. 2688 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR`` 2689 - Use IDR (Instantaneous Decoding Refresh) picture encoding. 2690 2691.. raw:: latex 2692 2693 \normalsize 2694 2695 2696``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)`` 2697 Selects the refresh period for HEVC encoder. 2698 This specifies the number of I pictures between two CRA/IDR pictures. 2699 This is valid only if REFRESH_TYPE is not 0. 2700 2701``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)`` 2702 Indicates HEVC lossless encoding. Setting it to 0 disables lossless 2703 encoding. Setting it to 1 enables lossless encoding. 2704 2705``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)`` 2706 Indicates constant intra prediction for HEVC encoder. Specifies the 2707 constrained intra prediction in which intra largest coding unit (LCU) 2708 prediction is performed by using residual data and decoded samples of 2709 neighboring intra LCU only. Setting the value to 1 enables constant intra 2710 prediction and setting the value to 0 disables constant intra prediction. 2711 2712``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)`` 2713 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0 2714 disables the feature and setting it to 1 enables the wavefront parallel 2715 processing. 2716 2717``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)`` 2718 Setting the value to 1 enables combination of P and B frame for HEVC 2719 encoder. 2720 2721``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)`` 2722 Indicates temporal identifier for HEVC encoder which is enabled by 2723 setting the value to 1. 2724 2725``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)`` 2726 Indicates bi-linear interpolation is conditionally used in the intra 2727 prediction filtering process in the CVS when set to 1. Indicates bi-linear 2728 interpolation is not used in the CVS when set to 0. 2729 2730``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)`` 2731 Indicates maximum number of merge candidate motion vectors. 2732 Values are from 0 to 4. 2733 2734``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)`` 2735 Indicates temporal motion vector prediction for HEVC encoder. Setting it to 2736 1 enables the prediction. Setting it to 0 disables the prediction. 2737 2738``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)`` 2739 Specifies if HEVC generates a stream with a size of the length field 2740 instead of start code pattern. The size of the length field is configurable 2741 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting 2742 the value to 0 disables encoding without startcode pattern. Setting the 2743 value to 1 will enables encoding without startcode pattern. 2744 2745.. _v4l2-hevc-size-of-length-field: 2746 2747``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD`` 2748(enum) 2749 2750enum v4l2_mpeg_video_hevc_size_of_length_field - 2751 Indicates the size of length field. 2752 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled. 2753 2754.. raw:: latex 2755 2756 \footnotesize 2757 2758.. tabularcolumns:: |p{5.5cm}|p{12.0cm}| 2759 2760.. flat-table:: 2761 :header-rows: 0 2762 :stub-columns: 0 2763 2764 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0`` 2765 - Generate start code pattern (Normal). 2766 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1`` 2767 - Generate size of length field instead of start code pattern and length is 1. 2768 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2`` 2769 - Generate size of length field instead of start code pattern and length is 2. 2770 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4`` 2771 - Generate size of length field instead of start code pattern and length is 4. 2772 2773.. raw:: latex 2774 2775 \normalsize 2776 2777``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)`` 2778 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder. 2779 2780``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)`` 2781 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder. 2782 2783``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)`` 2784 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder. 2785 2786``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)`` 2787 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder. 2788 2789``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)`` 2790 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder. 2791 2792``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)`` 2793 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder. 2794 2795``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)`` 2796 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder. 2797 2798``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)`` 2799 Selects number of P reference pictures required for HEVC encoder. 2800 P-Frame can use 1 or 2 frames for reference. 2801 2802``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)`` 2803 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0 2804 disables generating SPS and PPS at every IDR. Setting it to one enables 2805 generating SPS and PPS at every IDR. 2806 2807.. _v4l2-mpeg-hevc: 2808 2809``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)`` 2810 Specifies the Sequence Parameter Set fields (as extracted from the 2811 bitstream) for the associated HEVC slice data. 2812 These bitstream parameters are defined according to :ref:`hevc`. 2813 They are described in section 7.4.3.2 "Sequence parameter set RBSP 2814 semantics" of the specification. 2815 2816.. c:type:: v4l2_ctrl_hevc_sps 2817 2818.. raw:: latex 2819 2820 \small 2821 2822.. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}| 2823 2824.. cssclass:: longtable 2825 2826.. flat-table:: struct v4l2_ctrl_hevc_sps 2827 :header-rows: 0 2828 :stub-columns: 0 2829 :widths: 1 1 2 2830 2831 * - __u16 2832 - ``pic_width_in_luma_samples`` 2833 - 2834 * - __u16 2835 - ``pic_height_in_luma_samples`` 2836 - 2837 * - __u8 2838 - ``bit_depth_luma_minus8`` 2839 - 2840 * - __u8 2841 - ``bit_depth_chroma_minus8`` 2842 - 2843 * - __u8 2844 - ``log2_max_pic_order_cnt_lsb_minus4`` 2845 - 2846 * - __u8 2847 - ``sps_max_dec_pic_buffering_minus1`` 2848 - 2849 * - __u8 2850 - ``sps_max_num_reorder_pics`` 2851 - 2852 * - __u8 2853 - ``sps_max_latency_increase_plus1`` 2854 - 2855 * - __u8 2856 - ``log2_min_luma_coding_block_size_minus3`` 2857 - 2858 * - __u8 2859 - ``log2_diff_max_min_luma_coding_block_size`` 2860 - 2861 * - __u8 2862 - ``log2_min_luma_transform_block_size_minus2`` 2863 - 2864 * - __u8 2865 - ``log2_diff_max_min_luma_transform_block_size`` 2866 - 2867 * - __u8 2868 - ``max_transform_hierarchy_depth_inter`` 2869 - 2870 * - __u8 2871 - ``max_transform_hierarchy_depth_intra`` 2872 - 2873 * - __u8 2874 - ``pcm_sample_bit_depth_luma_minus1`` 2875 - 2876 * - __u8 2877 - ``pcm_sample_bit_depth_chroma_minus1`` 2878 - 2879 * - __u8 2880 - ``log2_min_pcm_luma_coding_block_size_minus3`` 2881 - 2882 * - __u8 2883 - ``log2_diff_max_min_pcm_luma_coding_block_size`` 2884 - 2885 * - __u8 2886 - ``num_short_term_ref_pic_sets`` 2887 - 2888 * - __u8 2889 - ``num_long_term_ref_pics_sps`` 2890 - 2891 * - __u8 2892 - ``chroma_format_idc`` 2893 - 2894 * - __u64 2895 - ``flags`` 2896 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>` 2897 2898.. raw:: latex 2899 2900 \normalsize 2901 2902.. _hevc_sps_flags: 2903 2904``Sequence Parameter Set Flags`` 2905 2906.. raw:: latex 2907 2908 \small 2909 2910.. cssclass:: longtable 2911 2912.. flat-table:: 2913 :header-rows: 0 2914 :stub-columns: 0 2915 :widths: 1 1 2 2916 2917 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE`` 2918 - 0x00000001 2919 - 2920 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED`` 2921 - 0x00000002 2922 - 2923 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED`` 2924 - 0x00000004 2925 - 2926 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET`` 2927 - 0x00000008 2928 - 2929 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED`` 2930 - 0x00000010 2931 - 2932 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED`` 2933 - 0x00000020 2934 - 2935 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT`` 2936 - 0x00000040 2937 - 2938 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED`` 2939 - 0x00000080 2940 - 2941 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED`` 2942 - 0x00000100 2943 - 2944 2945.. raw:: latex 2946 2947 \normalsize 2948 2949``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)`` 2950 Specifies the Picture Parameter Set fields (as extracted from the 2951 bitstream) for the associated HEVC slice data. 2952 These bitstream parameters are defined according to :ref:`hevc`. 2953 They are described in section 7.4.3.3 "Picture parameter set RBSP 2954 semantics" of the specification. 2955 2956.. c:type:: v4l2_ctrl_hevc_pps 2957 2958.. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}| 2959 2960.. cssclass:: longtable 2961 2962.. flat-table:: struct v4l2_ctrl_hevc_pps 2963 :header-rows: 0 2964 :stub-columns: 0 2965 :widths: 1 1 2 2966 2967 * - __u8 2968 - ``num_extra_slice_header_bits`` 2969 - 2970 * - __s8 2971 - ``init_qp_minus26`` 2972 - 2973 * - __u8 2974 - ``diff_cu_qp_delta_depth`` 2975 - 2976 * - __s8 2977 - ``pps_cb_qp_offset`` 2978 - 2979 * - __s8 2980 - ``pps_cr_qp_offset`` 2981 - 2982 * - __u8 2983 - ``num_tile_columns_minus1`` 2984 - 2985 * - __u8 2986 - ``num_tile_rows_minus1`` 2987 - 2988 * - __u8 2989 - ``column_width_minus1[20]`` 2990 - 2991 * - __u8 2992 - ``row_height_minus1[22]`` 2993 - 2994 * - __s8 2995 - ``pps_beta_offset_div2`` 2996 - 2997 * - __s8 2998 - ``pps_tc_offset_div2`` 2999 - 3000 * - __u8 3001 - ``log2_parallel_merge_level_minus2`` 3002 - 3003 * - __u8 3004 - ``padding[4]`` 3005 - Applications and drivers must set this to zero. 3006 * - __u64 3007 - ``flags`` 3008 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>` 3009 3010.. _hevc_pps_flags: 3011 3012``Picture Parameter Set Flags`` 3013 3014.. raw:: latex 3015 3016 \small 3017 3018.. flat-table:: 3019 :header-rows: 0 3020 :stub-columns: 0 3021 :widths: 1 1 2 3022 3023 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT`` 3024 - 0x00000001 3025 - 3026 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT`` 3027 - 0x00000002 3028 - 3029 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED`` 3030 - 0x00000004 3031 - 3032 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT`` 3033 - 0x00000008 3034 - 3035 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED`` 3036 - 0x00000010 3037 - 3038 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED`` 3039 - 0x00000020 3040 - 3041 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED`` 3042 - 0x00000040 3043 - 3044 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT`` 3045 - 0x00000080 3046 - 3047 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED`` 3048 - 0x00000100 3049 - 3050 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED`` 3051 - 0x00000200 3052 - 3053 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED`` 3054 - 0x00000400 3055 - 3056 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED`` 3057 - 0x00000800 3058 - 3059 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED`` 3060 - 0x00001000 3061 - 3062 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED`` 3063 - 0x00002000 3064 - 3065 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED`` 3066 - 0x00004000 3067 - 3068 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED`` 3069 - 0x00008000 3070 - 3071 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER`` 3072 - 0x00010000 3073 - 3074 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT`` 3075 - 0x00020000 3076 - 3077 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT`` 3078 - 0x00040000 3079 - 3080 3081.. raw:: latex 3082 3083 \normalsize 3084 3085``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)`` 3086 Specifies various slice-specific parameters, especially from the NAL unit 3087 header, general slice segment header and weighted prediction parameter 3088 parts of the bitstream. 3089 These bitstream parameters are defined according to :ref:`hevc`. 3090 They are described in section 7.4.7 "General slice segment header 3091 semantics" of the specification. 3092 3093.. c:type:: v4l2_ctrl_hevc_slice_params 3094 3095.. raw:: latex 3096 3097 \scriptsize 3098 3099.. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}| 3100 3101.. cssclass:: longtable 3102 3103.. flat-table:: struct v4l2_ctrl_hevc_slice_params 3104 :header-rows: 0 3105 :stub-columns: 0 3106 :widths: 1 1 2 3107 3108 * - __u32 3109 - ``bit_size`` 3110 - Size (in bits) of the current slice data. 3111 * - __u32 3112 - ``data_bit_offset`` 3113 - Offset (in bits) to the video data in the current slice data. 3114 * - __u8 3115 - ``nal_unit_type`` 3116 - 3117 * - __u8 3118 - ``nuh_temporal_id_plus1`` 3119 - 3120 * - __u8 3121 - ``slice_type`` 3122 - 3123 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or 3124 V4L2_HEVC_SLICE_TYPE_B). 3125 * - __u8 3126 - ``colour_plane_id`` 3127 - 3128 * - __u16 3129 - ``slice_pic_order_cnt`` 3130 - 3131 * - __u8 3132 - ``num_ref_idx_l0_active_minus1`` 3133 - 3134 * - __u8 3135 - ``num_ref_idx_l1_active_minus1`` 3136 - 3137 * - __u8 3138 - ``collocated_ref_idx`` 3139 - 3140 * - __u8 3141 - ``five_minus_max_num_merge_cand`` 3142 - 3143 * - __s8 3144 - ``slice_qp_delta`` 3145 - 3146 * - __s8 3147 - ``slice_cb_qp_offset`` 3148 - 3149 * - __s8 3150 - ``slice_cr_qp_offset`` 3151 - 3152 * - __s8 3153 - ``slice_act_y_qp_offset`` 3154 - 3155 * - __s8 3156 - ``slice_act_cb_qp_offset`` 3157 - 3158 * - __s8 3159 - ``slice_act_cr_qp_offset`` 3160 - 3161 * - __s8 3162 - ``slice_beta_offset_div2`` 3163 - 3164 * - __s8 3165 - ``slice_tc_offset_div2`` 3166 - 3167 * - __u8 3168 - ``pic_struct`` 3169 - 3170 * - __u8 3171 - ``num_active_dpb_entries`` 3172 - The number of entries in ``dpb``. 3173 * - __u8 3174 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3175 - The list of L0 reference elements as indices in the DPB. 3176 * - __u8 3177 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3178 - The list of L1 reference elements as indices in the DPB. 3179 * - __u8 3180 - ``num_rps_poc_st_curr_before`` 3181 - The number of reference pictures in the short-term set that come before 3182 the current frame. 3183 * - __u8 3184 - ``num_rps_poc_st_curr_after`` 3185 - The number of reference pictures in the short-term set that come after 3186 the current frame. 3187 * - __u8 3188 - ``num_rps_poc_lt_curr`` 3189 - The number of reference pictures in the long-term set. 3190 * - __u8 3191 - ``padding[7]`` 3192 - Applications and drivers must set this to zero. 3193 * - struct :c:type:`v4l2_hevc_dpb_entry` 3194 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3195 - The decoded picture buffer, for meta-data about reference frames. 3196 * - struct :c:type:`v4l2_hevc_pred_weight_table` 3197 - ``pred_weight_table`` 3198 - The prediction weight coefficients for inter-picture prediction. 3199 * - __u64 3200 - ``flags`` 3201 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>` 3202 3203.. raw:: latex 3204 3205 \normalsize 3206 3207.. _hevc_slice_params_flags: 3208 3209``Slice Parameters Flags`` 3210 3211.. raw:: latex 3212 3213 \scriptsize 3214 3215.. flat-table:: 3216 :header-rows: 0 3217 :stub-columns: 0 3218 :widths: 1 1 2 3219 3220 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA`` 3221 - 0x00000001 3222 - 3223 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA`` 3224 - 0x00000002 3225 - 3226 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED`` 3227 - 0x00000004 3228 - 3229 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO`` 3230 - 0x00000008 3231 - 3232 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT`` 3233 - 0x00000010 3234 - 3235 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0`` 3236 - 0x00000020 3237 - 3238 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV`` 3239 - 0x00000040 3240 - 3241 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED`` 3242 - 0x00000080 3243 - 3244 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED`` 3245 - 0x00000100 3246 - 3247 3248.. raw:: latex 3249 3250 \normalsize 3251 3252.. c:type:: v4l2_hevc_dpb_entry 3253 3254.. raw:: latex 3255 3256 \small 3257 3258.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}| 3259 3260.. flat-table:: struct v4l2_hevc_dpb_entry 3261 :header-rows: 0 3262 :stub-columns: 0 3263 :widths: 1 1 2 3264 3265 * - __u64 3266 - ``timestamp`` 3267 - Timestamp of the V4L2 capture buffer to use as reference, used 3268 with B-coded and P-coded frames. The timestamp refers to the 3269 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the 3270 :c:func:`v4l2_timeval_to_ns()` function to convert the struct 3271 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64. 3272 * - __u8 3273 - ``rps`` 3274 - The reference set for the reference frame 3275 (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE, 3276 V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or 3277 V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR) 3278 * - __u8 3279 - ``field_pic`` 3280 - Whether the reference is a field picture or a frame. 3281 * - __u16 3282 - ``pic_order_cnt[2]`` 3283 - The picture order count of the reference. Only the first element of the 3284 array is used for frame pictures, while the first element identifies the 3285 top field and the second the bottom field in field-coded pictures. 3286 * - __u8 3287 - ``padding[2]`` 3288 - Applications and drivers must set this to zero. 3289 3290.. raw:: latex 3291 3292 \normalsize 3293 3294.. c:type:: v4l2_hevc_pred_weight_table 3295 3296.. raw:: latex 3297 3298 \footnotesize 3299 3300.. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}| 3301 3302.. flat-table:: struct v4l2_hevc_pred_weight_table 3303 :header-rows: 0 3304 :stub-columns: 0 3305 :widths: 1 1 2 3306 3307 * - __u8 3308 - ``luma_log2_weight_denom`` 3309 - 3310 * - __s8 3311 - ``delta_chroma_log2_weight_denom`` 3312 - 3313 * - __s8 3314 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3315 - 3316 * - __s8 3317 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3318 - 3319 * - __s8 3320 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`` 3321 - 3322 * - __s8 3323 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`` 3324 - 3325 * - __s8 3326 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3327 - 3328 * - __s8 3329 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` 3330 - 3331 * - __s8 3332 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`` 3333 - 3334 * - __s8 3335 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]`` 3336 - 3337 * - __u8 3338 - ``padding[6]`` 3339 - Applications and drivers must set this to zero. 3340 3341.. raw:: latex 3342 3343 \normalsize 3344 3345``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)`` 3346 Specifies the decoding mode to use. Currently exposes slice-based and 3347 frame-based decoding but new modes might be added later on. 3348 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE 3349 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE 3350 are required to set this control in order to specify the decoding mode 3351 that is expected for the buffer. 3352 Drivers may expose a single or multiple decoding modes, depending 3353 on what they can support. 3354 3355 .. note:: 3356 3357 This menu control is not yet part of the public kernel API and 3358 it is expected to change. 3359 3360.. c:type:: v4l2_mpeg_video_hevc_decode_mode 3361 3362.. raw:: latex 3363 3364 \small 3365 3366.. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}| 3367 3368.. flat-table:: 3369 :header-rows: 0 3370 :stub-columns: 0 3371 :widths: 1 1 2 3372 3373 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED`` 3374 - 0 3375 - Decoding is done at the slice granularity. 3376 The OUTPUT buffer must contain a single slice. 3377 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED`` 3378 - 1 3379 - Decoding is done at the frame granularity. 3380 The OUTPUT buffer must contain all slices needed to decode the 3381 frame. The OUTPUT buffer must also contain both fields. 3382 3383.. raw:: latex 3384 3385 \normalsize 3386 3387``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)`` 3388 Specifies the HEVC slice start code expected for each slice. 3389 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE 3390 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE 3391 are required to set this control in order to specify the start code 3392 that is expected for the buffer. 3393 Drivers may expose a single or multiple start codes, depending 3394 on what they can support. 3395 3396 .. note:: 3397 3398 This menu control is not yet part of the public kernel API and 3399 it is expected to change. 3400 3401.. c:type:: v4l2_mpeg_video_hevc_start_code 3402 3403.. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}| 3404 3405.. flat-table:: 3406 :header-rows: 0 3407 :stub-columns: 0 3408 :widths: 1 1 2 3409 3410 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE`` 3411 - 0 3412 - Selecting this value specifies that HEVC slices are passed 3413 to the driver without any start code. The bitstream data should be 3414 according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence 3415 contains emulation prevention bytes when required. 3416 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B`` 3417 - 1 3418 - Selecting this value specifies that HEVC slices are expected 3419 to be prefixed by Annex B start codes. According to :ref:`hevc` 3420 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001. 3421 3422``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)`` 3423 Specifies a priority identifier for the NAL unit, which will be applied to 3424 the base layer. By default this value is set to 0 for the base layer, 3425 and the next layer will have the priority ID assigned as 1, 2, 3 and so on. 3426 The video encoder can't decide the priority id to be applied to a layer, 3427 so this has to come from client. 3428 This is applicable to H264 and valid Range is from 0 to 63. 3429 Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1. 3430