Merge remote-tracking branch 'vfio/next'
[deliverable/linux.git] / Documentation / media / uapi / v4l / extended-controls.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _extended-controls:
4
5 *****************
6 Extended Controls
7 *****************
8
9
10 Introduction
11 ============
12
13 The control mechanism as originally designed was meant to be used for
14 user settings (brightness, saturation, etc). However, it turned out to
15 be a very useful model for implementing more complicated driver APIs
16 where each driver implements only a subset of a larger API.
17
18 The MPEG encoding API was the driving force behind designing and
19 implementing this extended control mechanism: the MPEG standard is quite
20 large and the currently supported hardware MPEG encoders each only
21 implement a subset of this standard. Further more, many parameters
22 relating to how the video is encoded into an MPEG stream are specific to
23 the MPEG encoding chip since the MPEG standard only defines the format
24 of the resulting MPEG stream, not how the video is actually encoded into
25 that format.
26
27 Unfortunately, the original control API lacked some features needed for
28 these new uses and so it was extended into the (not terribly originally
29 named) extended control API.
30
31 Even though the MPEG encoding API was the first effort to use the
32 Extended Control API, nowadays there are also other classes of Extended
33 Controls, such as Camera Controls and FM Transmitter Controls. The
34 Extended Controls API as well as all Extended Controls classes are
35 described in the following text.
36
37
38 The Extended Control API
39 ========================
40
41 Three new ioctls are available:
42 :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
43 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
44 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. These ioctls act
45 on arrays of controls (as opposed to the
46 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
47 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls that act on a single
48 control). This is needed since it is often required to atomically change
49 several controls at once.
50
51 Each of the new ioctls expects a pointer to a struct
52 :c:type:`v4l2_ext_controls`. This structure
53 contains a pointer to the control array, a count of the number of
54 controls in that array and a control class. Control classes are used to
55 group similar controls into a single class. For example, control class
56 ``V4L2_CTRL_CLASS_USER`` contains all user controls (i. e. all controls
57 that can also be set using the old :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
58 ioctl). Control class ``V4L2_CTRL_CLASS_MPEG`` contains all controls
59 relating to MPEG encoding, etc.
60
61 All controls in the control array must belong to the specified control
62 class. An error is returned if this is not the case.
63
64 It is also possible to use an empty control array (``count`` == 0) to check
65 whether the specified control class is supported.
66
67 The control array is a struct
68 :c:type:`v4l2_ext_control` array. The
69 struct :c:type:`v4l2_ext_control` is very similar to
70 struct :c:type:`v4l2_control`, except for the fact that
71 it also allows for 64-bit values and pointers to be passed.
72
73 Since the struct :c:type:`v4l2_ext_control` supports
74 pointers it is now also possible to have controls with compound types
75 such as N-dimensional arrays and/or structures. You need to specify the
76 ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` when enumerating controls to actually
77 be able to see such compound controls. In other words, these controls
78 with compound types should only be used programmatically.
79
80 Since such compound controls need to expose more information about
81 themselves than is possible with
82 :ref:`VIDIOC_QUERYCTRL` the
83 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>` ioctl was added. In
84 particular, this ioctl gives the dimensions of the N-dimensional array
85 if this control consists of more than one element.
86
87 .. note::
88
89 #. It is important to realize that due to the flexibility of controls it is
90 necessary to check whether the control you want to set actually is
91 supported in the driver and what the valid range of values is. So use
92 the :ref:`VIDIOC_QUERYCTRL` (or :ref:`VIDIOC_QUERY_EXT_CTRL
93 <VIDIOC_QUERYCTRL>`) and :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>`
94 ioctls to check this.
95
96 #. It is possible that some of the menu indices in a control of
97 type ``V4L2_CTRL_TYPE_MENU`` may not be supported (``VIDIOC_QUERYMENU``
98 will return an error). A good example is the list of supported MPEG
99 audio bitrates. Some drivers only support one or two bitrates, others
100 support a wider range.
101
102 All controls use machine endianness.
103
104
105 Enumerating Extended Controls
106 =============================
107
108 The recommended way to enumerate over the extended controls is by using
109 :ref:`VIDIOC_QUERYCTRL` in combination with the
110 ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag:
111
112
113 .. code-block:: c
114
115 struct v4l2_queryctrl qctrl;
116
117 qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
118 while (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) {
119 /* ... */
120 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
121 }
122
123 The initial control ID is set to 0 ORed with the
124 ``V4L2_CTRL_FLAG_NEXT_CTRL`` flag. The ``VIDIOC_QUERYCTRL`` ioctl will
125 return the first control with a higher ID than the specified one. When
126 no such controls are found an error is returned.
127
128 If you want to get all controls within a specific control class, then
129 you can set the initial ``qctrl.id`` value to the control class and add
130 an extra check to break out of the loop when a control of another
131 control class is found:
132
133
134 .. code-block:: c
135
136 qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
137 while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
138 if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
139 break;
140 /* ... */
141 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
142 }
143
144 The 32-bit ``qctrl.id`` value is subdivided into three bit ranges: the
145 top 4 bits are reserved for flags (e. g. ``V4L2_CTRL_FLAG_NEXT_CTRL``)
146 and are not actually part of the ID. The remaining 28 bits form the
147 control ID, of which the most significant 12 bits define the control
148 class and the least significant 16 bits identify the control within the
149 control class. It is guaranteed that these last 16 bits are always
150 non-zero for controls. The range of 0x1000 and up are reserved for
151 driver-specific controls. The macro ``V4L2_CTRL_ID2CLASS(id)`` returns
152 the control class ID based on a control ID.
153
154 If the driver does not support extended controls, then
155 ``VIDIOC_QUERYCTRL`` will fail when used in combination with
156 ``V4L2_CTRL_FLAG_NEXT_CTRL``. In that case the old method of enumerating
157 control should be used (see :ref:`enum_all_controls`). But if it is
158 supported, then it is guaranteed to enumerate over all controls,
159 including driver-private controls.
160
161
162 Creating Control Panels
163 =======================
164
165 It is possible to create control panels for a graphical user interface
166 where the user can select the various controls. Basically you will have
167 to iterate over all controls using the method described above. Each
168 control class starts with a control of type
169 ``V4L2_CTRL_TYPE_CTRL_CLASS``. ``VIDIOC_QUERYCTRL`` will return the name
170 of this control class which can be used as the title of a tab page
171 within a control panel.
172
173 The flags field of struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` also
174 contains hints on the behavior of the control. See the
175 :ref:`VIDIOC_QUERYCTRL` documentation for more
176 details.
177
178
179 .. _mpeg-controls:
180
181 Codec Control Reference
182 =======================
183
184 Below all controls within the Codec control class are described. First
185 the generic controls, then controls specific for certain hardware.
186
187 .. note::
188
189 These controls are applicable to all codecs and not just MPEG. The
190 defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls
191 were originally made for MPEG codecs and later extended to cover all
192 encoding formats.
193
194
195 Generic Codec Controls
196 ----------------------
197
198
199 .. _mpeg-control-id:
200
201 Codec Control IDs
202 ^^^^^^^^^^^^^^^^^
203
204 ``V4L2_CID_MPEG_CLASS (class)``
205 The Codec class descriptor. Calling
206 :ref:`VIDIOC_QUERYCTRL` for this control will
207 return a description of this control class. This description can be
208 used as the caption of a Tab page in a GUI, for example.
209
210 .. _v4l2-mpeg-stream-type:
211
212 ``V4L2_CID_MPEG_STREAM_TYPE``
213 (enum)
214
215 enum v4l2_mpeg_stream_type -
216 The MPEG-1, -2 or -4 output stream type. One cannot assume anything
217 here. Each hardware MPEG encoder tends to support different subsets
218 of the available MPEG stream types. This control is specific to
219 multiplexed MPEG streams. The currently defined stream types are:
220
221
222
223 .. flat-table::
224 :header-rows: 0
225 :stub-columns: 0
226
227
228 - .. row 1
229
230 - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS``
231
232 - MPEG-2 program stream
233
234 - .. row 2
235
236 - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS``
237
238 - MPEG-2 transport stream
239
240 - .. row 3
241
242 - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS``
243
244 - MPEG-1 system stream
245
246 - .. row 4
247
248 - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD``
249
250 - MPEG-2 DVD-compatible stream
251
252 - .. row 5
253
254 - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD``
255
256 - MPEG-1 VCD-compatible stream
257
258 - .. row 6
259
260 - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD``
261
262 - MPEG-2 SVCD-compatible stream
263
264
265
266 ``V4L2_CID_MPEG_STREAM_PID_PMT (integer)``
267 Program Map Table Packet ID for the MPEG transport stream (default
268 16)
269
270 ``V4L2_CID_MPEG_STREAM_PID_AUDIO (integer)``
271 Audio Packet ID for the MPEG transport stream (default 256)
272
273 ``V4L2_CID_MPEG_STREAM_PID_VIDEO (integer)``
274 Video Packet ID for the MPEG transport stream (default 260)
275
276 ``V4L2_CID_MPEG_STREAM_PID_PCR (integer)``
277 Packet ID for the MPEG transport stream carrying PCR fields (default
278 259)
279
280 ``V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (integer)``
281 Audio ID for MPEG PES
282
283 ``V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (integer)``
284 Video ID for MPEG PES
285
286 .. _v4l2-mpeg-stream-vbi-fmt:
287
288 ``V4L2_CID_MPEG_STREAM_VBI_FMT``
289 (enum)
290
291 enum v4l2_mpeg_stream_vbi_fmt -
292 Some cards can embed VBI data (e. g. Closed Caption, Teletext) into
293 the MPEG stream. This control selects whether VBI data should be
294 embedded, and if so, what embedding method should be used. The list
295 of possible VBI formats depends on the driver. The currently defined
296 VBI format types are:
297
298
299
300 .. tabularcolumns:: |p{6 cm}|p{11.5cm}|
301
302 .. flat-table::
303 :header-rows: 0
304 :stub-columns: 0
305
306
307 - .. row 1
308
309 - ``V4L2_MPEG_STREAM_VBI_FMT_NONE``
310
311 - No VBI in the MPEG stream
312
313 - .. row 2
314
315 - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV``
316
317 - VBI in private packets, IVTV format (documented in the kernel
318 sources in the file
319 ``Documentation/video4linux/cx2341x/README.vbi``)
320
321
322
323 .. _v4l2-mpeg-audio-sampling-freq:
324
325 ``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ``
326 (enum)
327
328 enum v4l2_mpeg_audio_sampling_freq -
329 MPEG Audio sampling frequency. Possible values are:
330
331
332
333 .. flat-table::
334 :header-rows: 0
335 :stub-columns: 0
336
337
338 - .. row 1
339
340 - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100``
341
342 - 44.1 kHz
343
344 - .. row 2
345
346 - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000``
347
348 - 48 kHz
349
350 - .. row 3
351
352 - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000``
353
354 - 32 kHz
355
356
357
358 .. _v4l2-mpeg-audio-encoding:
359
360 ``V4L2_CID_MPEG_AUDIO_ENCODING``
361 (enum)
362
363 enum v4l2_mpeg_audio_encoding -
364 MPEG Audio encoding. This control is specific to multiplexed MPEG
365 streams. Possible values are:
366
367
368
369 .. flat-table::
370 :header-rows: 0
371 :stub-columns: 0
372
373
374 - .. row 1
375
376 - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1``
377
378 - MPEG-1/2 Layer I encoding
379
380 - .. row 2
381
382 - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2``
383
384 - MPEG-1/2 Layer II encoding
385
386 - .. row 3
387
388 - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3``
389
390 - MPEG-1/2 Layer III encoding
391
392 - .. row 4
393
394 - ``V4L2_MPEG_AUDIO_ENCODING_AAC``
395
396 - MPEG-2/4 AAC (Advanced Audio Coding)
397
398 - .. row 5
399
400 - ``V4L2_MPEG_AUDIO_ENCODING_AC3``
401
402 - AC-3 aka ATSC A/52 encoding
403
404
405
406 .. _v4l2-mpeg-audio-l1-bitrate:
407
408 ``V4L2_CID_MPEG_AUDIO_L1_BITRATE``
409 (enum)
410
411 enum v4l2_mpeg_audio_l1_bitrate -
412 MPEG-1/2 Layer I bitrate. Possible values are:
413
414
415
416 .. flat-table::
417 :header-rows: 0
418 :stub-columns: 0
419
420
421 - .. row 1
422
423 - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K``
424
425 - 32 kbit/s
426
427 - .. row 2
428
429 - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K``
430
431 - 64 kbit/s
432
433 - .. row 3
434
435 - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K``
436
437 - 96 kbit/s
438
439 - .. row 4
440
441 - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K``
442
443 - 128 kbit/s
444
445 - .. row 5
446
447 - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K``
448
449 - 160 kbit/s
450
451 - .. row 6
452
453 - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K``
454
455 - 192 kbit/s
456
457 - .. row 7
458
459 - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K``
460
461 - 224 kbit/s
462
463 - .. row 8
464
465 - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K``
466
467 - 256 kbit/s
468
469 - .. row 9
470
471 - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K``
472
473 - 288 kbit/s
474
475 - .. row 10
476
477 - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K``
478
479 - 320 kbit/s
480
481 - .. row 11
482
483 - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K``
484
485 - 352 kbit/s
486
487 - .. row 12
488
489 - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K``
490
491 - 384 kbit/s
492
493 - .. row 13
494
495 - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K``
496
497 - 416 kbit/s
498
499 - .. row 14
500
501 - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K``
502
503 - 448 kbit/s
504
505
506
507 .. _v4l2-mpeg-audio-l2-bitrate:
508
509 ``V4L2_CID_MPEG_AUDIO_L2_BITRATE``
510 (enum)
511
512 enum v4l2_mpeg_audio_l2_bitrate -
513 MPEG-1/2 Layer II bitrate. Possible values are:
514
515
516
517 .. flat-table::
518 :header-rows: 0
519 :stub-columns: 0
520
521
522 - .. row 1
523
524 - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K``
525
526 - 32 kbit/s
527
528 - .. row 2
529
530 - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K``
531
532 - 48 kbit/s
533
534 - .. row 3
535
536 - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K``
537
538 - 56 kbit/s
539
540 - .. row 4
541
542 - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K``
543
544 - 64 kbit/s
545
546 - .. row 5
547
548 - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K``
549
550 - 80 kbit/s
551
552 - .. row 6
553
554 - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K``
555
556 - 96 kbit/s
557
558 - .. row 7
559
560 - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K``
561
562 - 112 kbit/s
563
564 - .. row 8
565
566 - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K``
567
568 - 128 kbit/s
569
570 - .. row 9
571
572 - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K``
573
574 - 160 kbit/s
575
576 - .. row 10
577
578 - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K``
579
580 - 192 kbit/s
581
582 - .. row 11
583
584 - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K``
585
586 - 224 kbit/s
587
588 - .. row 12
589
590 - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K``
591
592 - 256 kbit/s
593
594 - .. row 13
595
596 - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K``
597
598 - 320 kbit/s
599
600 - .. row 14
601
602 - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K``
603
604 - 384 kbit/s
605
606
607
608 .. _v4l2-mpeg-audio-l3-bitrate:
609
610 ``V4L2_CID_MPEG_AUDIO_L3_BITRATE``
611 (enum)
612
613 enum v4l2_mpeg_audio_l3_bitrate -
614 MPEG-1/2 Layer III bitrate. Possible values are:
615
616
617
618 .. flat-table::
619 :header-rows: 0
620 :stub-columns: 0
621
622
623 - .. row 1
624
625 - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K``
626
627 - 32 kbit/s
628
629 - .. row 2
630
631 - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K``
632
633 - 40 kbit/s
634
635 - .. row 3
636
637 - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K``
638
639 - 48 kbit/s
640
641 - .. row 4
642
643 - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K``
644
645 - 56 kbit/s
646
647 - .. row 5
648
649 - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K``
650
651 - 64 kbit/s
652
653 - .. row 6
654
655 - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K``
656
657 - 80 kbit/s
658
659 - .. row 7
660
661 - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K``
662
663 - 96 kbit/s
664
665 - .. row 8
666
667 - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K``
668
669 - 112 kbit/s
670
671 - .. row 9
672
673 - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K``
674
675 - 128 kbit/s
676
677 - .. row 10
678
679 - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K``
680
681 - 160 kbit/s
682
683 - .. row 11
684
685 - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K``
686
687 - 192 kbit/s
688
689 - .. row 12
690
691 - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K``
692
693 - 224 kbit/s
694
695 - .. row 13
696
697 - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K``
698
699 - 256 kbit/s
700
701 - .. row 14
702
703 - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K``
704
705 - 320 kbit/s
706
707
708
709 ``V4L2_CID_MPEG_AUDIO_AAC_BITRATE (integer)``
710 AAC bitrate in bits per second.
711
712 .. _v4l2-mpeg-audio-ac3-bitrate:
713
714 ``V4L2_CID_MPEG_AUDIO_AC3_BITRATE``
715 (enum)
716
717 enum v4l2_mpeg_audio_ac3_bitrate -
718 AC-3 bitrate. Possible values are:
719
720
721
722 .. flat-table::
723 :header-rows: 0
724 :stub-columns: 0
725
726
727 - .. row 1
728
729 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K``
730
731 - 32 kbit/s
732
733 - .. row 2
734
735 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K``
736
737 - 40 kbit/s
738
739 - .. row 3
740
741 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K``
742
743 - 48 kbit/s
744
745 - .. row 4
746
747 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K``
748
749 - 56 kbit/s
750
751 - .. row 5
752
753 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K``
754
755 - 64 kbit/s
756
757 - .. row 6
758
759 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K``
760
761 - 80 kbit/s
762
763 - .. row 7
764
765 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K``
766
767 - 96 kbit/s
768
769 - .. row 8
770
771 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K``
772
773 - 112 kbit/s
774
775 - .. row 9
776
777 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K``
778
779 - 128 kbit/s
780
781 - .. row 10
782
783 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K``
784
785 - 160 kbit/s
786
787 - .. row 11
788
789 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K``
790
791 - 192 kbit/s
792
793 - .. row 12
794
795 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K``
796
797 - 224 kbit/s
798
799 - .. row 13
800
801 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K``
802
803 - 256 kbit/s
804
805 - .. row 14
806
807 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K``
808
809 - 320 kbit/s
810
811 - .. row 15
812
813 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K``
814
815 - 384 kbit/s
816
817 - .. row 16
818
819 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K``
820
821 - 448 kbit/s
822
823 - .. row 17
824
825 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K``
826
827 - 512 kbit/s
828
829 - .. row 18
830
831 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K``
832
833 - 576 kbit/s
834
835 - .. row 19
836
837 - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K``
838
839 - 640 kbit/s
840
841
842
843 .. _v4l2-mpeg-audio-mode:
844
845 ``V4L2_CID_MPEG_AUDIO_MODE``
846 (enum)
847
848 enum v4l2_mpeg_audio_mode -
849 MPEG Audio mode. Possible values are:
850
851
852
853 .. flat-table::
854 :header-rows: 0
855 :stub-columns: 0
856
857
858 - .. row 1
859
860 - ``V4L2_MPEG_AUDIO_MODE_STEREO``
861
862 - Stereo
863
864 - .. row 2
865
866 - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO``
867
868 - Joint Stereo
869
870 - .. row 3
871
872 - ``V4L2_MPEG_AUDIO_MODE_DUAL``
873
874 - Bilingual
875
876 - .. row 4
877
878 - ``V4L2_MPEG_AUDIO_MODE_MONO``
879
880 - Mono
881
882
883
884 .. _v4l2-mpeg-audio-mode-extension:
885
886 ``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION``
887 (enum)
888
889 enum v4l2_mpeg_audio_mode_extension -
890 Joint Stereo audio mode extension. In Layer I and II they indicate
891 which subbands are in intensity stereo. All other subbands are coded
892 in stereo. Layer III is not (yet) supported. Possible values are:
893
894
895
896 .. flat-table::
897 :header-rows: 0
898 :stub-columns: 0
899
900
901 - .. row 1
902
903 - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4``
904
905 - Subbands 4-31 in intensity stereo
906
907 - .. row 2
908
909 - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8``
910
911 - Subbands 8-31 in intensity stereo
912
913 - .. row 3
914
915 - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12``
916
917 - Subbands 12-31 in intensity stereo
918
919 - .. row 4
920
921 - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16``
922
923 - Subbands 16-31 in intensity stereo
924
925
926
927 .. _v4l2-mpeg-audio-emphasis:
928
929 ``V4L2_CID_MPEG_AUDIO_EMPHASIS``
930 (enum)
931
932 enum v4l2_mpeg_audio_emphasis -
933 Audio Emphasis. Possible values are:
934
935
936
937 .. flat-table::
938 :header-rows: 0
939 :stub-columns: 0
940
941
942 - .. row 1
943
944 - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE``
945
946 - None
947
948 - .. row 2
949
950 - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS``
951
952 - 50/15 microsecond emphasis
953
954 - .. row 3
955
956 - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17``
957
958 - CCITT J.17
959
960
961
962 .. _v4l2-mpeg-audio-crc:
963
964 ``V4L2_CID_MPEG_AUDIO_CRC``
965 (enum)
966
967 enum v4l2_mpeg_audio_crc -
968 CRC method. Possible values are:
969
970
971
972 .. flat-table::
973 :header-rows: 0
974 :stub-columns: 0
975
976
977 - .. row 1
978
979 - ``V4L2_MPEG_AUDIO_CRC_NONE``
980
981 - None
982
983 - .. row 2
984
985 - ``V4L2_MPEG_AUDIO_CRC_CRC16``
986
987 - 16 bit parity check
988
989
990
991 ``V4L2_CID_MPEG_AUDIO_MUTE (boolean)``
992 Mutes the audio when capturing. This is not done by muting audio
993 hardware, which can still produce a slight hiss, but in the encoder
994 itself, guaranteeing a fixed and reproducible audio bitstream. 0 =
995 unmuted, 1 = muted.
996
997 .. _v4l2-mpeg-audio-dec-playback:
998
999 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK``
1000 (enum)
1001
1002 enum v4l2_mpeg_audio_dec_playback -
1003 Determines how monolingual audio should be played back. Possible
1004 values are:
1005
1006
1007
1008 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
1009
1010 .. flat-table::
1011 :header-rows: 0
1012 :stub-columns: 0
1013
1014
1015 - .. row 1
1016
1017 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO``
1018
1019 - Automatically determines the best playback mode.
1020
1021 - .. row 2
1022
1023 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO``
1024
1025 - Stereo playback.
1026
1027 - .. row 3
1028
1029 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT``
1030
1031 - Left channel playback.
1032
1033 - .. row 4
1034
1035 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT``
1036
1037 - Right channel playback.
1038
1039 - .. row 5
1040
1041 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO``
1042
1043 - Mono playback.
1044
1045 - .. row 6
1046
1047 - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO``
1048
1049 - Stereo playback with swapped left and right channels.
1050
1051
1052
1053 .. _v4l2-mpeg-audio-dec-multilingual-playback:
1054
1055 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK``
1056 (enum)
1057
1058 enum v4l2_mpeg_audio_dec_playback -
1059 Determines how multilingual audio should be played back.
1060
1061 .. _v4l2-mpeg-video-encoding:
1062
1063 ``V4L2_CID_MPEG_VIDEO_ENCODING``
1064 (enum)
1065
1066 enum v4l2_mpeg_video_encoding -
1067 MPEG Video encoding method. This control is specific to multiplexed
1068 MPEG streams. Possible values are:
1069
1070
1071
1072 .. flat-table::
1073 :header-rows: 0
1074 :stub-columns: 0
1075
1076
1077 - .. row 1
1078
1079 - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1``
1080
1081 - MPEG-1 Video encoding
1082
1083 - .. row 2
1084
1085 - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2``
1086
1087 - MPEG-2 Video encoding
1088
1089 - .. row 3
1090
1091 - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC``
1092
1093 - MPEG-4 AVC (H.264) Video encoding
1094
1095
1096
1097 .. _v4l2-mpeg-video-aspect:
1098
1099 ``V4L2_CID_MPEG_VIDEO_ASPECT``
1100 (enum)
1101
1102 enum v4l2_mpeg_video_aspect -
1103 Video aspect. Possible values are:
1104
1105
1106
1107 .. flat-table::
1108 :header-rows: 0
1109 :stub-columns: 0
1110
1111
1112 - .. row 1
1113
1114 - ``V4L2_MPEG_VIDEO_ASPECT_1x1``
1115
1116 - .. row 2
1117
1118 - ``V4L2_MPEG_VIDEO_ASPECT_4x3``
1119
1120 - .. row 3
1121
1122 - ``V4L2_MPEG_VIDEO_ASPECT_16x9``
1123
1124 - .. row 4
1125
1126 - ``V4L2_MPEG_VIDEO_ASPECT_221x100``
1127
1128
1129
1130 ``V4L2_CID_MPEG_VIDEO_B_FRAMES (integer)``
1131 Number of B-Frames (default 2)
1132
1133 ``V4L2_CID_MPEG_VIDEO_GOP_SIZE (integer)``
1134 GOP size (default 12)
1135
1136 ``V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (boolean)``
1137 GOP closure (default 1)
1138
1139 ``V4L2_CID_MPEG_VIDEO_PULLDOWN (boolean)``
1140 Enable 3:2 pulldown (default 0)
1141
1142 .. _v4l2-mpeg-video-bitrate-mode:
1143
1144 ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE``
1145 (enum)
1146
1147 enum v4l2_mpeg_video_bitrate_mode -
1148 Video bitrate mode. Possible values are:
1149
1150
1151
1152 .. flat-table::
1153 :header-rows: 0
1154 :stub-columns: 0
1155
1156
1157 - .. row 1
1158
1159 - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR``
1160
1161 - Variable bitrate
1162
1163 - .. row 2
1164
1165 - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR``
1166
1167 - Constant bitrate
1168
1169
1170
1171 ``V4L2_CID_MPEG_VIDEO_BITRATE (integer)``
1172 Video bitrate in bits per second.
1173
1174 ``V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (integer)``
1175 Peak video bitrate in bits per second. Must be larger or equal to
1176 the average video bitrate. It is ignored if the video bitrate mode
1177 is set to constant bitrate.
1178
1179 ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)``
1180 For every captured frame, skip this many subsequent frames (default
1181 0).
1182
1183 ``V4L2_CID_MPEG_VIDEO_MUTE (boolean)``
1184 "Mutes" the video to a fixed color when capturing. This is useful
1185 for testing, to produce a fixed video bitstream. 0 = unmuted, 1 =
1186 muted.
1187
1188 ``V4L2_CID_MPEG_VIDEO_MUTE_YUV (integer)``
1189 Sets the "mute" color of the video. The supplied 32-bit integer is
1190 interpreted as follows (bit 0 = least significant bit):
1191
1192
1193
1194 .. flat-table::
1195 :header-rows: 0
1196 :stub-columns: 0
1197
1198
1199 - .. row 1
1200
1201 - Bit 0:7
1202
1203 - V chrominance information
1204
1205 - .. row 2
1206
1207 - Bit 8:15
1208
1209 - U chrominance information
1210
1211 - .. row 3
1212
1213 - Bit 16:23
1214
1215 - Y luminance information
1216
1217 - .. row 4
1218
1219 - Bit 24:31
1220
1221 - Must be zero.
1222
1223
1224
1225 .. _v4l2-mpeg-video-dec-pts:
1226
1227 ``V4L2_CID_MPEG_VIDEO_DEC_PTS (integer64)``
1228 This read-only control returns the 33-bit video Presentation Time
1229 Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of the
1230 currently displayed frame. This is the same PTS as is used in
1231 :ref:`VIDIOC_DECODER_CMD`.
1232
1233 .. _v4l2-mpeg-video-dec-frame:
1234
1235 ``V4L2_CID_MPEG_VIDEO_DEC_FRAME (integer64)``
1236 This read-only control returns the frame counter of the frame that
1237 is currently displayed (decoded). This value is reset to 0 whenever
1238 the decoder is started.
1239
1240 ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
1241 If enabled the decoder expects to receive a single slice per buffer,
1242 otherwise the decoder expects a single frame in per buffer.
1243 Applicable to the decoder, all codecs.
1244
1245 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)``
1246 Enable writing sample aspect ratio in the Video Usability
1247 Information. Applicable to the H264 encoder.
1248
1249 .. _v4l2-mpeg-video-h264-vui-sar-idc:
1250
1251 ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
1252 (enum)
1253
1254 enum v4l2_mpeg_video_h264_vui_sar_idc -
1255 VUI sample aspect ratio indicator for H.264 encoding. The value is
1256 defined in the table E-1 in the standard. Applicable to the H264
1257 encoder.
1258
1259
1260
1261 .. flat-table::
1262 :header-rows: 0
1263 :stub-columns: 0
1264
1265
1266 - .. row 1
1267
1268 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED``
1269
1270 - Unspecified
1271
1272 - .. row 2
1273
1274 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1``
1275
1276 - 1x1
1277
1278 - .. row 3
1279
1280 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11``
1281
1282 - 12x11
1283
1284 - .. row 4
1285
1286 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11``
1287
1288 - 10x11
1289
1290 - .. row 5
1291
1292 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11``
1293
1294 - 16x11
1295
1296 - .. row 6
1297
1298 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33``
1299
1300 - 40x33
1301
1302 - .. row 7
1303
1304 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11``
1305
1306 - 24x11
1307
1308 - .. row 8
1309
1310 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11``
1311
1312 - 20x11
1313
1314 - .. row 9
1315
1316 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11``
1317
1318 - 32x11
1319
1320 - .. row 10
1321
1322 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33``
1323
1324 - 80x33
1325
1326 - .. row 11
1327
1328 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11``
1329
1330 - 18x11
1331
1332 - .. row 12
1333
1334 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11``
1335
1336 - 15x11
1337
1338 - .. row 13
1339
1340 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33``
1341
1342 - 64x33
1343
1344 - .. row 14
1345
1346 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99``
1347
1348 - 160x99
1349
1350 - .. row 15
1351
1352 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3``
1353
1354 - 4x3
1355
1356 - .. row 16
1357
1358 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2``
1359
1360 - 3x2
1361
1362 - .. row 17
1363
1364 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1``
1365
1366 - 2x1
1367
1368 - .. row 18
1369
1370 - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED``
1371
1372 - Extended SAR
1373
1374
1375
1376 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (integer)``
1377 Extended sample aspect ratio width for H.264 VUI encoding.
1378 Applicable to the H264 encoder.
1379
1380 ``V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (integer)``
1381 Extended sample aspect ratio height for H.264 VUI encoding.
1382 Applicable to the H264 encoder.
1383
1384 .. _v4l2-mpeg-video-h264-level:
1385
1386 ``V4L2_CID_MPEG_VIDEO_H264_LEVEL``
1387 (enum)
1388
1389 enum v4l2_mpeg_video_h264_level -
1390 The level information for the H264 video elementary stream.
1391 Applicable to the H264 encoder. Possible values are:
1392
1393
1394
1395 .. flat-table::
1396 :header-rows: 0
1397 :stub-columns: 0
1398
1399
1400 - .. row 1
1401
1402 - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0``
1403
1404 - Level 1.0
1405
1406 - .. row 2
1407
1408 - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B``
1409
1410 - Level 1B
1411
1412 - .. row 3
1413
1414 - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1``
1415
1416 - Level 1.1
1417
1418 - .. row 4
1419
1420 - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2``
1421
1422 - Level 1.2
1423
1424 - .. row 5
1425
1426 - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3``
1427
1428 - Level 1.3
1429
1430 - .. row 6
1431
1432 - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0``
1433
1434 - Level 2.0
1435
1436 - .. row 7
1437
1438 - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1``
1439
1440 - Level 2.1
1441
1442 - .. row 8
1443
1444 - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2``
1445
1446 - Level 2.2
1447
1448 - .. row 9
1449
1450 - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0``
1451
1452 - Level 3.0
1453
1454 - .. row 10
1455
1456 - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1``
1457
1458 - Level 3.1
1459
1460 - .. row 11
1461
1462 - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2``
1463
1464 - Level 3.2
1465
1466 - .. row 12
1467
1468 - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0``
1469
1470 - Level 4.0
1471
1472 - .. row 13
1473
1474 - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1``
1475
1476 - Level 4.1
1477
1478 - .. row 14
1479
1480 - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2``
1481
1482 - Level 4.2
1483
1484 - .. row 15
1485
1486 - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0``
1487
1488 - Level 5.0
1489
1490 - .. row 16
1491
1492 - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1``
1493
1494 - Level 5.1
1495
1496
1497
1498 .. _v4l2-mpeg-video-mpeg4-level:
1499
1500 ``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL``
1501 (enum)
1502
1503 enum v4l2_mpeg_video_mpeg4_level -
1504 The level information for the MPEG4 elementary stream. Applicable to
1505 the MPEG4 encoder. Possible values are:
1506
1507
1508
1509 .. flat-table::
1510 :header-rows: 0
1511 :stub-columns: 0
1512
1513
1514 - .. row 1
1515
1516 - ``V4L2_MPEG_VIDEO_LEVEL_0``
1517
1518 - Level 0
1519
1520 - .. row 2
1521
1522 - ``V4L2_MPEG_VIDEO_LEVEL_0B``
1523
1524 - Level 0b
1525
1526 - .. row 3
1527
1528 - ``V4L2_MPEG_VIDEO_LEVEL_1``
1529
1530 - Level 1
1531
1532 - .. row 4
1533
1534 - ``V4L2_MPEG_VIDEO_LEVEL_2``
1535
1536 - Level 2
1537
1538 - .. row 5
1539
1540 - ``V4L2_MPEG_VIDEO_LEVEL_3``
1541
1542 - Level 3
1543
1544 - .. row 6
1545
1546 - ``V4L2_MPEG_VIDEO_LEVEL_3B``
1547
1548 - Level 3b
1549
1550 - .. row 7
1551
1552 - ``V4L2_MPEG_VIDEO_LEVEL_4``
1553
1554 - Level 4
1555
1556 - .. row 8
1557
1558 - ``V4L2_MPEG_VIDEO_LEVEL_5``
1559
1560 - Level 5
1561
1562
1563
1564 .. _v4l2-mpeg-video-h264-profile:
1565
1566 ``V4L2_CID_MPEG_VIDEO_H264_PROFILE``
1567 (enum)
1568
1569 enum v4l2_mpeg_video_h264_profile -
1570 The profile information for H264. Applicable to the H264 encoder.
1571 Possible values are:
1572
1573
1574
1575 .. flat-table::
1576 :header-rows: 0
1577 :stub-columns: 0
1578
1579
1580 - .. row 1
1581
1582 - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE``
1583
1584 - Baseline profile
1585
1586 - .. row 2
1587
1588 - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE``
1589
1590 - Constrained Baseline profile
1591
1592 - .. row 3
1593
1594 - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN``
1595
1596 - Main profile
1597
1598 - .. row 4
1599
1600 - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED``
1601
1602 - Extended profile
1603
1604 - .. row 5
1605
1606 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH``
1607
1608 - High profile
1609
1610 - .. row 6
1611
1612 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10``
1613
1614 - High 10 profile
1615
1616 - .. row 7
1617
1618 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422``
1619
1620 - High 422 profile
1621
1622 - .. row 8
1623
1624 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE``
1625
1626 - High 444 Predictive profile
1627
1628 - .. row 9
1629
1630 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA``
1631
1632 - High 10 Intra profile
1633
1634 - .. row 10
1635
1636 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA``
1637
1638 - High 422 Intra profile
1639
1640 - .. row 11
1641
1642 - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA``
1643
1644 - High 444 Intra profile
1645
1646 - .. row 12
1647
1648 - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA``
1649
1650 - CAVLC 444 Intra profile
1651
1652 - .. row 13
1653
1654 - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE``
1655
1656 - Scalable Baseline profile
1657
1658 - .. row 14
1659
1660 - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH``
1661
1662 - Scalable High profile
1663
1664 - .. row 15
1665
1666 - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA``
1667
1668 - Scalable High Intra profile
1669
1670 - .. row 16
1671
1672 - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH``
1673
1674 - Stereo High profile
1675
1676 - .. row 17
1677
1678 - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH``
1679
1680 - Multiview High profile
1681
1682
1683
1684 .. _v4l2-mpeg-video-mpeg4-profile:
1685
1686 ``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE``
1687 (enum)
1688
1689 enum v4l2_mpeg_video_mpeg4_profile -
1690 The profile information for MPEG4. Applicable to the MPEG4 encoder.
1691 Possible values are:
1692
1693
1694
1695 .. flat-table::
1696 :header-rows: 0
1697 :stub-columns: 0
1698
1699
1700 - .. row 1
1701
1702 - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE``
1703
1704 - Simple profile
1705
1706 - .. row 2
1707
1708 - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_SIMPLE``
1709
1710 - Advanced Simple profile
1711
1712 - .. row 3
1713
1714 - ``V4L2_MPEG_VIDEO_PROFILE_CORE``
1715
1716 - Core profile
1717
1718 - .. row 4
1719
1720 - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE_SCALABLE``
1721
1722 - Simple Scalable profile
1723
1724 - .. row 5
1725
1726 - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY``
1727
1728 -
1729
1730
1731
1732 ``V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (integer)``
1733 The maximum number of reference pictures used for encoding.
1734 Applicable to the encoder.
1735
1736 .. _v4l2-mpeg-video-multi-slice-mode:
1737
1738 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE``
1739 (enum)
1740
1741 enum v4l2_mpeg_video_multi_slice_mode -
1742 Determines how the encoder should handle division of frame into
1743 slices. Applicable to the encoder. Possible values are:
1744
1745
1746
1747 .. tabularcolumns:: |p{8.7cm}|p{8.8cm}|
1748
1749 .. flat-table::
1750 :header-rows: 0
1751 :stub-columns: 0
1752
1753
1754 - .. row 1
1755
1756 - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE``
1757
1758 - Single slice per frame.
1759
1760 - .. row 2
1761
1762 - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``
1763
1764 - Multiple slices with set maximum number of macroblocks per slice.
1765
1766 - .. row 3
1767
1768 - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``
1769
1770 - Multiple slice with set maximum size in bytes per slice.
1771
1772
1773
1774 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (integer)``
1775 The maximum number of macroblocks in a slice. Used when
1776 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1777 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB``. Applicable to the
1778 encoder.
1779
1780 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (integer)``
1781 The maximum size of a slice in bytes. Used when
1782 ``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` is set to
1783 ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES``. Applicable to the
1784 encoder.
1785
1786 .. _v4l2-mpeg-video-h264-loop-filter-mode:
1787
1788 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE``
1789 (enum)
1790
1791 enum v4l2_mpeg_video_h264_loop_filter_mode -
1792 Loop filter mode for H264 encoder. Possible values are:
1793
1794
1795
1796 .. tabularcolumns:: |p{14.0cm}|p{3.5cm}|
1797
1798 .. flat-table::
1799 :header-rows: 0
1800 :stub-columns: 0
1801
1802 - .. row 1
1803
1804 - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED``
1805
1806 - Loop filter is enabled.
1807
1808 - .. row 2
1809
1810 - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED``
1811
1812 - Loop filter is disabled.
1813
1814 - .. row 3
1815
1816 - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY``
1817
1818 - Loop filter is disabled at the slice boundary.
1819
1820
1821
1822 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (integer)``
1823 Loop filter alpha coefficient, defined in the H264 standard.
1824 Applicable to the H264 encoder.
1825
1826 ``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (integer)``
1827 Loop filter beta coefficient, defined in the H264 standard.
1828 Applicable to the H264 encoder.
1829
1830 .. _v4l2-mpeg-video-h264-entropy-mode:
1831
1832 ``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE``
1833 (enum)
1834
1835 enum v4l2_mpeg_video_h264_entropy_mode -
1836 Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264
1837 encoder. Possible values are:
1838
1839
1840
1841 .. flat-table::
1842 :header-rows: 0
1843 :stub-columns: 0
1844
1845
1846 - .. row 1
1847
1848 - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC``
1849
1850 - Use CAVLC entropy coding.
1851
1852 - .. row 2
1853
1854 - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC``
1855
1856 - Use CABAC entropy coding.
1857
1858
1859
1860 ``V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (boolean)``
1861 Enable 8X8 transform for H264. Applicable to the H264 encoder.
1862
1863 ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (integer)``
1864 Cyclic intra macroblock refresh. This is the number of continuous
1865 macroblocks refreshed every frame. Each frame a successive set of
1866 macroblocks is refreshed until the cycle completes and starts from
1867 the top of the frame. Applicable to H264, H263 and MPEG4 encoder.
1868
1869 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
1870 Frame level rate control enable. If this control is disabled then
1871 the quantization parameter for each frame type is constant and set
1872 with appropriate controls (e.g.
1873 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP``). If frame rate control is
1874 enabled then quantization parameter is adjusted to meet the chosen
1875 bitrate. Minimum and maximum value for the quantization parameter
1876 can be set with appropriate controls (e.g.
1877 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP``). Applicable to encoders.
1878
1879 ``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (boolean)``
1880 Macroblock level rate control enable. Applicable to the MPEG4 and
1881 H264 encoders.
1882
1883 ``V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (boolean)``
1884 Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4
1885 encoder.
1886
1887 ``V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (integer)``
1888 Quantization parameter for an I frame for H263. Valid range: from 1
1889 to 31.
1890
1891 ``V4L2_CID_MPEG_VIDEO_H263_MIN_QP (integer)``
1892 Minimum quantization parameter for H263. Valid range: from 1 to 31.
1893
1894 ``V4L2_CID_MPEG_VIDEO_H263_MAX_QP (integer)``
1895 Maximum quantization parameter for H263. Valid range: from 1 to 31.
1896
1897 ``V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (integer)``
1898 Quantization parameter for an P frame for H263. Valid range: from 1
1899 to 31.
1900
1901 ``V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (integer)``
1902 Quantization parameter for an B frame for H263. Valid range: from 1
1903 to 31.
1904
1905 ``V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (integer)``
1906 Quantization parameter for an I frame for H264. Valid range: from 0
1907 to 51.
1908
1909 ``V4L2_CID_MPEG_VIDEO_H264_MIN_QP (integer)``
1910 Minimum quantization parameter for H264. Valid range: from 0 to 51.
1911
1912 ``V4L2_CID_MPEG_VIDEO_H264_MAX_QP (integer)``
1913 Maximum quantization parameter for H264. Valid range: from 0 to 51.
1914
1915 ``V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (integer)``
1916 Quantization parameter for an P frame for H264. Valid range: from 0
1917 to 51.
1918
1919 ``V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (integer)``
1920 Quantization parameter for an B frame for H264. Valid range: from 0
1921 to 51.
1922
1923 ``V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (integer)``
1924 Quantization parameter for an I frame for MPEG4. Valid range: from 1
1925 to 31.
1926
1927 ``V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (integer)``
1928 Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.
1929
1930 ``V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (integer)``
1931 Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.
1932
1933 ``V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (integer)``
1934 Quantization parameter for an P frame for MPEG4. Valid range: from 1
1935 to 31.
1936
1937 ``V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (integer)``
1938 Quantization parameter for an B frame for MPEG4. Valid range: from 1
1939 to 31.
1940
1941 ``V4L2_CID_MPEG_VIDEO_VBV_SIZE (integer)``
1942 The Video Buffer Verifier size in kilobytes, it is used as a
1943 limitation of frame skip. The VBV is defined in the standard as a
1944 mean to verify that the produced stream will be successfully
1945 decoded. The standard describes it as "Part of a hypothetical
1946 decoder that is conceptually connected to the output of the encoder.
1947 Its purpose is to provide a constraint on the variability of the
1948 data rate that an encoder or editing process may produce.".
1949 Applicable to the MPEG1, MPEG2, MPEG4 encoders.
1950
1951 .. _v4l2-mpeg-video-vbv-delay:
1952
1953 ``V4L2_CID_MPEG_VIDEO_VBV_DELAY (integer)``
1954 Sets the initial delay in milliseconds for VBV buffer control.
1955
1956 .. _v4l2-mpeg-video-hor-search-range:
1957
1958 ``V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (integer)``
1959 Horizontal search range defines maximum horizontal search area in
1960 pixels to search and match for the present Macroblock (MB) in the
1961 reference picture. This V4L2 control macro is used to set horizontal
1962 search range for motion estimation module in video encoder.
1963
1964 .. _v4l2-mpeg-video-vert-search-range:
1965
1966 ``V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (integer)``
1967 Vertical search range defines maximum vertical search area in pixels
1968 to search and match for the present Macroblock (MB) in the reference
1969 picture. This V4L2 control macro is used to set vertical search
1970 range for motion estimation module in video encoder.
1971
1972 .. _v4l2-mpeg-video-force-key-frame:
1973
1974 ``V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (button)``
1975 Force a key frame for the next queued buffer. Applicable to
1976 encoders. This is a general, codec-agnostic keyframe control.
1977
1978 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
1979 The Coded Picture Buffer size in kilobytes, it is used as a
1980 limitation of frame skip. The CPB is defined in the H264 standard as
1981 a mean to verify that the produced stream will be successfully
1982 decoded. Applicable to the H264 encoder.
1983
1984 ``V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (integer)``
1985 Period between I-frames in the open GOP for H264. In case of an open
1986 GOP this is the period between two I-frames. The period between IDR
1987 (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE
1988 control. An IDR frame, which stands for Instantaneous Decoding
1989 Refresh is an I-frame after which no prior frames are referenced.
1990 This means that a stream can be restarted from an IDR frame without
1991 the need to store or decode any previous frames. Applicable to the
1992 H264 encoder.
1993
1994 .. _v4l2-mpeg-video-header-mode:
1995
1996 ``V4L2_CID_MPEG_VIDEO_HEADER_MODE``
1997 (enum)
1998
1999 enum v4l2_mpeg_video_header_mode -
2000 Determines whether the header is returned as the first buffer or is
2001 it returned together with the first frame. Applicable to encoders.
2002 Possible values are:
2003
2004
2005
2006 .. tabularcolumns:: |p{10.3cm}|p{7.2cm}|
2007
2008 .. flat-table::
2009 :header-rows: 0
2010 :stub-columns: 0
2011
2012
2013 - .. row 1
2014
2015 - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE``
2016
2017 - The stream header is returned separately in the first buffer.
2018
2019 - .. row 2
2020
2021 - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME``
2022
2023 - The stream header is returned together with the first encoded
2024 frame.
2025
2026
2027
2028 ``V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (boolean)``
2029 Repeat the video sequence headers. Repeating these headers makes
2030 random access to the video stream easier. Applicable to the MPEG1, 2
2031 and 4 encoder.
2032
2033 ``V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (boolean)``
2034 Enabled the deblocking post processing filter for MPEG4 decoder.
2035 Applicable to the MPEG4 decoder.
2036
2037 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES (integer)``
2038 vop_time_increment_resolution value for MPEG4. Applicable to the
2039 MPEG4 encoder.
2040
2041 ``V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC (integer)``
2042 vop_time_increment value for MPEG4. Applicable to the MPEG4
2043 encoder.
2044
2045 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (boolean)``
2046 Enable generation of frame packing supplemental enhancement
2047 information in the encoded bitstream. The frame packing SEI message
2048 contains the arrangement of L and R planes for 3D viewing.
2049 Applicable to the H264 encoder.
2050
2051 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (boolean)``
2052 Sets current frame as frame0 in frame packing SEI. Applicable to the
2053 H264 encoder.
2054
2055 .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type:
2056
2057 ``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE``
2058 (enum)
2059
2060 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type -
2061 Frame packing arrangement type for H264 SEI. Applicable to the H264
2062 encoder. Possible values are:
2063
2064 .. tabularcolumns:: |p{12cm}|p{5.5cm}|
2065
2066 .. flat-table::
2067 :header-rows: 0
2068 :stub-columns: 0
2069
2070 - .. row 1
2071
2072 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD``
2073
2074 - Pixels are alternatively from L and R.
2075
2076 - .. row 2
2077
2078 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN``
2079
2080 - L and R are interlaced by column.
2081
2082 - .. row 3
2083
2084 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW``
2085
2086 - L and R are interlaced by row.
2087
2088 - .. row 4
2089
2090 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE``
2091
2092 - L is on the left, R on the right.
2093
2094 - .. row 5
2095
2096 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM``
2097
2098 - L is on top, R on bottom.
2099
2100 - .. row 6
2101
2102 - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL``
2103
2104 - One view per frame.
2105
2106
2107
2108 ``V4L2_CID_MPEG_VIDEO_H264_FMO (boolean)``
2109 Enables flexible macroblock ordering in the encoded bitstream. It is
2110 a technique used for restructuring the ordering of macroblocks in
2111 pictures. Applicable to the H264 encoder.
2112
2113 .. _v4l2-mpeg-video-h264-fmo-map-type:
2114
2115 ``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE``
2116 (enum)
2117
2118 enum v4l2_mpeg_video_h264_fmo_map_type -
2119 When using FMO, the map type divides the image in different scan
2120 patterns of macroblocks. Applicable to the H264 encoder. Possible
2121 values are:
2122
2123 .. tabularcolumns:: |p{12.5cm}|p{5.0cm}|
2124
2125 .. flat-table::
2126 :header-rows: 0
2127 :stub-columns: 0
2128
2129 - .. row 1
2130
2131 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES``
2132
2133 - Slices are interleaved one after other with macroblocks in run
2134 length order.
2135
2136 - .. row 2
2137
2138 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES``
2139
2140 - Scatters the macroblocks based on a mathematical function known to
2141 both encoder and decoder.
2142
2143 - .. row 3
2144
2145 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER``
2146
2147 - Macroblocks arranged in rectangular areas or regions of interest.
2148
2149 - .. row 4
2150
2151 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT``
2152
2153 - Slice groups grow in a cyclic way from centre to outwards.
2154
2155 - .. row 5
2156
2157 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN``
2158
2159 - Slice groups grow in raster scan pattern from left to right.
2160
2161 - .. row 6
2162
2163 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN``
2164
2165 - Slice groups grow in wipe scan pattern from top to bottom.
2166
2167 - .. row 7
2168
2169 - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT``
2170
2171 - User defined map type.
2172
2173
2174
2175 ``V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (integer)``
2176 Number of slice groups in FMO. Applicable to the H264 encoder.
2177
2178 .. _v4l2-mpeg-video-h264-fmo-change-direction:
2179
2180 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION``
2181 (enum)
2182
2183 enum v4l2_mpeg_video_h264_fmo_change_dir -
2184 Specifies a direction of the slice group change for raster and wipe
2185 maps. Applicable to the H264 encoder. Possible values are:
2186
2187
2188
2189 .. flat-table::
2190 :header-rows: 0
2191 :stub-columns: 0
2192
2193
2194 - .. row 1
2195
2196 - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT``
2197
2198 - Raster scan or wipe right.
2199
2200 - .. row 2
2201
2202 - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT``
2203
2204 - Reverse raster scan or wipe left.
2205
2206
2207
2208 ``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (integer)``
2209 Specifies the size of the first slice group for raster and wipe map.
2210 Applicable to the H264 encoder.
2211
2212 ``V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (integer)``
2213 Specifies the number of consecutive macroblocks for the interleaved
2214 map. Applicable to the H264 encoder.
2215
2216 ``V4L2_CID_MPEG_VIDEO_H264_ASO (boolean)``
2217 Enables arbitrary slice ordering in encoded bitstream. Applicable to
2218 the H264 encoder.
2219
2220 ``V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (integer)``
2221 Specifies the slice order in ASO. Applicable to the H264 encoder.
2222 The supplied 32-bit integer is interpreted as follows (bit 0 = least
2223 significant bit):
2224
2225
2226
2227 .. flat-table::
2228 :header-rows: 0
2229 :stub-columns: 0
2230
2231
2232 - .. row 1
2233
2234 - Bit 0:15
2235
2236 - Slice ID
2237
2238 - .. row 2
2239
2240 - Bit 16:32
2241
2242 - Slice position or order
2243
2244
2245
2246 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (boolean)``
2247 Enables H264 hierarchical coding. Applicable to the H264 encoder.
2248
2249 .. _v4l2-mpeg-video-h264-hierarchical-coding-type:
2250
2251 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE``
2252 (enum)
2253
2254 enum v4l2_mpeg_video_h264_hierarchical_coding_type -
2255 Specifies the hierarchical coding type. Applicable to the H264
2256 encoder. Possible values are:
2257
2258
2259
2260 .. flat-table::
2261 :header-rows: 0
2262 :stub-columns: 0
2263
2264
2265 - .. row 1
2266
2267 - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B``
2268
2269 - Hierarchical B coding.
2270
2271 - .. row 2
2272
2273 - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P``
2274
2275 - Hierarchical P coding.
2276
2277
2278
2279 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (integer)``
2280 Specifies the number of hierarchical coding layers. Applicable to
2281 the H264 encoder.
2282
2283 ``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (integer)``
2284 Specifies a user defined QP for each layer. Applicable to the H264
2285 encoder. The supplied 32-bit integer is interpreted as follows (bit
2286 0 = least significant bit):
2287
2288
2289
2290 .. flat-table::
2291 :header-rows: 0
2292 :stub-columns: 0
2293
2294
2295 - .. row 1
2296
2297 - Bit 0:15
2298
2299 - QP value
2300
2301 - .. row 2
2302
2303 - Bit 16:32
2304
2305 - Layer number
2306
2307
2308
2309
2310 MFC 5.1 MPEG Controls
2311 ---------------------
2312
2313 The following MPEG class controls deal with MPEG decoding and encoding
2314 settings that are specific to the Multi Format Codec 5.1 device present
2315 in the S5P family of SoCs by Samsung.
2316
2317
2318 .. _mfc51-control-id:
2319
2320 MFC 5.1 Control IDs
2321 ^^^^^^^^^^^^^^^^^^^
2322
2323 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (boolean)``
2324 If the display delay is enabled then the decoder is forced to return
2325 a CAPTURE buffer (decoded frame) after processing a certain number
2326 of OUTPUT buffers. The delay can be set through
2327 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY``. This
2328 feature can be used for example for generating thumbnails of videos.
2329 Applicable to the H264 decoder.
2330
2331 ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)``
2332 Display delay value for H264 decoder. The decoder is forced to
2333 return a decoded frame after the set 'display delay' number of
2334 frames. If this number is low it may result in frames returned out
2335 of dispaly order, in addition the hardware may still be using the
2336 returned buffer as a reference picture for subsequent frames.
2337
2338 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)``
2339 The number of reference pictures used for encoding a P picture.
2340 Applicable to the H264 encoder.
2341
2342 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING (boolean)``
2343 Padding enable in the encoder - use a color instead of repeating
2344 border pixels. Applicable to encoders.
2345
2346 ``V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (integer)``
2347 Padding color in the encoder. Applicable to encoders. The supplied
2348 32-bit integer is interpreted as follows (bit 0 = least significant
2349 bit):
2350
2351
2352
2353 .. flat-table::
2354 :header-rows: 0
2355 :stub-columns: 0
2356
2357
2358 - .. row 1
2359
2360 - Bit 0:7
2361
2362 - V chrominance information
2363
2364 - .. row 2
2365
2366 - Bit 8:15
2367
2368 - U chrominance information
2369
2370 - .. row 3
2371
2372 - Bit 16:23
2373
2374 - Y luminance information
2375
2376 - .. row 4
2377
2378 - Bit 24:31
2379
2380 - Must be zero.
2381
2382
2383
2384 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (integer)``
2385 Reaction coefficient for MFC rate control. Applicable to encoders.
2386
2387 .. note::
2388
2389 #. Valid only when the frame level RC is enabled.
2390
2391 #. For tight CBR, this field must be small (ex. 2 ~ 10). For
2392 VBR, this field must be large (ex. 100 ~ 1000).
2393
2394 #. It is not recommended to use the greater number than
2395 FRAME_RATE * (10^9 / BIT_RATE).
2396
2397 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (boolean)``
2398 Adaptive rate control for dark region. Valid only when H.264 and
2399 macroblock level RC is enabled
2400 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2401 encoder.
2402
2403 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (boolean)``
2404 Adaptive rate control for smooth region. Valid only when H.264 and
2405 macroblock level RC is enabled
2406 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2407 encoder.
2408
2409 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (boolean)``
2410 Adaptive rate control for static region. Valid only when H.264 and
2411 macroblock level RC is enabled
2412 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2413 encoder.
2414
2415 ``V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (boolean)``
2416 Adaptive rate control for activity region. Valid only when H.264 and
2417 macroblock level RC is enabled
2418 (``V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE``). Applicable to the H264
2419 encoder.
2420
2421 .. _v4l2-mpeg-mfc51-video-frame-skip-mode:
2422
2423 ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE``
2424 (enum)
2425
2426 enum v4l2_mpeg_mfc51_video_frame_skip_mode -
2427 Indicates in what conditions the encoder should skip frames. If
2428 encoding a frame would cause the encoded stream to be larger then a
2429 chosen data limit then the frame will be skipped. Possible values
2430 are:
2431
2432
2433 .. tabularcolumns:: |p{9.0cm}|p{8.5cm}|
2434
2435 .. flat-table::
2436 :header-rows: 0
2437 :stub-columns: 0
2438
2439 - .. row 1
2440
2441 - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED``
2442
2443 - Frame skip mode is disabled.
2444
2445 - .. row 2
2446
2447 - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT``
2448
2449 - Frame skip mode enabled and buffer limit is set by the chosen
2450 level and is defined by the standard.
2451
2452 - .. row 3
2453
2454 - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT``
2455
2456 - Frame skip mode enabled and buffer limit is set by the VBV
2457 (MPEG1/2/4) or CPB (H264) buffer size control.
2458
2459
2460
2461 ``V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (integer)``
2462 Enable rate-control with fixed target bit. If this setting is
2463 enabled, then the rate control logic of the encoder will calculate
2464 the average bitrate for a GOP and keep it below or equal the set
2465 bitrate target. Otherwise the rate control logic calculates the
2466 overall average bitrate for the stream and keeps it below or equal
2467 to the set bitrate. In the first case the average bitrate for the
2468 whole stream will be smaller then the set bitrate. This is caused
2469 because the average is calculated for smaller number of frames, on
2470 the other hand enabling this setting will ensure that the stream
2471 will meet tight bandwidth constraints. Applicable to encoders.
2472
2473 .. _v4l2-mpeg-mfc51-video-force-frame-type:
2474
2475 ``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE``
2476 (enum)
2477
2478 enum v4l2_mpeg_mfc51_video_force_frame_type -
2479 Force a frame type for the next queued buffer. Applicable to
2480 encoders. Possible values are:
2481
2482
2483
2484 .. flat-table::
2485 :header-rows: 0
2486 :stub-columns: 0
2487
2488
2489 - .. row 1
2490
2491 - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED``
2492
2493 - Forcing a specific frame type disabled.
2494
2495 - .. row 2
2496
2497 - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME``
2498
2499 - Force an I-frame.
2500
2501 - .. row 3
2502
2503 - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED``
2504
2505 - Force a non-coded frame.
2506
2507
2508
2509
2510 CX2341x MPEG Controls
2511 ---------------------
2512
2513 The following MPEG class controls deal with MPEG encoding settings that
2514 are specific to the Conexant CX23415 and CX23416 MPEG encoding chips.
2515
2516
2517 .. _cx2341x-control-id:
2518
2519 CX2341x Control IDs
2520 ^^^^^^^^^^^^^^^^^^^
2521
2522 .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode:
2523
2524 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE``
2525 (enum)
2526
2527 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode -
2528 Sets the Spatial Filter mode (default ``MANUAL``). Possible values
2529 are:
2530
2531
2532
2533 .. flat-table::
2534 :header-rows: 0
2535 :stub-columns: 0
2536
2537
2538 - .. row 1
2539
2540 - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL``
2541
2542 - Choose the filter manually
2543
2544 - .. row 2
2545
2546 - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO``
2547
2548 - Choose the filter automatically
2549
2550
2551
2552 ``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (integer (0-15))``
2553 The setting for the Spatial Filter. 0 = off, 15 = maximum. (Default
2554 is 0.)
2555
2556 .. _luma-spatial-filter-type:
2557
2558 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE``
2559 (enum)
2560
2561 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type -
2562 Select the algorithm to use for the Luma Spatial Filter (default
2563 ``1D_HOR``). Possible values:
2564
2565
2566
2567 .. tabularcolumns:: |p{14.5cm}|p{3.0cm}|
2568
2569 .. flat-table::
2570 :header-rows: 0
2571 :stub-columns: 0
2572
2573
2574 - .. row 1
2575
2576 - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF``
2577
2578 - No filter
2579
2580 - .. row 2
2581
2582 - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR``
2583
2584 - One-dimensional horizontal
2585
2586 - .. row 3
2587
2588 - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT``
2589
2590 - One-dimensional vertical
2591
2592 - .. row 4
2593
2594 - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE``
2595
2596 - Two-dimensional separable
2597
2598 - .. row 5
2599
2600 - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE``
2601
2602 - Two-dimensional symmetrical non-separable
2603
2604
2605
2606 .. _chroma-spatial-filter-type:
2607
2608 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE``
2609 (enum)
2610
2611 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type -
2612 Select the algorithm for the Chroma Spatial Filter (default
2613 ``1D_HOR``). Possible values are:
2614
2615
2616
2617 .. flat-table::
2618 :header-rows: 0
2619 :stub-columns: 0
2620
2621
2622 - .. row 1
2623
2624 - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF``
2625
2626 - No filter
2627
2628 - .. row 2
2629
2630 - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR``
2631
2632 - One-dimensional horizontal
2633
2634
2635
2636 .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode:
2637
2638 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE``
2639 (enum)
2640
2641 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode -
2642 Sets the Temporal Filter mode (default ``MANUAL``). Possible values
2643 are:
2644
2645
2646
2647 .. flat-table::
2648 :header-rows: 0
2649 :stub-columns: 0
2650
2651
2652 - .. row 1
2653
2654 - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL``
2655
2656 - Choose the filter manually
2657
2658 - .. row 2
2659
2660 - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO``
2661
2662 - Choose the filter automatically
2663
2664
2665
2666 ``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (integer (0-31))``
2667 The setting for the Temporal Filter. 0 = off, 31 = maximum. (Default
2668 is 8 for full-scale capturing and 0 for scaled capturing.)
2669
2670 .. _v4l2-mpeg-cx2341x-video-median-filter-type:
2671
2672 ``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE``
2673 (enum)
2674
2675 enum v4l2_mpeg_cx2341x_video_median_filter_type -
2676 Median Filter Type (default ``OFF``). Possible values are:
2677
2678
2679
2680 .. flat-table::
2681 :header-rows: 0
2682 :stub-columns: 0
2683
2684
2685 - .. row 1
2686
2687 - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF``
2688
2689 - No filter
2690
2691 - .. row 2
2692
2693 - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR``
2694
2695 - Horizontal filter
2696
2697 - .. row 3
2698
2699 - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT``
2700
2701 - Vertical filter
2702
2703 - .. row 4
2704
2705 - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT``
2706
2707 - Horizontal and vertical filter
2708
2709 - .. row 5
2710
2711 - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG``
2712
2713 - Diagonal filter
2714
2715
2716
2717 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2718 Threshold above which the luminance median filter is enabled
2719 (default 0)
2720
2721 ``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (integer (0-255))``
2722 Threshold below which the luminance median filter is enabled
2723 (default 255)
2724
2725 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (integer (0-255))``
2726 Threshold above which the chroma median filter is enabled (default
2727 0)
2728
2729 ``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (integer (0-255))``
2730 Threshold below which the chroma median filter is enabled (default
2731 255)
2732
2733 ``V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (boolean)``
2734 The CX2341X MPEG encoder can insert one empty MPEG-2 PES packet into
2735 the stream between every four video frames. The packet size is 2048
2736 bytes, including the packet_start_code_prefix and stream_id
2737 fields. The stream_id is 0xBF (private stream 2). The payload
2738 consists of 0x00 bytes, to be filled in by the application. 0 = do
2739 not insert, 1 = insert packets.
2740
2741
2742 VPX Control Reference
2743 ---------------------
2744
2745 The VPX controls include controls for encoding parameters of VPx video
2746 codec.
2747
2748
2749 .. _vpx-control-id:
2750
2751 VPX Control IDs
2752 ^^^^^^^^^^^^^^^
2753
2754 .. _v4l2-vpx-num-partitions:
2755
2756 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS``
2757 (enum)
2758
2759 enum v4l2_vp8_num_partitions -
2760 The number of token partitions to use in VP8 encoder. Possible
2761 values are:
2762
2763
2764
2765 .. flat-table::
2766 :header-rows: 0
2767 :stub-columns: 0
2768
2769
2770 - .. row 1
2771
2772 - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION``
2773
2774 - 1 coefficient partition
2775
2776 - .. row 2
2777
2778 - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS``
2779
2780 - 2 coefficient partitions
2781
2782 - .. row 3
2783
2784 - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS``
2785
2786 - 4 coefficient partitions
2787
2788 - .. row 4
2789
2790 - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS``
2791
2792 - 8 coefficient partitions
2793
2794
2795
2796 ``V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (boolean)``
2797 Setting this prevents intra 4x4 mode in the intra mode decision.
2798
2799 .. _v4l2-vpx-num-ref-frames:
2800
2801 ``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES``
2802 (enum)
2803
2804 enum v4l2_vp8_num_ref_frames -
2805 The number of reference pictures for encoding P frames. Possible
2806 values are:
2807
2808 .. tabularcolumns:: |p{7.9cm}|p{9.6cm}|
2809
2810 .. flat-table::
2811 :header-rows: 0
2812 :stub-columns: 0
2813
2814 - .. row 1
2815
2816 - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME``
2817
2818 - Last encoded frame will be searched
2819
2820 - .. row 2
2821
2822 - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME``
2823
2824 - Two frames will be searched among the last encoded frame, the
2825 golden frame and the alternate reference (altref) frame. The
2826 encoder implementation will decide which two are chosen.
2827
2828 - .. row 3
2829
2830 - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME``
2831
2832 - The last encoded frame, the golden frame and the altref frame will
2833 be searched.
2834
2835
2836
2837 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (integer)``
2838 Indicates the loop filter level. The adjustment of the loop filter
2839 level is done via a delta value against a baseline loop filter
2840 value.
2841
2842 ``V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (integer)``
2843 This parameter affects the loop filter. Anything above zero weakens
2844 the deblocking effect on the loop filter.
2845
2846 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (integer)``
2847 Sets the refresh period for the golden frame. The period is defined
2848 in number of frames. For a value of 'n', every nth frame starting
2849 from the first key frame will be taken as a golden frame. For eg.
2850 for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden
2851 frame refresh period is set as 4, the frames 0, 4, 8 etc will be
2852 taken as the golden frames as frame 0 is always a key frame.
2853
2854 .. _v4l2-vpx-golden-frame-sel:
2855
2856 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL``
2857 (enum)
2858
2859 enum v4l2_vp8_golden_frame_sel -
2860 Selects the golden frame for encoding. Possible values are:
2861
2862 .. raw:: latex
2863
2864 \begin{adjustbox}{width=\columnwidth}
2865
2866 .. tabularcolumns:: |p{11.0cm}|p{10.0cm}|
2867
2868 .. flat-table::
2869 :header-rows: 0
2870 :stub-columns: 0
2871
2872 - .. row 1
2873
2874 - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV``
2875
2876 - Use the (n-2)th frame as a golden frame, current frame index being
2877 'n'.
2878
2879 - .. row 2
2880
2881 - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD``
2882
2883 - Use the previous specific frame indicated by
2884 ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a
2885 golden frame.
2886
2887 .. raw:: latex
2888
2889 \end{adjustbox}
2890
2891
2892 ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)``
2893 Minimum quantization parameter for VP8.
2894
2895 ``V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (integer)``
2896 Maximum quantization parameter for VP8.
2897
2898 ``V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (integer)``
2899 Quantization parameter for an I frame for VP8.
2900
2901 ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)``
2902 Quantization parameter for a P frame for VP8.
2903
2904 ``V4L2_CID_MPEG_VIDEO_VPX_PROFILE (integer)``
2905 Select the desired profile for VPx encoder. Acceptable values are 0,
2906 1, 2 and 3 corresponding to encoder profiles 0, 1, 2 and 3.
2907
2908
2909 .. _camera-controls:
2910
2911 Camera Control Reference
2912 ========================
2913
2914 The Camera class includes controls for mechanical (or equivalent
2915 digital) features of a device such as controllable lenses or sensors.
2916
2917
2918 .. _camera-control-id:
2919
2920 Camera Control IDs
2921 ------------------
2922
2923 ``V4L2_CID_CAMERA_CLASS (class)``
2924 The Camera class descriptor. Calling
2925 :ref:`VIDIOC_QUERYCTRL` for this control will
2926 return a description of this control class.
2927
2928 .. _v4l2-exposure-auto-type:
2929
2930 ``V4L2_CID_EXPOSURE_AUTO``
2931 (enum)
2932
2933 enum v4l2_exposure_auto_type -
2934 Enables automatic adjustments of the exposure time and/or iris
2935 aperture. The effect of manual changes of the exposure time or iris
2936 aperture while these features are enabled is undefined, drivers
2937 should ignore such requests. Possible values are:
2938
2939
2940
2941 .. flat-table::
2942 :header-rows: 0
2943 :stub-columns: 0
2944
2945
2946 - .. row 1
2947
2948 - ``V4L2_EXPOSURE_AUTO``
2949
2950 - Automatic exposure time, automatic iris aperture.
2951
2952 - .. row 2
2953
2954 - ``V4L2_EXPOSURE_MANUAL``
2955
2956 - Manual exposure time, manual iris.
2957
2958 - .. row 3
2959
2960 - ``V4L2_EXPOSURE_SHUTTER_PRIORITY``
2961
2962 - Manual exposure time, auto iris.
2963
2964 - .. row 4
2965
2966 - ``V4L2_EXPOSURE_APERTURE_PRIORITY``
2967
2968 - Auto exposure time, manual iris.
2969
2970
2971
2972 ``V4L2_CID_EXPOSURE_ABSOLUTE (integer)``
2973 Determines the exposure time of the camera sensor. The exposure time
2974 is limited by the frame interval. Drivers should interpret the
2975 values as 100 µs units, where the value 1 stands for 1/10000th of a
2976 second, 10000 for 1 second and 100000 for 10 seconds.
2977
2978 ``V4L2_CID_EXPOSURE_AUTO_PRIORITY (boolean)``
2979 When ``V4L2_CID_EXPOSURE_AUTO`` is set to ``AUTO`` or
2980 ``APERTURE_PRIORITY``, this control determines if the device may
2981 dynamically vary the frame rate. By default this feature is disabled
2982 (0) and the frame rate must remain constant.
2983
2984 ``V4L2_CID_EXPOSURE_BIAS (integer menu)``
2985 Determines the automatic exposure compensation, it is effective only
2986 when ``V4L2_CID_EXPOSURE_AUTO`` control is set to ``AUTO``,
2987 ``SHUTTER_PRIORITY`` or ``APERTURE_PRIORITY``. It is expressed in
2988 terms of EV, drivers should interpret the values as 0.001 EV units,
2989 where the value 1000 stands for +1 EV.
2990
2991 Increasing the exposure compensation value is equivalent to
2992 decreasing the exposure value (EV) and will increase the amount of
2993 light at the image sensor. The camera performs the exposure
2994 compensation by adjusting absolute exposure time and/or aperture.
2995
2996 .. _v4l2-exposure-metering:
2997
2998 ``V4L2_CID_EXPOSURE_METERING``
2999 (enum)
3000
3001 enum v4l2_exposure_metering -
3002 Determines how the camera measures the amount of light available for
3003 the frame exposure. Possible values are:
3004
3005 .. tabularcolumns:: |p{8.5cm}|p{9.0cm}|
3006
3007 .. flat-table::
3008 :header-rows: 0
3009 :stub-columns: 0
3010
3011 - .. row 1
3012
3013 - ``V4L2_EXPOSURE_METERING_AVERAGE``
3014
3015 - Use the light information coming from the entire frame and average
3016 giving no weighting to any particular portion of the metered area.
3017
3018 - .. row 2
3019
3020 - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED``
3021
3022 - Average the light information coming from the entire frame giving
3023 priority to the center of the metered area.
3024
3025 - .. row 3
3026
3027 - ``V4L2_EXPOSURE_METERING_SPOT``
3028
3029 - Measure only very small area at the center of the frame.
3030
3031 - .. row 4
3032
3033 - ``V4L2_EXPOSURE_METERING_MATRIX``
3034
3035 - A multi-zone metering. The light intensity is measured in several
3036 points of the frame and the results are combined. The algorithm of
3037 the zones selection and their significance in calculating the
3038 final value is device dependent.
3039
3040
3041
3042 ``V4L2_CID_PAN_RELATIVE (integer)``
3043 This control turns the camera horizontally by the specified amount.
3044 The unit is undefined. A positive value moves the camera to the
3045 right (clockwise when viewed from above), a negative value to the
3046 left. A value of zero does not cause motion. This is a write-only
3047 control.
3048
3049 ``V4L2_CID_TILT_RELATIVE (integer)``
3050 This control turns the camera vertically by the specified amount.
3051 The unit is undefined. A positive value moves the camera up, a
3052 negative value down. A value of zero does not cause motion. This is
3053 a write-only control.
3054
3055 ``V4L2_CID_PAN_RESET (button)``
3056 When this control is set, the camera moves horizontally to the
3057 default position.
3058
3059 ``V4L2_CID_TILT_RESET (button)``
3060 When this control is set, the camera moves vertically to the default
3061 position.
3062
3063 ``V4L2_CID_PAN_ABSOLUTE (integer)``
3064 This control turns the camera horizontally to the specified
3065 position. Positive values move the camera to the right (clockwise
3066 when viewed from above), negative values to the left. Drivers should
3067 interpret the values as arc seconds, with valid values between -180
3068 * 3600 and +180 * 3600 inclusive.
3069
3070 ``V4L2_CID_TILT_ABSOLUTE (integer)``
3071 This control turns the camera vertically to the specified position.
3072 Positive values move the camera up, negative values down. Drivers
3073 should interpret the values as arc seconds, with valid values
3074 between -180 * 3600 and +180 * 3600 inclusive.
3075
3076 ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
3077 This control sets the focal point of the camera to the specified
3078 position. The unit is undefined. Positive values set the focus
3079 closer to the camera, negative values towards infinity.
3080
3081 ``V4L2_CID_FOCUS_RELATIVE (integer)``
3082 This control moves the focal point of the camera by the specified
3083 amount. The unit is undefined. Positive values move the focus closer
3084 to the camera, negative values towards infinity. This is a
3085 write-only control.
3086
3087 ``V4L2_CID_FOCUS_AUTO (boolean)``
3088 Enables continuous automatic focus adjustments. The effect of manual
3089 focus adjustments while this feature is enabled is undefined,
3090 drivers should ignore such requests.
3091
3092 ``V4L2_CID_AUTO_FOCUS_START (button)``
3093 Starts single auto focus process. The effect of setting this control
3094 when ``V4L2_CID_FOCUS_AUTO`` is set to ``TRUE`` (1) is undefined,
3095 drivers should ignore such requests.
3096
3097 ``V4L2_CID_AUTO_FOCUS_STOP (button)``
3098 Aborts automatic focusing started with ``V4L2_CID_AUTO_FOCUS_START``
3099 control. It is effective only when the continuous autofocus is
3100 disabled, that is when ``V4L2_CID_FOCUS_AUTO`` control is set to
3101 ``FALSE`` (0).
3102
3103 .. _v4l2-auto-focus-status:
3104
3105 ``V4L2_CID_AUTO_FOCUS_STATUS (bitmask)``
3106 The automatic focus status. This is a read-only control.
3107
3108 Setting ``V4L2_LOCK_FOCUS`` lock bit of the ``V4L2_CID_3A_LOCK``
3109 control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS``
3110 control value.
3111
3112 .. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
3113
3114 .. flat-table::
3115 :header-rows: 0
3116 :stub-columns: 0
3117
3118 - .. row 1
3119
3120 - ``V4L2_AUTO_FOCUS_STATUS_IDLE``
3121
3122 - Automatic focus is not active.
3123
3124 - .. row 2
3125
3126 - ``V4L2_AUTO_FOCUS_STATUS_BUSY``
3127
3128 - Automatic focusing is in progress.
3129
3130 - .. row 3
3131
3132 - ``V4L2_AUTO_FOCUS_STATUS_REACHED``
3133
3134 - Focus has been reached.
3135
3136 - .. row 4
3137
3138 - ``V4L2_AUTO_FOCUS_STATUS_FAILED``
3139
3140 - Automatic focus has failed, the driver will not transition from
3141 this state until another action is performed by an application.
3142
3143
3144
3145 .. _v4l2-auto-focus-range:
3146
3147 ``V4L2_CID_AUTO_FOCUS_RANGE``
3148 (enum)
3149
3150 enum v4l2_auto_focus_range -
3151 Determines auto focus distance range for which lens may be adjusted.
3152
3153 .. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
3154
3155 .. flat-table::
3156 :header-rows: 0
3157 :stub-columns: 0
3158
3159
3160 - .. row 1
3161
3162 - ``V4L2_AUTO_FOCUS_RANGE_AUTO``
3163
3164 - The camera automatically selects the focus range.
3165
3166 - .. row 2
3167
3168 - ``V4L2_AUTO_FOCUS_RANGE_NORMAL``
3169
3170 - Normal distance range, limited for best automatic focus
3171 performance.
3172
3173 - .. row 3
3174
3175 - ``V4L2_AUTO_FOCUS_RANGE_MACRO``
3176
3177 - Macro (close-up) auto focus. The camera will use its minimum
3178 possible distance for auto focus.
3179
3180 - .. row 4
3181
3182 - ``V4L2_AUTO_FOCUS_RANGE_INFINITY``
3183
3184 - The lens is set to focus on an object at infinite distance.
3185
3186
3187
3188 ``V4L2_CID_ZOOM_ABSOLUTE (integer)``
3189 Specify the objective lens focal length as an absolute value. The
3190 zoom unit is driver-specific and its value should be a positive
3191 integer.
3192
3193 ``V4L2_CID_ZOOM_RELATIVE (integer)``
3194 Specify the objective lens focal length relatively to the current
3195 value. Positive values move the zoom lens group towards the
3196 telephoto direction, negative values towards the wide-angle
3197 direction. The zoom unit is driver-specific. This is a write-only
3198 control.
3199
3200 ``V4L2_CID_ZOOM_CONTINUOUS (integer)``
3201 Move the objective lens group at the specified speed until it
3202 reaches physical device limits or until an explicit request to stop
3203 the movement. A positive value moves the zoom lens group towards the
3204 telephoto direction. A value of zero stops the zoom lens group
3205 movement. A negative value moves the zoom lens group towards the
3206 wide-angle direction. The zoom speed unit is driver-specific.
3207
3208 ``V4L2_CID_IRIS_ABSOLUTE (integer)``
3209 This control sets the camera's aperture to the specified value. The
3210 unit is undefined. Larger values open the iris wider, smaller values
3211 close it.
3212
3213 ``V4L2_CID_IRIS_RELATIVE (integer)``
3214 This control modifies the camera's aperture by the specified amount.
3215 The unit is undefined. Positive values open the iris one step
3216 further, negative values close it one step further. This is a
3217 write-only control.
3218
3219 ``V4L2_CID_PRIVACY (boolean)``
3220 Prevent video from being acquired by the camera. When this control
3221 is set to ``TRUE`` (1), no image can be captured by the camera.
3222 Common means to enforce privacy are mechanical obturation of the
3223 sensor and firmware image processing, but the device is not
3224 restricted to these methods. Devices that implement the privacy
3225 control must support read access and may support write access.
3226
3227 ``V4L2_CID_BAND_STOP_FILTER (integer)``
3228 Switch the band-stop filter of a camera sensor on or off, or specify
3229 its strength. Such band-stop filters can be used, for example, to
3230 filter out the fluorescent light component.
3231
3232 .. _v4l2-auto-n-preset-white-balance:
3233
3234 ``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``
3235 (enum)
3236
3237 enum v4l2_auto_n_preset_white_balance -
3238 Sets white balance to automatic, manual or a preset. The presets
3239 determine color temperature of the light as a hint to the camera for
3240 white balance adjustments resulting in most accurate color
3241 representation. The following white balance presets are listed in
3242 order of increasing color temperature.
3243
3244 .. tabularcolumns:: |p{7.0 cm}|p{10.5cm}|
3245
3246 .. flat-table::
3247 :header-rows: 0
3248 :stub-columns: 0
3249
3250 - .. row 1
3251
3252 - ``V4L2_WHITE_BALANCE_MANUAL``
3253
3254 - Manual white balance.
3255
3256 - .. row 2
3257
3258 - ``V4L2_WHITE_BALANCE_AUTO``
3259
3260 - Automatic white balance adjustments.
3261
3262 - .. row 3
3263
3264 - ``V4L2_WHITE_BALANCE_INCANDESCENT``
3265
3266 - White balance setting for incandescent (tungsten) lighting. It
3267 generally cools down the colors and corresponds approximately to
3268 2500...3500 K color temperature range.
3269
3270 - .. row 4
3271
3272 - ``V4L2_WHITE_BALANCE_FLUORESCENT``
3273
3274 - White balance preset for fluorescent lighting. It corresponds
3275 approximately to 4000...5000 K color temperature.
3276
3277 - .. row 5
3278
3279 - ``V4L2_WHITE_BALANCE_FLUORESCENT_H``
3280
3281 - With this setting the camera will compensate for fluorescent H
3282 lighting.
3283
3284 - .. row 6
3285
3286 - ``V4L2_WHITE_BALANCE_HORIZON``
3287
3288 - White balance setting for horizon daylight. It corresponds
3289 approximately to 5000 K color temperature.
3290
3291 - .. row 7
3292
3293 - ``V4L2_WHITE_BALANCE_DAYLIGHT``
3294
3295 - White balance preset for daylight (with clear sky). It corresponds
3296 approximately to 5000...6500 K color temperature.
3297
3298 - .. row 8
3299
3300 - ``V4L2_WHITE_BALANCE_FLASH``
3301
3302 - With this setting the camera will compensate for the flash light.
3303 It slightly warms up the colors and corresponds roughly to
3304 5000...5500 K color temperature.
3305
3306 - .. row 9
3307
3308 - ``V4L2_WHITE_BALANCE_CLOUDY``
3309
3310 - White balance preset for moderately overcast sky. This option
3311 corresponds approximately to 6500...8000 K color temperature
3312 range.
3313
3314 - .. row 10
3315
3316 - ``V4L2_WHITE_BALANCE_SHADE``
3317
3318 - White balance preset for shade or heavily overcast sky. It
3319 corresponds approximately to 9000...10000 K color temperature.
3320
3321
3322
3323 .. _v4l2-wide-dynamic-range:
3324
3325 ``V4L2_CID_WIDE_DYNAMIC_RANGE (boolean)``
3326 Enables or disables the camera's wide dynamic range feature. This
3327 feature allows to obtain clear images in situations where intensity
3328 of the illumination varies significantly throughout the scene, i.e.
3329 there are simultaneously very dark and very bright areas. It is most
3330 commonly realized in cameras by combining two subsequent frames with
3331 different exposure times. [#f1]_
3332
3333 .. _v4l2-image-stabilization:
3334
3335 ``V4L2_CID_IMAGE_STABILIZATION (boolean)``
3336 Enables or disables image stabilization.
3337
3338 ``V4L2_CID_ISO_SENSITIVITY (integer menu)``
3339 Determines ISO equivalent of an image sensor indicating the sensor's
3340 sensitivity to light. The numbers are expressed in arithmetic scale,
3341 as per :ref:`iso12232` standard, where doubling the sensor
3342 sensitivity is represented by doubling the numerical ISO value.
3343 Applications should interpret the values as standard ISO values
3344 multiplied by 1000, e.g. control value 800 stands for ISO 0.8.
3345 Drivers will usually support only a subset of standard ISO values.
3346 The effect of setting this control while the
3347 ``V4L2_CID_ISO_SENSITIVITY_AUTO`` control is set to a value other
3348 than ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` is undefined, drivers
3349 should ignore such requests.
3350
3351 .. _v4l2-iso-sensitivity-auto-type:
3352
3353 ``V4L2_CID_ISO_SENSITIVITY_AUTO``
3354 (enum)
3355
3356 enum v4l2_iso_sensitivity_type -
3357 Enables or disables automatic ISO sensitivity adjustments.
3358
3359
3360
3361 .. flat-table::
3362 :header-rows: 0
3363 :stub-columns: 0
3364
3365
3366 - .. row 1
3367
3368 - ``V4L2_CID_ISO_SENSITIVITY_MANUAL``
3369
3370 - Manual ISO sensitivity.
3371
3372 - .. row 2
3373
3374 - ``V4L2_CID_ISO_SENSITIVITY_AUTO``
3375
3376 - Automatic ISO sensitivity adjustments.
3377
3378
3379
3380 .. _v4l2-scene-mode:
3381
3382 ``V4L2_CID_SCENE_MODE``
3383 (enum)
3384
3385 enum v4l2_scene_mode -
3386 This control allows to select scene programs as the camera automatic
3387 modes optimized for common shooting scenes. Within these modes the
3388 camera determines best exposure, aperture, focusing, light metering,
3389 white balance and equivalent sensitivity. The controls of those
3390 parameters are influenced by the scene mode control. An exact
3391 behavior in each mode is subject to the camera specification.
3392
3393 When the scene mode feature is not used, this control should be set
3394 to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related
3395 controls are accessible. The following scene programs are defined:
3396
3397 .. tabularcolumns:: |p{6.0cm}|p{11.5cm}|
3398
3399 .. flat-table::
3400 :header-rows: 0
3401 :stub-columns: 0
3402
3403 - .. row 1
3404
3405 - ``V4L2_SCENE_MODE_NONE``
3406
3407 - The scene mode feature is disabled.
3408
3409 - .. row 2
3410
3411 - ``V4L2_SCENE_MODE_BACKLIGHT``
3412
3413 - Backlight. Compensates for dark shadows when light is coming from
3414 behind a subject, also by automatically turning on the flash.
3415
3416 - .. row 3
3417
3418 - ``V4L2_SCENE_MODE_BEACH_SNOW``
3419
3420 - Beach and snow. This mode compensates for all-white or bright
3421 scenes, which tend to look gray and low contrast, when camera's
3422 automatic exposure is based on an average scene brightness. To
3423 compensate, this mode automatically slightly overexposes the
3424 frames. The white balance may also be adjusted to compensate for
3425 the fact that reflected snow looks bluish rather than white.
3426
3427 - .. row 4
3428
3429 - ``V4L2_SCENE_MODE_CANDLELIGHT``
3430
3431 - Candle light. The camera generally raises the ISO sensitivity and
3432 lowers the shutter speed. This mode compensates for relatively
3433 close subject in the scene. The flash is disabled in order to
3434 preserve the ambiance of the light.
3435
3436 - .. row 5
3437
3438 - ``V4L2_SCENE_MODE_DAWN_DUSK``
3439
3440 - Dawn and dusk. Preserves the colors seen in low natural light
3441 before dusk and after down. The camera may turn off the flash, and
3442 automatically focus at infinity. It will usually boost saturation
3443 and lower the shutter speed.
3444
3445 - .. row 6
3446
3447 - ``V4L2_SCENE_MODE_FALL_COLORS``
3448
3449 - Fall colors. Increases saturation and adjusts white balance for
3450 color enhancement. Pictures of autumn leaves get saturated reds
3451 and yellows.
3452
3453 - .. row 7
3454
3455 - ``V4L2_SCENE_MODE_FIREWORKS``
3456
3457 - Fireworks. Long exposure times are used to capture the expanding
3458 burst of light from a firework. The camera may invoke image
3459 stabilization.
3460
3461 - .. row 8
3462
3463 - ``V4L2_SCENE_MODE_LANDSCAPE``
3464
3465 - Landscape. The camera may choose a small aperture to provide deep
3466 depth of field and long exposure duration to help capture detail
3467 in dim light conditions. The focus is fixed at infinity. Suitable
3468 for distant and wide scenery.
3469
3470 - .. row 9
3471
3472 - ``V4L2_SCENE_MODE_NIGHT``
3473
3474 - Night, also known as Night Landscape. Designed for low light
3475 conditions, it preserves detail in the dark areas without blowing
3476 out bright objects. The camera generally sets itself to a
3477 medium-to-high ISO sensitivity, with a relatively long exposure
3478 time, and turns flash off. As such, there will be increased image
3479 noise and the possibility of blurred image.
3480
3481 - .. row 10
3482
3483 - ``V4L2_SCENE_MODE_PARTY_INDOOR``
3484
3485 - Party and indoor. Designed to capture indoor scenes that are lit
3486 by indoor background lighting as well as the flash. The camera
3487 usually increases ISO sensitivity, and adjusts exposure for the
3488 low light conditions.
3489
3490 - .. row 11
3491
3492 - ``V4L2_SCENE_MODE_PORTRAIT``
3493
3494 - Portrait. The camera adjusts the aperture so that the depth of
3495 field is reduced, which helps to isolate the subject against a
3496 smooth background. Most cameras recognize the presence of faces in
3497 the scene and focus on them. The color hue is adjusted to enhance
3498 skin tones. The intensity of the flash is often reduced.
3499
3500 - .. row 12
3501
3502 - ``V4L2_SCENE_MODE_SPORTS``
3503
3504 - Sports. Significantly increases ISO and uses a fast shutter speed
3505 to freeze motion of rapidly-moving subjects. Increased image noise
3506 may be seen in this mode.
3507
3508 - .. row 13
3509
3510 - ``V4L2_SCENE_MODE_SUNSET``
3511
3512 - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps
3513 up the saturation.
3514
3515 - .. row 14
3516
3517 - ``V4L2_SCENE_MODE_TEXT``
3518
3519 - Text. It applies extra contrast and sharpness, it is typically a
3520 black-and-white mode optimized for readability. Automatic focus
3521 may be switched to close-up mode and this setting may also involve
3522 some lens-distortion correction.
3523
3524
3525
3526 ``V4L2_CID_3A_LOCK (bitmask)``
3527 This control locks or unlocks the automatic focus, exposure and
3528 white balance. The automatic adjustments can be paused independently
3529 by setting the corresponding lock bit to 1. The camera then retains
3530 the settings until the lock bit is cleared. The following lock bits
3531 are defined:
3532
3533 When a given algorithm is not enabled, drivers should ignore
3534 requests to lock it and should return no error. An example might be
3535 an application setting bit ``V4L2_LOCK_WHITE_BALANCE`` when the
3536 ``V4L2_CID_AUTO_WHITE_BALANCE`` control is set to ``FALSE``. The
3537 value of this control may be changed by exposure, white balance or
3538 focus controls.
3539
3540
3541
3542 .. flat-table::
3543 :header-rows: 0
3544 :stub-columns: 0
3545
3546
3547 - .. row 1
3548
3549 - ``V4L2_LOCK_EXPOSURE``
3550
3551 - Automatic exposure adjustments lock.
3552
3553 - .. row 2
3554
3555 - ``V4L2_LOCK_WHITE_BALANCE``
3556
3557 - Automatic white balance adjustments lock.
3558
3559 - .. row 3
3560
3561 - ``V4L2_LOCK_FOCUS``
3562
3563 - Automatic focus lock.
3564
3565
3566
3567 ``V4L2_CID_PAN_SPEED (integer)``
3568 This control turns the camera horizontally at the specific speed.
3569 The unit is undefined. A positive value moves the camera to the
3570 right (clockwise when viewed from above), a negative value to the
3571 left. A value of zero stops the motion if one is in progress and has
3572 no effect otherwise.
3573
3574 ``V4L2_CID_TILT_SPEED (integer)``
3575 This control turns the camera vertically at the specified speed. The
3576 unit is undefined. A positive value moves the camera up, a negative
3577 value down. A value of zero stops the motion if one is in progress
3578 and has no effect otherwise.
3579
3580
3581 .. _fm-tx-controls:
3582
3583 FM Transmitter Control Reference
3584 ================================
3585
3586 The FM Transmitter (FM_TX) class includes controls for common features
3587 of FM transmissions capable devices. Currently this class includes
3588 parameters for audio compression, pilot tone generation, audio deviation
3589 limiter, RDS transmission and tuning power features.
3590
3591
3592 .. _fm-tx-control-id:
3593
3594 FM_TX Control IDs
3595 -----------------
3596
3597 ``V4L2_CID_FM_TX_CLASS (class)``
3598 The FM_TX class descriptor. Calling
3599 :ref:`VIDIOC_QUERYCTRL` for this control will
3600 return a description of this control class.
3601
3602 ``V4L2_CID_RDS_TX_DEVIATION (integer)``
3603 Configures RDS signal frequency deviation level in Hz. The range and
3604 step are driver-specific.
3605
3606 ``V4L2_CID_RDS_TX_PI (integer)``
3607 Sets the RDS Programme Identification field for transmission.
3608
3609 ``V4L2_CID_RDS_TX_PTY (integer)``
3610 Sets the RDS Programme Type field for transmission. This encodes up
3611 to 31 pre-defined programme types.
3612
3613 ``V4L2_CID_RDS_TX_PS_NAME (string)``
3614 Sets the Programme Service name (PS_NAME) for transmission. It is
3615 intended for static display on a receiver. It is the primary aid to
3616 listeners in programme service identification and selection. In
3617 Annex E of :ref:`iec62106`, the RDS specification, there is a full
3618 description of the correct character encoding for Programme Service
3619 name strings. Also from RDS specification, PS is usually a single
3620 eight character text. However, it is also possible to find receivers
3621 which can scroll strings sized as 8 x N characters. So, this control
3622 must be configured with steps of 8 characters. The result is it must
3623 always contain a string with size multiple of 8.
3624
3625 ``V4L2_CID_RDS_TX_RADIO_TEXT (string)``
3626 Sets the Radio Text info for transmission. It is a textual
3627 description of what is being broadcasted. RDS Radio Text can be
3628 applied when broadcaster wishes to transmit longer PS names,
3629 programme-related information or any other text. In these cases,
3630 RadioText should be used in addition to ``V4L2_CID_RDS_TX_PS_NAME``.
3631 The encoding for Radio Text strings is also fully described in Annex
3632 E of :ref:`iec62106`. The length of Radio Text strings depends on
3633 which RDS Block is being used to transmit it, either 32 (2A block)
3634 or 64 (2B block). However, it is also possible to find receivers
3635 which can scroll strings sized as 32 x N or 64 x N characters. So,
3636 this control must be configured with steps of 32 or 64 characters.
3637 The result is it must always contain a string with size multiple of
3638 32 or 64.
3639
3640 ``V4L2_CID_RDS_TX_MONO_STEREO (boolean)``
3641 Sets the Mono/Stereo bit of the Decoder Identification code. If set,
3642 then the audio was recorded as stereo.
3643
3644 ``V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (boolean)``
3645 Sets the
3646 `Artificial Head <http://en.wikipedia.org/wiki/Artificial_head>`__
3647 bit of the Decoder Identification code. If set, then the audio was
3648 recorded using an artificial head.
3649
3650 ``V4L2_CID_RDS_TX_COMPRESSED (boolean)``
3651 Sets the Compressed bit of the Decoder Identification code. If set,
3652 then the audio is compressed.
3653
3654 ``V4L2_CID_RDS_TX_DYNAMIC_PTY (boolean)``
3655 Sets the Dynamic PTY bit of the Decoder Identification code. If set,
3656 then the PTY code is dynamically switched.
3657
3658 ``V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (boolean)``
3659 If set, then a traffic announcement is in progress.
3660
3661 ``V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (boolean)``
3662 If set, then the tuned programme carries traffic announcements.
3663
3664 ``V4L2_CID_RDS_TX_MUSIC_SPEECH (boolean)``
3665 If set, then this channel broadcasts music. If cleared, then it
3666 broadcasts speech. If the transmitter doesn't make this distinction,
3667 then it should be set.
3668
3669 ``V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (boolean)``
3670 If set, then transmit alternate frequencies.
3671
3672 ``V4L2_CID_RDS_TX_ALT_FREQS (__u32 array)``
3673 The alternate frequencies in kHz units. The RDS standard allows for
3674 up to 25 frequencies to be defined. Drivers may support fewer
3675 frequencies so check the array size.
3676
3677 ``V4L2_CID_AUDIO_LIMITER_ENABLED (boolean)``
3678 Enables or disables the audio deviation limiter feature. The limiter
3679 is useful when trying to maximize the audio volume, minimize
3680 receiver-generated distortion and prevent overmodulation.
3681
3682 ``V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (integer)``
3683 Sets the audio deviation limiter feature release time. Unit is in
3684 useconds. Step and range are driver-specific.
3685
3686 ``V4L2_CID_AUDIO_LIMITER_DEVIATION (integer)``
3687 Configures audio frequency deviation level in Hz. The range and step
3688 are driver-specific.
3689
3690 ``V4L2_CID_AUDIO_COMPRESSION_ENABLED (boolean)``
3691 Enables or disables the audio compression feature. This feature
3692 amplifies signals below the threshold by a fixed gain and compresses
3693 audio signals above the threshold by the ratio of Threshold/(Gain +
3694 Threshold).
3695
3696 ``V4L2_CID_AUDIO_COMPRESSION_GAIN (integer)``
3697 Sets the gain for audio compression feature. It is a dB value. The
3698 range and step are driver-specific.
3699
3700 ``V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (integer)``
3701 Sets the threshold level for audio compression freature. It is a dB
3702 value. The range and step are driver-specific.
3703
3704 ``V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (integer)``
3705 Sets the attack time for audio compression feature. It is a useconds
3706 value. The range and step are driver-specific.
3707
3708 ``V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (integer)``
3709 Sets the release time for audio compression feature. It is a
3710 useconds value. The range and step are driver-specific.
3711
3712 ``V4L2_CID_PILOT_TONE_ENABLED (boolean)``
3713 Enables or disables the pilot tone generation feature.
3714
3715 ``V4L2_CID_PILOT_TONE_DEVIATION (integer)``
3716 Configures pilot tone frequency deviation level. Unit is in Hz. The
3717 range and step are driver-specific.
3718
3719 ``V4L2_CID_PILOT_TONE_FREQUENCY (integer)``
3720 Configures pilot tone frequency value. Unit is in Hz. The range and
3721 step are driver-specific.
3722
3723 ``V4L2_CID_TUNE_PREEMPHASIS``
3724 (enum)
3725
3726 enum v4l2_preemphasis -
3727 Configures the pre-emphasis value for broadcasting. A pre-emphasis
3728 filter is applied to the broadcast to accentuate the high audio
3729 frequencies. Depending on the region, a time constant of either 50
3730 or 75 useconds is used. The enum v4l2_preemphasis defines possible
3731 values for pre-emphasis. Here they are:
3732
3733
3734
3735 .. flat-table::
3736 :header-rows: 0
3737 :stub-columns: 0
3738
3739
3740 - .. row 1
3741
3742 - ``V4L2_PREEMPHASIS_DISABLED``
3743
3744 - No pre-emphasis is applied.
3745
3746 - .. row 2
3747
3748 - ``V4L2_PREEMPHASIS_50_uS``
3749
3750 - A pre-emphasis of 50 uS is used.
3751
3752 - .. row 3
3753
3754 - ``V4L2_PREEMPHASIS_75_uS``
3755
3756 - A pre-emphasis of 75 uS is used.
3757
3758
3759
3760 ``V4L2_CID_TUNE_POWER_LEVEL (integer)``
3761 Sets the output power level for signal transmission. Unit is in
3762 dBuV. Range and step are driver-specific.
3763
3764 ``V4L2_CID_TUNE_ANTENNA_CAPACITOR (integer)``
3765 This selects the value of antenna tuning capacitor manually or
3766 automatically if set to zero. Unit, range and step are
3767 driver-specific.
3768
3769 For more details about RDS specification, refer to :ref:`iec62106`
3770 document, from CENELEC.
3771
3772
3773 .. _flash-controls:
3774
3775 Flash Control Reference
3776 =======================
3777
3778 The V4L2 flash controls are intended to provide generic access to flash
3779 controller devices. Flash controller devices are typically used in
3780 digital cameras.
3781
3782 The interface can support both LED and xenon flash devices. As of
3783 writing this, there is no xenon flash driver using this interface.
3784
3785
3786 .. _flash-controls-use-cases:
3787
3788 Supported use cases
3789 -------------------
3790
3791
3792 Unsynchronised LED flash (software strobe)
3793 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3794
3795 Unsynchronised LED flash is controlled directly by the host as the
3796 sensor. The flash must be enabled by the host before the exposure of the
3797 image starts and disabled once it ends. The host is fully responsible
3798 for the timing of the flash.
3799
3800 Example of such device: Nokia N900.
3801
3802
3803 Synchronised LED flash (hardware strobe)
3804 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3805
3806 The synchronised LED flash is pre-programmed by the host (power and
3807 timeout) but controlled by the sensor through a strobe signal from the
3808 sensor to the flash.
3809
3810 The sensor controls the flash duration and timing. This information
3811 typically must be made available to the sensor.
3812
3813
3814 LED flash as torch
3815 ^^^^^^^^^^^^^^^^^^
3816
3817 LED flash may be used as torch in conjunction with another use case
3818 involving camera or individually.
3819
3820
3821 .. _flash-control-id:
3822
3823 Flash Control IDs
3824 """""""""""""""""
3825
3826 ``V4L2_CID_FLASH_CLASS (class)``
3827 The FLASH class descriptor.
3828
3829 ``V4L2_CID_FLASH_LED_MODE (menu)``
3830 Defines the mode of the flash LED, the high-power white LED attached
3831 to the flash controller. Setting this control may not be possible in
3832 presence of some faults. See V4L2_CID_FLASH_FAULT.
3833
3834
3835
3836 .. flat-table::
3837 :header-rows: 0
3838 :stub-columns: 0
3839
3840
3841 - .. row 1
3842
3843 - ``V4L2_FLASH_LED_MODE_NONE``
3844
3845 - Off.
3846
3847 - .. row 2
3848
3849 - ``V4L2_FLASH_LED_MODE_FLASH``
3850
3851 - Flash mode.
3852
3853 - .. row 3
3854
3855 - ``V4L2_FLASH_LED_MODE_TORCH``
3856
3857 - Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.
3858
3859
3860
3861 ``V4L2_CID_FLASH_STROBE_SOURCE (menu)``
3862 Defines the source of the flash LED strobe.
3863
3864 .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
3865
3866 .. flat-table::
3867 :header-rows: 0
3868 :stub-columns: 0
3869
3870 - .. row 1
3871
3872 - ``V4L2_FLASH_STROBE_SOURCE_SOFTWARE``
3873
3874 - The flash strobe is triggered by using the
3875 V4L2_CID_FLASH_STROBE control.
3876
3877 - .. row 2
3878
3879 - ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL``
3880
3881 - The flash strobe is triggered by an external source. Typically
3882 this is a sensor, which makes it possible to synchronises the
3883 flash strobe start to exposure start.
3884
3885
3886
3887 ``V4L2_CID_FLASH_STROBE (button)``
3888 Strobe flash. Valid when V4L2_CID_FLASH_LED_MODE is set to
3889 V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
3890 is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
3891 control may not be possible in presence of some faults. See
3892 V4L2_CID_FLASH_FAULT.
3893
3894 ``V4L2_CID_FLASH_STROBE_STOP (button)``
3895 Stop flash strobe immediately.
3896
3897 ``V4L2_CID_FLASH_STROBE_STATUS (boolean)``
3898 Strobe status: whether the flash is strobing at the moment or not.
3899 This is a read-only control.
3900
3901 ``V4L2_CID_FLASH_TIMEOUT (integer)``
3902 Hardware timeout for flash. The flash strobe is stopped after this
3903 period of time has passed from the start of the strobe.
3904
3905 ``V4L2_CID_FLASH_INTENSITY (integer)``
3906 Intensity of the flash strobe when the flash LED is in flash mode
3907 (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps (mA)
3908 if possible.
3909
3910 ``V4L2_CID_FLASH_TORCH_INTENSITY (integer)``
3911 Intensity of the flash LED in torch mode
3912 (V4L2_FLASH_LED_MODE_TORCH). The unit should be milliamps (mA)
3913 if possible. Setting this control may not be possible in presence of
3914 some faults. See V4L2_CID_FLASH_FAULT.
3915
3916 ``V4L2_CID_FLASH_INDICATOR_INTENSITY (integer)``
3917 Intensity of the indicator LED. The indicator LED may be fully
3918 independent of the flash LED. The unit should be microamps (uA) if
3919 possible.
3920
3921 ``V4L2_CID_FLASH_FAULT (bitmask)``
3922 Faults related to the flash. The faults tell about specific problems
3923 in the flash chip itself or the LEDs attached to it. Faults may
3924 prevent further use of some of the flash controls. In particular,
3925 V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
3926 if the fault affects the flash LED. Exactly which faults have such
3927 an effect is chip dependent. Reading the faults resets the control
3928 and returns the chip to a usable state if possible.
3929
3930 .. tabularcolumns:: |p{8.0cm}|p{9.5cm}|
3931
3932 .. flat-table::
3933 :header-rows: 0
3934 :stub-columns: 0
3935
3936
3937 - .. row 1
3938
3939 - ``V4L2_FLASH_FAULT_OVER_VOLTAGE``
3940
3941 - Flash controller voltage to the flash LED has exceeded the limit
3942 specific to the flash controller.
3943
3944 - .. row 2
3945
3946 - ``V4L2_FLASH_FAULT_TIMEOUT``
3947
3948 - The flash strobe was still on when the timeout set by the user ---
3949 V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash
3950 controllers may set this in all such conditions.
3951
3952 - .. row 3
3953
3954 - ``V4L2_FLASH_FAULT_OVER_TEMPERATURE``
3955
3956 - The flash controller has overheated.
3957
3958 - .. row 4
3959
3960 - ``V4L2_FLASH_FAULT_SHORT_CIRCUIT``
3961
3962 - The short circuit protection of the flash controller has been
3963 triggered.
3964
3965 - .. row 5
3966
3967 - ``V4L2_FLASH_FAULT_OVER_CURRENT``
3968
3969 - Current in the LED power supply has exceeded the limit specific to
3970 the flash controller.
3971
3972 - .. row 6
3973
3974 - ``V4L2_FLASH_FAULT_INDICATOR``
3975
3976 - The flash controller has detected a short or open circuit
3977 condition on the indicator LED.
3978
3979 - .. row 7
3980
3981 - ``V4L2_FLASH_FAULT_UNDER_VOLTAGE``
3982
3983 - Flash controller voltage to the flash LED has been below the
3984 minimum limit specific to the flash controller.
3985
3986 - .. row 8
3987
3988 - ``V4L2_FLASH_FAULT_INPUT_VOLTAGE``
3989
3990 - The input voltage of the flash controller is below the limit under
3991 which strobing the flash at full current will not be possible.The
3992 condition persists until this flag is no longer set.
3993
3994 - .. row 9
3995
3996 - ``V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE``
3997
3998 - The temperature of the LED has exceeded its allowed upper limit.
3999
4000
4001
4002 ``V4L2_CID_FLASH_CHARGE (boolean)``
4003 Enable or disable charging of the xenon flash capacitor.
4004
4005 ``V4L2_CID_FLASH_READY (boolean)``
4006 Is the flash ready to strobe? Xenon flashes require their capacitors
4007 charged before strobing. LED flashes often require a cooldown period
4008 after strobe during which another strobe will not be possible. This
4009 is a read-only control.
4010
4011
4012 .. _jpeg-controls:
4013
4014 JPEG Control Reference
4015 ======================
4016
4017 The JPEG class includes controls for common features of JPEG encoders
4018 and decoders. Currently it includes features for codecs implementing
4019 progressive baseline DCT compression process with Huffman entrophy
4020 coding.
4021
4022
4023 .. _jpeg-control-id:
4024
4025 JPEG Control IDs
4026 ----------------
4027
4028 ``V4L2_CID_JPEG_CLASS (class)``
4029 The JPEG class descriptor. Calling
4030 :ref:`VIDIOC_QUERYCTRL` for this control will
4031 return a description of this control class.
4032
4033 ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING (menu)``
4034 The chroma subsampling factors describe how each component of an
4035 input image is sampled, in respect to maximum sample rate in each
4036 spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more
4037 details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines
4038 how Cb and Cr components are downsampled after coverting an input
4039 image from RGB to Y'CbCr color space.
4040
4041 .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
4042
4043 .. flat-table::
4044 :header-rows: 0
4045 :stub-columns: 0
4046
4047
4048 - .. row 1
4049
4050 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_444``
4051
4052 - No chroma subsampling, each pixel has Y, Cr and Cb values.
4053
4054 - .. row 2
4055
4056 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_422``
4057
4058 - Horizontally subsample Cr, Cb components by a factor of 2.
4059
4060 - .. row 3
4061
4062 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_420``
4063
4064 - Subsample Cr, Cb components horizontally and vertically by 2.
4065
4066 - .. row 4
4067
4068 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_411``
4069
4070 - Horizontally subsample Cr, Cb components by a factor of 4.
4071
4072 - .. row 5
4073
4074 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_410``
4075
4076 - Subsample Cr, Cb components horizontally by 4 and vertically by 2.
4077
4078 - .. row 6
4079
4080 - ``V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY``
4081
4082 - Use only luminance component.
4083
4084
4085
4086 ``V4L2_CID_JPEG_RESTART_INTERVAL (integer)``
4087 The restart interval determines an interval of inserting RSTm
4088 markers (m = 0..7). The purpose of these markers is to additionally
4089 reinitialize the encoder process, in order to process blocks of an
4090 image independently. For the lossy compression processes the restart
4091 interval unit is MCU (Minimum Coded Unit) and its value is contained
4092 in DRI (Define Restart Interval) marker. If
4093 ``V4L2_CID_JPEG_RESTART_INTERVAL`` control is set to 0, DRI and RSTm
4094 markers will not be inserted.
4095
4096 .. _jpeg-quality-control:
4097
4098 ``V4L2_CID_JPEG_COMPRESSION_QUALITY (integer)``
4099 ``V4L2_CID_JPEG_COMPRESSION_QUALITY`` control determines trade-off
4100 between image quality and size. It provides simpler method for
4101 applications to control image quality, without a need for direct
4102 reconfiguration of luminance and chrominance quantization tables. In
4103 cases where a driver uses quantization tables configured directly by
4104 an application, using interfaces defined elsewhere,
4105 ``V4L2_CID_JPEG_COMPRESSION_QUALITY`` control should be set by
4106 driver to 0.
4107
4108 The value range of this control is driver-specific. Only positive,
4109 non-zero values are meaningful. The recommended range is 1 - 100,
4110 where larger values correspond to better image quality.
4111
4112 .. _jpeg-active-marker-control:
4113
4114 ``V4L2_CID_JPEG_ACTIVE_MARKER (bitmask)``
4115 Specify which JPEG markers are included in compressed stream. This
4116 control is valid only for encoders.
4117
4118
4119
4120 .. flat-table::
4121 :header-rows: 0
4122 :stub-columns: 0
4123
4124
4125 - .. row 1
4126
4127 - ``V4L2_JPEG_ACTIVE_MARKER_APP0``
4128
4129 - Application data segment APP\ :sub:`0`.
4130
4131 - .. row 2
4132
4133 - ``V4L2_JPEG_ACTIVE_MARKER_APP1``
4134
4135 - Application data segment APP\ :sub:`1`.
4136
4137 - .. row 3
4138
4139 - ``V4L2_JPEG_ACTIVE_MARKER_COM``
4140
4141 - Comment segment.
4142
4143 - .. row 4
4144
4145 - ``V4L2_JPEG_ACTIVE_MARKER_DQT``
4146
4147 - Quantization tables segment.
4148
4149 - .. row 5
4150
4151 - ``V4L2_JPEG_ACTIVE_MARKER_DHT``
4152
4153 - Huffman tables segment.
4154
4155
4156
4157 For more details about JPEG specification, refer to :ref:`itu-t81`,
4158 :ref:`jfif`, :ref:`w3c-jpeg-jfif`.
4159
4160
4161 .. _image-source-controls:
4162
4163 Image Source Control Reference
4164 ==============================
4165
4166 The Image Source control class is intended for low-level control of
4167 image source devices such as image sensors. The devices feature an
4168 analogue to digital converter and a bus transmitter to transmit the
4169 image data out of the device.
4170
4171
4172 .. _image-source-control-id:
4173
4174 Image Source Control IDs
4175 ------------------------
4176
4177 ``V4L2_CID_IMAGE_SOURCE_CLASS (class)``
4178 The IMAGE_SOURCE class descriptor.
4179
4180 ``V4L2_CID_VBLANK (integer)``
4181 Vertical blanking. The idle period after every frame during which no
4182 image data is produced. The unit of vertical blanking is a line.
4183 Every line has length of the image width plus horizontal blanking at
4184 the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the
4185 same sub-device.
4186
4187 ``V4L2_CID_HBLANK (integer)``
4188 Horizontal blanking. The idle period after every line of image data
4189 during which no image data is produced. The unit of horizontal
4190 blanking is pixels.
4191
4192 ``V4L2_CID_ANALOGUE_GAIN (integer)``
4193 Analogue gain is gain affecting all colour components in the pixel
4194 matrix. The gain operation is performed in the analogue domain
4195 before A/D conversion.
4196
4197 ``V4L2_CID_TEST_PATTERN_RED (integer)``
4198 Test pattern red colour component.
4199
4200 ``V4L2_CID_TEST_PATTERN_GREENR (integer)``
4201 Test pattern green (next to red) colour component.
4202
4203 ``V4L2_CID_TEST_PATTERN_BLUE (integer)``
4204 Test pattern blue colour component.
4205
4206 ``V4L2_CID_TEST_PATTERN_GREENB (integer)``
4207 Test pattern green (next to blue) colour component.
4208
4209
4210 .. _image-process-controls:
4211
4212 Image Process Control Reference
4213 ===============================
4214
4215 The Image Process control class is intended for low-level control of
4216 image processing functions. Unlike ``V4L2_CID_IMAGE_SOURCE_CLASS``, the
4217 controls in this class affect processing the image, and do not control
4218 capturing of it.
4219
4220
4221 .. _image-process-control-id:
4222
4223 Image Process Control IDs
4224 -------------------------
4225
4226 ``V4L2_CID_IMAGE_PROC_CLASS (class)``
4227 The IMAGE_PROC class descriptor.
4228
4229 ``V4L2_CID_LINK_FREQ (integer menu)``
4230 Data bus frequency. Together with the media bus pixel code, bus type
4231 (clock cycles per sample), the data bus frequency defines the pixel
4232 rate (``V4L2_CID_PIXEL_RATE``) in the pixel array (or possibly
4233 elsewhere, if the device is not an image sensor). The frame rate can
4234 be calculated from the pixel clock, image width and height and
4235 horizontal and vertical blanking. While the pixel rate control may
4236 be defined elsewhere than in the subdev containing the pixel array,
4237 the frame rate cannot be obtained from that information. This is
4238 because only on the pixel array it can be assumed that the vertical
4239 and horizontal blanking information is exact: no other blanking is
4240 allowed in the pixel array. The selection of frame rate is performed
4241 by selecting the desired horizontal and vertical blanking. The unit
4242 of this control is Hz.
4243
4244 ``V4L2_CID_PIXEL_RATE (64-bit integer)``
4245 Pixel rate in the source pads of the subdev. This control is
4246 read-only and its unit is pixels / second.
4247
4248 ``V4L2_CID_TEST_PATTERN (menu)``
4249 Some capture/display/sensor devices have the capability to generate
4250 test pattern images. These hardware specific test patterns can be
4251 used to test if a device is working properly.
4252
4253
4254 .. _dv-controls:
4255
4256 Digital Video Control Reference
4257 ===============================
4258
4259 The Digital Video control class is intended to control receivers and
4260 transmitters for `VGA <http://en.wikipedia.org/wiki/Vga>`__,
4261 `DVI <http://en.wikipedia.org/wiki/Digital_Visual_Interface>`__
4262 (Digital Visual Interface), HDMI (:ref:`hdmi`) and DisplayPort
4263 (:ref:`dp`). These controls are generally expected to be private to
4264 the receiver or transmitter subdevice that implements them, so they are
4265 only exposed on the ``/dev/v4l-subdev*`` device node.
4266
4267 .. note::
4268
4269 Note that these devices can have multiple input or output pads which are
4270 hooked up to e.g. HDMI connectors. Even though the subdevice will
4271 receive or transmit video from/to only one of those pads, the other pads
4272 can still be active when it comes to EDID (Extended Display
4273 Identification Data, :ref:`vesaedid`) and HDCP (High-bandwidth Digital
4274 Content Protection System, :ref:`hdcp`) processing, allowing the
4275 device to do the fairly slow EDID/HDCP handling in advance. This allows
4276 for quick switching between connectors.
4277
4278 These pads appear in several of the controls in this section as
4279 bitmasks, one bit for each pad. Bit 0 corresponds to pad 0, bit 1 to pad
4280 1, etc. The maximum value of the control is the set of valid pads.
4281
4282
4283 .. _dv-control-id:
4284
4285 Digital Video Control IDs
4286 -------------------------
4287
4288 ``V4L2_CID_DV_CLASS (class)``
4289 The Digital Video class descriptor.
4290
4291 ``V4L2_CID_DV_TX_HOTPLUG (bitmask)``
4292 Many connectors have a hotplug pin which is high if EDID information
4293 is available from the source. This control shows the state of the
4294 hotplug pin as seen by the transmitter. Each bit corresponds to an
4295 output pad on the transmitter. If an output pad does not have an
4296 associated hotplug pin, then the bit for that pad will be 0. This
4297 read-only control is applicable to DVI-D, HDMI and DisplayPort
4298 connectors.
4299
4300 ``V4L2_CID_DV_TX_RXSENSE (bitmask)``
4301 Rx Sense is the detection of pull-ups on the TMDS clock lines. This
4302 normally means that the sink has left/entered standby (i.e. the
4303 transmitter can sense that the receiver is ready to receive video).
4304 Each bit corresponds to an output pad on the transmitter. If an
4305 output pad does not have an associated Rx Sense, then the bit for
4306 that pad will be 0. This read-only control is applicable to DVI-D
4307 and HDMI devices.
4308
4309 ``V4L2_CID_DV_TX_EDID_PRESENT (bitmask)``
4310 When the transmitter sees the hotplug signal from the receiver it
4311 will attempt to read the EDID. If set, then the transmitter has read
4312 at least the first block (= 128 bytes). Each bit corresponds to an
4313 output pad on the transmitter. If an output pad does not support
4314 EDIDs, then the bit for that pad will be 0. This read-only control
4315 is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors.
4316
4317 ``V4L2_CID_DV_TX_MODE``
4318 (enum)
4319
4320 enum v4l2_dv_tx_mode -
4321 HDMI transmitters can transmit in DVI-D mode (just video) or in HDMI
4322 mode (video + audio + auxiliary data). This control selects which
4323 mode to use: V4L2_DV_TX_MODE_DVI_D or V4L2_DV_TX_MODE_HDMI.
4324 This control is applicable to HDMI connectors.
4325
4326 ``V4L2_CID_DV_TX_RGB_RANGE``
4327 (enum)
4328
4329 enum v4l2_dv_rgb_range -
4330 Select the quantization range for RGB output. V4L2_DV_RANGE_AUTO
4331 follows the RGB quantization range specified in the standard for the
4332 video interface (ie. :ref:`cea861` for HDMI).
4333 V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
4334 standard to be compatible with sinks that have not implemented the
4335 standard correctly (unfortunately quite common for HDMI and DVI-D).
4336 Full range allows all possible values to be used whereas limited
4337 range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
4338 the number of bits per component. This control is applicable to VGA,
4339 DVI-A/D, HDMI and DisplayPort connectors.
4340
4341 ``V4L2_CID_DV_TX_IT_CONTENT_TYPE``
4342 (enum)
4343
4344 enum v4l2_dv_it_content_type -
4345 Configures the IT Content Type of the transmitted video. This
4346 information is sent over HDMI and DisplayPort connectors as part of
4347 the AVI InfoFrame. The term 'IT Content' is used for content that
4348 originates from a computer as opposed to content from a TV broadcast
4349 or an analog source. The enum v4l2_dv_it_content_type defines
4350 the possible content types:
4351
4352 .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
4353
4354 .. flat-table::
4355 :header-rows: 0
4356 :stub-columns: 0
4357
4358
4359 - .. row 1
4360
4361 - ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS``
4362
4363 - Graphics content. Pixel data should be passed unfiltered and
4364 without analog reconstruction.
4365
4366 - .. row 2
4367
4368 - ``V4L2_DV_IT_CONTENT_TYPE_PHOTO``
4369
4370 - Photo content. The content is derived from digital still pictures.
4371 The content should be passed through with minimal scaling and
4372 picture enhancements.
4373
4374 - .. row 3
4375
4376 - ``V4L2_DV_IT_CONTENT_TYPE_CINEMA``
4377
4378 - Cinema content.
4379
4380 - .. row 4
4381
4382 - ``V4L2_DV_IT_CONTENT_TYPE_GAME``
4383
4384 - Game content. Audio and video latency should be minimized.
4385
4386 - .. row 5
4387
4388 - ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC``
4389
4390 - No IT Content information is available and the ITC bit in the AVI
4391 InfoFrame is set to 0.
4392
4393
4394
4395 ``V4L2_CID_DV_RX_POWER_PRESENT (bitmask)``
4396 Detects whether the receiver receives power from the source (e.g.
4397 HDMI carries 5V on one of the pins). This is often used to power an
4398 eeprom which contains EDID information, such that the source can
4399 read the EDID even if the sink is in standby/power off. Each bit
4400 corresponds to an input pad on the transmitter. If an input pad
4401 cannot detect whether power is present, then the bit for that pad
4402 will be 0. This read-only control is applicable to DVI-D, HDMI and
4403 DisplayPort connectors.
4404
4405 ``V4L2_CID_DV_RX_RGB_RANGE``
4406 (enum)
4407
4408 enum v4l2_dv_rgb_range -
4409 Select the quantization range for RGB input. V4L2_DV_RANGE_AUTO
4410 follows the RGB quantization range specified in the standard for the
4411 video interface (ie. :ref:`cea861` for HDMI).
4412 V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
4413 standard to be compatible with sources that have not implemented the
4414 standard correctly (unfortunately quite common for HDMI and DVI-D).
4415 Full range allows all possible values to be used whereas limited
4416 range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
4417 the number of bits per component. This control is applicable to VGA,
4418 DVI-A/D, HDMI and DisplayPort connectors.
4419
4420 ``V4L2_CID_DV_RX_IT_CONTENT_TYPE``
4421 (enum)
4422
4423 enum v4l2_dv_it_content_type -
4424 Reads the IT Content Type of the received video. This information is
4425 sent over HDMI and DisplayPort connectors as part of the AVI
4426 InfoFrame. The term 'IT Content' is used for content that originates
4427 from a computer as opposed to content from a TV broadcast or an
4428 analog source. See ``V4L2_CID_DV_TX_IT_CONTENT_TYPE`` for the
4429 available content types.
4430
4431
4432 .. _fm-rx-controls:
4433
4434 FM Receiver Control Reference
4435 =============================
4436
4437 The FM Receiver (FM_RX) class includes controls for common features of
4438 FM Reception capable devices.
4439
4440
4441 .. _fm-rx-control-id:
4442
4443 FM_RX Control IDs
4444 -----------------
4445
4446 ``V4L2_CID_FM_RX_CLASS (class)``
4447 The FM_RX class descriptor. Calling
4448 :ref:`VIDIOC_QUERYCTRL` for this control will
4449 return a description of this control class.
4450
4451 ``V4L2_CID_RDS_RECEPTION (boolean)``
4452 Enables/disables RDS reception by the radio tuner
4453
4454 ``V4L2_CID_RDS_RX_PTY (integer)``
4455 Gets RDS Programme Type field. This encodes up to 31 pre-defined
4456 programme types.
4457
4458 ``V4L2_CID_RDS_RX_PS_NAME (string)``
4459 Gets the Programme Service name (PS_NAME). It is intended for
4460 static display on a receiver. It is the primary aid to listeners in
4461 programme service identification and selection. In Annex E of
4462 :ref:`iec62106`, the RDS specification, there is a full
4463 description of the correct character encoding for Programme Service
4464 name strings. Also from RDS specification, PS is usually a single
4465 eight character text. However, it is also possible to find receivers
4466 which can scroll strings sized as 8 x N characters. So, this control
4467 must be configured with steps of 8 characters. The result is it must
4468 always contain a string with size multiple of 8.
4469
4470 ``V4L2_CID_RDS_RX_RADIO_TEXT (string)``
4471 Gets the Radio Text info. It is a textual description of what is
4472 being broadcasted. RDS Radio Text can be applied when broadcaster
4473 wishes to transmit longer PS names, programme-related information or
4474 any other text. In these cases, RadioText can be used in addition to
4475 ``V4L2_CID_RDS_RX_PS_NAME``. The encoding for Radio Text strings is
4476 also fully described in Annex E of :ref:`iec62106`. The length of
4477 Radio Text strings depends on which RDS Block is being used to
4478 transmit it, either 32 (2A block) or 64 (2B block). However, it is
4479 also possible to find receivers which can scroll strings sized as 32
4480 x N or 64 x N characters. So, this control must be configured with
4481 steps of 32 or 64 characters. The result is it must always contain a
4482 string with size multiple of 32 or 64.
4483
4484 ``V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (boolean)``
4485 If set, then a traffic announcement is in progress.
4486
4487 ``V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (boolean)``
4488 If set, then the tuned programme carries traffic announcements.
4489
4490 ``V4L2_CID_RDS_RX_MUSIC_SPEECH (boolean)``
4491 If set, then this channel broadcasts music. If cleared, then it
4492 broadcasts speech. If the transmitter doesn't make this distinction,
4493 then it will be set.
4494
4495 ``V4L2_CID_TUNE_DEEMPHASIS``
4496 (enum)
4497
4498 enum v4l2_deemphasis -
4499 Configures the de-emphasis value for reception. A de-emphasis filter
4500 is applied to the broadcast to accentuate the high audio
4501 frequencies. Depending on the region, a time constant of either 50
4502 or 75 useconds is used. The enum v4l2_deemphasis defines possible
4503 values for de-emphasis. Here they are:
4504
4505
4506
4507 .. flat-table::
4508 :header-rows: 0
4509 :stub-columns: 0
4510
4511
4512 - .. row 1
4513
4514 - ``V4L2_DEEMPHASIS_DISABLED``
4515
4516 - No de-emphasis is applied.
4517
4518 - .. row 2
4519
4520 - ``V4L2_DEEMPHASIS_50_uS``
4521
4522 - A de-emphasis of 50 uS is used.
4523
4524 - .. row 3
4525
4526 - ``V4L2_DEEMPHASIS_75_uS``
4527
4528 - A de-emphasis of 75 uS is used.
4529
4530
4531
4532
4533 .. _detect-controls:
4534
4535 Detect Control Reference
4536 ========================
4537
4538 The Detect class includes controls for common features of various motion
4539 or object detection capable devices.
4540
4541
4542 .. _detect-control-id:
4543
4544 Detect Control IDs
4545 ------------------
4546
4547 ``V4L2_CID_DETECT_CLASS (class)``
4548 The Detect class descriptor. Calling
4549 :ref:`VIDIOC_QUERYCTRL` for this control will
4550 return a description of this control class.
4551
4552 ``V4L2_CID_DETECT_MD_MODE (menu)``
4553 Sets the motion detection mode.
4554
4555 .. tabularcolumns:: |p{7.5cm}|p{10.0cm}|
4556
4557 .. flat-table::
4558 :header-rows: 0
4559 :stub-columns: 0
4560
4561
4562 - .. row 1
4563
4564 - ``V4L2_DETECT_MD_MODE_DISABLED``
4565
4566 - Disable motion detection.
4567
4568 - .. row 2
4569
4570 - ``V4L2_DETECT_MD_MODE_GLOBAL``
4571
4572 - Use a single motion detection threshold.
4573
4574 - .. row 3
4575
4576 - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID``
4577
4578 - The image is divided into a grid, each cell with its own motion
4579 detection threshold. These thresholds are set through the
4580 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control.
4581
4582 - .. row 4
4583
4584 - ``V4L2_DETECT_MD_MODE_REGION_GRID``
4585
4586 - The image is divided into a grid, each cell with its own region
4587 value that specifies which per-region motion detection thresholds
4588 should be used. Each region has its own thresholds. How these
4589 per-region thresholds are set up is driver-specific. The region
4590 values for the grid are set through the
4591 ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control.
4592
4593
4594
4595 ``V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (integer)``
4596 Sets the global motion detection threshold to be used with the
4597 ``V4L2_DETECT_MD_MODE_GLOBAL`` motion detection mode.
4598
4599 ``V4L2_CID_DETECT_MD_THRESHOLD_GRID (__u16 matrix)``
4600 Sets the motion detection thresholds for each cell in the grid. To
4601 be used with the ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` motion
4602 detection mode. Matrix element (0, 0) represents the cell at the
4603 top-left of the grid.
4604
4605 ``V4L2_CID_DETECT_MD_REGION_GRID (__u8 matrix)``
4606 Sets the motion detection region value for each cell in the grid. To
4607 be used with the ``V4L2_DETECT_MD_MODE_REGION_GRID`` motion
4608 detection mode. Matrix element (0, 0) represents the cell at the
4609 top-left of the grid.
4610
4611
4612 .. _rf-tuner-controls:
4613
4614 RF Tuner Control Reference
4615 ==========================
4616
4617 The RF Tuner (RF_TUNER) class includes controls for common features of
4618 devices having RF tuner.
4619
4620 In this context, RF tuner is radio receiver circuit between antenna and
4621 demodulator. It receives radio frequency (RF) from the antenna and
4622 converts that received signal to lower intermediate frequency (IF) or
4623 baseband frequency (BB). Tuners that could do baseband output are often
4624 called Zero-IF tuners. Older tuners were typically simple PLL tuners
4625 inside a metal box, whilst newer ones are highly integrated chips
4626 without a metal box "silicon tuners". These controls are mostly
4627 applicable for new feature rich silicon tuners, just because older
4628 tuners does not have much adjustable features.
4629
4630 For more information about RF tuners see
4631 `Tuner (radio) <http://en.wikipedia.org/wiki/Tuner_%28radio%29>`__
4632 and `RF front end <http://en.wikipedia.org/wiki/RF_front_end>`__
4633 from Wikipedia.
4634
4635
4636 .. _rf-tuner-control-id:
4637
4638 RF_TUNER Control IDs
4639 --------------------
4640
4641 ``V4L2_CID_RF_TUNER_CLASS (class)``
4642 The RF_TUNER class descriptor. Calling
4643 :ref:`VIDIOC_QUERYCTRL` for this control will
4644 return a description of this control class.
4645
4646 ``V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (boolean)``
4647 Enables/disables tuner radio channel bandwidth configuration. In
4648 automatic mode bandwidth configuration is performed by the driver.
4649
4650 ``V4L2_CID_RF_TUNER_BANDWIDTH (integer)``
4651 Filter(s) on tuner signal path are used to filter signal according
4652 to receiving party needs. Driver configures filters to fulfill
4653 desired bandwidth requirement. Used when
4654 V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not set. Unit is in Hz. The
4655 range and step are driver-specific.
4656
4657 ``V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (boolean)``
4658 Enables/disables LNA automatic gain control (AGC)
4659
4660 ``V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (boolean)``
4661 Enables/disables mixer automatic gain control (AGC)
4662
4663 ``V4L2_CID_RF_TUNER_IF_GAIN_AUTO (boolean)``
4664 Enables/disables IF automatic gain control (AGC)
4665
4666 ``V4L2_CID_RF_TUNER_RF_GAIN (integer)``
4667 The RF amplifier is the very first amplifier on the receiver signal
4668 path, just right after the antenna input. The difference between the
4669 LNA gain and the RF gain in this document is that the LNA gain is
4670 integrated in the tuner chip while the RF gain is a separate chip.
4671 There may be both RF and LNA gain controls in the same device. The
4672 range and step are driver-specific.
4673
4674 ``V4L2_CID_RF_TUNER_LNA_GAIN (integer)``
4675 LNA (low noise amplifier) gain is first gain stage on the RF tuner
4676 signal path. It is located very close to tuner antenna input. Used
4677 when ``V4L2_CID_RF_TUNER_LNA_GAIN_AUTO`` is not set. See
4678 ``V4L2_CID_RF_TUNER_RF_GAIN`` to understand how RF gain and LNA gain
4679 differs from the each others. The range and step are
4680 driver-specific.
4681
4682 ``V4L2_CID_RF_TUNER_MIXER_GAIN (integer)``
4683 Mixer gain is second gain stage on the RF tuner signal path. It is
4684 located inside mixer block, where RF signal is down-converted by the
4685 mixer. Used when ``V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO`` is not set.
4686 The range and step are driver-specific.
4687
4688 ``V4L2_CID_RF_TUNER_IF_GAIN (integer)``
4689 IF gain is last gain stage on the RF tuner signal path. It is
4690 located on output of RF tuner. It controls signal level of
4691 intermediate frequency output or baseband output. Used when
4692 ``V4L2_CID_RF_TUNER_IF_GAIN_AUTO`` is not set. The range and step
4693 are driver-specific.
4694
4695 ``V4L2_CID_RF_TUNER_PLL_LOCK (boolean)``
4696 Is synthesizer PLL locked? RF tuner is receiving given frequency
4697 when that control is set. This is a read-only control.
4698
4699 .. [#f1]
4700 This control may be changed to a menu control in the future, if more
4701 options are required.
This page took 0.139096 seconds and 5 git commands to generate.