media: docs: split uAPI info from imx.rst
[linux-block.git] / Documentation / media / uapi / v4l / ext-ctrls-codec.rst
CommitLineData
4f14e327
HV
1.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/media/uapi/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. _mpeg-controls:
11
12***********************
13Codec Control Reference
14***********************
15
16Below all controls within the Codec control class are described. First
17the generic controls, then controls specific for certain hardware.
18
19.. note::
20
21 These controls are applicable to all codecs and not just MPEG. The
22 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
23 were originally made for MPEG codecs and later extended to cover all
24 encoding formats.
25
26
27Generic Codec Controls
28======================
29
30
31.. _mpeg-control-id:
32
33Codec Control IDs
34-----------------
35
36``V4L2_CID_MPEG_CLASS (class)``
37 The Codec class descriptor. Calling
38 :ref:`VIDIOC_QUERYCTRL` for this control will
39 return a description of this control class. This description can be
40 used as the caption of a Tab page in a GUI, for example.
41
42.. _v4l2-mpeg-stream-type:
43
44``V4L2_CID_MPEG_STREAM_TYPE``
45 (enum)
46
47enum v4l2_mpeg_stream_type -
48 The MPEG-1, -2 or -4 output stream type. One cannot assume anything
49 here. Each hardware MPEG encoder tends to support different subsets
50 of the available MPEG stream types. This control is specific to
51 multiplexed MPEG streams. The currently defined stream types are:
52
53
54
55.. flat-table::
56 :header-rows: 0
57 :stub-columns: 0
58
59 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
60 - MPEG-2 program stream
61 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
62 - MPEG-2 transport stream
63 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
64 - MPEG-1 system stream
65 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
66 - MPEG-2 DVD-compatible stream
67 * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
68 - MPEG-1 VCD-compatible stream
69 * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
70 - MPEG-2 SVCD-compatible stream
71
72
73
74``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
75 Program Map Table Packet ID for the MPEG transport stream (default
76 16)
77
78``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
79 Audio Packet ID for the MPEG transport stream (default 256)
80
81``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
82 Video Packet ID for the MPEG transport stream (default 260)
83
84``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
85 Packet ID for the MPEG transport stream carrying PCR fields (default
86 259)
87
88``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
89 Audio ID for MPEG PES
90
91``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
92 Video ID for MPEG PES
93
94.. _v4l2-mpeg-stream-vbi-fmt:
95
96``V4L2_CID_MPEG_STREAM_VBI_FMT``
97 (enum)
98
99enum v4l2_mpeg_stream_vbi_fmt -
100 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
101 the MPEG stream. This control selects whether VBI data should be
102 embedded, and if so, what embedding method should be used. The list
103 of possible VBI formats depends on the driver. The currently defined
104 VBI format types are:
105
106
107
94fa831e 108.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|
4f14e327
HV
109
110.. flat-table::
111 :header-rows: 0
112 :stub-columns: 0
113
114 * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
115 - No VBI in the MPEG stream
116 * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
117 - VBI in private packets, IVTV format (documented in the kernel
118 sources in the file
119 ``Documentation/media/v4l-drivers/cx2341x.rst``)
120
121
122
123.. _v4l2-mpeg-audio-sampling-freq:
124
125``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
126 (enum)
127
128enum v4l2_mpeg_audio_sampling_freq -
129 MPEG Audio sampling frequency. Possible values are:
130
131
132
133.. flat-table::
134 :header-rows: 0
135 :stub-columns: 0
136
137 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
138 - 44.1 kHz
139 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
140 - 48 kHz
141 * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
142 - 32 kHz
143
144
145
146.. _v4l2-mpeg-audio-encoding:
147
148``V4L2_CID_MPEG_AUDIO_ENCODING``
149 (enum)
150
151enum v4l2_mpeg_audio_encoding -
152 MPEG Audio encoding. This control is specific to multiplexed MPEG
153 streams. Possible values are:
154
155
156
157.. flat-table::
158 :header-rows: 0
159 :stub-columns: 0
160
161 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
162 - MPEG-1/2 Layer I encoding
163 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
164 - MPEG-1/2 Layer II encoding
165 * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
166 - MPEG-1/2 Layer III encoding
167 * - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
168 - MPEG-2/4 AAC (Advanced Audio Coding)
169 * - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
170 - AC-3 aka ATSC A/52 encoding
171
172
173
174.. _v4l2-mpeg-audio-l1-bitrate:
175
176``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
177 (enum)
178
179enum v4l2_mpeg_audio_l1_bitrate -
180 MPEG-1/2 Layer I bitrate. Possible values are:
181
182
183
184.. flat-table::
185 :header-rows: 0
186 :stub-columns: 0
187
188 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
189 - 32 kbit/s
190 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
191 - 64 kbit/s
192 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
193 - 96 kbit/s
194 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
195 - 128 kbit/s
196 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
197 - 160 kbit/s
198 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
199 - 192 kbit/s
200 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
201 - 224 kbit/s
202 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
203 - 256 kbit/s
204 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
205 - 288 kbit/s
206 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
207 - 320 kbit/s
208 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
209 - 352 kbit/s
210 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
211 - 384 kbit/s
212 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
213 - 416 kbit/s
214 * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
215 - 448 kbit/s
216
217
218
219.. _v4l2-mpeg-audio-l2-bitrate:
220
221``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
222 (enum)
223
224enum v4l2_mpeg_audio_l2_bitrate -
225 MPEG-1/2 Layer II bitrate. Possible values are:
226
227
228
229.. flat-table::
230 :header-rows: 0
231 :stub-columns: 0
232
233 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
234 - 32 kbit/s
235 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
236 - 48 kbit/s
237 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
238 - 56 kbit/s
239 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
240 - 64 kbit/s
241 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
242 - 80 kbit/s
243 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
244 - 96 kbit/s
245 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
246 - 112 kbit/s
247 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
248 - 128 kbit/s
249 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
250 - 160 kbit/s
251 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
252 - 192 kbit/s
253 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
254 - 224 kbit/s
255 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
256 - 256 kbit/s
257 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
258 - 320 kbit/s
259 * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
260 - 384 kbit/s
261
262
263
264.. _v4l2-mpeg-audio-l3-bitrate:
265
266``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
267 (enum)
268
269enum v4l2_mpeg_audio_l3_bitrate -
270 MPEG-1/2 Layer III bitrate. Possible values are:
271
272
273
274.. flat-table::
275 :header-rows: 0
276 :stub-columns: 0
277
278 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
279 - 32 kbit/s
280 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
281 - 40 kbit/s
282 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
283 - 48 kbit/s
284 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
285 - 56 kbit/s
286 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
287 - 64 kbit/s
288 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
289 - 80 kbit/s
290 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
291 - 96 kbit/s
292 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
293 - 112 kbit/s
294 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
295 - 128 kbit/s
296 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
297 - 160 kbit/s
298 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
299 - 192 kbit/s
300 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
301 - 224 kbit/s
302 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
303 - 256 kbit/s
304 * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
305 - 320 kbit/s
306
307
308
309``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
310 AAC bitrate in bits per second.
311
312.. _v4l2-mpeg-audio-ac3-bitrate:
313
314``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
315 (enum)
316
317enum v4l2_mpeg_audio_ac3_bitrate -
318 AC-3 bitrate. Possible values are:
319
320
321
322.. flat-table::
323 :header-rows: 0
324 :stub-columns: 0
325
326 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
327 - 32 kbit/s
328 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
329 - 40 kbit/s
330 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
331 - 48 kbit/s
332 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
333 - 56 kbit/s
334 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
335 - 64 kbit/s
336 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
337 - 80 kbit/s
338 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
339 - 96 kbit/s
340 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
341 - 112 kbit/s
342 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
343 - 128 kbit/s
344 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
345 - 160 kbit/s
346 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
347 - 192 kbit/s
348 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
349 - 224 kbit/s
350 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
351 - 256 kbit/s
352 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
353 - 320 kbit/s
354 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
355 - 384 kbit/s
356 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
357 - 448 kbit/s
358 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
359 - 512 kbit/s
360 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
361 - 576 kbit/s
362 * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
363 - 640 kbit/s
364
365
366
367.. _v4l2-mpeg-audio-mode:
368
369``V4L2_CID_MPEG_AUDIO_MODE``
370 (enum)
371
372enum v4l2_mpeg_audio_mode -
373 MPEG Audio mode. Possible values are:
374
375
376
377.. flat-table::
378 :header-rows: 0
379 :stub-columns: 0
380
381 * - ``V4L2_MPEG_AUDIO_MODE_STEREO``
382 - Stereo
383 * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
384 - Joint Stereo
385 * - ``V4L2_MPEG_AUDIO_MODE_DUAL``
386 - Bilingual
387 * - ``V4L2_MPEG_AUDIO_MODE_MONO``
388 - Mono
389
390
391
392.. _v4l2-mpeg-audio-mode-extension:
393
394``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
395 (enum)
396
397enum v4l2_mpeg_audio_mode_extension -
398 Joint Stereo audio mode extension. In Layer I and II they indicate
399 which subbands are in intensity stereo. All other subbands are coded
400 in stereo. Layer III is not (yet) supported. Possible values are:
401
402
403
404.. flat-table::
405 :header-rows: 0
406 :stub-columns: 0
407
408 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
409 - Subbands 4-31 in intensity stereo
410 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
411 - Subbands 8-31 in intensity stereo
412 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
413 - Subbands 12-31 in intensity stereo
414 * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
415 - Subbands 16-31 in intensity stereo
416
417
418
419.. _v4l2-mpeg-audio-emphasis:
420
421``V4L2_CID_MPEG_AUDIO_EMPHASIS``
422 (enum)
423
424enum v4l2_mpeg_audio_emphasis -
425 Audio Emphasis. Possible values are:
426
427
428
429.. flat-table::
430 :header-rows: 0
431 :stub-columns: 0
432
433 * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
434 - None
435 * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
436 - 50/15 microsecond emphasis
437 * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
438 - CCITT J.17
439
440
441
442.. _v4l2-mpeg-audio-crc:
443
444``V4L2_CID_MPEG_AUDIO_CRC``
445 (enum)
446
447enum v4l2_mpeg_audio_crc -
448 CRC method. Possible values are:
449
450
451
452.. flat-table::
453 :header-rows: 0
454 :stub-columns: 0
455
456 * - ``V4L2_MPEG_AUDIO_CRC_NONE``
457 - None
458 * - ``V4L2_MPEG_AUDIO_CRC_CRC16``
459 - 16 bit parity check
460
461
462
463``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
464 Mutes the audio when capturing. This is not done by muting audio
465 hardware, which can still produce a slight hiss, but in the encoder
466 itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
467 unmuted, 1 = muted.
468
469.. _v4l2-mpeg-audio-dec-playback:
470
471``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
472 (enum)
473
474enum v4l2_mpeg_audio_dec_playback -
475 Determines how monolingual audio should be played back. Possible
476 values are:
477
478
479
94fa831e 480.. tabularcolumns:: |p{9.8cm}|p{7.7cm}|
4f14e327
HV
481
482.. flat-table::
483 :header-rows: 0
484 :stub-columns: 0
485
486 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
487 - Automatically determines the best playback mode.
488 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
489 - Stereo playback.
490 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
491 - Left channel playback.
492 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
493 - Right channel playback.
494 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
495 - Mono playback.
496 * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
497 - Stereo playback with swapped left and right channels.
498
499
500
501.. _v4l2-mpeg-audio-dec-multilingual-playback:
502
503``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
504 (enum)
505
506enum v4l2_mpeg_audio_dec_playback -
507 Determines how multilingual audio should be played back.
508
509.. _v4l2-mpeg-video-encoding:
510
511``V4L2_CID_MPEG_VIDEO_ENCODING``
512 (enum)
513
514enum v4l2_mpeg_video_encoding -
515 MPEG Video encoding method. This control is specific to multiplexed
516 MPEG streams. Possible values are:
517
518
519
520.. flat-table::
521 :header-rows: 0
522 :stub-columns: 0
523
524 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
525 - MPEG-1 Video encoding
526 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
527 - MPEG-2 Video encoding
528 * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
529 - MPEG-4 AVC (H.264) Video encoding
530
531
532
533.. _v4l2-mpeg-video-aspect:
534
535``V4L2_CID_MPEG_VIDEO_ASPECT``
536 (enum)
537
538enum v4l2_mpeg_video_aspect -
539 Video aspect. Possible values are:
540
541
542
543.. flat-table::
544 :header-rows: 0
545 :stub-columns: 0
546
547 * - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
548 * - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
549 * - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
550 * - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
551
552
553
554``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
555 Number of B-Frames (default 2)
556
557``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
558 GOP size (default 12)
559
560``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
561 GOP closure (default 1)
562
563``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
564 Enable 3:2 pulldown (default 0)
565
566.. _v4l2-mpeg-video-bitrate-mode:
567
568``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
569 (enum)
570
571enum v4l2_mpeg_video_bitrate_mode -
572 Video bitrate mode. Possible values are:
573
574
575
576.. flat-table::
577 :header-rows: 0
578 :stub-columns: 0
579
580 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
581 - Variable bitrate
582 * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
583 - Constant bitrate
584
585
586
587``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
588 Video bitrate in bits per second.
589
590``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
591 Peak video bitrate in bits per second. Must be larger or equal to
592 the average video bitrate. It is ignored if the video bitrate mode
593 is set to constant bitrate.
594
595``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
596 For every captured frame, skip this many subsequent frames (default
597 0).
598
599``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
600 "Mutes" the video to a fixed color when capturing. This is useful
601 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
602 muted.
603
604``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
605 Sets the "mute" color of the video. The supplied 32-bit integer is
606 interpreted as follows (bit 0 = least significant bit):
607
608
609
610.. flat-table::
611 :header-rows: 0
612 :stub-columns: 0
613
614 * - Bit 0:7
615 - V chrominance information
616 * - Bit 8:15
617 - U chrominance information
618 * - Bit 16:23
619 - Y luminance information
620 * - Bit 24:31
621 - Must be zero.
622
623
624
625.. _v4l2-mpeg-video-dec-pts:
626
627``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
628 This read-only control returns the 33-bit video Presentation Time
629 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
630 currently displayed frame. This is the same PTS as is used in
631 :ref:`VIDIOC_DECODER_CMD`.
632
633.. _v4l2-mpeg-video-dec-frame:
634
635``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
636 This read-only control returns the frame counter of the frame that
637 is currently displayed (decoded). This value is reset to 0 whenever
638 the decoder is started.
639
640``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
641 If enabled the decoder expects to receive a single slice per buffer,
642 otherwise the decoder expects a single frame in per buffer.
643 Applicable to the decoder, all codecs.
644
645``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
646 Enable writing sample aspect ratio in the Video Usability
647 Information. Applicable to the H264 encoder.
648
649.. _v4l2-mpeg-video-h264-vui-sar-idc:
650
651``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
652 (enum)
653
654enum v4l2_mpeg_video_h264_vui_sar_idc -
655 VUI sample aspect ratio indicator for H.264 encoding. The value is
656 defined in the table E-1 in the standard. Applicable to the H264
657 encoder.
658
659
660
661.. flat-table::
662 :header-rows: 0
663 :stub-columns: 0
664
665 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
666 - Unspecified
667 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
668 - 1x1
669 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
670 - 12x11
671 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
672 - 10x11
673 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
674 - 16x11
675 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
676 - 40x33
677 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
678 - 24x11
679 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
680 - 20x11
681 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
682 - 32x11
683 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
684 - 80x33
685 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
686 - 18x11
687 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
688 - 15x11
689 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
690 - 64x33
691 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
692 - 160x99
693 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
694 - 4x3
695 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
696 - 3x2
697 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
698 - 2x1
699 * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
700 - Extended SAR
701
702
703
704``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
705 Extended sample aspect ratio width for H.264 VUI encoding.
706 Applicable to the H264 encoder.
707
708``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
709 Extended sample aspect ratio height for H.264 VUI encoding.
710 Applicable to the H264 encoder.
711
712.. _v4l2-mpeg-video-h264-level:
713
714``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
715 (enum)
716
717enum v4l2_mpeg_video_h264_level -
718 The level information for the H264 video elementary stream.
719 Applicable to the H264 encoder. Possible values are:
720
721
722
723.. flat-table::
724 :header-rows: 0
725 :stub-columns: 0
726
727 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
728 - Level 1.0
729 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
730 - Level 1B
731 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
732 - Level 1.1
733 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
734 - Level 1.2
735 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
736 - Level 1.3
737 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
738 - Level 2.0
739 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
740 - Level 2.1
741 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
742 - Level 2.2
743 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
744 - Level 3.0
745 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
746 - Level 3.1
747 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
748 - Level 3.2
749 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
750 - Level 4.0
751 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
752 - Level 4.1
753 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
754 - Level 4.2
755 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
756 - Level 5.0
757 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
758 - Level 5.1
759
760
761
5902bca9
PZ
762.. _v4l2-mpeg-video-mpeg2-level:
763
764``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
765 (enum)
766
767enum v4l2_mpeg_video_mpeg2_level -
768 The level information for the MPEG2 elementary stream. Applicable to
769 MPEG2 codecs. Possible values are:
770
771
772
773.. flat-table::
774 :header-rows: 0
775 :stub-columns: 0
776
777 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
778 - Low Level (LL)
779 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
780 - Main Level (ML)
781 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
782 - High-1440 Level (H-14)
783 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
784 - High Level (HL)
785
786
787
4f14e327
HV
788.. _v4l2-mpeg-video-mpeg4-level:
789
790``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
791 (enum)
792
793enum v4l2_mpeg_video_mpeg4_level -
794 The level information for the MPEG4 elementary stream. Applicable to
795 the MPEG4 encoder. Possible values are:
796
797
798
799.. flat-table::
800 :header-rows: 0
801 :stub-columns: 0
802
803 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
804 - Level 0
805 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
806 - Level 0b
807 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
808 - Level 1
809 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
810 - Level 2
811 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
812 - Level 3
813 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
814 - Level 3b
815 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
816 - Level 4
817 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
818 - Level 5
819
820
821
822.. _v4l2-mpeg-video-h264-profile:
823
824``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
825 (enum)
826
827enum v4l2_mpeg_video_h264_profile -
828 The profile information for H264. Applicable to the H264 encoder.
829 Possible values are:
830
831
832
833.. flat-table::
834 :header-rows: 0
835 :stub-columns: 0
836
837 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
838 - Baseline profile
839 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
840 - Constrained Baseline profile
841 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
842 - Main profile
843 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
844 - Extended profile
845 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
846 - High profile
847 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
848 - High 10 profile
849 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
850 - High 422 profile
851 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
852 - High 444 Predictive profile
853 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
854 - High 10 Intra profile
855 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
856 - High 422 Intra profile
857 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
858 - High 444 Intra profile
859 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
860 - CAVLC 444 Intra profile
861 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
862 - Scalable Baseline profile
863 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
864 - Scalable High profile
865 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
866 - Scalable High Intra profile
867 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
868 - Stereo High profile
869 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
870 - Multiview High profile
871
872
873
5902bca9
PZ
874.. _v4l2-mpeg-video-mpeg2-profile:
875
876``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
877 (enum)
878
879enum v4l2_mpeg_video_mpeg2_profile -
880 The profile information for MPEG2. Applicable to MPEG2 codecs.
881 Possible values are:
882
883
884
885.. flat-table::
886 :header-rows: 0
887 :stub-columns: 0
888
889 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
890 - Simple profile (SP)
891 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
892 - Main profile (MP)
893 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
894 - SNR Scalable profile (SNR)
895 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
896 - Spatially Scalable profile (Spt)
897 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
898 - High profile (HP)
899 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
900 - Multi-view profile (MVP)
901
902
903
4f14e327
HV
904.. _v4l2-mpeg-video-mpeg4-profile:
905
906``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
907 (enum)
908
909enum v4l2_mpeg_video_mpeg4_profile -
910 The profile information for MPEG4. Applicable to the MPEG4 encoder.
911 Possible values are:
912
913
914
915.. flat-table::
916 :header-rows: 0
917 :stub-columns: 0
918
919 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
920 - Simple profile
921 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
922 - Advanced Simple profile
923 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
924 - Core profile
925 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
926 - Simple Scalable profile
927 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
928 -
929
930
931
932``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
933 The maximum number of reference pictures used for encoding.
934 Applicable to the encoder.
935
936.. _v4l2-mpeg-video-multi-slice-mode:
937
938``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
939 (enum)
940
941enum v4l2_mpeg_video_multi_slice_mode -
942 Determines how the encoder should handle division of frame into
943 slices. Applicable to the encoder. Possible values are:
944
945
946
94fa831e 947.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
4f14e327
HV
948
949.. flat-table::
950 :header-rows: 0
951 :stub-columns: 0
952
953 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
954 - Single slice per frame.
955 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
956 - Multiple slices with set maximum number of macroblocks per slice.
957 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
958 - Multiple slice with set maximum size in bytes per slice.
959
960
961
962``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
963 The maximum number of macroblocks in a slice. Used when
964 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
965 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
966 encoder.
967
968``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
969 The maximum size of a slice in bytes. Used when
970 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
971 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
972 encoder.
973
974.. _v4l2-mpeg-video-h264-loop-filter-mode:
975
976``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
977 (enum)
978
979enum v4l2_mpeg_video_h264_loop_filter_mode -
980 Loop filter mode for H264 encoder. Possible values are:
981
94fa831e 982.. raw:: latex
4f14e327 983
94fa831e 984 \small
4f14e327 985
94fa831e 986.. tabularcolumns:: |p{13.6cm}|p{3.9cm}|
4f14e327
HV
987
988.. flat-table::
989 :header-rows: 0
990 :stub-columns: 0
991
992 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
993 - Loop filter is enabled.
994 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
995 - Loop filter is disabled.
996 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
997 - Loop filter is disabled at the slice boundary.
998
94fa831e
MCC
999.. raw:: latex
1000
1001 \normalsize
4f14e327
HV
1002
1003
1004``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1005 Loop filter alpha coefficient, defined in the H264 standard.
1006 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1007 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1008 offset FilterOffsetA is twice this value.
1009 Applicable to the H264 encoder.
1010
1011``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1012 Loop filter beta coefficient, defined in the H264 standard.
1013 This corresponds to the slice_beta_offset_div2 slice header field, and
1014 should be in the range of -6 to +6, inclusive. The actual beta offset
1015 FilterOffsetB is twice this value.
1016 Applicable to the H264 encoder.
1017
1018.. _v4l2-mpeg-video-h264-entropy-mode:
1019
1020``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1021 (enum)
1022
1023enum v4l2_mpeg_video_h264_entropy_mode -
1024 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1025 encoder. Possible values are:
1026
1027
94fa831e
MCC
1028.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1029
4f14e327
HV
1030
1031.. flat-table::
1032 :header-rows: 0
1033 :stub-columns: 0
1034
1035 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1036 - Use CAVLC entropy coding.
1037 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1038 - Use CABAC entropy coding.
1039
1040
1041
1042``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1043 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1044
1045``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1046 Enable constrained intra prediction for H264. Applicable to the H264
1047 encoder.
1048
1049``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1050 Specify the offset that should be added to the luma quantization
1051 parameter to determine the chroma quantization parameter. Applicable
1052 to the H264 encoder.
1053
1054``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1055 Cyclic intra macroblock refresh. This is the number of continuous
1056 macroblocks refreshed every frame. Each frame a successive set of
1057 macroblocks is refreshed until the cycle completes and starts from
1058 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1059
1060``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1061 Frame level rate control enable. If this control is disabled then
1062 the quantization parameter for each frame type is constant and set
1063 with appropriate controls (e.g.
1064 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1065 enabled then quantization parameter is adjusted to meet the chosen
1066 bitrate. Minimum and maximum value for the quantization parameter
1067 can be set with appropriate controls (e.g.
1068 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1069
1070``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1071 Macroblock level rate control enable. Applicable to the MPEG4 and
1072 H264 encoders.
1073
1074``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1075 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1076 encoder.
1077
1078``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1079 Quantization parameter for an I frame for H263. Valid range: from 1
1080 to 31.
1081
1082``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1083 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1084
1085``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1086 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1087
1088``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1089 Quantization parameter for an P frame for H263. Valid range: from 1
1090 to 31.
1091
1092``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1093 Quantization parameter for an B frame for H263. Valid range: from 1
1094 to 31.
1095
1096``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1097 Quantization parameter for an I frame for H264. Valid range: from 0
1098 to 51.
1099
1100``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1101 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1102
1103``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1104 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1105
1106``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1107 Quantization parameter for an P frame for H264. Valid range: from 0
1108 to 51.
1109
1110``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1111 Quantization parameter for an B frame for H264. Valid range: from 0
1112 to 51.
1113
87effaae
FL
1114``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1115 Minimum quantization parameter for the H264 I frame to limit I frame
1116 quality to a range. Valid range: from 0 to 51. If
1117 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1118 should be chosen to meet both requirements.
1119
1120``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1121 Maximum quantization parameter for the H264 I frame to limit I frame
1122 quality to a range. Valid range: from 0 to 51. If
1123 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1124 should be chosen to meet both requirements.
1125
1126``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1127 Minimum quantization parameter for the H264 P frame to limit P frame
1128 quality to a range. Valid range: from 0 to 51. If
1129 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1130 should be chosen to meet both requirements.
1131
1132``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1133 Maximum quantization parameter for the H264 P frame to limit P frame
1134 quality to a range. Valid range: from 0 to 51. If
1135 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1136 should be chosen to meet both requirements.
1137
4f14e327
HV
1138``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1139 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1140 to 31.
1141
1142``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1143 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1144
1145``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1146 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1147
1148``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1149 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1150 to 31.
1151
1152``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1153 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1154 to 31.
1155
1156``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1157 The Video Buffer Verifier size in kilobytes, it is used as a
1158 limitation of frame skip. The VBV is defined in the standard as a
1159 mean to verify that the produced stream will be successfully
1160 decoded. The standard describes it as "Part of a hypothetical
1161 decoder that is conceptually connected to the output of the encoder.
1162 Its purpose is to provide a constraint on the variability of the
1163 data rate that an encoder or editing process may produce.".
1164 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1165
1166.. _v4l2-mpeg-video-vbv-delay:
1167
1168``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1169 Sets the initial delay in milliseconds for VBV buffer control.
1170
1171.. _v4l2-mpeg-video-hor-search-range:
1172
1173``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1174 Horizontal search range defines maximum horizontal search area in
1175 pixels to search and match for the present Macroblock (MB) in the
1176 reference picture. This V4L2 control macro is used to set horizontal
1177 search range for motion estimation module in video encoder.
1178
1179.. _v4l2-mpeg-video-vert-search-range:
1180
1181``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1182 Vertical search range defines maximum vertical search area in pixels
1183 to search and match for the present Macroblock (MB) in the reference
1184 picture. This V4L2 control macro is used to set vertical search
1185 range for motion estimation module in video encoder.
1186
1187.. _v4l2-mpeg-video-force-key-frame:
1188
1189``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1190 Force a key frame for the next queued buffer. Applicable to
1191 encoders. This is a general, codec-agnostic keyframe control.
1192
1193``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1194 The Coded Picture Buffer size in kilobytes, it is used as a
1195 limitation of frame skip. The CPB is defined in the H264 standard as
1196 a mean to verify that the produced stream will be successfully
1197 decoded. Applicable to the H264 encoder.
1198
1199``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1200 Period between I-frames in the open GOP for H264. In case of an open
1201 GOP this is the period between two I-frames. The period between IDR
1202 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1203 control. An IDR frame, which stands for Instantaneous Decoding
1204 Refresh is an I-frame after which no prior frames are referenced.
1205 This means that a stream can be restarted from an IDR frame without
1206 the need to store or decode any previous frames. Applicable to the
1207 H264 encoder.
1208
1209.. _v4l2-mpeg-video-header-mode:
1210
1211``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1212 (enum)
1213
1214enum v4l2_mpeg_video_header_mode -
1215 Determines whether the header is returned as the first buffer or is
1216 it returned together with the first frame. Applicable to encoders.
1217 Possible values are:
1218
94fa831e 1219.. raw:: latex
4f14e327 1220
94fa831e 1221 \small
4f14e327
HV
1222
1223.. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1224
1225.. flat-table::
1226 :header-rows: 0
1227 :stub-columns: 0
1228
1229 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1230 - The stream header is returned separately in the first buffer.
1231 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1232 - The stream header is returned together with the first encoded
1233 frame.
1234
94fa831e
MCC
1235.. raw:: latex
1236
1237 \normalsize
4f14e327
HV
1238
1239
1240``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1241 Repeat the video sequence headers. Repeating these headers makes
1242 random access to the video stream easier. Applicable to the MPEG1, 2
1243 and 4 encoder.
1244
1245``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1246 Enabled the deblocking post processing filter for MPEG4 decoder.
1247 Applicable to the MPEG4 decoder.
1248
1249``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1250 vop_time_increment_resolution value for MPEG4. Applicable to the
1251 MPEG4 encoder.
1252
1253``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1254 vop_time_increment value for MPEG4. Applicable to the MPEG4
1255 encoder.
1256
1257``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1258 Enable generation of frame packing supplemental enhancement
1259 information in the encoded bitstream. The frame packing SEI message
1260 contains the arrangement of L and R planes for 3D viewing.
1261 Applicable to the H264 encoder.
1262
1263``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1264 Sets current frame as frame0 in frame packing SEI. Applicable to the
1265 H264 encoder.
1266
1267.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1268
1269``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1270 (enum)
1271
1272enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1273 Frame packing arrangement type for H264 SEI. Applicable to the H264
1274 encoder. Possible values are:
1275
94fa831e
MCC
1276.. raw:: latex
1277
1278 \small
1279
4f14e327
HV
1280.. tabularcolumns:: |p{12cm}|p{5.5cm}|
1281
1282.. flat-table::
1283 :header-rows: 0
1284 :stub-columns: 0
1285
1286 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1287 - Pixels are alternatively from L and R.
1288 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1289 - L and R are interlaced by column.
1290 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1291 - L and R are interlaced by row.
1292 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1293 - L is on the left, R on the right.
1294 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1295 - L is on top, R on bottom.
1296 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1297 - One view per frame.
1298
94fa831e
MCC
1299.. raw:: latex
1300
1301 \normalsize
1302
4f14e327
HV
1303
1304
1305``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1306 Enables flexible macroblock ordering in the encoded bitstream. It is
1307 a technique used for restructuring the ordering of macroblocks in
1308 pictures. Applicable to the H264 encoder.
1309
1310.. _v4l2-mpeg-video-h264-fmo-map-type:
1311
1312``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1313 (enum)
1314
1315enum v4l2_mpeg_video_h264_fmo_map_type -
1316 When using FMO, the map type divides the image in different scan
1317 patterns of macroblocks. Applicable to the H264 encoder. Possible
1318 values are:
1319
94fa831e
MCC
1320.. raw:: latex
1321
1322 \small
1323
4f14e327
HV
1324.. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1325
1326.. flat-table::
1327 :header-rows: 0
1328 :stub-columns: 0
1329
1330 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1331 - Slices are interleaved one after other with macroblocks in run
1332 length order.
1333 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1334 - Scatters the macroblocks based on a mathematical function known to
1335 both encoder and decoder.
1336 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1337 - Macroblocks arranged in rectangular areas or regions of interest.
1338 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1339 - Slice groups grow in a cyclic way from centre to outwards.
1340 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1341 - Slice groups grow in raster scan pattern from left to right.
1342 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1343 - Slice groups grow in wipe scan pattern from top to bottom.
1344 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1345 - User defined map type.
1346
94fa831e
MCC
1347.. raw:: latex
1348
1349 \normalsize
1350
4f14e327
HV
1351
1352
1353``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1354 Number of slice groups in FMO. Applicable to the H264 encoder.
1355
1356.. _v4l2-mpeg-video-h264-fmo-change-direction:
1357
1358``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1359 (enum)
1360
1361enum v4l2_mpeg_video_h264_fmo_change_dir -
1362 Specifies a direction of the slice group change for raster and wipe
1363 maps. Applicable to the H264 encoder. Possible values are:
1364
1365
1366
1367.. flat-table::
1368 :header-rows: 0
1369 :stub-columns: 0
1370
1371 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1372 - Raster scan or wipe right.
1373 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1374 - Reverse raster scan or wipe left.
1375
1376
1377
1378``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1379 Specifies the size of the first slice group for raster and wipe map.
1380 Applicable to the H264 encoder.
1381
1382``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1383 Specifies the number of consecutive macroblocks for the interleaved
1384 map. Applicable to the H264 encoder.
1385
1386``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1387 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1388 the H264 encoder.
1389
1390``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1391 Specifies the slice order in ASO. Applicable to the H264 encoder.
1392 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1393 significant bit):
1394
1395
1396
1397.. flat-table::
1398 :header-rows: 0
1399 :stub-columns: 0
1400
1401 * - Bit 0:15
1402 - Slice ID
1403 * - Bit 16:32
1404 - Slice position or order
1405
1406
1407
1408``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1409 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1410
1411.. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1412
1413``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1414 (enum)
1415
1416enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1417 Specifies the hierarchical coding type. Applicable to the H264
1418 encoder. Possible values are:
1419
1420
1421
1422.. flat-table::
1423 :header-rows: 0
1424 :stub-columns: 0
1425
1426 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1427 - Hierarchical B coding.
1428 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1429 - Hierarchical P coding.
1430
1431
1432
1433``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1434 Specifies the number of hierarchical coding layers. Applicable to
1435 the H264 encoder.
1436
1437``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1438 Specifies a user defined QP for each layer. Applicable to the H264
1439 encoder. The supplied 32-bit integer is interpreted as follows (bit
1440 0 = least significant bit):
1441
1442
1443
1444.. flat-table::
1445 :header-rows: 0
1446 :stub-columns: 0
1447
1448 * - Bit 0:15
1449 - QP value
1450 * - Bit 16:32
1451 - Layer number
1452
1453
1f0545d3
PO
1454.. _v4l2-mpeg-h264:
1455
1456``V4L2_CID_MPEG_VIDEO_H264_SPS (struct)``
1457 Specifies the sequence parameter set (as extracted from the
1458 bitstream) for the associated H264 slice data. This includes the
1459 necessary parameters for configuring a stateless hardware decoding
1460 pipeline for H264. The bitstream parameters are defined according
1461 to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
1462 Semantics". For further documentation, refer to the above
1463 specification, unless there is an explicit comment stating
1464 otherwise.
1465
1466 .. note::
1467
1468 This compound control is not yet part of the public kernel API and
1469 it is expected to change.
1470
1471.. c:type:: v4l2_ctrl_h264_sps
1472
1473.. cssclass:: longtable
1474
1475.. flat-table:: struct v4l2_ctrl_h264_sps
1476 :header-rows: 0
1477 :stub-columns: 0
1478 :widths: 1 1 2
1479
1480 * - __u8
1481 - ``profile_idc``
1482 -
1483 * - __u8
1484 - ``constraint_set_flags``
1485 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
1486 * - __u8
1487 - ``level_idc``
1488 -
1489 * - __u8
1490 - ``seq_parameter_set_id``
1491 -
1492 * - __u8
1493 - ``chroma_format_idc``
1494 -
1495 * - __u8
1496 - ``bit_depth_luma_minus8``
1497 -
1498 * - __u8
1499 - ``bit_depth_chroma_minus8``
1500 -
1501 * - __u8
1502 - ``log2_max_frame_num_minus4``
1503 -
1504 * - __u8
1505 - ``pic_order_cnt_type``
1506 -
1507 * - __u8
1508 - ``log2_max_pic_order_cnt_lsb_minus4``
1509 -
1510 * - __u8
1511 - ``max_num_ref_frames``
1512 -
1513 * - __u8
1514 - ``num_ref_frames_in_pic_order_cnt_cycle``
1515 -
1516 * - __s32
1517 - ``offset_for_ref_frame[255]``
1518 -
1519 * - __s32
1520 - ``offset_for_non_ref_pic``
1521 -
1522 * - __s32
1523 - ``offset_for_top_to_bottom_field``
1524 -
1525 * - __u16
1526 - ``pic_width_in_mbs_minus1``
1527 -
1528 * - __u16
1529 - ``pic_height_in_map_units_minus1``
1530 -
1531 * - __u32
1532 - ``flags``
1533 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
1534
1535.. _h264_sps_constraints_set_flags:
1536
1537``Sequence Parameter Set Constraints Set Flags``
1538
1539.. cssclass:: longtable
1540
1541.. flat-table::
1542 :header-rows: 0
1543 :stub-columns: 0
1544 :widths: 1 1 2
1545
1546 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
1547 - 0x00000001
1548 -
1549 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
1550 - 0x00000002
1551 -
1552 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
1553 - 0x00000004
1554 -
1555 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
1556 - 0x00000008
1557 -
1558 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
1559 - 0x00000010
1560 -
1561 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
1562 - 0x00000020
1563 -
1564
1565.. _h264_sps_flags:
1566
1567``Sequence Parameter Set Flags``
1568
1569.. cssclass:: longtable
1570
1571.. flat-table::
1572 :header-rows: 0
1573 :stub-columns: 0
1574 :widths: 1 1 2
1575
1576 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
1577 - 0x00000001
1578 -
1579 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
1580 - 0x00000002
1581 -
1582 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
1583 - 0x00000004
1584 -
1585 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
1586 - 0x00000008
1587 -
1588 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
1589 - 0x00000010
1590 -
1591 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
1592 - 0x00000020
1593 -
1594 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
1595 - 0x00000040
1596 -
1597
1598``V4L2_CID_MPEG_VIDEO_H264_PPS (struct)``
1599 Specifies the picture parameter set (as extracted from the
1600 bitstream) for the associated H264 slice data. This includes the
1601 necessary parameters for configuring a stateless hardware decoding
1602 pipeline for H264. The bitstream parameters are defined according
1603 to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
1604 Semantics". For further documentation, refer to the above
1605 specification, unless there is an explicit comment stating
1606 otherwise.
1607
1608 .. note::
1609
1610 This compound control is not yet part of the public kernel API and
1611 it is expected to change.
1612
1613.. c:type:: v4l2_ctrl_h264_pps
1614
1615.. cssclass:: longtable
1616
1617.. flat-table:: struct v4l2_ctrl_h264_pps
1618 :header-rows: 0
1619 :stub-columns: 0
1620 :widths: 1 1 2
1621
1622 * - __u8
1623 - ``pic_parameter_set_id``
1624 -
1625 * - __u8
1626 - ``seq_parameter_set_id``
1627 -
1628 * - __u8
1629 - ``num_slice_groups_minus1``
1630 -
1631 * - __u8
1632 - ``num_ref_idx_l0_default_active_minus1``
1633 -
1634 * - __u8
1635 - ``num_ref_idx_l1_default_active_minus1``
1636 -
1637 * - __u8
1638 - ``weighted_bipred_idc``
1639 -
1640 * - __s8
1641 - ``pic_init_qp_minus26``
1642 -
1643 * - __s8
1644 - ``pic_init_qs_minus26``
1645 -
1646 * - __s8
1647 - ``chroma_qp_index_offset``
1648 -
1649 * - __s8
1650 - ``second_chroma_qp_index_offset``
1651 -
1652 * - __u16
1653 - ``flags``
1654 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
1655
1656.. _h264_pps_flags:
1657
1658``Picture Parameter Set Flags``
1659
1660.. cssclass:: longtable
1661
1662.. flat-table::
1663 :header-rows: 0
1664 :stub-columns: 0
1665 :widths: 1 1 2
1666
1667 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
1668 - 0x00000001
1669 -
1670 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
1671 - 0x00000002
1672 -
1673 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
1674 - 0x00000004
1675 -
1676 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
1677 - 0x00000008
1678 -
1679 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
1680 - 0x00000010
1681 -
1682 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
1683 - 0x00000020
1684 -
1685 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
1686 - 0x00000040
1687 -
1688 * - ``V4L2_H264_PPS_FLAG_PIC_SCALING_MATRIX_PRESENT``
1689 - 0x00000080
1690 -
1691
1692``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX (struct)``
1693 Specifies the scaling matrix (as extracted from the bitstream) for
1694 the associated H264 slice data. The bitstream parameters are
1695 defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
1696 List Semantics". For further documentation, refer to the above
1697 specification, unless there is an explicit comment stating
1698 otherwise.
1699
1700 .. note::
1701
1702 This compound control is not yet part of the public kernel API and
1703 it is expected to change.
1704
1705.. c:type:: v4l2_ctrl_h264_scaling_matrix
1706
1707.. cssclass:: longtable
1708
1709.. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
1710 :header-rows: 0
1711 :stub-columns: 0
1712 :widths: 1 1 2
1713
1714 * - __u8
1715 - ``scaling_list_4x4[6][16]``
0b0393d5
JK
1716 - Scaling matrix after applying the inverse scanning process.
1717 Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
1718 Inter Cb, Inter Cr.
1f0545d3
PO
1719 * - __u8
1720 - ``scaling_list_8x8[6][64]``
0b0393d5
JK
1721 - Scaling matrix after applying the inverse scanning process.
1722 Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
1723 Intra Cr, Inter Cr.
1f0545d3
PO
1724
1725``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS (struct)``
1726 Specifies the slice parameters (as extracted from the bitstream)
1727 for the associated H264 slice data. This includes the necessary
1728 parameters for configuring a stateless hardware decoding pipeline
1729 for H264. The bitstream parameters are defined according to
1730 :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
1731 documentation, refer to the above specification, unless there is
1732 an explicit comment stating otherwise.
1733
1734 .. note::
1735
1736 This compound control is not yet part of the public kernel API
1737 and it is expected to change.
1738
1739 This structure is expected to be passed as an array, with one
1740 entry for each slice included in the bitstream buffer.
1741
1742.. c:type:: v4l2_ctrl_h264_slice_params
1743
1744.. cssclass:: longtable
1745
1746.. flat-table:: struct v4l2_ctrl_h264_slice_params
1747 :header-rows: 0
1748 :stub-columns: 0
1749 :widths: 1 1 2
1750
1751 * - __u32
1752 - ``size``
1753 -
5604be66
BB
1754 * - __u32
1755 - ``start_byte_offset``
1756 Offset (in bytes) from the beginning of the OUTPUT buffer to the start
1757 of the slice. If the slice starts with a start code, then this is the
1758 offset to such start code. When operating in slice-based decoding mode
1759 (see :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field should
1760 be set to 0. When operating in frame-based decoding mode, this field
1761 should be 0 for the first slice.
1f0545d3
PO
1762 * - __u32
1763 - ``header_bit_size``
1764 -
1765 * - __u16
1766 - ``first_mb_in_slice``
1767 -
1768 * - __u8
1769 - ``slice_type``
1770 -
1771 * - __u8
1772 - ``pic_parameter_set_id``
1773 -
1774 * - __u8
1775 - ``colour_plane_id``
1776 -
1777 * - __u8
1778 - ``redundant_pic_cnt``
1779 -
1780 * - __u16
1781 - ``frame_num``
1782 -
1783 * - __u16
1784 - ``idr_pic_id``
1785 -
1786 * - __u16
1787 - ``pic_order_cnt_lsb``
1788 -
1789 * - __s32
1790 - ``delta_pic_order_cnt_bottom``
1791 -
1792 * - __s32
1793 - ``delta_pic_order_cnt0``
1794 -
1795 * - __s32
1796 - ``delta_pic_order_cnt1``
1797 -
1798 * - struct :c:type:`v4l2_h264_pred_weight_table`
1799 - ``pred_weight_table``
1800 -
1801 * - __u32
1802 - ``dec_ref_pic_marking_bit_size``
3ff8b2c6 1803 - Size in bits of the dec_ref_pic_marking() syntax element.
1f0545d3
PO
1804 * - __u32
1805 - ``pic_order_cnt_bit_size``
1806 -
1807 * - __u8
1808 - ``cabac_init_idc``
1809 -
1810 * - __s8
1811 - ``slice_qp_delta``
1812 -
1813 * - __s8
1814 - ``slice_qs_delta``
1815 -
1816 * - __u8
1817 - ``disable_deblocking_filter_idc``
1818 -
1819 * - __s8
1820 - ``slice_alpha_c0_offset_div2``
1821 -
1822 * - __s8
1823 - ``slice_beta_offset_div2``
1824 -
1825 * - __u8
1826 - ``num_ref_idx_l0_active_minus1``
187ef7c5
PZ
1827 - If num_ref_idx_active_override_flag is not set, this field must be
1828 set to the value of num_ref_idx_l0_default_active_minus1.
1f0545d3
PO
1829 * - __u8
1830 - ``num_ref_idx_l1_active_minus1``
187ef7c5
PZ
1831 - If num_ref_idx_active_override_flag is not set, this field must be
1832 set to the value of num_ref_idx_l1_default_active_minus1.
1f0545d3
PO
1833 * - __u32
1834 - ``slice_group_change_cycle``
1835 -
1836 * - __u8
1837 - ``ref_pic_list0[32]``
1838 - Reference picture list after applying the per-slice modifications
1839 * - __u8
1840 - ``ref_pic_list1[32]``
1841 - Reference picture list after applying the per-slice modifications
1842 * - __u32
1843 - ``flags``
1844 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
1845
1846.. _h264_slice_flags:
1847
1848``Slice Parameter Set Flags``
1849
1850.. cssclass:: longtable
1851
1852.. flat-table::
1853 :header-rows: 0
1854 :stub-columns: 0
1855 :widths: 1 1 2
1856
1857 * - ``V4L2_H264_SLICE_FLAG_FIELD_PIC``
1858 - 0x00000001
1859 -
1860 * - ``V4L2_H264_SLICE_FLAG_BOTTOM_FIELD``
1861 - 0x00000002
1862 -
1863 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
1864 - 0x00000004
1865 -
1866 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
1867 - 0x00000008
1868 -
1869
1870``Prediction Weight Table``
1871
1872 The bitstream parameters are defined according to :ref:`h264`,
1873 section 7.4.3.2 "Prediction Weight Table Semantics". For further
1874 documentation, refer to the above specification, unless there is
1875 an explicit comment stating otherwise.
1876
1877.. c:type:: v4l2_h264_pred_weight_table
1878
1879.. cssclass:: longtable
1880
1881.. flat-table:: struct v4l2_h264_pred_weight_table
1882 :header-rows: 0
1883 :stub-columns: 0
1884 :widths: 1 1 2
1885
1886 * - __u16
1887 - ``luma_log2_weight_denom``
1888 -
1889 * - __u16
1890 - ``chroma_log2_weight_denom``
1891 -
1892 * - struct :c:type:`v4l2_h264_weight_factors`
1893 - ``weight_factors[2]``
1894 - The weight factors at index 0 are the weight factors for the reference
1895 list 0, the one at index 1 for the reference list 1.
1896
1897.. c:type:: v4l2_h264_weight_factors
1898
1899.. cssclass:: longtable
1900
1901.. flat-table:: struct v4l2_h264_weight_factors
1902 :header-rows: 0
1903 :stub-columns: 0
1904 :widths: 1 1 2
1905
1906 * - __s16
1907 - ``luma_weight[32]``
1908 -
1909 * - __s16
1910 - ``luma_offset[32]``
1911 -
1912 * - __s16
1913 - ``chroma_weight[32][2]``
1914 -
1915 * - __s16
1916 - ``chroma_offset[32][2]``
1917 -
1918
1919``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS (struct)``
1920 Specifies the decode parameters (as extracted from the bitstream)
1921 for the associated H264 slice data. This includes the necessary
1922 parameters for configuring a stateless hardware decoding pipeline
1923 for H264. The bitstream parameters are defined according to
1924 :ref:`h264`. For further documentation, refer to the above
1925 specification, unless there is an explicit comment stating
1926 otherwise.
1927
1928 .. note::
1929
1930 This compound control is not yet part of the public kernel API and
1931 it is expected to change.
1932
1933.. c:type:: v4l2_ctrl_h264_decode_params
1934
1935.. cssclass:: longtable
1936
1937.. flat-table:: struct v4l2_ctrl_h264_decode_params
1938 :header-rows: 0
1939 :stub-columns: 0
1940 :widths: 1 1 2
1941
1942 * - struct :c:type:`v4l2_h264_dpb_entry`
1943 - ``dpb[16]``
1944 -
1945 * - __u16
1946 - ``num_slices``
5604be66
BB
1947 - Number of slices needed to decode the current frame/field. When
1948 operating in slice-based decoding mode (see
1949 :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field
1950 should always be set to one.
1f0545d3
PO
1951 * - __u16
1952 - ``nal_ref_idc``
1953 - NAL reference ID value coming from the NAL Unit header
1f0545d3
PO
1954 * - __s32
1955 - ``top_field_order_cnt``
1956 - Picture Order Count for the coded top field
1957 * - __s32
1958 - ``bottom_field_order_cnt``
1959 - Picture Order Count for the coded bottom field
1960 * - __u32
1961 - ``flags``
1962 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
1963
1964.. _h264_decode_params_flags:
1965
1966``Decode Parameters Flags``
1967
1968.. cssclass:: longtable
1969
1970.. flat-table::
1971 :header-rows: 0
1972 :stub-columns: 0
1973 :widths: 1 1 2
1974
1975 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
1976 - 0x00000001
1977 - That picture is an IDR picture
1978
1979.. c:type:: v4l2_h264_dpb_entry
1980
1981.. cssclass:: longtable
1982
1983.. flat-table:: struct v4l2_h264_dpb_entry
1984 :header-rows: 0
1985 :stub-columns: 0
1986 :widths: 1 1 2
1987
1988 * - __u64
1989 - ``reference_ts``
1990 - Timestamp of the V4L2 capture buffer to use as reference, used
1991 with B-coded and P-coded frames. The timestamp refers to the
256fa392
PK
1992 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1993 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1994 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1f0545d3
PO
1995 * - __u16
1996 - ``frame_num``
1997 -
1998 * - __u16
1999 - ``pic_num``
2000 -
2001 * - __s32
2002 - ``top_field_order_cnt``
2003 -
2004 * - __s32
2005 - ``bottom_field_order_cnt``
2006 -
2007 * - __u32
2008 - ``flags``
2009 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
2010
2011.. _h264_dpb_flags:
2012
2013``DPB Entries Flags``
2014
2015.. cssclass:: longtable
2016
2017.. flat-table::
2018 :header-rows: 0
2019 :stub-columns: 0
2020 :widths: 1 1 2
2021
2022 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
2023 - 0x00000001
2024 - The DPB entry is valid and should be considered
2025 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
2026 - 0x00000002
2027 - The DPB entry is currently being used as a reference frame
2028 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
2029 - 0x00000004
2030 - The DPB entry is a long term reference frame
5e815fe0
JK
2031 * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
2032 - 0x00000008
2033 - The DPB entry is a field reference, which means only one of the field
2034 will be used when decoding the new frame/field. When not set the DPB
2035 entry is a frame reference (both fields will be used). Note that this
2036 flag does not say anything about the number of fields contained in the
2037 reference frame, it just describes the one used to decode the new
2038 field/frame
2039 * - ``V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD``
2040 - 0x00000010
2041 - The DPB entry is a bottom field reference (only the bottom field of the
2042 reference frame is needed to decode the new frame/field). Only valid if
2043 V4L2_H264_DPB_ENTRY_FLAG_FIELD is set. When
2044 V4L2_H264_DPB_ENTRY_FLAG_FIELD is set but
2045 V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD is not, that means the
2046 DPB entry is a top field reference
4f14e327 2047
5604be66
BB
2048``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
2049 Specifies the decoding mode to use. Currently exposes slice-based and
2050 frame-based decoding but new modes might be added later on.
2051 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2052 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2053 are required to set this control in order to specify the decoding mode
2054 that is expected for the buffer.
2055 Drivers may expose a single or multiple decoding modes, depending
2056 on what they can support.
2057
2058 .. note::
2059
2060 This menu control is not yet part of the public kernel API and
2061 it is expected to change.
2062
2063.. c:type:: v4l2_mpeg_video_h264_decode_mode
2064
2065.. cssclass:: longtable
2066
2067.. flat-table::
2068 :header-rows: 0
2069 :stub-columns: 0
2070 :widths: 1 1 2
2071
2072 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED``
2073 - 0
2074 - Decoding is done at the slice granularity.
2075 In this mode, ``num_slices`` field in struct
2076 :c:type:`v4l2_ctrl_h264_decode_params` should be set to 1,
2077 and ``start_byte_offset`` in struct
2078 :c:type:`v4l2_ctrl_h264_slice_params` should be set to 0.
2079 The OUTPUT buffer must contain a single slice.
2080 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED``
2081 - 1
2082 - Decoding is done at the frame granularity.
2083 In this mode, ``num_slices`` field in struct
2084 :c:type:`v4l2_ctrl_h264_decode_params` should be set to the number
2085 of slices in the frame, and ``start_byte_offset`` in struct
2086 :c:type:`v4l2_ctrl_h264_slice_params` should be set accordingly
2087 for each slice. For the first slice, ``start_byte_offset`` should
2088 be zero.
2089 The OUTPUT buffer must contain all slices needed to decode the
2090 frame. The OUTPUT buffer must also contain both fields.
2091
8cae93e0
EG
2092``V4L2_CID_MPEG_VIDEO_H264_START_CODE (enum)``
2093 Specifies the H264 slice start code expected for each slice.
2094 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2095 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2096 are required to set this control in order to specify the start code
2097 that is expected for the buffer.
2098 Drivers may expose a single or multiple start codes, depending
2099 on what they can support.
2100
2101 .. note::
2102
2103 This menu control is not yet part of the public kernel API and
2104 it is expected to change.
2105
2106.. c:type:: v4l2_mpeg_video_h264_start_code
2107
2108.. cssclass:: longtable
2109
2110.. flat-table::
2111 :header-rows: 0
2112 :stub-columns: 0
2113 :widths: 1 1 2
2114
2115 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_NONE``
2116 - 0
2117 - Selecting this value specifies that H264 slices are passed
2118 to the driver without any start code.
2119 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B``
2120 - 1
2121 - Selecting this value specifies that H264 slices are expected
2122 to be prefixed by Annex B start codes. According to :ref:`h264`
2123 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
2124
4f14e327
HV
2125.. _v4l2-mpeg-mpeg2:
2126
2127``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
2128 Specifies the slice parameters (as extracted from the bitstream) for the
2129 associated MPEG-2 slice data. This includes the necessary parameters for
2130 configuring a stateless hardware decoding pipeline for MPEG-2.
2131 The bitstream parameters are defined according to :ref:`mpeg2part2`.
2132
2133 .. note::
2134
2135 This compound control is not yet part of the public kernel API and
2136 it is expected to change.
2137
2138.. c:type:: v4l2_ctrl_mpeg2_slice_params
2139
2140.. cssclass:: longtable
2141
94fa831e
MCC
2142.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2143
4f14e327
HV
2144.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
2145 :header-rows: 0
2146 :stub-columns: 0
2147 :widths: 1 1 2
2148
2149 * - __u32
2150 - ``bit_size``
2151 - Size (in bits) of the current slice data.
2152 * - __u32
2153 - ``data_bit_offset``
2154 - Offset (in bits) to the video data in the current slice data.
2155 * - struct :c:type:`v4l2_mpeg2_sequence`
2156 - ``sequence``
2157 - Structure with MPEG-2 sequence metadata, merging relevant fields from
2158 the sequence header and sequence extension parts of the bitstream.
2159 * - struct :c:type:`v4l2_mpeg2_picture`
2160 - ``picture``
2161 - Structure with MPEG-2 picture metadata, merging relevant fields from
2162 the picture header and picture coding extension parts of the bitstream.
2163 * - __u64
2164 - ``backward_ref_ts``
2165 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2166 with B-coded and P-coded frames. The timestamp refers to the
2167 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2168 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2169 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2170 * - __u64
2171 - ``forward_ref_ts``
2172 - Timestamp for the V4L2 capture buffer to use as forward reference, used
2173 with B-coded frames. The timestamp refers to the ``timestamp`` field in
2174 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2175 function to convert the struct :c:type:`timeval` in struct
2176 :c:type:`v4l2_buffer` to a __u64.
2177 * - __u32
2178 - ``quantiser_scale_code``
2179 - Code used to determine the quantization scale to use for the IDCT.
2180
2181.. c:type:: v4l2_mpeg2_sequence
2182
2183.. cssclass:: longtable
2184
94fa831e
MCC
2185.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2186
4f14e327
HV
2187.. flat-table:: struct v4l2_mpeg2_sequence
2188 :header-rows: 0
2189 :stub-columns: 0
2190 :widths: 1 1 2
2191
2192 * - __u16
2193 - ``horizontal_size``
2194 - The width of the displayable part of the frame's luminance component.
2195 * - __u16
2196 - ``vertical_size``
2197 - The height of the displayable part of the frame's luminance component.
2198 * - __u32
2199 - ``vbv_buffer_size``
2200 - Used to calculate the required size of the video buffering verifier,
2201 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
2202 * - __u16
2203 - ``profile_and_level_indication``
2204 - The current profile and level indication as extracted from the
2205 bitstream.
2206 * - __u8
2207 - ``progressive_sequence``
2208 - Indication that all the frames for the sequence are progressive instead
2209 of interlaced.
2210 * - __u8
2211 - ``chroma_format``
2212 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
2213
2214.. c:type:: v4l2_mpeg2_picture
2215
2216.. cssclass:: longtable
2217
94fa831e
MCC
2218.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2219
4f14e327
HV
2220.. flat-table:: struct v4l2_mpeg2_picture
2221 :header-rows: 0
2222 :stub-columns: 0
2223 :widths: 1 1 2
2224
2225 * - __u8
2226 - ``picture_coding_type``
2227 - Picture coding type for the frame covered by the current slice
2228 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
2229 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
2230 * - __u8
2231 - ``f_code[2][2]``
2232 - Motion vector codes.
2233 * - __u8
2234 - ``intra_dc_precision``
2235 - Precision of Discrete Cosine transform (0: 8 bits precision,
2236 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
2237 * - __u8
2238 - ``picture_structure``
2239 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
2240 3: progressive frame).
2241 * - __u8
2242 - ``top_field_first``
2243 - If set to 1 and interlaced stream, top field is output first.
2244 * - __u8
2245 - ``frame_pred_frame_dct``
2246 - If set to 1, only frame-DCT and frame prediction are used.
2247 * - __u8
2248 - ``concealment_motion_vectors``
2249 - If set to 1, motion vectors are coded for intra macroblocks.
2250 * - __u8
2251 - ``q_scale_type``
2252 - This flag affects the inverse quantization process.
2253 * - __u8
2254 - ``intra_vlc_format``
2255 - This flag affects the decoding of transform coefficient data.
2256 * - __u8
2257 - ``alternate_scan``
2258 - This flag affects the decoding of transform coefficient data.
2259 * - __u8
2260 - ``repeat_first_field``
2261 - This flag affects the decoding process of progressive frames.
2262 * - __u16
2263 - ``progressive_frame``
2264 - Indicates whether the current frame is progressive.
2265
2266``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
2267 Specifies quantization matrices (as extracted from the bitstream) for the
2268 associated MPEG-2 slice data.
2269
2270 .. note::
2271
2272 This compound control is not yet part of the public kernel API and
2273 it is expected to change.
2274
2275.. c:type:: v4l2_ctrl_mpeg2_quantization
2276
2277.. cssclass:: longtable
2278
94fa831e
MCC
2279.. tabularcolumns:: |p{1.2cm}|p{8.0cm}|p{7.4cm}|
2280
2281.. raw:: latex
2282
2283 \small
2284
4f14e327
HV
2285.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
2286 :header-rows: 0
2287 :stub-columns: 0
2288 :widths: 1 1 2
2289
2290 * - __u8
2291 - ``load_intra_quantiser_matrix``
2292 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
2293 * - __u8
2294 - ``load_non_intra_quantiser_matrix``
2295 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
2296 data.
2297 * - __u8
2298 - ``load_chroma_intra_quantiser_matrix``
2299 - One bit to indicate whether to load the
2300 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
2301 formats.
2302 * - __u8
2303 - ``load_chroma_non_intra_quantiser_matrix``
2304 - One bit to indicate whether to load the
2305 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
2306 YUV formats.
2307 * - __u8
2308 - ``intra_quantiser_matrix[64]``
2309 - The quantization matrix coefficients for intra-coded frames, in zigzag
2310 scanning order. It is relevant for both luma and chroma components,
2311 although it can be superseded by the chroma-specific matrix for
2312 non-4:2:0 YUV formats.
2313 * - __u8
2314 - ``non_intra_quantiser_matrix[64]``
2315 - The quantization matrix coefficients for non-intra-coded frames, in
2316 zigzag scanning order. It is relevant for both luma and chroma
2317 components, although it can be superseded by the chroma-specific matrix
2318 for non-4:2:0 YUV formats.
2319 * - __u8
2320 - ``chroma_intra_quantiser_matrix[64]``
2321 - The quantization matrix coefficients for the chominance component of
2322 intra-coded frames, in zigzag scanning order. Only relevant for
2323 non-4:2:0 YUV formats.
2324 * - __u8
2325 - ``chroma_non_intra_quantiser_matrix[64]``
2326 - The quantization matrix coefficients for the chrominance component of
2327 non-intra-coded frames, in zigzag scanning order. Only relevant for
2328 non-4:2:0 YUV formats.
2329
b663e57c
DH
2330``V4L2_CID_FWHT_I_FRAME_QP (integer)``
2331 Quantization parameter for an I frame for FWHT. Valid range: from 1
2332 to 31.
2333
2334``V4L2_CID_FWHT_P_FRAME_QP (integer)``
2335 Quantization parameter for a P frame for FWHT. Valid range: from 1
2336 to 31.
2337
a57d6aca
PO
2338.. _v4l2-mpeg-vp8:
2339
2340``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
2341 Specifies the frame parameters for the associated VP8 parsed frame data.
2342 This includes the necessary parameters for
2343 configuring a stateless hardware decoding pipeline for VP8.
2344 The bitstream parameters are defined according to :ref:`vp8`.
2345
2346 .. note::
2347
2348 This compound control is not yet part of the public kernel API and
2349 it is expected to change.
2350
2351.. c:type:: v4l2_ctrl_vp8_frame_header
2352
2353.. cssclass:: longtable
2354
2355.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2356
2357.. flat-table:: struct v4l2_ctrl_vp8_frame_header
2358 :header-rows: 0
2359 :stub-columns: 0
2360 :widths: 1 1 2
2361
2362 * - struct :c:type:`v4l2_vp8_segment_header`
2363 - ``segment_header``
2364 - Structure with segment-based adjustments metadata.
2365 * - struct :c:type:`v4l2_vp8_loopfilter_header`
2366 - ``loopfilter_header``
2367 - Structure with loop filter level adjustments metadata.
2368 * - struct :c:type:`v4l2_vp8_quantization_header`
2369 - ``quant_header``
2370 - Structure with VP8 dequantization indices metadata.
2371 * - struct :c:type:`v4l2_vp8_entropy_header`
2372 - ``entropy_header``
2373 - Structure with VP8 entropy coder probabilities metadata.
2374 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
2375 - ``coder_state``
2376 - Structure with VP8 entropy coder state.
2377 * - __u16
2378 - ``width``
2379 - The width of the frame. Must be set for all frames.
2380 * - __u16
2381 - ``height``
2382 - The height of the frame. Must be set for all frames.
2383 * - __u8
2384 - ``horizontal_scale``
2385 - Horizontal scaling factor.
2386 * - __u8
2387 - ``vertical_scaling factor``
2388 - Vertical scale.
2389 * - __u8
2390 - ``version``
2391 - Bitstream version.
2392 * - __u8
2393 - ``prob_skip_false``
2394 - Indicates the probability that the macroblock is not skipped.
2395 * - __u8
2396 - ``prob_intra``
2397 - Indicates the probability that a macroblock is intra-predicted.
2398 * - __u8
2399 - ``prob_last``
2400 - Indicates the probability that the last reference frame is used
2401 for inter-prediction
2402 * - __u8
2403 - ``prob_gf``
2404 - Indicates the probability that the golden reference frame is used
2405 for inter-prediction
2406 * - __u8
2407 - ``num_dct_parts``
2408 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
2409 * - __u32
2410 - ``first_part_size``
2411 - Size of the first partition, i.e. the control partition.
2412 * - __u32
2413 - ``first_part_header_bits``
2414 - Size in bits of the first partition header portion.
2415 * - __u32
2416 - ``dct_part_sizes[8]``
2417 - DCT coefficients sizes.
2418 * - __u64
2419 - ``last_frame_ts``
2420 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2421 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2422 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2423 function to convert the struct :c:type:`timeval` in struct
2424 :c:type:`v4l2_buffer` to a __u64.
2425 * - __u64
2426 - ``golden_frame_ts``
2427 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2428 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2429 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2430 function to convert the struct :c:type:`timeval` in struct
2431 :c:type:`v4l2_buffer` to a __u64.
2432 * - __u64
2433 - ``alt_frame_ts``
2434 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
2435 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2436 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2437 function to convert the struct :c:type:`timeval` in struct
2438 :c:type:`v4l2_buffer` to a __u64.
2439 * - __u64
2440 - ``flags``
2441 - See :ref:`Frame Header Flags <vp8_frame_header_flags>`
2442
2443.. _vp8_frame_header_flags:
2444
2445``Frame Header Flags``
2446
2447.. cssclass:: longtable
2448
2449.. flat-table::
2450 :header-rows: 0
2451 :stub-columns: 0
2452 :widths: 1 1 2
2453
2454 * - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
2455 - 0x01
2456 - Indicates if the frame is a key frame.
2457 * - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
2458 - 0x02
2459 - Experimental bitstream.
2460 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
2461 - 0x04
2462 - Show frame flag, indicates if the frame is for display.
2463 * - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
2464 - 0x08
2465 - Enable/disable skipping of macroblocks with no non-zero coefficients.
2466 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
2467 - 0x10
2468 - Sign of motion vectors when the golden frame is referenced.
2469 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
2470 - 0x20
2471 - Sign of motion vectors when the alt frame is referenced.
2472
2473.. c:type:: v4l2_vp8_entropy_coder_state
2474
2475.. cssclass:: longtable
2476
2477.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2478
2479.. flat-table:: struct v4l2_vp8_entropy_coder_state
2480 :header-rows: 0
2481 :stub-columns: 0
2482 :widths: 1 1 2
2483
2484 * - __u8
2485 - ``range``
2486 -
2487 * - __u8
2488 - ``value``
2489 -
2490 * - __u8
2491 - ``bit_count``
2492 -
2493 * - __u8
2494 - ``padding``
2495 - Applications and drivers must set this to zero.
2496
2497.. c:type:: v4l2_vp8_segment_header
2498
2499.. cssclass:: longtable
2500
2501.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2502
2503.. flat-table:: struct v4l2_vp8_segment_header
2504 :header-rows: 0
2505 :stub-columns: 0
2506 :widths: 1 1 2
2507
2508 * - __s8
2509 - ``quant_update[4]``
2510 - Signed quantizer value update.
2511 * - __s8
2512 - ``lf_update[4]``
2513 - Signed loop filter level value update.
2514 * - __u8
2515 - ``segment_probs[3]``
2516 - Segment probabilities.
2517 * - __u8
2518 - ``padding``
2519 - Applications and drivers must set this to zero.
2520 * - __u32
2521 - ``flags``
2522 - See :ref:`Segment Header Flags <vp8_segment_header_flags>`
2523
2524.. _vp8_segment_header_flags:
2525
2526``Segment Header Flags``
2527
2528.. cssclass:: longtable
2529
2530.. flat-table::
2531 :header-rows: 0
2532 :stub-columns: 0
2533 :widths: 1 1 2
2534
2535 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
2536 - 0x01
2537 - Enable/disable segment-based adjustments.
2538 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
2539 - 0x02
2540 - Indicates if the macroblock segmentation map is updated in this frame.
2541 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
2542 - 0x04
2543 - Indicates if the segment feature data is updated in this frame.
2544 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
2545 - 0x08
2546 - If is set, the segment feature data mode is delta-value.
2547 If cleared, it's absolute-value.
2548
2549.. c:type:: v4l2_vp8_loopfilter_header
2550
2551.. cssclass:: longtable
2552
2553.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2554
2555.. flat-table:: struct v4l2_vp8_loopfilter_header
2556 :header-rows: 0
2557 :stub-columns: 0
2558 :widths: 1 1 2
2559
2560 * - __s8
2561 - ``ref_frm_delta[4]``
2562 - Reference adjustment (signed) delta value.
2563 * - __s8
2564 - ``mb_mode_delta[4]``
2565 - Macroblock prediction mode adjustment (signed) delta value.
2566 * - __u8
2567 - ``sharpness_level``
2568 - Sharpness level
2569 * - __u8
2570 - ``level``
2571 - Filter level
2572 * - __u16
2573 - ``padding``
2574 - Applications and drivers must set this to zero.
2575 * - __u32
2576 - ``flags``
2577 - See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
2578
2579.. _vp8_loopfilter_header_flags:
2580
2581``Loopfilter Header Flags``
2582
2583.. cssclass:: longtable
2584
2585.. flat-table::
2586 :header-rows: 0
2587 :stub-columns: 0
2588 :widths: 1 1 2
2589
2590 * - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
2591 - 0x01
2592 - Enable/disable macroblock-level loop filter adjustment.
2593 * - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
2594 - 0x02
2595 - Indicates if the delta values used in an adjustment are updated.
2596 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
2597 - 0x04
2598 - If set, indicates the filter type is simple.
2599 If cleared, the filter type is normal.
2600
2601.. c:type:: v4l2_vp8_quantization_header
2602
2603.. cssclass:: longtable
2604
2605.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2606
2607.. flat-table:: struct v4l2_vp8_quantization_header
2608 :header-rows: 0
2609 :stub-columns: 0
2610 :widths: 1 1 2
2611
2612 * - __u8
2613 - ``y_ac_qi``
2614 - Luma AC coefficient table index.
2615 * - __s8
2616 - ``y_dc_delta``
2617 - Luma DC delta vaue.
2618 * - __s8
2619 - ``y2_dc_delta``
2620 - Y2 block DC delta value.
2621 * - __s8
2622 - ``y2_ac_delta``
2623 - Y2 block AC delta value.
2624 * - __s8
2625 - ``uv_dc_delta``
2626 - Chroma DC delta value.
2627 * - __s8
2628 - ``uv_ac_delta``
2629 - Chroma AC delta value.
2630 * - __u16
2631 - ``padding``
2632 - Applications and drivers must set this to zero.
2633
2634.. c:type:: v4l2_vp8_entropy_header
2635
2636.. cssclass:: longtable
2637
2638.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2639
2640.. flat-table:: struct v4l2_vp8_entropy_header
2641 :header-rows: 0
2642 :stub-columns: 0
2643 :widths: 1 1 2
2644
2645 * - __u8
2646 - ``coeff_probs[4][8][3][11]``
2647 - Coefficient update probabilities.
2648 * - __u8
2649 - ``y_mode_probs[4]``
2650 - Luma mode update probabilities.
2651 * - __u8
2652 - ``uv_mode_probs[3]``
2653 - Chroma mode update probabilities.
2654 * - __u8
2655 - ``mv_probs[2][19]``
2656 - MV decoding update probabilities.
2657 * - __u8
2658 - ``padding[3]``
2659 - Applications and drivers must set this to zero.
2660
94fa831e
MCC
2661.. raw:: latex
2662
2663 \normalsize
2664
2665
4f14e327
HV
2666MFC 5.1 MPEG Controls
2667=====================
2668
2669The following MPEG class controls deal with MPEG decoding and encoding
2670settings that are specific to the Multi Format Codec 5.1 device present
2671in the S5P family of SoCs by Samsung.
2672
2673
2674.. _mfc51-control-id:
2675
2676MFC 5.1 Control IDs
2677-------------------
2678
2679``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2680 If the display delay is enabled then the decoder is forced to return
2681 a CAPTURE buffer (decoded frame) after processing a certain number
2682 of OUTPUT buffers. The delay can be set through
2683 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2684 feature can be used for example for generating thumbnails of videos.
2685 Applicable to the H264 decoder.
2686
2687``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2688 Display delay value for H264 decoder. The decoder is forced to
2689 return a decoded frame after the set 'display delay' number of
2690 frames. If this number is low it may result in frames returned out
adf48e3f 2691 of display order, in addition the hardware may still be using the
4f14e327
HV
2692 returned buffer as a reference picture for subsequent frames.
2693
2694``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2695 The number of reference pictures used for encoding a P picture.
2696 Applicable to the H264 encoder.
2697
2698``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2699 Padding enable in the encoder - use a color instead of repeating
2700 border pixels. Applicable to encoders.
2701
2702``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2703 Padding color in the encoder. Applicable to encoders. The supplied
2704 32-bit integer is interpreted as follows (bit 0 = least significant
2705 bit):
2706
2707
2708
2709.. flat-table::
2710 :header-rows: 0
2711 :stub-columns: 0
2712
2713 * - Bit 0:7
2714 - V chrominance information
2715 * - Bit 8:15
2716 - U chrominance information
2717 * - Bit 16:23
2718 - Y luminance information
2719 * - Bit 24:31
2720 - Must be zero.
2721
2722
2723
2724``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2725 Reaction coefficient for MFC rate control. Applicable to encoders.
2726
2727 .. note::
2728
2729 #. Valid only when the frame level RC is enabled.
2730
2731 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2732 VBR, this field must be large (ex. 100 ~ 1000).
2733
2734 #. It is not recommended to use the greater number than
2735 FRAME_RATE * (10^9 / BIT_RATE).
2736
2737``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2738 Adaptive rate control for dark region. Valid only when H.264 and
2739 macroblock level RC is enabled
2740 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2741 encoder.
2742
2743``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2744 Adaptive rate control for smooth region. Valid only when H.264 and
2745 macroblock level RC is enabled
2746 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2747 encoder.
2748
2749``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2750 Adaptive rate control for static region. Valid only when H.264 and
2751 macroblock level RC is enabled
2752 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2753 encoder.
2754
2755``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
2756 Adaptive rate control for activity region. Valid only when H.264 and
2757 macroblock level RC is enabled
2758 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2759 encoder.
2760
2761.. _v4l2-mpeg-mfc51-video-frame-skip-mode:
2762
2763``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2764 (enum)
2765
2766enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2767 Indicates in what conditions the encoder should skip frames. If
2768 encoding a frame would cause the encoded stream to be larger then a
2769 chosen data limit then the frame will be skipped. Possible values
2770 are:
2771
2772
94fa831e
MCC
2773.. tabularcolumns:: |p{9.2cm}|p{8.3cm}|
2774
2775.. raw:: latex
2776
2777 \small
4f14e327
HV
2778
2779.. flat-table::
2780 :header-rows: 0
2781 :stub-columns: 0
2782
2783 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2784 - Frame skip mode is disabled.
2785 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2786 - Frame skip mode enabled and buffer limit is set by the chosen
2787 level and is defined by the standard.
2788 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2789 - Frame skip mode enabled and buffer limit is set by the VBV
2790 (MPEG1/2/4) or CPB (H264) buffer size control.
2791
94fa831e 2792.. raw:: latex
4f14e327 2793
94fa831e 2794 \normalsize
4f14e327
HV
2795
2796``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2797 Enable rate-control with fixed target bit. If this setting is
2798 enabled, then the rate control logic of the encoder will calculate
2799 the average bitrate for a GOP and keep it below or equal the set
2800 bitrate target. Otherwise the rate control logic calculates the
2801 overall average bitrate for the stream and keeps it below or equal
2802 to the set bitrate. In the first case the average bitrate for the
2803 whole stream will be smaller then the set bitrate. This is caused
2804 because the average is calculated for smaller number of frames, on
2805 the other hand enabling this setting will ensure that the stream
2806 will meet tight bandwidth constraints. Applicable to encoders.
2807
2808.. _v4l2-mpeg-mfc51-video-force-frame-type:
2809
2810``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2811 (enum)
2812
2813enum v4l2_mpeg_mfc51_video_force_frame_type -
2814 Force a frame type for the next queued buffer. Applicable to
2815 encoders. Possible values are:
2816
94fa831e 2817.. tabularcolumns:: |p{9.5cm}|p{8.0cm}|
4f14e327
HV
2818
2819.. flat-table::
2820 :header-rows: 0
2821 :stub-columns: 0
2822
2823 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2824 - Forcing a specific frame type disabled.
2825 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2826 - Force an I-frame.
2827 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2828 - Force a non-coded frame.
2829
2830
f94368e3
DH
2831.. _v4l2-mpeg-fwht:
2832
2833``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
2834 Specifies the fwht parameters (as extracted from the bitstream) for the
2835 associated FWHT data. This includes the necessary parameters for
2836 configuring a stateless hardware decoding pipeline for FWHT.
2837
2838 .. note::
2839
2840 This compound control is not yet part of the public kernel API and
2841 it is expected to change.
2842
2843.. c:type:: v4l2_ctrl_fwht_params
2844
2845.. cssclass:: longtable
2846
94fa831e
MCC
2847.. tabularcolumns:: |p{1.4cm}|p{4.3cm}|p{11.8cm}|
2848
f94368e3
DH
2849.. flat-table:: struct v4l2_ctrl_fwht_params
2850 :header-rows: 0
2851 :stub-columns: 0
2852 :widths: 1 1 2
2853
2854 * - __u64
2855 - ``backward_ref_ts``
2856 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2857 with P-coded frames. The timestamp refers to the
2858 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2859 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2860 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2861 * - __u32
2862 - ``version``
2863 - The version of the codec
2864 * - __u32
2865 - ``width``
2866 - The width of the frame
2867 * - __u32
2868 - ``height``
2869 - The height of the frame
2870 * - __u32
2871 - ``flags``
2872 - The flags of the frame, see :ref:`fwht-flags`.
2873 * - __u32
2874 - ``colorspace``
2875 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
2876 * - __u32
2877 - ``xfer_func``
2878 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
2879 * - __u32
2880 - ``ycbcr_enc``
2881 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
2882 * - __u32
2883 - ``quantization``
2884 - The quantization range, from enum :c:type:`v4l2_quantization`.
2885
2886
2887
2888.. _fwht-flags:
2889
2890FWHT Flags
2891============
f94368e3
DH
2892
2893.. cssclass:: longtable
2894
94fa831e
MCC
2895.. tabularcolumns:: |p{6.8cm}|p{2.4cm}|p{8.3cm}|
2896
f94368e3
DH
2897.. flat-table::
2898 :header-rows: 0
2899 :stub-columns: 0
2900 :widths: 3 1 4
2901
2902 * - ``FWHT_FL_IS_INTERLACED``
2903 - 0x00000001
2904 - Set if this is an interlaced format
2905 * - ``FWHT_FL_IS_BOTTOM_FIRST``
2906 - 0x00000002
2907 - Set if this is a bottom-first (NTSC) interlaced format
2908 * - ``FWHT_FL_IS_ALTERNATE``
2909 - 0x00000004
2910 - Set if each 'frame' contains just one field
2911 * - ``FWHT_FL_IS_BOTTOM_FIELD``
2912 - 0x00000008
2913 - If FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
2914 bottom field, else it is the top field.
2915 * - ``FWHT_FL_LUMA_IS_UNCOMPRESSED``
2916 - 0x00000010
2917 - Set if the luma plane is uncompressed
2918 * - ``FWHT_FL_CB_IS_UNCOMPRESSED``
2919 - 0x00000020
2920 - Set if the cb plane is uncompressed
2921 * - ``FWHT_FL_CR_IS_UNCOMPRESSED``
2922 - 0x00000040
2923 - Set if the cr plane is uncompressed
2924 * - ``FWHT_FL_CHROMA_FULL_HEIGHT``
2925 - 0x00000080
2926 - Set if the chroma plane has the same height as the luma plane,
2927 else the chroma plane is half the height of the luma plane
2928 * - ``FWHT_FL_CHROMA_FULL_WIDTH``
2929 - 0x00000100
2930 - Set if the chroma plane has the same width as the luma plane,
2931 else the chroma plane is half the width of the luma plane
2932 * - ``FWHT_FL_ALPHA_IS_UNCOMPRESSED``
2933 - 0x00000200
2934 - Set if the alpha plane is uncompressed
2935 * - ``FWHT_FL_I_FRAME``
2936 - 0x00000400
2937 - Set if this is an I-frame
2938 * - ``FWHT_FL_COMPONENTS_NUM_MSK``
2939 - 0x00070000
2940 - A 4-values flag - the number of components - 1
2941 * - ``FWHT_FL_PIXENC_YUV``
2942 - 0x00080000
2943 - Set if the pixel encoding is YUV
2944 * - ``FWHT_FL_PIXENC_RGB``
2945 - 0x00100000
2946 - Set if the pixel encoding is RGB
2947 * - ``FWHT_FL_PIXENC_HSV``
2948 - 0x00180000
2949 - Set if the pixel encoding is HSV
4f14e327
HV
2950
2951
2952CX2341x MPEG Controls
2953=====================
2954
2955The following MPEG class controls deal with MPEG encoding settings that
2956are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
2957
2958
2959.. _cx2341x-control-id:
2960
2961CX2341x Control IDs
2962-------------------
2963
2964.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
2965
2966``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
2967 (enum)
2968
2969enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
2970 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
2971 are:
2972
2973
2974
2975.. flat-table::
2976 :header-rows: 0
2977 :stub-columns: 0
2978
2979 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
2980 - Choose the filter manually
2981 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
2982 - Choose the filter automatically
2983
2984
2985
2986``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
2987 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
2988 is 0.)
2989
2990.. _luma-spatial-filter-type:
2991
2992``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
2993 (enum)
2994
2995enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
2996 Select the algorithm to use for the Luma Spatial Filter (default
2997 ``1D_HOR``). Possible values:
2998
94fa831e 2999.. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
4f14e327 3000
94fa831e 3001.. raw:: latex
4f14e327 3002
94fa831e 3003 \small
4f14e327
HV
3004
3005.. flat-table::
3006 :header-rows: 0
3007 :stub-columns: 0
3008
3009 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
3010 - No filter
3011 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
3012 - One-dimensional horizontal
3013 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
3014 - One-dimensional vertical
3015 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
3016 - Two-dimensional separable
3017 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
3018 - Two-dimensional symmetrical non-separable
3019
94fa831e
MCC
3020.. raw:: latex
3021
3022 \normalsize
3023
4f14e327
HV
3024
3025
3026.. _chroma-spatial-filter-type:
3027
3028``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
3029 (enum)
3030
3031enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
3032 Select the algorithm for the Chroma Spatial Filter (default
3033 ``1D_HOR``). Possible values are:
3034
3035
94fa831e 3036.. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
4f14e327
HV
3037
3038.. flat-table::
3039 :header-rows: 0
3040 :stub-columns: 0
3041
3042 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
3043 - No filter
3044 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
3045 - One-dimensional horizontal
3046
3047
3048
3049.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
3050
3051``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
3052 (enum)
3053
3054enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
3055 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
3056 are:
3057
3058
3059
3060.. flat-table::
3061 :header-rows: 0
3062 :stub-columns: 0
3063
3064 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
3065 - Choose the filter manually
3066 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
3067 - Choose the filter automatically
3068
3069
3070
3071``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
3072 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
3073 is 8 for full-scale capturing and 0 for scaled capturing.)
3074
3075.. _v4l2-mpeg-cx2341x-video-median-filter-type:
3076
3077``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
3078 (enum)
3079
3080enum v4l2_mpeg_cx2341x_video_median_filter_type -
3081 Median Filter Type (default ``OFF``). Possible values are:
3082
3083
3084
3085.. flat-table::
3086 :header-rows: 0
3087 :stub-columns: 0
3088
3089 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
3090 - No filter
3091 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
3092 - Horizontal filter
3093 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
3094 - Vertical filter
3095 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
3096 - Horizontal and vertical filter
3097 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
3098 - Diagonal filter
3099
3100
3101
3102``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3103 Threshold above which the luminance median filter is enabled
3104 (default 0)
3105
3106``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
3107 Threshold below which the luminance median filter is enabled
3108 (default 255)
3109
3110``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3111 Threshold above which the chroma median filter is enabled (default
3112 0)
3113
3114``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
3115 Threshold below which the chroma median filter is enabled (default
3116 255)
3117
3118``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
3119 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
3120 the stream between every four video frames. The packet size is 2048
3121 bytes, including the packet_start_code_prefix and stream_id
3122 fields. The stream_id is 0xBF (private stream 2). The payload
3123 consists of 0x00 bytes, to be filled in by the application. 0 = do
3124 not insert, 1 = insert packets.
3125
3126
3127VPX Control Reference
3128=====================
3129
3130The VPX controls include controls for encoding parameters of VPx video
3131codec.
3132
3133
3134.. _vpx-control-id:
3135
3136VPX Control IDs
3137---------------
3138
3139.. _v4l2-vpx-num-partitions:
3140
3141``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
3142 (enum)
3143
3144enum v4l2_vp8_num_partitions -
3145 The number of token partitions to use in VP8 encoder. Possible
3146 values are:
3147
3148
3149
3150.. flat-table::
3151 :header-rows: 0
3152 :stub-columns: 0
3153
3154 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
3155 - 1 coefficient partition
3156 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
3157 - 2 coefficient partitions
3158 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
3159 - 4 coefficient partitions
3160 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
3161 - 8 coefficient partitions
3162
3163
3164
3165``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
3166 Setting this prevents intra 4x4 mode in the intra mode decision.
3167
3168.. _v4l2-vpx-num-ref-frames:
3169
3170``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
3171 (enum)
3172
3173enum v4l2_vp8_num_ref_frames -
3174 The number of reference pictures for encoding P frames. Possible
3175 values are:
3176
3177.. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
3178
94fa831e
MCC
3179.. raw:: latex
3180
3181 \small
3182
4f14e327
HV
3183.. flat-table::
3184 :header-rows: 0
3185 :stub-columns: 0
3186
3187 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
3188 - Last encoded frame will be searched
3189 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
3190 - Two frames will be searched among the last encoded frame, the
3191 golden frame and the alternate reference (altref) frame. The
3192 encoder implementation will decide which two are chosen.
3193 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
3194 - The last encoded frame, the golden frame and the altref frame will
3195 be searched.
3196
94fa831e
MCC
3197.. raw:: latex
3198
3199 \normalsize
3200
4f14e327
HV
3201
3202
3203``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
3204 Indicates the loop filter level. The adjustment of the loop filter
3205 level is done via a delta value against a baseline loop filter
3206 value.
3207
3208``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
3209 This parameter affects the loop filter. Anything above zero weakens
3210 the deblocking effect on the loop filter.
3211
3212``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
3213 Sets the refresh period for the golden frame. The period is defined
3214 in number of frames. For a value of 'n', every nth frame starting
3215 from the first key frame will be taken as a golden frame. For eg.
3216 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
3217 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
3218 taken as the golden frames as frame 0 is always a key frame.
3219
3220.. _v4l2-vpx-golden-frame-sel:
3221
3222``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
3223 (enum)
3224
3225enum v4l2_vp8_golden_frame_sel -
3226 Selects the golden frame for encoding. Possible values are:
3227
3228.. raw:: latex
3229
94fa831e 3230 \scriptsize
4f14e327
HV
3231
3232.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3233
3234.. flat-table::
3235 :header-rows: 0
3236 :stub-columns: 0
3237
3238 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
3239 - Use the (n-2)th frame as a golden frame, current frame index being
3240 'n'.
3241 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
3242 - Use the previous specific frame indicated by
3243 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
3244 golden frame.
3245
3246.. raw:: latex
3247
3248 \normalsize
3249
3250
3251``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
3252 Minimum quantization parameter for VP8.
3253
3254``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
3255 Maximum quantization parameter for VP8.
3256
3257``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
3258 Quantization parameter for an I frame for VP8.
3259
3260``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
3261 Quantization parameter for a P frame for VP8.
3262
3263.. _v4l2-mpeg-video-vp8-profile:
3264
3265``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
3266 (enum)
3267
3268enum v4l2_mpeg_video_vp8_profile -
3269 This control allows selecting the profile for VP8 encoder.
3270 This is also used to enumerate supported profiles by VP8 encoder or decoder.
3271 Possible values are:
3272
3273.. flat-table::
3274 :header-rows: 0
3275 :stub-columns: 0
3276
3277 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
3278 - Profile 0
3279 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
3280 - Profile 1
3281 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
3282 - Profile 2
3283 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
3284 - Profile 3
3285
3286.. _v4l2-mpeg-video-vp9-profile:
3287
3288``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
3289 (enum)
3290
3291enum v4l2_mpeg_video_vp9_profile -
3292 This control allows selecting the profile for VP9 encoder.
3293 This is also used to enumerate supported profiles by VP9 encoder or decoder.
3294 Possible values are:
3295
3296.. flat-table::
3297 :header-rows: 0
3298 :stub-columns: 0
3299
3300 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
3301 - Profile 0
3302 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
3303 - Profile 1
3304 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
3305 - Profile 2
3306 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
3307 - Profile 3
3308
3309
3310High Efficiency Video Coding (HEVC/H.265) Control Reference
3311===========================================================
3312
3313The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
3314video codec.
3315
3316
3317.. _hevc-control-id:
3318
3319HEVC/H.265 Control IDs
3320----------------------
3321
3322``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
3323 Minimum quantization parameter for HEVC.
3324 Valid range: from 0 to 51.
3325
3326``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
3327 Maximum quantization parameter for HEVC.
3328 Valid range: from 0 to 51.
3329
3330``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
3331 Quantization parameter for an I frame for HEVC.
3332 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3333 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3334
3335``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
3336 Quantization parameter for a P frame for HEVC.
3337 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3338 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3339
3340``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
3341 Quantization parameter for a B frame for HEVC.
3342 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3343 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3344
3345``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
3346 HIERARCHICAL_QP allows the host to specify the quantization parameter
3347 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
3348 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
3349 control value to 1 enables setting of the QP values for the layers.
3350
3351.. _v4l2-hevc-hier-coding-type:
3352
3353``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
3354 (enum)
3355
3356enum v4l2_mpeg_video_hevc_hier_coding_type -
3357 Selects the hierarchical coding type for encoding. Possible values are:
3358
3359.. raw:: latex
3360
3361 \footnotesize
3362
3363.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3364
3365.. flat-table::
3366 :header-rows: 0
3367 :stub-columns: 0
3368
3369 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
3370 - Use the B frame for hierarchical coding.
3371 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
3372 - Use the P frame for hierarchical coding.
3373
3374.. raw:: latex
3375
3376 \normalsize
3377
3378
3379``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
3380 Selects the hierarchical coding layer. In normal encoding
3381 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
3382 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
3383 LAYER 1 and so on.
3384
3385``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
3386 Indicates quantization parameter for hierarchical coding layer 0.
3387 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3388 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3389
3390``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
3391 Indicates quantization parameter for hierarchical coding layer 1.
3392 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3393 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3394
3395``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
3396 Indicates quantization parameter for hierarchical coding layer 2.
3397 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3398 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3399
3400``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
3401 Indicates quantization parameter for hierarchical coding layer 3.
3402 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3403 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3404
3405``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
3406 Indicates quantization parameter for hierarchical coding layer 4.
3407 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3408 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3409
3410``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
3411 Indicates quantization parameter for hierarchical coding layer 5.
3412 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3413 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3414
3415``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
3416 Indicates quantization parameter for hierarchical coding layer 6.
3417 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3418 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3419
3420.. _v4l2-hevc-profile:
3421
3422``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
3423 (enum)
3424
3425enum v4l2_mpeg_video_hevc_profile -
3426 Select the desired profile for HEVC encoder.
3427
3428.. raw:: latex
3429
3430 \footnotesize
3431
3432.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3433
3434.. flat-table::
3435 :header-rows: 0
3436 :stub-columns: 0
3437
3438 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
3439 - Main profile.
3440 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
3441 - Main still picture profile.
3442 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
3443 - Main 10 profile.
3444
3445.. raw:: latex
3446
3447 \normalsize
3448
3449
3450.. _v4l2-hevc-level:
3451
3452``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
3453 (enum)
3454
3455enum v4l2_mpeg_video_hevc_level -
3456 Selects the desired level for HEVC encoder.
3457
3458.. raw:: latex
3459
3460 \footnotesize
3461
3462.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3463
3464.. flat-table::
3465 :header-rows: 0
3466 :stub-columns: 0
3467
3468 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
3469 - Level 1.0
3470 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
3471 - Level 2.0
3472 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
3473 - Level 2.1
3474 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
3475 - Level 3.0
3476 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
3477 - Level 3.1
3478 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
3479 - Level 4.0
3480 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
3481 - Level 4.1
3482 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
3483 - Level 5.0
3484 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
3485 - Level 5.1
3486 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
3487 - Level 5.2
3488 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
3489 - Level 6.0
3490 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
3491 - Level 6.1
3492 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
3493 - Level 6.2
3494
3495.. raw:: latex
3496
3497 \normalsize
3498
3499
3500``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
3501 Indicates the number of evenly spaced subintervals, called ticks, within
3502 one second. This is a 16 bit unsigned integer and has a maximum value up to
3503 0xffff and a minimum value of 1.
3504
3505.. _v4l2-hevc-tier:
3506
3507``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
3508 (enum)
3509
3510enum v4l2_mpeg_video_hevc_tier -
3511 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
3512 were made to deal with applications that differ in terms of maximum bit
3513 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
3514 this flag to 1 indicates High tier. High tier is for applications requiring
3515 high bit rates.
3516
3517.. raw:: latex
3518
3519 \footnotesize
3520
3521.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3522
3523.. flat-table::
3524 :header-rows: 0
3525 :stub-columns: 0
3526
3527 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
3528 - Main tier.
3529 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
3530 - High tier.
3531
3532.. raw:: latex
3533
3534 \normalsize
3535
3536
3537``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
3538 Selects HEVC maximum coding unit depth.
3539
3540.. _v4l2-hevc-loop-filter-mode:
3541
3542``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
3543 (enum)
3544
3545enum v4l2_mpeg_video_hevc_loop_filter_mode -
3546 Loop filter mode for HEVC encoder. Possible values are:
3547
3548.. raw:: latex
3549
3550 \footnotesize
3551
94fa831e 3552.. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
4f14e327
HV
3553
3554.. flat-table::
3555 :header-rows: 0
3556 :stub-columns: 0
3557
3558 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
3559 - Loop filter is disabled.
3560 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
3561 - Loop filter is enabled.
3562 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
3563 - Loop filter is disabled at the slice boundary.
3564
3565.. raw:: latex
3566
3567 \normalsize
3568
3569
3570``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
3571 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
3572
3573``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
3574 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
3575
3576.. _v4l2-hevc-refresh-type:
3577
3578``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
3579 (enum)
3580
3581enum v4l2_mpeg_video_hevc_hier_refresh_type -
3582 Selects refresh type for HEVC encoder.
3583 Host has to specify the period into
3584 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
3585
3586.. raw:: latex
3587
3588 \footnotesize
3589
3590.. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
3591
3592.. flat-table::
3593 :header-rows: 0
3594 :stub-columns: 0
3595
3596 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
3597 - Use the B frame for hierarchical coding.
3598 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
3599 - Use CRA (Clean Random Access Unit) picture encoding.
3600 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
3601 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
3602
3603.. raw:: latex
3604
3605 \normalsize
3606
3607
3608``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
3609 Selects the refresh period for HEVC encoder.
3610 This specifies the number of I pictures between two CRA/IDR pictures.
3611 This is valid only if REFRESH_TYPE is not 0.
3612
3613``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
3614 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
3615 encoding. Setting it to 1 enables lossless encoding.
3616
3617``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
3618 Indicates constant intra prediction for HEVC encoder. Specifies the
3619 constrained intra prediction in which intra largest coding unit (LCU)
3620 prediction is performed by using residual data and decoded samples of
3621 neighboring intra LCU only. Setting the value to 1 enables constant intra
3622 prediction and setting the value to 0 disables constant intra prediction.
3623
3624``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
3625 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
3626 disables the feature and setting it to 1 enables the wavefront parallel
3627 processing.
3628
3629``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
3630 Setting the value to 1 enables combination of P and B frame for HEVC
3631 encoder.
3632
3633``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
3634 Indicates temporal identifier for HEVC encoder which is enabled by
3635 setting the value to 1.
3636
3637``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
3638 Indicates bi-linear interpolation is conditionally used in the intra
3639 prediction filtering process in the CVS when set to 1. Indicates bi-linear
3640 interpolation is not used in the CVS when set to 0.
3641
3642``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
3643 Indicates maximum number of merge candidate motion vectors.
3644 Values are from 0 to 4.
3645
3646``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
3647 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
3648 1 enables the prediction. Setting it to 0 disables the prediction.
3649
3650``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
3651 Specifies if HEVC generates a stream with a size of the length field
3652 instead of start code pattern. The size of the length field is configurable
3653 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
3654 the value to 0 disables encoding without startcode pattern. Setting the
3655 value to 1 will enables encoding without startcode pattern.
3656
3657.. _v4l2-hevc-size-of-length-field:
3658
3659``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
3660(enum)
3661
3662enum v4l2_mpeg_video_hevc_size_of_length_field -
3663 Indicates the size of length field.
3664 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
3665
3666.. raw:: latex
3667
3668 \footnotesize
3669
3670.. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
3671
3672.. flat-table::
3673 :header-rows: 0
3674 :stub-columns: 0
3675
3676 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
3677 - Generate start code pattern (Normal).
3678 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
3679 - Generate size of length field instead of start code pattern and length is 1.
3680 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
3681 - Generate size of length field instead of start code pattern and length is 2.
3682 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
3683 - Generate size of length field instead of start code pattern and length is 4.
3684
3685.. raw:: latex
3686
3687 \normalsize
3688
3689``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
3690 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
3691
3692``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
3693 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
3694
3695``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
3696 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
3697
3698``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
3699 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
3700
3701``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
3702 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
3703
3704``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
3705 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
3706
3707``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
3708 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
3709
3710``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
3711 Selects number of P reference pictures required for HEVC encoder.
3712 P-Frame can use 1 or 2 frames for reference.
3713
3714``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
3715 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
3716 disables generating SPS and PPS at every IDR. Setting it to one enables
3717 generating SPS and PPS at every IDR.
256fa392
PK
3718
3719.. _v4l2-mpeg-hevc:
3720
3721``V4L2_CID_MPEG_VIDEO_HEVC_SPS (struct)``
3722 Specifies the Sequence Parameter Set fields (as extracted from the
3723 bitstream) for the associated HEVC slice data.
3724 These bitstream parameters are defined according to :ref:`hevc`.
3725 They are described in section 7.4.3.2 "Sequence parameter set RBSP
3726 semantics" of the specification.
3727
3728.. c:type:: v4l2_ctrl_hevc_sps
3729
3730.. cssclass:: longtable
3731
3732.. flat-table:: struct v4l2_ctrl_hevc_sps
3733 :header-rows: 0
3734 :stub-columns: 0
3735 :widths: 1 1 2
3736
3737 * - __u16
3738 - ``pic_width_in_luma_samples``
3739 -
3740 * - __u16
3741 - ``pic_height_in_luma_samples``
3742 -
3743 * - __u8
3744 - ``bit_depth_luma_minus8``
3745 -
3746 * - __u8
3747 - ``bit_depth_chroma_minus8``
3748 -
3749 * - __u8
3750 - ``log2_max_pic_order_cnt_lsb_minus4``
3751 -
3752 * - __u8
3753 - ``sps_max_dec_pic_buffering_minus1``
3754 -
3755 * - __u8
3756 - ``sps_max_num_reorder_pics``
3757 -
3758 * - __u8
3759 - ``sps_max_latency_increase_plus1``
3760 -
3761 * - __u8
3762 - ``log2_min_luma_coding_block_size_minus3``
3763 -
3764 * - __u8
3765 - ``log2_diff_max_min_luma_coding_block_size``
3766 -
3767 * - __u8
3768 - ``log2_min_luma_transform_block_size_minus2``
3769 -
3770 * - __u8
3771 - ``log2_diff_max_min_luma_transform_block_size``
3772 -
3773 * - __u8
3774 - ``max_transform_hierarchy_depth_inter``
3775 -
3776 * - __u8
3777 - ``max_transform_hierarchy_depth_intra``
3778 -
3779 * - __u8
3780 - ``pcm_sample_bit_depth_luma_minus1``
3781 -
3782 * - __u8
3783 - ``pcm_sample_bit_depth_chroma_minus1``
3784 -
3785 * - __u8
3786 - ``log2_min_pcm_luma_coding_block_size_minus3``
3787 -
3788 * - __u8
3789 - ``log2_diff_max_min_pcm_luma_coding_block_size``
3790 -
3791 * - __u8
3792 - ``num_short_term_ref_pic_sets``
3793 -
3794 * - __u8
3795 - ``num_long_term_ref_pics_sps``
3796 -
3797 * - __u8
3798 - ``chroma_format_idc``
3799 -
3800 * - __u64
3801 - ``flags``
3802 - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
3803
3804.. _hevc_sps_flags:
3805
3806``Sequence Parameter Set Flags``
3807
3808.. cssclass:: longtable
3809
3810.. flat-table::
3811 :header-rows: 0
3812 :stub-columns: 0
3813 :widths: 1 1 2
3814
3815 * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
3816 - 0x00000001
3817 -
3818 * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
3819 - 0x00000002
3820 -
3821 * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
3822 - 0x00000004
3823 -
3824 * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
3825 - 0x00000008
3826 -
3827 * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
3828 - 0x00000010
3829 -
3830 * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
3831 - 0x00000020
3832 -
3833 * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
3834 - 0x00000040
3835 -
3836 * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
3837 - 0x00000080
3838 -
3839 * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
3840 - 0x00000100
3841 -
3842
3843``V4L2_CID_MPEG_VIDEO_HEVC_PPS (struct)``
3844 Specifies the Picture Parameter Set fields (as extracted from the
3845 bitstream) for the associated HEVC slice data.
3846 These bitstream parameters are defined according to :ref:`hevc`.
3847 They are described in section 7.4.3.3 "Picture parameter set RBSP
3848 semantics" of the specification.
3849
3850.. c:type:: v4l2_ctrl_hevc_pps
3851
3852.. cssclass:: longtable
3853
3854.. flat-table:: struct v4l2_ctrl_hevc_pps
3855 :header-rows: 0
3856 :stub-columns: 0
3857 :widths: 1 1 2
3858
3859 * - __u8
3860 - ``num_extra_slice_header_bits``
3861 -
3862 * - __s8
3863 - ``init_qp_minus26``
3864 -
3865 * - __u8
3866 - ``diff_cu_qp_delta_depth``
3867 -
3868 * - __s8
3869 - ``pps_cb_qp_offset``
3870 -
3871 * - __s8
3872 - ``pps_cr_qp_offset``
3873 -
3874 * - __u8
3875 - ``num_tile_columns_minus1``
3876 -
3877 * - __u8
3878 - ``num_tile_rows_minus1``
3879 -
3880 * - __u8
3881 - ``column_width_minus1[20]``
3882 -
3883 * - __u8
3884 - ``row_height_minus1[22]``
3885 -
3886 * - __s8
3887 - ``pps_beta_offset_div2``
3888 -
3889 * - __s8
3890 - ``pps_tc_offset_div2``
3891 -
3892 * - __u8
3893 - ``log2_parallel_merge_level_minus2``
3894 -
3895 * - __u8
3896 - ``padding[4]``
3897 - Applications and drivers must set this to zero.
3898 * - __u64
3899 - ``flags``
3900 - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
3901
3902.. _hevc_pps_flags:
3903
3904``Picture Parameter Set Flags``
3905
3906.. cssclass:: longtable
3907
3908.. flat-table::
3909 :header-rows: 0
3910 :stub-columns: 0
3911 :widths: 1 1 2
3912
3913 * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT``
3914 - 0x00000001
3915 -
3916 * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
3917 - 0x00000002
3918 -
3919 * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
3920 - 0x00000004
3921 -
3922 * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
3923 - 0x00000008
3924 -
3925 * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
3926 - 0x00000010
3927 -
3928 * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
3929 - 0x00000020
3930 -
3931 * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
3932 - 0x00000040
3933 -
3934 * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
3935 - 0x00000080
3936 -
3937 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
3938 - 0x00000100
3939 -
3940 * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
3941 - 0x00000200
3942 -
3943 * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
3944 - 0x00000400
3945 -
3946 * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
3947 - 0x00000800
3948 -
3949 * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
3950 - 0x00001000
3951 -
3952 * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
3953 - 0x00002000
3954 -
3955 * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
3956 - 0x00004000
3957 -
3958 * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
3959 - 0x00008000
3960 -
3961 * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
3962 - 0x00010000
3963 -
3964 * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
3965 - 0x00020000
3966 -
3967 * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
3968 - 0x00040000
3969 -
3970
3971``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS (struct)``
3972 Specifies various slice-specific parameters, especially from the NAL unit
3973 header, general slice segment header and weighted prediction parameter
3974 parts of the bitstream.
3975 These bitstream parameters are defined according to :ref:`hevc`.
3976 They are described in section 7.4.7 "General slice segment header
3977 semantics" of the specification.
3978
3979.. c:type:: v4l2_ctrl_hevc_slice_params
3980
3981.. cssclass:: longtable
3982
3983.. flat-table:: struct v4l2_ctrl_hevc_slice_params
3984 :header-rows: 0
3985 :stub-columns: 0
3986 :widths: 1 1 2
3987
3988 * - __u32
3989 - ``bit_size``
3990 - Size (in bits) of the current slice data.
3991 * - __u32
3992 - ``data_bit_offset``
3993 - Offset (in bits) to the video data in the current slice data.
3994 * - __u8
3995 - ``nal_unit_type``
3996 -
3997 * - __u8
3998 - ``nuh_temporal_id_plus1``
3999 -
4000 * - __u8
4001 - ``slice_type``
4002 -
4003 (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
4004 V4L2_HEVC_SLICE_TYPE_B).
4005 * - __u8
4006 - ``colour_plane_id``
4007 -
4008 * - __u16
4009 - ``slice_pic_order_cnt``
4010 -
4011 * - __u8
4012 - ``num_ref_idx_l0_active_minus1``
4013 -
4014 * - __u8
4015 - ``num_ref_idx_l1_active_minus1``
4016 -
4017 * - __u8
4018 - ``collocated_ref_idx``
4019 -
4020 * - __u8
4021 - ``five_minus_max_num_merge_cand``
4022 -
4023 * - __s8
4024 - ``slice_qp_delta``
4025 -
4026 * - __s8
4027 - ``slice_cb_qp_offset``
4028 -
4029 * - __s8
4030 - ``slice_cr_qp_offset``
4031 -
4032 * - __s8
4033 - ``slice_act_y_qp_offset``
4034 -
4035 * - __s8
4036 - ``slice_act_cb_qp_offset``
4037 -
4038 * - __s8
4039 - ``slice_act_cr_qp_offset``
4040 -
4041 * - __s8
4042 - ``slice_beta_offset_div2``
4043 -
4044 * - __s8
4045 - ``slice_tc_offset_div2``
4046 -
4047 * - __u8
4048 - ``pic_struct``
4049 -
4050 * - __u8
4051 - ``num_active_dpb_entries``
4052 - The number of entries in ``dpb``.
4053 * - __u8
4054 - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4055 - The list of L0 reference elements as indices in the DPB.
4056 * - __u8
4057 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4058 - The list of L1 reference elements as indices in the DPB.
4059 * - __u8
4060 - ``num_rps_poc_st_curr_before``
4061 - The number of reference pictures in the short-term set that come before
4062 the current frame.
4063 * - __u8
4064 - ``num_rps_poc_st_curr_after``
4065 - The number of reference pictures in the short-term set that come after
4066 the current frame.
4067 * - __u8
4068 - ``num_rps_poc_lt_curr``
4069 - The number of reference pictures in the long-term set.
4070 * - __u8
4071 - ``padding[7]``
4072 - Applications and drivers must set this to zero.
4073 * - struct :c:type:`v4l2_hevc_dpb_entry`
4074 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4075 - The decoded picture buffer, for meta-data about reference frames.
4076 * - struct :c:type:`v4l2_hevc_pred_weight_table`
4077 - ``pred_weight_table``
4078 - The prediction weight coefficients for inter-picture prediction.
4079 * - __u64
4080 - ``flags``
4081 - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
4082
4083.. _hevc_slice_params_flags:
4084
4085``Slice Parameters Flags``
4086
4087.. cssclass:: longtable
4088
4089.. flat-table::
4090 :header-rows: 0
4091 :stub-columns: 0
4092 :widths: 1 1 2
4093
4094 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
4095 - 0x00000001
4096 -
4097 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
4098 - 0x00000002
4099 -
4100 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
4101 - 0x00000004
4102 -
4103 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
4104 - 0x00000008
4105 -
4106 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
4107 - 0x00000010
4108 -
4109 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
4110 - 0x00000020
4111 -
4112 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
4113 - 0x00000040
4114 -
4115 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
4116 - 0x00000080
4117 -
4118 * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
4119 - 0x00000100
4120 -
4121
4122.. c:type:: v4l2_hevc_dpb_entry
4123
4124.. cssclass:: longtable
4125
4126.. flat-table:: struct v4l2_hevc_dpb_entry
4127 :header-rows: 0
4128 :stub-columns: 0
4129 :widths: 1 1 2
4130
4131 * - __u64
4132 - ``timestamp``
4133 - Timestamp of the V4L2 capture buffer to use as reference, used
4134 with B-coded and P-coded frames. The timestamp refers to the
4135 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
4136 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
4137 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
4138 * - __u8
4139 - ``rps``
4140 - The reference set for the reference frame
4141 (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
4142 V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
4143 V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
4144 * - __u8
4145 - ``field_pic``
4146 - Whether the reference is a field picture or a frame.
4147 * - __u16
4148 - ``pic_order_cnt[2]``
4149 - The picture order count of the reference. Only the first element of the
4150 array is used for frame pictures, while the first element identifies the
4151 top field and the second the bottom field in field-coded pictures.
4152 * - __u8
4153 - ``padding[2]``
4154 - Applications and drivers must set this to zero.
4155
4156.. c:type:: v4l2_hevc_pred_weight_table
4157
4158.. cssclass:: longtable
4159
4160.. flat-table:: struct v4l2_hevc_pred_weight_table
4161 :header-rows: 0
4162 :stub-columns: 0
4163 :widths: 1 1 2
4164
4165 * - __u8
4166 - ``luma_log2_weight_denom``
4167 -
4168 * - __s8
4169 - ``delta_chroma_log2_weight_denom``
4170 -
4171 * - __s8
4172 - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4173 -
4174 * - __s8
4175 - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4176 -
4177 * - __s8
4178 - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4179 -
4180 * - __s8
4181 - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4182 -
4183 * - __s8
4184 - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4185 -
4186 * - __s8
4187 - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
4188 -
4189 * - __s8
4190 - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4191 -
4192 * - __s8
4193 - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
4194 -
4195 * - __u8
4196 - ``padding[6]``
4197 - Applications and drivers must set this to zero.
4198
4199``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE (enum)``
4200 Specifies the decoding mode to use. Currently exposes slice-based and
4201 frame-based decoding but new modes might be added later on.
4202 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4203 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4204 are required to set this control in order to specify the decoding mode
4205 that is expected for the buffer.
4206 Drivers may expose a single or multiple decoding modes, depending
4207 on what they can support.
4208
4209 .. note::
4210
4211 This menu control is not yet part of the public kernel API and
4212 it is expected to change.
4213
4214.. c:type:: v4l2_mpeg_video_hevc_decode_mode
4215
4216.. cssclass:: longtable
4217
4218.. flat-table::
4219 :header-rows: 0
4220 :stub-columns: 0
4221 :widths: 1 1 2
4222
4223 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED``
4224 - 0
4225 - Decoding is done at the slice granularity.
4226 The OUTPUT buffer must contain a single slice.
4227 * - ``V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED``
4228 - 1
4229 - Decoding is done at the frame granularity.
4230 The OUTPUT buffer must contain all slices needed to decode the
4231 frame. The OUTPUT buffer must also contain both fields.
4232
4233``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE (enum)``
4234 Specifies the HEVC slice start code expected for each slice.
4235 This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
4236 pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
4237 are required to set this control in order to specify the start code
4238 that is expected for the buffer.
4239 Drivers may expose a single or multiple start codes, depending
4240 on what they can support.
4241
4242 .. note::
4243
4244 This menu control is not yet part of the public kernel API and
4245 it is expected to change.
4246
4247.. c:type:: v4l2_mpeg_video_hevc_start_code
4248
4249.. cssclass:: longtable
4250
4251.. flat-table::
4252 :header-rows: 0
4253 :stub-columns: 0
4254 :widths: 1 1 2
4255
4256 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
4257 - 0
4258 - Selecting this value specifies that HEVC slices are passed
4259 to the driver without any start code.
4260 * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
4261 - 1
4262 - Selecting this value specifies that HEVC slices are expected
4263 to be prefixed by Annex B start codes. According to :ref:`hevc`
4264 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.