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