blob: 03a40fd2237f9cc7798bc78d03a52f787c936eda [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001.. 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
108.. tabularcolumns:: |p{6.6 cm}|p{10.9cm}|
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
480.. tabularcolumns:: |p{9.8cm}|p{7.7cm}|
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 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_2``
760 - Level 5.2
761 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_0``
762 - Level 6.0
763 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_1``
764 - Level 6.1
765 * - ``V4L2_MPEG_VIDEO_H264_LEVEL_6_2``
766 - Level 6.2
767
768
769
770.. _v4l2-mpeg-video-mpeg2-level:
771
772``V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL``
773 (enum)
774
775enum v4l2_mpeg_video_mpeg2_level -
776 The level information for the MPEG2 elementary stream. Applicable to
777 MPEG2 codecs. Possible values are:
778
779
780
781.. flat-table::
782 :header-rows: 0
783 :stub-columns: 0
784
785 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW``
786 - Low Level (LL)
787 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN``
788 - Main Level (ML)
789 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440``
790 - High-1440 Level (H-14)
791 * - ``V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH``
792 - High Level (HL)
793
794
795
796.. _v4l2-mpeg-video-mpeg4-level:
797
798``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
799 (enum)
800
801enum v4l2_mpeg_video_mpeg4_level -
802 The level information for the MPEG4 elementary stream. Applicable to
803 the MPEG4 encoder. Possible values are:
804
805
806
807.. flat-table::
808 :header-rows: 0
809 :stub-columns: 0
810
811 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0``
812 - Level 0
813 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B``
814 - Level 0b
815 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_1``
816 - Level 1
817 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_2``
818 - Level 2
819 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3``
820 - Level 3
821 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B``
822 - Level 3b
823 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_4``
824 - Level 4
825 * - ``V4L2_MPEG_VIDEO_MPEG4_LEVEL_5``
826 - Level 5
827
828
829
830.. _v4l2-mpeg-video-h264-profile:
831
832``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
833 (enum)
834
835enum v4l2_mpeg_video_h264_profile -
836 The profile information for H264. Applicable to the H264 encoder.
837 Possible values are:
838
839
840
841.. flat-table::
842 :header-rows: 0
843 :stub-columns: 0
844
845 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
846 - Baseline profile
847 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
848 - Constrained Baseline profile
849 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
850 - Main profile
851 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
852 - Extended profile
853 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
854 - High profile
855 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
856 - High 10 profile
857 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
858 - High 422 profile
859 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
860 - High 444 Predictive profile
861 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
862 - High 10 Intra profile
863 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
864 - High 422 Intra profile
865 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
866 - High 444 Intra profile
867 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
868 - CAVLC 444 Intra profile
869 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
870 - Scalable Baseline profile
871 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
872 - Scalable High profile
873 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
874 - Scalable High Intra profile
875 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
876 - Stereo High profile
877 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
878 - Multiview High profile
879 * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH``
880 - Constrained High profile
881
882
883
884.. _v4l2-mpeg-video-mpeg2-profile:
885
886``V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE``
887 (enum)
888
889enum v4l2_mpeg_video_mpeg2_profile -
890 The profile information for MPEG2. Applicable to MPEG2 codecs.
891 Possible values are:
892
893
894
895.. flat-table::
896 :header-rows: 0
897 :stub-columns: 0
898
899 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE``
900 - Simple profile (SP)
901 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN``
902 - Main profile (MP)
903 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE``
904 - SNR Scalable profile (SNR)
905 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE``
906 - Spatially Scalable profile (Spt)
907 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH``
908 - High profile (HP)
909 * - ``V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW``
910 - Multi-view profile (MVP)
911
912
913
914.. _v4l2-mpeg-video-mpeg4-profile:
915
916``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
917 (enum)
918
919enum v4l2_mpeg_video_mpeg4_profile -
920 The profile information for MPEG4. Applicable to the MPEG4 encoder.
921 Possible values are:
922
923
924
925.. flat-table::
926 :header-rows: 0
927 :stub-columns: 0
928
929 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE``
930 - Simple profile
931 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE``
932 - Advanced Simple profile
933 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE``
934 - Core profile
935 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE``
936 - Simple Scalable profile
937 * - ``V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY``
938 -
939
940
941
942``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
943 The maximum number of reference pictures used for encoding.
944 Applicable to the encoder.
945
946.. _v4l2-mpeg-video-multi-slice-mode:
947
948``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
949 (enum)
950
951enum v4l2_mpeg_video_multi_slice_mode -
952 Determines how the encoder should handle division of frame into
953 slices. Applicable to the encoder. Possible values are:
954
955
956
957.. tabularcolumns:: |p{9.6cm}|p{7.9cm}|
958
959.. flat-table::
960 :header-rows: 0
961 :stub-columns: 0
962
963 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
964 - Single slice per frame.
965 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
966 - Multiple slices with set maximum number of macroblocks per slice.
967 * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
968 - Multiple slice with set maximum size in bytes per slice.
969
970
971
972``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
973 The maximum number of macroblocks in a slice. Used when
974 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
975 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
976 encoder.
977
978``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
979 The maximum size of a slice in bytes. Used when
980 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
981 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
982 encoder.
983
984.. _v4l2-mpeg-video-h264-loop-filter-mode:
985
986``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
987 (enum)
988
989enum v4l2_mpeg_video_h264_loop_filter_mode -
990 Loop filter mode for H264 encoder. Possible values are:
991
992.. raw:: latex
993
994 \small
995
996.. tabularcolumns:: |p{13.6cm}|p{3.9cm}|
997
998.. flat-table::
999 :header-rows: 0
1000 :stub-columns: 0
1001
1002 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1003 - Loop filter is enabled.
1004 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1005 - Loop filter is disabled.
1006 * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1007 - Loop filter is disabled at the slice boundary.
1008
1009.. raw:: latex
1010
1011 \normalsize
1012
1013
1014``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1015 Loop filter alpha coefficient, defined in the H264 standard.
1016 This value corresponds to the slice_alpha_c0_offset_div2 slice header
1017 field, and should be in the range of -6 to +6, inclusive. The actual alpha
1018 offset FilterOffsetA is twice this value.
1019 Applicable to the H264 encoder.
1020
1021``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1022 Loop filter beta coefficient, defined in the H264 standard.
1023 This corresponds to the slice_beta_offset_div2 slice header field, and
1024 should be in the range of -6 to +6, inclusive. The actual beta offset
1025 FilterOffsetB is twice this value.
1026 Applicable to the H264 encoder.
1027
1028.. _v4l2-mpeg-video-h264-entropy-mode:
1029
1030``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1031 (enum)
1032
1033enum v4l2_mpeg_video_h264_entropy_mode -
1034 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1035 encoder. Possible values are:
1036
1037
1038.. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1039
1040
1041.. flat-table::
1042 :header-rows: 0
1043 :stub-columns: 0
1044
1045 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1046 - Use CAVLC entropy coding.
1047 * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1048 - Use CABAC entropy coding.
1049
1050
1051
1052``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1053 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1054
1055``V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (boolean)``
1056 Enable constrained intra prediction for H264. Applicable to the H264
1057 encoder.
1058
1059``V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (integer)``
1060 Specify the offset that should be added to the luma quantization
1061 parameter to determine the chroma quantization parameter. Applicable
1062 to the H264 encoder.
1063
1064``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1065 Cyclic intra macroblock refresh. This is the number of continuous
1066 macroblocks refreshed every frame. Each frame a successive set of
1067 macroblocks is refreshed until the cycle completes and starts from
1068 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1069
1070``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1071 Frame level rate control enable. If this control is disabled then
1072 the quantization parameter for each frame type is constant and set
1073 with appropriate controls (e.g.
1074 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1075 enabled then quantization parameter is adjusted to meet the chosen
1076 bitrate. Minimum and maximum value for the quantization parameter
1077 can be set with appropriate controls (e.g.
1078 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1079
1080``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1081 Macroblock level rate control enable. Applicable to the MPEG4 and
1082 H264 encoders.
1083
1084``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1085 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1086 encoder.
1087
1088``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1089 Quantization parameter for an I frame for H263. Valid range: from 1
1090 to 31.
1091
1092``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1093 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1094
1095``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1096 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1097
1098``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1099 Quantization parameter for an P frame for H263. Valid range: from 1
1100 to 31.
1101
1102``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1103 Quantization parameter for an B frame for H263. Valid range: from 1
1104 to 31.
1105
1106``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1107 Quantization parameter for an I frame for H264. Valid range: from 0
1108 to 51.
1109
1110``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1111 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1112
1113``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1114 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1115
1116``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1117 Quantization parameter for an P frame for H264. Valid range: from 0
1118 to 51.
1119
1120``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1121 Quantization parameter for an B frame for H264. Valid range: from 0
1122 to 51.
1123
1124``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (integer)``
1125 Minimum quantization parameter for the H264 I frame to limit I frame
1126 quality to a range. Valid range: from 0 to 51. If
1127 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1128 should be chosen to meet both requirements.
1129
1130``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (integer)``
1131 Maximum quantization parameter for the H264 I frame to limit I frame
1132 quality to a range. Valid range: from 0 to 51. If
1133 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1134 should be chosen to meet both requirements.
1135
1136``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (integer)``
1137 Minimum quantization parameter for the H264 P frame to limit P frame
1138 quality to a range. Valid range: from 0 to 51. If
1139 V4L2_CID_MPEG_VIDEO_H264_MIN_QP is also set, the quantization parameter
1140 should be chosen to meet both requirements.
1141
1142``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (integer)``
1143 Maximum quantization parameter for the H264 P frame to limit P frame
1144 quality to a range. Valid range: from 0 to 51. If
1145 V4L2_CID_MPEG_VIDEO_H264_MAX_QP is also set, the quantization parameter
1146 should be chosen to meet both requirements.
1147
1148``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1149 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1150 to 31.
1151
1152``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1153 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1154
1155``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1156 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1157
1158``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1159 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1160 to 31.
1161
1162``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1163 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1164 to 31.
1165
1166``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1167 The Video Buffer Verifier size in kilobytes, it is used as a
1168 limitation of frame skip. The VBV is defined in the standard as a
1169 mean to verify that the produced stream will be successfully
1170 decoded. The standard describes it as "Part of a hypothetical
1171 decoder that is conceptually connected to the output of the encoder.
1172 Its purpose is to provide a constraint on the variability of the
1173 data rate that an encoder or editing process may produce.".
1174 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1175
1176.. _v4l2-mpeg-video-vbv-delay:
1177
1178``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1179 Sets the initial delay in milliseconds for VBV buffer control.
1180
1181.. _v4l2-mpeg-video-hor-search-range:
1182
1183``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1184 Horizontal search range defines maximum horizontal search area in
1185 pixels to search and match for the present Macroblock (MB) in the
1186 reference picture. This V4L2 control macro is used to set horizontal
1187 search range for motion estimation module in video encoder.
1188
1189.. _v4l2-mpeg-video-vert-search-range:
1190
1191``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1192 Vertical search range defines maximum vertical search area in pixels
1193 to search and match for the present Macroblock (MB) in the reference
1194 picture. This V4L2 control macro is used to set vertical search
1195 range for motion estimation module in video encoder.
1196
1197.. _v4l2-mpeg-video-force-key-frame:
1198
1199``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1200 Force a key frame for the next queued buffer. Applicable to
1201 encoders. This is a general, codec-agnostic keyframe control.
1202
1203``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1204 The Coded Picture Buffer size in kilobytes, it is used as a
1205 limitation of frame skip. The CPB is defined in the H264 standard as
1206 a mean to verify that the produced stream will be successfully
1207 decoded. Applicable to the H264 encoder.
1208
1209``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1210 Period between I-frames in the open GOP for H264. In case of an open
1211 GOP this is the period between two I-frames. The period between IDR
1212 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1213 control. An IDR frame, which stands for Instantaneous Decoding
1214 Refresh is an I-frame after which no prior frames are referenced.
1215 This means that a stream can be restarted from an IDR frame without
1216 the need to store or decode any previous frames. Applicable to the
1217 H264 encoder.
1218
1219.. _v4l2-mpeg-video-header-mode:
1220
1221``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1222 (enum)
1223
1224enum v4l2_mpeg_video_header_mode -
1225 Determines whether the header is returned as the first buffer or is
1226 it returned together with the first frame. Applicable to encoders.
1227 Possible values are:
1228
1229.. raw:: latex
1230
1231 \small
1232
1233.. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
1234
1235.. flat-table::
1236 :header-rows: 0
1237 :stub-columns: 0
1238
1239 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
1240 - The stream header is returned separately in the first buffer.
1241 * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
1242 - The stream header is returned together with the first encoded
1243 frame.
1244
1245.. raw:: latex
1246
1247 \normalsize
1248
1249
1250``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
1251 Repeat the video sequence headers. Repeating these headers makes
1252 random access to the video stream easier. Applicable to the MPEG1, 2
1253 and 4 encoder.
1254
1255``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
1256 Enabled the deblocking post processing filter for MPEG4 decoder.
1257 Applicable to the MPEG4 decoder.
1258
1259``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
1260 vop_time_increment_resolution value for MPEG4. Applicable to the
1261 MPEG4 encoder.
1262
1263``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
1264 vop_time_increment value for MPEG4. Applicable to the MPEG4
1265 encoder.
1266
1267``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
1268 Enable generation of frame packing supplemental enhancement
1269 information in the encoded bitstream. The frame packing SEI message
1270 contains the arrangement of L and R planes for 3D viewing.
1271 Applicable to the H264 encoder.
1272
1273``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
1274 Sets current frame as frame0 in frame packing SEI. Applicable to the
1275 H264 encoder.
1276
1277.. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
1278
1279``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
1280 (enum)
1281
1282enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
1283 Frame packing arrangement type for H264 SEI. Applicable to the H264
1284 encoder. Possible values are:
1285
1286.. raw:: latex
1287
1288 \small
1289
1290.. tabularcolumns:: |p{12cm}|p{5.5cm}|
1291
1292.. flat-table::
1293 :header-rows: 0
1294 :stub-columns: 0
1295
1296 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
1297 - Pixels are alternatively from L and R.
1298 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
1299 - L and R are interlaced by column.
1300 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
1301 - L and R are interlaced by row.
1302 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
1303 - L is on the left, R on the right.
1304 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
1305 - L is on top, R on bottom.
1306 * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
1307 - One view per frame.
1308
1309.. raw:: latex
1310
1311 \normalsize
1312
1313
1314
1315``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
1316 Enables flexible macroblock ordering in the encoded bitstream. It is
1317 a technique used for restructuring the ordering of macroblocks in
1318 pictures. Applicable to the H264 encoder.
1319
1320.. _v4l2-mpeg-video-h264-fmo-map-type:
1321
1322``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
1323 (enum)
1324
1325enum v4l2_mpeg_video_h264_fmo_map_type -
1326 When using FMO, the map type divides the image in different scan
1327 patterns of macroblocks. Applicable to the H264 encoder. Possible
1328 values are:
1329
1330.. raw:: latex
1331
1332 \small
1333
1334.. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
1335
1336.. flat-table::
1337 :header-rows: 0
1338 :stub-columns: 0
1339
1340 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
1341 - Slices are interleaved one after other with macroblocks in run
1342 length order.
1343 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
1344 - Scatters the macroblocks based on a mathematical function known to
1345 both encoder and decoder.
1346 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
1347 - Macroblocks arranged in rectangular areas or regions of interest.
1348 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
1349 - Slice groups grow in a cyclic way from centre to outwards.
1350 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
1351 - Slice groups grow in raster scan pattern from left to right.
1352 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
1353 - Slice groups grow in wipe scan pattern from top to bottom.
1354 * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
1355 - User defined map type.
1356
1357.. raw:: latex
1358
1359 \normalsize
1360
1361
1362
1363``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
1364 Number of slice groups in FMO. Applicable to the H264 encoder.
1365
1366.. _v4l2-mpeg-video-h264-fmo-change-direction:
1367
1368``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
1369 (enum)
1370
1371enum v4l2_mpeg_video_h264_fmo_change_dir -
1372 Specifies a direction of the slice group change for raster and wipe
1373 maps. Applicable to the H264 encoder. Possible values are:
1374
1375
1376
1377.. flat-table::
1378 :header-rows: 0
1379 :stub-columns: 0
1380
1381 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
1382 - Raster scan or wipe right.
1383 * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
1384 - Reverse raster scan or wipe left.
1385
1386
1387
1388``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
1389 Specifies the size of the first slice group for raster and wipe map.
1390 Applicable to the H264 encoder.
1391
1392``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
1393 Specifies the number of consecutive macroblocks for the interleaved
1394 map. Applicable to the H264 encoder.
1395
1396``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
1397 Enables arbitrary slice ordering in encoded bitstream. Applicable to
1398 the H264 encoder.
1399
1400``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
1401 Specifies the slice order in ASO. Applicable to the H264 encoder.
1402 The supplied 32-bit integer is interpreted as follows (bit 0 = least
1403 significant bit):
1404
1405
1406
1407.. flat-table::
1408 :header-rows: 0
1409 :stub-columns: 0
1410
1411 * - Bit 0:15
1412 - Slice ID
1413 * - Bit 16:32
1414 - Slice position or order
1415
1416
1417
1418``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
1419 Enables H264 hierarchical coding. Applicable to the H264 encoder.
1420
1421.. _v4l2-mpeg-video-h264-hierarchical-coding-type:
1422
1423``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
1424 (enum)
1425
1426enum v4l2_mpeg_video_h264_hierarchical_coding_type -
1427 Specifies the hierarchical coding type. Applicable to the H264
1428 encoder. Possible values are:
1429
1430
1431
1432.. flat-table::
1433 :header-rows: 0
1434 :stub-columns: 0
1435
1436 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
1437 - Hierarchical B coding.
1438 * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
1439 - Hierarchical P coding.
1440
1441
1442
1443``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
1444 Specifies the number of hierarchical coding layers. Applicable to
1445 the H264 encoder.
1446
1447``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
1448 Specifies a user defined QP for each layer. Applicable to the H264
1449 encoder. The supplied 32-bit integer is interpreted as follows (bit
1450 0 = least significant bit):
1451
1452
1453
1454.. flat-table::
1455 :header-rows: 0
1456 :stub-columns: 0
1457
1458 * - Bit 0:15
1459 - QP value
1460 * - Bit 16:32
1461 - Layer number
1462
1463
1464.. _v4l2-mpeg-h264:
1465
1466``V4L2_CID_MPEG_VIDEO_H264_SPS (struct)``
1467 Specifies the sequence parameter set (as extracted from the
1468 bitstream) for the associated H264 slice data. This includes the
1469 necessary parameters for configuring a stateless hardware decoding
1470 pipeline for H264. The bitstream parameters are defined according
1471 to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
1472 Semantics". For further documentation, refer to the above
1473 specification, unless there is an explicit comment stating
1474 otherwise.
1475
1476 .. note::
1477
1478 This compound control is not yet part of the public kernel API and
1479 it is expected to change.
1480
1481.. c:type:: v4l2_ctrl_h264_sps
1482
1483.. cssclass:: longtable
1484
1485.. flat-table:: struct v4l2_ctrl_h264_sps
1486 :header-rows: 0
1487 :stub-columns: 0
1488 :widths: 1 1 2
1489
1490 * - __u8
1491 - ``profile_idc``
1492 -
1493 * - __u8
1494 - ``constraint_set_flags``
1495 - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
1496 * - __u8
1497 - ``level_idc``
1498 -
1499 * - __u8
1500 - ``seq_parameter_set_id``
1501 -
1502 * - __u8
1503 - ``chroma_format_idc``
1504 -
1505 * - __u8
1506 - ``bit_depth_luma_minus8``
1507 -
1508 * - __u8
1509 - ``bit_depth_chroma_minus8``
1510 -
1511 * - __u8
1512 - ``log2_max_frame_num_minus4``
1513 -
1514 * - __u8
1515 - ``pic_order_cnt_type``
1516 -
1517 * - __u8
1518 - ``log2_max_pic_order_cnt_lsb_minus4``
1519 -
1520 * - __u8
1521 - ``max_num_ref_frames``
1522 -
1523 * - __u8
1524 - ``num_ref_frames_in_pic_order_cnt_cycle``
1525 -
1526 * - __s32
1527 - ``offset_for_ref_frame[255]``
1528 -
1529 * - __s32
1530 - ``offset_for_non_ref_pic``
1531 -
1532 * - __s32
1533 - ``offset_for_top_to_bottom_field``
1534 -
1535 * - __u16
1536 - ``pic_width_in_mbs_minus1``
1537 -
1538 * - __u16
1539 - ``pic_height_in_map_units_minus1``
1540 -
1541 * - __u32
1542 - ``flags``
1543 - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
1544
1545.. _h264_sps_constraints_set_flags:
1546
1547``Sequence Parameter Set Constraints Set Flags``
1548
1549.. cssclass:: longtable
1550
1551.. flat-table::
1552 :header-rows: 0
1553 :stub-columns: 0
1554 :widths: 1 1 2
1555
1556 * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
1557 - 0x00000001
1558 -
1559 * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
1560 - 0x00000002
1561 -
1562 * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
1563 - 0x00000004
1564 -
1565 * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
1566 - 0x00000008
1567 -
1568 * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
1569 - 0x00000010
1570 -
1571 * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
1572 - 0x00000020
1573 -
1574
1575.. _h264_sps_flags:
1576
1577``Sequence Parameter Set Flags``
1578
1579.. cssclass:: longtable
1580
1581.. flat-table::
1582 :header-rows: 0
1583 :stub-columns: 0
1584 :widths: 1 1 2
1585
1586 * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
1587 - 0x00000001
1588 -
1589 * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
1590 - 0x00000002
1591 -
1592 * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
1593 - 0x00000004
1594 -
1595 * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
1596 - 0x00000008
1597 -
1598 * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
1599 - 0x00000010
1600 -
1601 * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
1602 - 0x00000020
1603 -
1604 * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
1605 - 0x00000040
1606 -
1607
1608``V4L2_CID_MPEG_VIDEO_H264_PPS (struct)``
1609 Specifies the picture parameter set (as extracted from the
1610 bitstream) for the associated H264 slice data. This includes the
1611 necessary parameters for configuring a stateless hardware decoding
1612 pipeline for H264. The bitstream parameters are defined according
1613 to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
1614 Semantics". For further documentation, refer to the above
1615 specification, unless there is an explicit comment stating
1616 otherwise.
1617
1618 .. note::
1619
1620 This compound control is not yet part of the public kernel API and
1621 it is expected to change.
1622
1623.. c:type:: v4l2_ctrl_h264_pps
1624
1625.. cssclass:: longtable
1626
1627.. flat-table:: struct v4l2_ctrl_h264_pps
1628 :header-rows: 0
1629 :stub-columns: 0
1630 :widths: 1 1 2
1631
1632 * - __u8
1633 - ``pic_parameter_set_id``
1634 -
1635 * - __u8
1636 - ``seq_parameter_set_id``
1637 -
1638 * - __u8
1639 - ``num_slice_groups_minus1``
1640 -
1641 * - __u8
1642 - ``num_ref_idx_l0_default_active_minus1``
1643 -
1644 * - __u8
1645 - ``num_ref_idx_l1_default_active_minus1``
1646 -
1647 * - __u8
1648 - ``weighted_bipred_idc``
1649 -
1650 * - __s8
1651 - ``pic_init_qp_minus26``
1652 -
1653 * - __s8
1654 - ``pic_init_qs_minus26``
1655 -
1656 * - __s8
1657 - ``chroma_qp_index_offset``
1658 -
1659 * - __s8
1660 - ``second_chroma_qp_index_offset``
1661 -
1662 * - __u16
1663 - ``flags``
1664 - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
1665
1666.. _h264_pps_flags:
1667
1668``Picture Parameter Set Flags``
1669
1670.. cssclass:: longtable
1671
1672.. flat-table::
1673 :header-rows: 0
1674 :stub-columns: 0
1675 :widths: 1 1 2
1676
1677 * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
1678 - 0x00000001
1679 -
1680 * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
1681 - 0x00000002
1682 -
1683 * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
1684 - 0x00000004
1685 -
1686 * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
1687 - 0x00000008
1688 -
1689 * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
1690 - 0x00000010
1691 -
1692 * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
1693 - 0x00000020
1694 -
1695 * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
1696 - 0x00000040
1697 -
1698 * - ``V4L2_H264_PPS_FLAG_PIC_SCALING_MATRIX_PRESENT``
1699 - 0x00000080
1700 -
1701
1702``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX (struct)``
1703 Specifies the scaling matrix (as extracted from the bitstream) for
1704 the associated H264 slice data. The bitstream parameters are
1705 defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
1706 List Semantics". For further documentation, refer to the above
1707 specification, unless there is an explicit comment stating
1708 otherwise.
1709
1710 .. note::
1711
1712 This compound control is not yet part of the public kernel API and
1713 it is expected to change.
1714
1715.. c:type:: v4l2_ctrl_h264_scaling_matrix
1716
1717.. cssclass:: longtable
1718
1719.. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
1720 :header-rows: 0
1721 :stub-columns: 0
1722 :widths: 1 1 2
1723
1724 * - __u8
1725 - ``scaling_list_4x4[6][16]``
1726 -
1727 * - __u8
1728 - ``scaling_list_8x8[6][64]``
1729 -
1730
1731``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS (struct)``
1732 Specifies the slice parameters (as extracted from the bitstream)
1733 for the associated H264 slice data. This includes the necessary
1734 parameters for configuring a stateless hardware decoding pipeline
1735 for H264. The bitstream parameters are defined according to
1736 :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
1737 documentation, refer to the above specification, unless there is
1738 an explicit comment stating otherwise.
1739
1740 .. note::
1741
1742 This compound control is not yet part of the public kernel API
1743 and it is expected to change.
1744
1745 This structure is expected to be passed as an array, with one
1746 entry for each slice included in the bitstream buffer.
1747
1748.. c:type:: v4l2_ctrl_h264_slice_params
1749
1750.. cssclass:: longtable
1751
1752.. flat-table:: struct v4l2_ctrl_h264_slice_params
1753 :header-rows: 0
1754 :stub-columns: 0
1755 :widths: 1 1 2
1756
1757 * - __u32
1758 - ``size``
1759 -
1760 * - __u32
1761 - ``start_byte_offset``
1762 Offset (in bytes) from the beginning of the OUTPUT buffer to the start
1763 of the slice. If the slice starts with a start code, then this is the
1764 offset to such start code. When operating in slice-based decoding mode
1765 (see :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field should
1766 be set to 0. When operating in frame-based decoding mode, this field
1767 should be 0 for the first slice.
1768 * - __u32
1769 - ``header_bit_size``
1770 -
1771 * - __u16
1772 - ``first_mb_in_slice``
1773 -
1774 * - __u8
1775 - ``slice_type``
1776 -
1777 * - __u8
1778 - ``pic_parameter_set_id``
1779 -
1780 * - __u8
1781 - ``colour_plane_id``
1782 -
1783 * - __u8
1784 - ``redundant_pic_cnt``
1785 -
1786 * - __u16
1787 - ``frame_num``
1788 -
1789 * - __u16
1790 - ``idr_pic_id``
1791 -
1792 * - __u16
1793 - ``pic_order_cnt_lsb``
1794 -
1795 * - __s32
1796 - ``delta_pic_order_cnt_bottom``
1797 -
1798 * - __s32
1799 - ``delta_pic_order_cnt0``
1800 -
1801 * - __s32
1802 - ``delta_pic_order_cnt1``
1803 -
1804 * - struct :c:type:`v4l2_h264_pred_weight_table`
1805 - ``pred_weight_table``
1806 -
1807 * - __u32
1808 - ``dec_ref_pic_marking_bit_size``
1809 -
1810 * - __u32
1811 - ``pic_order_cnt_bit_size``
1812 -
1813 * - __u8
1814 - ``cabac_init_idc``
1815 -
1816 * - __s8
1817 - ``slice_qp_delta``
1818 -
1819 * - __s8
1820 - ``slice_qs_delta``
1821 -
1822 * - __u8
1823 - ``disable_deblocking_filter_idc``
1824 -
1825 * - __s8
1826 - ``slice_alpha_c0_offset_div2``
1827 -
1828 * - __s8
1829 - ``slice_beta_offset_div2``
1830 -
1831 * - __u8
1832 - ``num_ref_idx_l0_active_minus1``
1833 -
1834 * - __u8
1835 - ``num_ref_idx_l1_active_minus1``
1836 -
1837 * - __u32
1838 - ``slice_group_change_cycle``
1839 -
1840 * - __u8
1841 - ``ref_pic_list0[32]``
1842 - Reference picture list after applying the per-slice modifications
1843 * - __u8
1844 - ``ref_pic_list1[32]``
1845 - Reference picture list after applying the per-slice modifications
1846 * - __u32
1847 - ``flags``
1848 - See :ref:`Slice Parameter Flags <h264_slice_flags>`
1849
1850.. _h264_slice_flags:
1851
1852``Slice Parameter Set Flags``
1853
1854.. cssclass:: longtable
1855
1856.. flat-table::
1857 :header-rows: 0
1858 :stub-columns: 0
1859 :widths: 1 1 2
1860
1861 * - ``V4L2_H264_SLICE_FLAG_FIELD_PIC``
1862 - 0x00000001
1863 -
1864 * - ``V4L2_H264_SLICE_FLAG_BOTTOM_FIELD``
1865 - 0x00000002
1866 -
1867 * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
1868 - 0x00000004
1869 -
1870 * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
1871 - 0x00000008
1872 -
1873
1874``Prediction Weight Table``
1875
1876 The bitstream parameters are defined according to :ref:`h264`,
1877 section 7.4.3.2 "Prediction Weight Table Semantics". For further
1878 documentation, refer to the above specification, unless there is
1879 an explicit comment stating otherwise.
1880
1881.. c:type:: v4l2_h264_pred_weight_table
1882
1883.. cssclass:: longtable
1884
1885.. flat-table:: struct v4l2_h264_pred_weight_table
1886 :header-rows: 0
1887 :stub-columns: 0
1888 :widths: 1 1 2
1889
1890 * - __u16
1891 - ``luma_log2_weight_denom``
1892 -
1893 * - __u16
1894 - ``chroma_log2_weight_denom``
1895 -
1896 * - struct :c:type:`v4l2_h264_weight_factors`
1897 - ``weight_factors[2]``
1898 - The weight factors at index 0 are the weight factors for the reference
1899 list 0, the one at index 1 for the reference list 1.
1900
1901.. c:type:: v4l2_h264_weight_factors
1902
1903.. cssclass:: longtable
1904
1905.. flat-table:: struct v4l2_h264_weight_factors
1906 :header-rows: 0
1907 :stub-columns: 0
1908 :widths: 1 1 2
1909
1910 * - __s16
1911 - ``luma_weight[32]``
1912 -
1913 * - __s16
1914 - ``luma_offset[32]``
1915 -
1916 * - __s16
1917 - ``chroma_weight[32][2]``
1918 -
1919 * - __s16
1920 - ``chroma_offset[32][2]``
1921 -
1922
1923``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS (struct)``
1924 Specifies the decode parameters (as extracted from the bitstream)
1925 for the associated H264 slice data. This includes the necessary
1926 parameters for configuring a stateless hardware decoding pipeline
1927 for H264. The bitstream parameters are defined according to
1928 :ref:`h264`. For further documentation, refer to the above
1929 specification, unless there is an explicit comment stating
1930 otherwise.
1931
1932 .. note::
1933
1934 This compound control is not yet part of the public kernel API and
1935 it is expected to change.
1936
1937.. c:type:: v4l2_ctrl_h264_decode_params
1938
1939.. cssclass:: longtable
1940
1941.. flat-table:: struct v4l2_ctrl_h264_decode_params
1942 :header-rows: 0
1943 :stub-columns: 0
1944 :widths: 1 1 2
1945
1946 * - struct :c:type:`v4l2_h264_dpb_entry`
1947 - ``dpb[16]``
1948 -
1949 * - __u16
1950 - ``num_slices``
1951 - Number of slices needed to decode the current frame/field. When
1952 operating in slice-based decoding mode (see
1953 :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field
1954 should always be set to one.
1955 * - __u16
1956 - ``nal_ref_idc``
1957 - NAL reference ID value coming from the NAL Unit header
1958 * - __s32
1959 - ``top_field_order_cnt``
1960 - Picture Order Count for the coded top field
1961 * - __s32
1962 - ``bottom_field_order_cnt``
1963 - Picture Order Count for the coded bottom field
1964 * - __u32
1965 - ``flags``
1966 - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
1967
1968.. _h264_decode_params_flags:
1969
1970``Decode Parameters Flags``
1971
1972.. cssclass:: longtable
1973
1974.. flat-table::
1975 :header-rows: 0
1976 :stub-columns: 0
1977 :widths: 1 1 2
1978
1979 * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
1980 - 0x00000001
1981 - That picture is an IDR picture
1982
1983.. c:type:: v4l2_h264_dpb_entry
1984
1985.. cssclass:: longtable
1986
1987.. flat-table:: struct v4l2_h264_dpb_entry
1988 :header-rows: 0
1989 :stub-columns: 0
1990 :widths: 1 1 2
1991
1992 * - __u64
1993 - ``reference_ts``
1994 - Timestamp of the V4L2 capture buffer to use as reference, used
1995 with B-coded and P-coded frames. The timestamp refers to the
1996 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
1997 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
1998 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
1999 * - __u16
2000 - ``frame_num``
2001 -
2002 * - __u16
2003 - ``pic_num``
2004 -
2005 * - __s32
2006 - ``top_field_order_cnt``
2007 -
2008 * - __s32
2009 - ``bottom_field_order_cnt``
2010 -
2011 * - __u32
2012 - ``flags``
2013 - See :ref:`DPB Entry Flags <h264_dpb_flags>`
2014
2015.. _h264_dpb_flags:
2016
2017``DPB Entries Flags``
2018
2019.. cssclass:: longtable
2020
2021.. flat-table::
2022 :header-rows: 0
2023 :stub-columns: 0
2024 :widths: 1 1 2
2025
2026 * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
2027 - 0x00000001
2028 - The DPB entry is valid and should be considered
2029 * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
2030 - 0x00000002
2031 - The DPB entry is currently being used as a reference frame
2032 * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
2033 - 0x00000004
2034 - The DPB entry is a long term reference frame
2035
2036``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
2037 Specifies the decoding mode to use. Currently exposes slice-based and
2038 frame-based decoding but new modes might be added later on.
2039 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2040 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2041 are required to set this control in order to specify the decoding mode
2042 that is expected for the buffer.
2043 Drivers may expose a single or multiple decoding modes, depending
2044 on what they can support.
2045
2046 .. note::
2047
2048 This menu control is not yet part of the public kernel API and
2049 it is expected to change.
2050
2051.. c:type:: v4l2_mpeg_video_h264_decode_mode
2052
2053.. cssclass:: longtable
2054
2055.. flat-table::
2056 :header-rows: 0
2057 :stub-columns: 0
2058 :widths: 1 1 2
2059
2060 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED``
2061 - 0
2062 - Decoding is done at the slice granularity.
2063 In this mode, ``num_slices`` field in struct
2064 :c:type:`v4l2_ctrl_h264_decode_params` should be set to 1,
2065 and ``start_byte_offset`` in struct
2066 :c:type:`v4l2_ctrl_h264_slice_params` should be set to 0.
2067 The OUTPUT buffer must contain a single slice.
2068 * - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED``
2069 - 1
2070 - Decoding is done at the frame granularity.
2071 In this mode, ``num_slices`` field in struct
2072 :c:type:`v4l2_ctrl_h264_decode_params` should be set to the number
2073 of slices in the frame, and ``start_byte_offset`` in struct
2074 :c:type:`v4l2_ctrl_h264_slice_params` should be set accordingly
2075 for each slice. For the first slice, ``start_byte_offset`` should
2076 be zero.
2077 The OUTPUT buffer must contain all slices needed to decode the
2078 frame. The OUTPUT buffer must also contain both fields.
2079
2080``V4L2_CID_MPEG_VIDEO_H264_START_CODE (enum)``
2081 Specifies the H264 slice start code expected for each slice.
2082 This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
2083 pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
2084 are required to set this control in order to specify the start code
2085 that is expected for the buffer.
2086 Drivers may expose a single or multiple start codes, depending
2087 on what they can support.
2088
2089 .. note::
2090
2091 This menu control is not yet part of the public kernel API and
2092 it is expected to change.
2093
2094.. c:type:: v4l2_mpeg_video_h264_start_code
2095
2096.. cssclass:: longtable
2097
2098.. flat-table::
2099 :header-rows: 0
2100 :stub-columns: 0
2101 :widths: 1 1 2
2102
2103 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_NONE``
2104 - 0
2105 - Selecting this value specifies that H264 slices are passed
2106 to the driver without any start code.
2107 * - ``V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B``
2108 - 1
2109 - Selecting this value specifies that H264 slices are expected
2110 to be prefixed by Annex B start codes. According to :ref:`h264`
2111 valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
2112
2113.. _v4l2-mpeg-mpeg2:
2114
2115``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
2116 Specifies the slice parameters (as extracted from the bitstream) for the
2117 associated MPEG-2 slice data. This includes the necessary parameters for
2118 configuring a stateless hardware decoding pipeline for MPEG-2.
2119 The bitstream parameters are defined according to :ref:`mpeg2part2`.
2120
2121 .. note::
2122
2123 This compound control is not yet part of the public kernel API and
2124 it is expected to change.
2125
2126.. c:type:: v4l2_ctrl_mpeg2_slice_params
2127
2128.. cssclass:: longtable
2129
2130.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2131
2132.. flat-table:: struct v4l2_ctrl_mpeg2_slice_params
2133 :header-rows: 0
2134 :stub-columns: 0
2135 :widths: 1 1 2
2136
2137 * - __u32
2138 - ``bit_size``
2139 - Size (in bits) of the current slice data.
2140 * - __u32
2141 - ``data_bit_offset``
2142 - Offset (in bits) to the video data in the current slice data.
2143 * - struct :c:type:`v4l2_mpeg2_sequence`
2144 - ``sequence``
2145 - Structure with MPEG-2 sequence metadata, merging relevant fields from
2146 the sequence header and sequence extension parts of the bitstream.
2147 * - struct :c:type:`v4l2_mpeg2_picture`
2148 - ``picture``
2149 - Structure with MPEG-2 picture metadata, merging relevant fields from
2150 the picture header and picture coding extension parts of the bitstream.
2151 * - __u64
2152 - ``backward_ref_ts``
2153 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2154 with B-coded and P-coded frames. The timestamp refers to the
2155 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2156 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2157 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2158 * - __u64
2159 - ``forward_ref_ts``
2160 - Timestamp for the V4L2 capture buffer to use as forward reference, used
2161 with B-coded frames. The timestamp refers to the ``timestamp`` field in
2162 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2163 function to convert the struct :c:type:`timeval` in struct
2164 :c:type:`v4l2_buffer` to a __u64.
2165 * - __u32
2166 - ``quantiser_scale_code``
2167 - Code used to determine the quantization scale to use for the IDCT.
2168
2169.. c:type:: v4l2_mpeg2_sequence
2170
2171.. cssclass:: longtable
2172
2173.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2174
2175.. flat-table:: struct v4l2_mpeg2_sequence
2176 :header-rows: 0
2177 :stub-columns: 0
2178 :widths: 1 1 2
2179
2180 * - __u16
2181 - ``horizontal_size``
2182 - The width of the displayable part of the frame's luminance component.
2183 * - __u16
2184 - ``vertical_size``
2185 - The height of the displayable part of the frame's luminance component.
2186 * - __u32
2187 - ``vbv_buffer_size``
2188 - Used to calculate the required size of the video buffering verifier,
2189 defined (in bits) as: 16 * 1024 * vbv_buffer_size.
2190 * - __u16
2191 - ``profile_and_level_indication``
2192 - The current profile and level indication as extracted from the
2193 bitstream.
2194 * - __u8
2195 - ``progressive_sequence``
2196 - Indication that all the frames for the sequence are progressive instead
2197 of interlaced.
2198 * - __u8
2199 - ``chroma_format``
2200 - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
2201
2202.. c:type:: v4l2_mpeg2_picture
2203
2204.. cssclass:: longtable
2205
2206.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2207
2208.. flat-table:: struct v4l2_mpeg2_picture
2209 :header-rows: 0
2210 :stub-columns: 0
2211 :widths: 1 1 2
2212
2213 * - __u8
2214 - ``picture_coding_type``
2215 - Picture coding type for the frame covered by the current slice
2216 (V4L2_MPEG2_PICTURE_CODING_TYPE_I, V4L2_MPEG2_PICTURE_CODING_TYPE_P or
2217 V4L2_MPEG2_PICTURE_CODING_TYPE_B).
2218 * - __u8
2219 - ``f_code[2][2]``
2220 - Motion vector codes.
2221 * - __u8
2222 - ``intra_dc_precision``
2223 - Precision of Discrete Cosine transform (0: 8 bits precision,
2224 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
2225 * - __u8
2226 - ``picture_structure``
2227 - Picture structure (1: interlaced top field, 2: interlaced bottom field,
2228 3: progressive frame).
2229 * - __u8
2230 - ``top_field_first``
2231 - If set to 1 and interlaced stream, top field is output first.
2232 * - __u8
2233 - ``frame_pred_frame_dct``
2234 - If set to 1, only frame-DCT and frame prediction are used.
2235 * - __u8
2236 - ``concealment_motion_vectors``
2237 - If set to 1, motion vectors are coded for intra macroblocks.
2238 * - __u8
2239 - ``q_scale_type``
2240 - This flag affects the inverse quantization process.
2241 * - __u8
2242 - ``intra_vlc_format``
2243 - This flag affects the decoding of transform coefficient data.
2244 * - __u8
2245 - ``alternate_scan``
2246 - This flag affects the decoding of transform coefficient data.
2247 * - __u8
2248 - ``repeat_first_field``
2249 - This flag affects the decoding process of progressive frames.
2250 * - __u16
2251 - ``progressive_frame``
2252 - Indicates whether the current frame is progressive.
2253
2254``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (struct)``
2255 Specifies quantization matrices (as extracted from the bitstream) for the
2256 associated MPEG-2 slice data.
2257
2258 .. note::
2259
2260 This compound control is not yet part of the public kernel API and
2261 it is expected to change.
2262
2263.. c:type:: v4l2_ctrl_mpeg2_quantization
2264
2265.. cssclass:: longtable
2266
2267.. tabularcolumns:: |p{1.2cm}|p{8.0cm}|p{7.4cm}|
2268
2269.. raw:: latex
2270
2271 \small
2272
2273.. flat-table:: struct v4l2_ctrl_mpeg2_quantization
2274 :header-rows: 0
2275 :stub-columns: 0
2276 :widths: 1 1 2
2277
2278 * - __u8
2279 - ``load_intra_quantiser_matrix``
2280 - One bit to indicate whether to load the ``intra_quantiser_matrix`` data.
2281 * - __u8
2282 - ``load_non_intra_quantiser_matrix``
2283 - One bit to indicate whether to load the ``non_intra_quantiser_matrix``
2284 data.
2285 * - __u8
2286 - ``load_chroma_intra_quantiser_matrix``
2287 - One bit to indicate whether to load the
2288 ``chroma_intra_quantiser_matrix`` data, only relevant for non-4:2:0 YUV
2289 formats.
2290 * - __u8
2291 - ``load_chroma_non_intra_quantiser_matrix``
2292 - One bit to indicate whether to load the
2293 ``chroma_non_intra_quantiser_matrix`` data, only relevant for non-4:2:0
2294 YUV formats.
2295 * - __u8
2296 - ``intra_quantiser_matrix[64]``
2297 - The quantization matrix coefficients for intra-coded frames, in zigzag
2298 scanning order. It is relevant for both luma and chroma components,
2299 although it can be superseded by the chroma-specific matrix for
2300 non-4:2:0 YUV formats.
2301 * - __u8
2302 - ``non_intra_quantiser_matrix[64]``
2303 - The quantization matrix coefficients for non-intra-coded frames, in
2304 zigzag scanning order. It is relevant for both luma and chroma
2305 components, although it can be superseded by the chroma-specific matrix
2306 for non-4:2:0 YUV formats.
2307 * - __u8
2308 - ``chroma_intra_quantiser_matrix[64]``
2309 - The quantization matrix coefficients for the chominance component of
2310 intra-coded frames, in zigzag scanning order. Only relevant for
2311 non-4:2:0 YUV formats.
2312 * - __u8
2313 - ``chroma_non_intra_quantiser_matrix[64]``
2314 - The quantization matrix coefficients for the chrominance component of
2315 non-intra-coded frames, in zigzag scanning order. Only relevant for
2316 non-4:2:0 YUV formats.
2317
2318``V4L2_CID_FWHT_I_FRAME_QP (integer)``
2319 Quantization parameter for an I frame for FWHT. Valid range: from 1
2320 to 31.
2321
2322``V4L2_CID_FWHT_P_FRAME_QP (integer)``
2323 Quantization parameter for a P frame for FWHT. Valid range: from 1
2324 to 31.
2325
2326.. _v4l2-mpeg-vp8:
2327
2328``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
2329 Specifies the frame parameters for the associated VP8 parsed frame data.
2330 This includes the necessary parameters for
2331 configuring a stateless hardware decoding pipeline for VP8.
2332 The bitstream parameters are defined according to :ref:`vp8`.
2333
2334 .. note::
2335
2336 This compound control is not yet part of the public kernel API and
2337 it is expected to change.
2338
2339.. c:type:: v4l2_ctrl_vp8_frame_header
2340
2341.. cssclass:: longtable
2342
2343.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
2344
2345.. flat-table:: struct v4l2_ctrl_vp8_frame_header
2346 :header-rows: 0
2347 :stub-columns: 0
2348 :widths: 1 1 2
2349
2350 * - struct :c:type:`v4l2_vp8_segment_header`
2351 - ``segment_header``
2352 - Structure with segment-based adjustments metadata.
2353 * - struct :c:type:`v4l2_vp8_loopfilter_header`
2354 - ``loopfilter_header``
2355 - Structure with loop filter level adjustments metadata.
2356 * - struct :c:type:`v4l2_vp8_quantization_header`
2357 - ``quant_header``
2358 - Structure with VP8 dequantization indices metadata.
2359 * - struct :c:type:`v4l2_vp8_entropy_header`
2360 - ``entropy_header``
2361 - Structure with VP8 entropy coder probabilities metadata.
2362 * - struct :c:type:`v4l2_vp8_entropy_coder_state`
2363 - ``coder_state``
2364 - Structure with VP8 entropy coder state.
2365 * - __u16
2366 - ``width``
2367 - The width of the frame. Must be set for all frames.
2368 * - __u16
2369 - ``height``
2370 - The height of the frame. Must be set for all frames.
2371 * - __u8
2372 - ``horizontal_scale``
2373 - Horizontal scaling factor.
2374 * - __u8
2375 - ``vertical_scaling factor``
2376 - Vertical scale.
2377 * - __u8
2378 - ``version``
2379 - Bitstream version.
2380 * - __u8
2381 - ``prob_skip_false``
2382 - Indicates the probability that the macroblock is not skipped.
2383 * - __u8
2384 - ``prob_intra``
2385 - Indicates the probability that a macroblock is intra-predicted.
2386 * - __u8
2387 - ``prob_last``
2388 - Indicates the probability that the last reference frame is used
2389 for inter-prediction
2390 * - __u8
2391 - ``prob_gf``
2392 - Indicates the probability that the golden reference frame is used
2393 for inter-prediction
2394 * - __u8
2395 - ``num_dct_parts``
2396 - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
2397 * - __u32
2398 - ``first_part_size``
2399 - Size of the first partition, i.e. the control partition.
2400 * - __u32
2401 - ``first_part_header_bits``
2402 - Size in bits of the first partition header portion.
2403 * - __u32
2404 - ``dct_part_sizes[8]``
2405 - DCT coefficients sizes.
2406 * - __u64
2407 - ``last_frame_ts``
2408 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2409 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2410 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2411 function to convert the struct :c:type:`timeval` in struct
2412 :c:type:`v4l2_buffer` to a __u64.
2413 * - __u64
2414 - ``golden_frame_ts``
2415 - Timestamp for the V4L2 capture buffer to use as last reference frame, used
2416 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2417 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2418 function to convert the struct :c:type:`timeval` in struct
2419 :c:type:`v4l2_buffer` to a __u64.
2420 * - __u64
2421 - ``alt_frame_ts``
2422 - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
2423 with inter-coded frames. The timestamp refers to the ``timestamp`` field in
2424 struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
2425 function to convert the struct :c:type:`timeval` in struct
2426 :c:type:`v4l2_buffer` to a __u64.
2427 * - __u64
2428 - ``flags``
2429 - See :ref:`Frame Header Flags <vp8_frame_header_flags>`
2430
2431.. _vp8_frame_header_flags:
2432
2433``Frame Header Flags``
2434
2435.. cssclass:: longtable
2436
2437.. flat-table::
2438 :header-rows: 0
2439 :stub-columns: 0
2440 :widths: 1 1 2
2441
2442 * - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
2443 - 0x01
2444 - Indicates if the frame is a key frame.
2445 * - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
2446 - 0x02
2447 - Experimental bitstream.
2448 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
2449 - 0x04
2450 - Show frame flag, indicates if the frame is for display.
2451 * - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
2452 - 0x08
2453 - Enable/disable skipping of macroblocks with no non-zero coefficients.
2454 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
2455 - 0x10
2456 - Sign of motion vectors when the golden frame is referenced.
2457 * - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
2458 - 0x20
2459 - Sign of motion vectors when the alt frame is referenced.
2460
2461.. c:type:: v4l2_vp8_entropy_coder_state
2462
2463.. cssclass:: longtable
2464
2465.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2466
2467.. flat-table:: struct v4l2_vp8_entropy_coder_state
2468 :header-rows: 0
2469 :stub-columns: 0
2470 :widths: 1 1 2
2471
2472 * - __u8
2473 - ``range``
2474 -
2475 * - __u8
2476 - ``value``
2477 -
2478 * - __u8
2479 - ``bit_count``
2480 -
2481 * - __u8
2482 - ``padding``
2483 - Applications and drivers must set this to zero.
2484
2485.. c:type:: v4l2_vp8_segment_header
2486
2487.. cssclass:: longtable
2488
2489.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2490
2491.. flat-table:: struct v4l2_vp8_segment_header
2492 :header-rows: 0
2493 :stub-columns: 0
2494 :widths: 1 1 2
2495
2496 * - __s8
2497 - ``quant_update[4]``
2498 - Signed quantizer value update.
2499 * - __s8
2500 - ``lf_update[4]``
2501 - Signed loop filter level value update.
2502 * - __u8
2503 - ``segment_probs[3]``
2504 - Segment probabilities.
2505 * - __u8
2506 - ``padding``
2507 - Applications and drivers must set this to zero.
2508 * - __u32
2509 - ``flags``
2510 - See :ref:`Segment Header Flags <vp8_segment_header_flags>`
2511
2512.. _vp8_segment_header_flags:
2513
2514``Segment Header Flags``
2515
2516.. cssclass:: longtable
2517
2518.. flat-table::
2519 :header-rows: 0
2520 :stub-columns: 0
2521 :widths: 1 1 2
2522
2523 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
2524 - 0x01
2525 - Enable/disable segment-based adjustments.
2526 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
2527 - 0x02
2528 - Indicates if the macroblock segmentation map is updated in this frame.
2529 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
2530 - 0x04
2531 - Indicates if the segment feature data is updated in this frame.
2532 * - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
2533 - 0x08
2534 - If is set, the segment feature data mode is delta-value.
2535 If cleared, it's absolute-value.
2536
2537.. c:type:: v4l2_vp8_loopfilter_header
2538
2539.. cssclass:: longtable
2540
2541.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2542
2543.. flat-table:: struct v4l2_vp8_loopfilter_header
2544 :header-rows: 0
2545 :stub-columns: 0
2546 :widths: 1 1 2
2547
2548 * - __s8
2549 - ``ref_frm_delta[4]``
2550 - Reference adjustment (signed) delta value.
2551 * - __s8
2552 - ``mb_mode_delta[4]``
2553 - Macroblock prediction mode adjustment (signed) delta value.
2554 * - __u8
2555 - ``sharpness_level``
2556 - Sharpness level
2557 * - __u8
2558 - ``level``
2559 - Filter level
2560 * - __u16
2561 - ``padding``
2562 - Applications and drivers must set this to zero.
2563 * - __u32
2564 - ``flags``
2565 - See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
2566
2567.. _vp8_loopfilter_header_flags:
2568
2569``Loopfilter Header Flags``
2570
2571.. cssclass:: longtable
2572
2573.. flat-table::
2574 :header-rows: 0
2575 :stub-columns: 0
2576 :widths: 1 1 2
2577
2578 * - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
2579 - 0x01
2580 - Enable/disable macroblock-level loop filter adjustment.
2581 * - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
2582 - 0x02
2583 - Indicates if the delta values used in an adjustment are updated.
2584 * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
2585 - 0x04
2586 - If set, indicates the filter type is simple.
2587 If cleared, the filter type is normal.
2588
2589.. c:type:: v4l2_vp8_quantization_header
2590
2591.. cssclass:: longtable
2592
2593.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2594
2595.. flat-table:: struct v4l2_vp8_quantization_header
2596 :header-rows: 0
2597 :stub-columns: 0
2598 :widths: 1 1 2
2599
2600 * - __u8
2601 - ``y_ac_qi``
2602 - Luma AC coefficient table index.
2603 * - __s8
2604 - ``y_dc_delta``
2605 - Luma DC delta vaue.
2606 * - __s8
2607 - ``y2_dc_delta``
2608 - Y2 block DC delta value.
2609 * - __s8
2610 - ``y2_ac_delta``
2611 - Y2 block AC delta value.
2612 * - __s8
2613 - ``uv_dc_delta``
2614 - Chroma DC delta value.
2615 * - __s8
2616 - ``uv_ac_delta``
2617 - Chroma AC delta value.
2618 * - __u16
2619 - ``padding``
2620 - Applications and drivers must set this to zero.
2621
2622.. c:type:: v4l2_vp8_entropy_header
2623
2624.. cssclass:: longtable
2625
2626.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
2627
2628.. flat-table:: struct v4l2_vp8_entropy_header
2629 :header-rows: 0
2630 :stub-columns: 0
2631 :widths: 1 1 2
2632
2633 * - __u8
2634 - ``coeff_probs[4][8][3][11]``
2635 - Coefficient update probabilities.
2636 * - __u8
2637 - ``y_mode_probs[4]``
2638 - Luma mode update probabilities.
2639 * - __u8
2640 - ``uv_mode_probs[3]``
2641 - Chroma mode update probabilities.
2642 * - __u8
2643 - ``mv_probs[2][19]``
2644 - MV decoding update probabilities.
2645 * - __u8
2646 - ``padding[3]``
2647 - Applications and drivers must set this to zero.
2648
2649.. raw:: latex
2650
2651 \normalsize
2652
2653
2654MFC 5.1 MPEG Controls
2655=====================
2656
2657The following MPEG class controls deal with MPEG decoding and encoding
2658settings that are specific to the Multi Format Codec 5.1 device present
2659in the S5P family of SoCs by Samsung.
2660
2661
2662.. _mfc51-control-id:
2663
2664MFC 5.1 Control IDs
2665-------------------
2666
2667``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2668 If the display delay is enabled then the decoder is forced to return
2669 a CAPTURE buffer (decoded frame) after processing a certain number
2670 of OUTPUT buffers. The delay can be set through
2671 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2672 feature can be used for example for generating thumbnails of videos.
2673 Applicable to the H264 decoder.
2674
2675``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2676 Display delay value for H264 decoder. The decoder is forced to
2677 return a decoded frame after the set 'display delay' number of
2678 frames. If this number is low it may result in frames returned out
2679 of display order, in addition the hardware may still be using the
2680 returned buffer as a reference picture for subsequent frames.
2681
2682``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2683 The number of reference pictures used for encoding a P picture.
2684 Applicable to the H264 encoder.
2685
2686``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2687 Padding enable in the encoder - use a color instead of repeating
2688 border pixels. Applicable to encoders.
2689
2690``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2691 Padding color in the encoder. Applicable to encoders. The supplied
2692 32-bit integer is interpreted as follows (bit 0 = least significant
2693 bit):
2694
2695
2696
2697.. flat-table::
2698 :header-rows: 0
2699 :stub-columns: 0
2700
2701 * - Bit 0:7
2702 - V chrominance information
2703 * - Bit 8:15
2704 - U chrominance information
2705 * - Bit 16:23
2706 - Y luminance information
2707 * - Bit 24:31
2708 - Must be zero.
2709
2710
2711
2712``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2713 Reaction coefficient for MFC rate control. Applicable to encoders.
2714
2715 .. note::
2716
2717 #. Valid only when the frame level RC is enabled.
2718
2719 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2720 VBR, this field must be large (ex. 100 ~ 1000).
2721
2722 #. It is not recommended to use the greater number than
2723 FRAME_RATE * (10^9 / BIT_RATE).
2724
2725``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2726 Adaptive rate control for dark region. Valid only when H.264 and
2727 macroblock level RC is enabled
2728 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2729 encoder.
2730
2731``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2732 Adaptive rate control for smooth region. Valid only when H.264 and
2733 macroblock level RC is enabled
2734 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2735 encoder.
2736
2737``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2738 Adaptive rate control for static 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_ACTIVITY (boolean)``
2744 Adaptive rate control for activity 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-mpeg-mfc51-video-frame-skip-mode:
2750
2751``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2752 (enum)
2753
2754enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2755 Indicates in what conditions the encoder should skip frames. If
2756 encoding a frame would cause the encoded stream to be larger then a
2757 chosen data limit then the frame will be skipped. Possible values
2758 are:
2759
2760
2761.. tabularcolumns:: |p{9.2cm}|p{8.3cm}|
2762
2763.. raw:: latex
2764
2765 \small
2766
2767.. flat-table::
2768 :header-rows: 0
2769 :stub-columns: 0
2770
2771 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2772 - Frame skip mode is disabled.
2773 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2774 - Frame skip mode enabled and buffer limit is set by the chosen
2775 level and is defined by the standard.
2776 * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2777 - Frame skip mode enabled and buffer limit is set by the VBV
2778 (MPEG1/2/4) or CPB (H264) buffer size control.
2779
2780.. raw:: latex
2781
2782 \normalsize
2783
2784``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2785 Enable rate-control with fixed target bit. If this setting is
2786 enabled, then the rate control logic of the encoder will calculate
2787 the average bitrate for a GOP and keep it below or equal the set
2788 bitrate target. Otherwise the rate control logic calculates the
2789 overall average bitrate for the stream and keeps it below or equal
2790 to the set bitrate. In the first case the average bitrate for the
2791 whole stream will be smaller then the set bitrate. This is caused
2792 because the average is calculated for smaller number of frames, on
2793 the other hand enabling this setting will ensure that the stream
2794 will meet tight bandwidth constraints. Applicable to encoders.
2795
2796.. _v4l2-mpeg-mfc51-video-force-frame-type:
2797
2798``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2799 (enum)
2800
2801enum v4l2_mpeg_mfc51_video_force_frame_type -
2802 Force a frame type for the next queued buffer. Applicable to
2803 encoders. Possible values are:
2804
2805.. tabularcolumns:: |p{9.5cm}|p{8.0cm}|
2806
2807.. flat-table::
2808 :header-rows: 0
2809 :stub-columns: 0
2810
2811 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2812 - Forcing a specific frame type disabled.
2813 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2814 - Force an I-frame.
2815 * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2816 - Force a non-coded frame.
2817
2818
2819.. _v4l2-mpeg-fwht:
2820
2821``V4L2_CID_MPEG_VIDEO_FWHT_PARAMS (struct)``
2822 Specifies the fwht parameters (as extracted from the bitstream) for the
2823 associated FWHT data. This includes the necessary parameters for
2824 configuring a stateless hardware decoding pipeline for FWHT.
2825
2826 .. note::
2827
2828 This compound control is not yet part of the public kernel API and
2829 it is expected to change.
2830
2831.. c:type:: v4l2_ctrl_fwht_params
2832
2833.. cssclass:: longtable
2834
2835.. tabularcolumns:: |p{1.4cm}|p{4.3cm}|p{11.8cm}|
2836
2837.. flat-table:: struct v4l2_ctrl_fwht_params
2838 :header-rows: 0
2839 :stub-columns: 0
2840 :widths: 1 1 2
2841
2842 * - __u64
2843 - ``backward_ref_ts``
2844 - Timestamp of the V4L2 capture buffer to use as backward reference, used
2845 with P-coded frames. The timestamp refers to the
2846 ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
2847 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
2848 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
2849 * - __u32
2850 - ``version``
2851 - The version of the codec
2852 * - __u32
2853 - ``width``
2854 - The width of the frame
2855 * - __u32
2856 - ``height``
2857 - The height of the frame
2858 * - __u32
2859 - ``flags``
2860 - The flags of the frame, see :ref:`fwht-flags`.
2861 * - __u32
2862 - ``colorspace``
2863 - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
2864 * - __u32
2865 - ``xfer_func``
2866 - The transfer function, from enum :c:type:`v4l2_xfer_func`.
2867 * - __u32
2868 - ``ycbcr_enc``
2869 - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
2870 * - __u32
2871 - ``quantization``
2872 - The quantization range, from enum :c:type:`v4l2_quantization`.
2873
2874
2875
2876.. _fwht-flags:
2877
2878FWHT Flags
2879============
2880
2881.. cssclass:: longtable
2882
2883.. tabularcolumns:: |p{6.8cm}|p{2.4cm}|p{8.3cm}|
2884
2885.. flat-table::
2886 :header-rows: 0
2887 :stub-columns: 0
2888 :widths: 3 1 4
2889
2890 * - ``FWHT_FL_IS_INTERLACED``
2891 - 0x00000001
2892 - Set if this is an interlaced format
2893 * - ``FWHT_FL_IS_BOTTOM_FIRST``
2894 - 0x00000002
2895 - Set if this is a bottom-first (NTSC) interlaced format
2896 * - ``FWHT_FL_IS_ALTERNATE``
2897 - 0x00000004
2898 - Set if each 'frame' contains just one field
2899 * - ``FWHT_FL_IS_BOTTOM_FIELD``
2900 - 0x00000008
2901 - If FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
2902 bottom field, else it is the top field.
2903 * - ``FWHT_FL_LUMA_IS_UNCOMPRESSED``
2904 - 0x00000010
2905 - Set if the luma plane is uncompressed
2906 * - ``FWHT_FL_CB_IS_UNCOMPRESSED``
2907 - 0x00000020
2908 - Set if the cb plane is uncompressed
2909 * - ``FWHT_FL_CR_IS_UNCOMPRESSED``
2910 - 0x00000040
2911 - Set if the cr plane is uncompressed
2912 * - ``FWHT_FL_CHROMA_FULL_HEIGHT``
2913 - 0x00000080
2914 - Set if the chroma plane has the same height as the luma plane,
2915 else the chroma plane is half the height of the luma plane
2916 * - ``FWHT_FL_CHROMA_FULL_WIDTH``
2917 - 0x00000100
2918 - Set if the chroma plane has the same width as the luma plane,
2919 else the chroma plane is half the width of the luma plane
2920 * - ``FWHT_FL_ALPHA_IS_UNCOMPRESSED``
2921 - 0x00000200
2922 - Set if the alpha plane is uncompressed
2923 * - ``FWHT_FL_I_FRAME``
2924 - 0x00000400
2925 - Set if this is an I-frame
2926 * - ``FWHT_FL_COMPONENTS_NUM_MSK``
2927 - 0x00070000
2928 - A 4-values flag - the number of components - 1
2929 * - ``FWHT_FL_PIXENC_YUV``
2930 - 0x00080000
2931 - Set if the pixel encoding is YUV
2932 * - ``FWHT_FL_PIXENC_RGB``
2933 - 0x00100000
2934 - Set if the pixel encoding is RGB
2935 * - ``FWHT_FL_PIXENC_HSV``
2936 - 0x00180000
2937 - Set if the pixel encoding is HSV
2938
2939
2940CX2341x MPEG Controls
2941=====================
2942
2943The following MPEG class controls deal with MPEG encoding settings that
2944are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
2945
2946
2947.. _cx2341x-control-id:
2948
2949CX2341x Control IDs
2950-------------------
2951
2952.. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
2953
2954``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
2955 (enum)
2956
2957enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
2958 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
2959 are:
2960
2961
2962
2963.. flat-table::
2964 :header-rows: 0
2965 :stub-columns: 0
2966
2967 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
2968 - Choose the filter manually
2969 * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
2970 - Choose the filter automatically
2971
2972
2973
2974``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
2975 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
2976 is 0.)
2977
2978.. _luma-spatial-filter-type:
2979
2980``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
2981 (enum)
2982
2983enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
2984 Select the algorithm to use for the Luma Spatial Filter (default
2985 ``1D_HOR``). Possible values:
2986
2987.. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
2988
2989.. raw:: latex
2990
2991 \small
2992
2993.. flat-table::
2994 :header-rows: 0
2995 :stub-columns: 0
2996
2997 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
2998 - No filter
2999 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
3000 - One-dimensional horizontal
3001 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
3002 - One-dimensional vertical
3003 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
3004 - Two-dimensional separable
3005 * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
3006 - Two-dimensional symmetrical non-separable
3007
3008.. raw:: latex
3009
3010 \normalsize
3011
3012
3013
3014.. _chroma-spatial-filter-type:
3015
3016``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
3017 (enum)
3018
3019enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
3020 Select the algorithm for the Chroma Spatial Filter (default
3021 ``1D_HOR``). Possible values are:
3022
3023
3024.. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
3025
3026.. flat-table::
3027 :header-rows: 0
3028 :stub-columns: 0
3029
3030 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
3031 - No filter
3032 * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
3033 - One-dimensional horizontal
3034
3035
3036
3037.. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
3038
3039``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
3040 (enum)
3041
3042enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
3043 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
3044 are:
3045
3046
3047
3048.. flat-table::
3049 :header-rows: 0
3050 :stub-columns: 0
3051
3052 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
3053 - Choose the filter manually
3054 * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
3055 - Choose the filter automatically
3056
3057
3058
3059``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
3060 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
3061 is 8 for full-scale capturing and 0 for scaled capturing.)
3062
3063.. _v4l2-mpeg-cx2341x-video-median-filter-type:
3064
3065``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
3066 (enum)
3067
3068enum v4l2_mpeg_cx2341x_video_median_filter_type -
3069 Median Filter Type (default ``OFF``). Possible values are:
3070
3071
3072
3073.. flat-table::
3074 :header-rows: 0
3075 :stub-columns: 0
3076
3077 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
3078 - No filter
3079 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
3080 - Horizontal filter
3081 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
3082 - Vertical filter
3083 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
3084 - Horizontal and vertical filter
3085 * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
3086 - Diagonal filter
3087
3088
3089
3090``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3091 Threshold above which the luminance median filter is enabled
3092 (default 0)
3093
3094``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
3095 Threshold below which the luminance median filter is enabled
3096 (default 255)
3097
3098``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
3099 Threshold above which the chroma median filter is enabled (default
3100 0)
3101
3102``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
3103 Threshold below which the chroma median filter is enabled (default
3104 255)
3105
3106``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
3107 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
3108 the stream between every four video frames. The packet size is 2048
3109 bytes, including the packet_start_code_prefix and stream_id
3110 fields. The stream_id is 0xBF (private stream 2). The payload
3111 consists of 0x00 bytes, to be filled in by the application. 0 = do
3112 not insert, 1 = insert packets.
3113
3114
3115VPX Control Reference
3116=====================
3117
3118The VPX controls include controls for encoding parameters of VPx video
3119codec.
3120
3121
3122.. _vpx-control-id:
3123
3124VPX Control IDs
3125---------------
3126
3127.. _v4l2-vpx-num-partitions:
3128
3129``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
3130 (enum)
3131
3132enum v4l2_vp8_num_partitions -
3133 The number of token partitions to use in VP8 encoder. Possible
3134 values are:
3135
3136
3137
3138.. flat-table::
3139 :header-rows: 0
3140 :stub-columns: 0
3141
3142 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
3143 - 1 coefficient partition
3144 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
3145 - 2 coefficient partitions
3146 * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
3147 - 4 coefficient partitions
3148 * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
3149 - 8 coefficient partitions
3150
3151
3152
3153``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
3154 Setting this prevents intra 4x4 mode in the intra mode decision.
3155
3156.. _v4l2-vpx-num-ref-frames:
3157
3158``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
3159 (enum)
3160
3161enum v4l2_vp8_num_ref_frames -
3162 The number of reference pictures for encoding P frames. Possible
3163 values are:
3164
3165.. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
3166
3167.. raw:: latex
3168
3169 \small
3170
3171.. flat-table::
3172 :header-rows: 0
3173 :stub-columns: 0
3174
3175 * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
3176 - Last encoded frame will be searched
3177 * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
3178 - Two frames will be searched among the last encoded frame, the
3179 golden frame and the alternate reference (altref) frame. The
3180 encoder implementation will decide which two are chosen.
3181 * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
3182 - The last encoded frame, the golden frame and the altref frame will
3183 be searched.
3184
3185.. raw:: latex
3186
3187 \normalsize
3188
3189
3190
3191``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
3192 Indicates the loop filter level. The adjustment of the loop filter
3193 level is done via a delta value against a baseline loop filter
3194 value.
3195
3196``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
3197 This parameter affects the loop filter. Anything above zero weakens
3198 the deblocking effect on the loop filter.
3199
3200``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
3201 Sets the refresh period for the golden frame. The period is defined
3202 in number of frames. For a value of 'n', every nth frame starting
3203 from the first key frame will be taken as a golden frame. For eg.
3204 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
3205 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
3206 taken as the golden frames as frame 0 is always a key frame.
3207
3208.. _v4l2-vpx-golden-frame-sel:
3209
3210``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
3211 (enum)
3212
3213enum v4l2_vp8_golden_frame_sel -
3214 Selects the golden frame for encoding. Possible values are:
3215
3216.. raw:: latex
3217
3218 \scriptsize
3219
3220.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3221
3222.. flat-table::
3223 :header-rows: 0
3224 :stub-columns: 0
3225
3226 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
3227 - Use the (n-2)th frame as a golden frame, current frame index being
3228 'n'.
3229 * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
3230 - Use the previous specific frame indicated by
3231 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
3232 golden frame.
3233
3234.. raw:: latex
3235
3236 \normalsize
3237
3238
3239``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
3240 Minimum quantization parameter for VP8.
3241
3242``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
3243 Maximum quantization parameter for VP8.
3244
3245``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
3246 Quantization parameter for an I frame for VP8.
3247
3248``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
3249 Quantization parameter for a P frame for VP8.
3250
3251.. _v4l2-mpeg-video-vp8-profile:
3252
3253``V4L2_CID_MPEG_VIDEO_VP8_PROFILE``
3254 (enum)
3255
3256enum v4l2_mpeg_video_vp8_profile -
3257 This control allows selecting the profile for VP8 encoder.
3258 This is also used to enumerate supported profiles by VP8 encoder or decoder.
3259 Possible values are:
3260
3261.. flat-table::
3262 :header-rows: 0
3263 :stub-columns: 0
3264
3265 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0``
3266 - Profile 0
3267 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1``
3268 - Profile 1
3269 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2``
3270 - Profile 2
3271 * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3``
3272 - Profile 3
3273
3274.. _v4l2-mpeg-video-vp9-profile:
3275
3276``V4L2_CID_MPEG_VIDEO_VP9_PROFILE``
3277 (enum)
3278
3279enum v4l2_mpeg_video_vp9_profile -
3280 This control allows selecting the profile for VP9 encoder.
3281 This is also used to enumerate supported profiles by VP9 encoder or decoder.
3282 Possible values are:
3283
3284.. flat-table::
3285 :header-rows: 0
3286 :stub-columns: 0
3287
3288 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_0``
3289 - Profile 0
3290 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_1``
3291 - Profile 1
3292 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_2``
3293 - Profile 2
3294 * - ``V4L2_MPEG_VIDEO_VP9_PROFILE_3``
3295 - Profile 3
3296
3297
3298High Efficiency Video Coding (HEVC/H.265) Control Reference
3299===========================================================
3300
3301The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
3302video codec.
3303
3304
3305.. _hevc-control-id:
3306
3307HEVC/H.265 Control IDs
3308----------------------
3309
3310``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
3311 Minimum quantization parameter for HEVC.
3312 Valid range: from 0 to 51.
3313
3314``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
3315 Maximum quantization parameter for HEVC.
3316 Valid range: from 0 to 51.
3317
3318``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
3319 Quantization parameter for an I frame for HEVC.
3320 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3321 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3322
3323``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
3324 Quantization parameter for a P frame for HEVC.
3325 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3326 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3327
3328``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
3329 Quantization parameter for a B frame for HEVC.
3330 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3331 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3332
3333``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
3334 HIERARCHICAL_QP allows the host to specify the quantization parameter
3335 values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
3336 valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
3337 control value to 1 enables setting of the QP values for the layers.
3338
3339.. _v4l2-hevc-hier-coding-type:
3340
3341``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
3342 (enum)
3343
3344enum v4l2_mpeg_video_hevc_hier_coding_type -
3345 Selects the hierarchical coding type for encoding. Possible values are:
3346
3347.. raw:: latex
3348
3349 \footnotesize
3350
3351.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3352
3353.. flat-table::
3354 :header-rows: 0
3355 :stub-columns: 0
3356
3357 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
3358 - Use the B frame for hierarchical coding.
3359 * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
3360 - Use the P frame for hierarchical coding.
3361
3362.. raw:: latex
3363
3364 \normalsize
3365
3366
3367``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
3368 Selects the hierarchical coding layer. In normal encoding
3369 (non-hierarchial coding), it should be zero. Possible values are [0, 6].
3370 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
3371 LAYER 1 and so on.
3372
3373``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
3374 Indicates quantization parameter for hierarchical coding layer 0.
3375 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3376 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3377
3378``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
3379 Indicates quantization parameter for hierarchical coding layer 1.
3380 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3381 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3382
3383``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
3384 Indicates quantization parameter for hierarchical coding layer 2.
3385 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3386 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3387
3388``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
3389 Indicates quantization parameter for hierarchical coding layer 3.
3390 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3391 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3392
3393``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
3394 Indicates quantization parameter for hierarchical coding layer 4.
3395 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3396 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3397
3398``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
3399 Indicates quantization parameter for hierarchical coding layer 5.
3400 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3401 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3402
3403``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
3404 Indicates quantization parameter for hierarchical coding layer 6.
3405 Valid range: [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
3406 V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP].
3407
3408.. _v4l2-hevc-profile:
3409
3410``V4L2_CID_MPEG_VIDEO_HEVC_PROFILE``
3411 (enum)
3412
3413enum v4l2_mpeg_video_hevc_profile -
3414 Select the desired profile for HEVC encoder.
3415
3416.. raw:: latex
3417
3418 \footnotesize
3419
3420.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3421
3422.. flat-table::
3423 :header-rows: 0
3424 :stub-columns: 0
3425
3426 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN``
3427 - Main profile.
3428 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE``
3429 - Main still picture profile.
3430 * - ``V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10``
3431 - Main 10 profile.
3432
3433.. raw:: latex
3434
3435 \normalsize
3436
3437
3438.. _v4l2-hevc-level:
3439
3440``V4L2_CID_MPEG_VIDEO_HEVC_LEVEL``
3441 (enum)
3442
3443enum v4l2_mpeg_video_hevc_level -
3444 Selects the desired level for HEVC encoder.
3445
3446.. raw:: latex
3447
3448 \footnotesize
3449
3450.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3451
3452.. flat-table::
3453 :header-rows: 0
3454 :stub-columns: 0
3455
3456 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_1``
3457 - Level 1.0
3458 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2``
3459 - Level 2.0
3460 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1``
3461 - Level 2.1
3462 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3``
3463 - Level 3.0
3464 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1``
3465 - Level 3.1
3466 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4``
3467 - Level 4.0
3468 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1``
3469 - Level 4.1
3470 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5``
3471 - Level 5.0
3472 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1``
3473 - Level 5.1
3474 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2``
3475 - Level 5.2
3476 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6``
3477 - Level 6.0
3478 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1``
3479 - Level 6.1
3480 * - ``V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2``
3481 - Level 6.2
3482
3483.. raw:: latex
3484
3485 \normalsize
3486
3487
3488``V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (integer)``
3489 Indicates the number of evenly spaced subintervals, called ticks, within
3490 one second. This is a 16 bit unsigned integer and has a maximum value up to
3491 0xffff and a minimum value of 1.
3492
3493.. _v4l2-hevc-tier:
3494
3495``V4L2_CID_MPEG_VIDEO_HEVC_TIER``
3496 (enum)
3497
3498enum v4l2_mpeg_video_hevc_tier -
3499 TIER_FLAG specifies tiers information of the HEVC encoded picture. Tier
3500 were made to deal with applications that differ in terms of maximum bit
3501 rate. Setting the flag to 0 selects HEVC tier as Main tier and setting
3502 this flag to 1 indicates High tier. High tier is for applications requiring
3503 high bit rates.
3504
3505.. raw:: latex
3506
3507 \footnotesize
3508
3509.. tabularcolumns:: |p{9.0cm}|p{8.0cm}|
3510
3511.. flat-table::
3512 :header-rows: 0
3513 :stub-columns: 0
3514
3515 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_MAIN``
3516 - Main tier.
3517 * - ``V4L2_MPEG_VIDEO_HEVC_TIER_HIGH``
3518 - High tier.
3519
3520.. raw:: latex
3521
3522 \normalsize
3523
3524
3525``V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (integer)``
3526 Selects HEVC maximum coding unit depth.
3527
3528.. _v4l2-hevc-loop-filter-mode:
3529
3530``V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE``
3531 (enum)
3532
3533enum v4l2_mpeg_video_hevc_loop_filter_mode -
3534 Loop filter mode for HEVC encoder. Possible values are:
3535
3536.. raw:: latex
3537
3538 \footnotesize
3539
3540.. tabularcolumns:: |p{12.1cm}|p{5.4cm}|
3541
3542.. flat-table::
3543 :header-rows: 0
3544 :stub-columns: 0
3545
3546 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED``
3547 - Loop filter is disabled.
3548 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED``
3549 - Loop filter is enabled.
3550 * - ``V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
3551 - Loop filter is disabled at the slice boundary.
3552
3553.. raw:: latex
3554
3555 \normalsize
3556
3557
3558``V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (integer)``
3559 Selects HEVC loop filter beta offset. The valid range is [-6, +6].
3560
3561``V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (integer)``
3562 Selects HEVC loop filter tc offset. The valid range is [-6, +6].
3563
3564.. _v4l2-hevc-refresh-type:
3565
3566``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE``
3567 (enum)
3568
3569enum v4l2_mpeg_video_hevc_hier_refresh_type -
3570 Selects refresh type for HEVC encoder.
3571 Host has to specify the period into
3572 V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD.
3573
3574.. raw:: latex
3575
3576 \footnotesize
3577
3578.. tabularcolumns:: |p{8.0cm}|p{9.0cm}|
3579
3580.. flat-table::
3581 :header-rows: 0
3582 :stub-columns: 0
3583
3584 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE``
3585 - Use the B frame for hierarchical coding.
3586 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA``
3587 - Use CRA (Clean Random Access Unit) picture encoding.
3588 * - ``V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR``
3589 - Use IDR (Instantaneous Decoding Refresh) picture encoding.
3590
3591.. raw:: latex
3592
3593 \normalsize
3594
3595
3596``V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (integer)``
3597 Selects the refresh period for HEVC encoder.
3598 This specifies the number of I pictures between two CRA/IDR pictures.
3599 This is valid only if REFRESH_TYPE is not 0.
3600
3601``V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (boolean)``
3602 Indicates HEVC lossless encoding. Setting it to 0 disables lossless
3603 encoding. Setting it to 1 enables lossless encoding.
3604
3605``V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (boolean)``
3606 Indicates constant intra prediction for HEVC encoder. Specifies the
3607 constrained intra prediction in which intra largest coding unit (LCU)
3608 prediction is performed by using residual data and decoded samples of
3609 neighboring intra LCU only. Setting the value to 1 enables constant intra
3610 prediction and setting the value to 0 disables constant intra prediction.
3611
3612``V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (boolean)``
3613 Indicates wavefront parallel processing for HEVC encoder. Setting it to 0
3614 disables the feature and setting it to 1 enables the wavefront parallel
3615 processing.
3616
3617``V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (boolean)``
3618 Setting the value to 1 enables combination of P and B frame for HEVC
3619 encoder.
3620
3621``V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (boolean)``
3622 Indicates temporal identifier for HEVC encoder which is enabled by
3623 setting the value to 1.
3624
3625``V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (boolean)``
3626 Indicates bi-linear interpolation is conditionally used in the intra
3627 prediction filtering process in the CVS when set to 1. Indicates bi-linear
3628 interpolation is not used in the CVS when set to 0.
3629
3630``V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (integer)``
3631 Indicates maximum number of merge candidate motion vectors.
3632 Values are from 0 to 4.
3633
3634``V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (boolean)``
3635 Indicates temporal motion vector prediction for HEVC encoder. Setting it to
3636 1 enables the prediction. Setting it to 0 disables the prediction.
3637
3638``V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (boolean)``
3639 Specifies if HEVC generates a stream with a size of the length field
3640 instead of start code pattern. The size of the length field is configurable
3641 through the V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD control. Setting
3642 the value to 0 disables encoding without startcode pattern. Setting the
3643 value to 1 will enables encoding without startcode pattern.
3644
3645.. _v4l2-hevc-size-of-length-field:
3646
3647``V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD``
3648(enum)
3649
3650enum v4l2_mpeg_video_hevc_size_of_length_field -
3651 Indicates the size of length field.
3652 This is valid when encoding WITHOUT_STARTCODE_ENABLE is enabled.
3653
3654.. raw:: latex
3655
3656 \footnotesize
3657
3658.. tabularcolumns:: |p{6.0cm}|p{11.0cm}|
3659
3660.. flat-table::
3661 :header-rows: 0
3662 :stub-columns: 0
3663
3664 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_0``
3665 - Generate start code pattern (Normal).
3666 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_1``
3667 - Generate size of length field instead of start code pattern and length is 1.
3668 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_2``
3669 - Generate size of length field instead of start code pattern and length is 2.
3670 * - ``V4L2_MPEG_VIDEO_HEVC_SIZE_4``
3671 - Generate size of length field instead of start code pattern and length is 4.
3672
3673.. raw:: latex
3674
3675 \normalsize
3676
3677``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (integer)``
3678 Indicates bit rate for hierarchical coding layer 0 for HEVC encoder.
3679
3680``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (integer)``
3681 Indicates bit rate for hierarchical coding layer 1 for HEVC encoder.
3682
3683``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (integer)``
3684 Indicates bit rate for hierarchical coding layer 2 for HEVC encoder.
3685
3686``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (integer)``
3687 Indicates bit rate for hierarchical coding layer 3 for HEVC encoder.
3688
3689``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (integer)``
3690 Indicates bit rate for hierarchical coding layer 4 for HEVC encoder.
3691
3692``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (integer)``
3693 Indicates bit rate for hierarchical coding layer 5 for HEVC encoder.
3694
3695``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (integer)``
3696 Indicates bit rate for hierarchical coding layer 6 for HEVC encoder.
3697
3698``V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (integer)``
3699 Selects number of P reference pictures required for HEVC encoder.
3700 P-Frame can use 1 or 2 frames for reference.
3701
3702``V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (integer)``
3703 Indicates whether to generate SPS and PPS at every IDR. Setting it to 0
3704 disables generating SPS and PPS at every IDR. Setting it to one enables
3705 generating SPS and PPS at every IDR.