]> Pileus Git - ~andy/linux/blob - Documentation/DocBook/media/v4l/controls.xml
[media] V4L: Add camera exposure metering control
[~andy/linux] / Documentation / DocBook / media / v4l / controls.xml
1   <section id="control">
2     <title>User Controls</title>
3
4     <para>Devices typically have a number of user-settable controls
5 such as brightness, saturation and so on, which would be presented to
6 the user on a graphical user interface. But, different devices
7 will have different controls available, and furthermore, the range of
8 possible values, and the default value will vary from device to
9 device. The control ioctls provide the information and a mechanism to
10 create a nice user interface for these controls that will work
11 correctly with any device.</para>
12
13     <para>All controls are accessed using an ID value. V4L2 defines
14 several IDs for specific purposes. Drivers can also implement their
15 own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant>
16 and higher values. The pre-defined control IDs have the prefix
17 <constant>V4L2_CID_</constant>, and are listed in <xref
18 linkend="control-id" />. The ID is used when querying the attributes of
19 a control, and when getting or setting the current value.</para>
20
21     <para>Generally applications should present controls to the user
22 without assumptions about their purpose. Each control comes with a
23 name string the user is supposed to understand. When the purpose is
24 non-intuitive the driver writer should provide a user manual, a user
25 interface plug-in or a driver specific panel application. Predefined
26 IDs were introduced to change a few controls programmatically, for
27 example to mute a device during a channel switch.</para>
28
29     <para>Drivers may enumerate different controls after switching
30 the current video input or output, tuner or modulator, or audio input
31 or output. Different in the sense of other bounds, another default and
32 current value, step size or other menu items. A control with a certain
33 <emphasis>custom</emphasis> ID can also change name and
34 type.<footnote>
35         <para>It will be more convenient for applications if drivers
36 make use of the <constant>V4L2_CTRL_FLAG_DISABLED</constant> flag, but
37 that was never required.</para>
38       </footnote> Control values are stored globally, they do not
39 change when switching except to stay within the reported bounds. They
40 also do not change &eg; when the device is opened or closed, when the
41 tuner radio frequency is changed or generally never without
42 application request. Since V4L2 specifies no event mechanism, panel
43 applications intended to cooperate with other panel applications (be
44 they built into a larger application, as a TV viewer) may need to
45 regularly poll control values to update their user
46 interface.<footnote>
47         <para>Applications could call an ioctl to request events.
48 After another process called &VIDIOC-S-CTRL; or another ioctl changing
49 shared properties the &func-select; function would indicate
50 readability until any ioctl (querying the properties) is
51 called.</para>
52       </footnote></para>
53
54     <para>
55       All controls use machine endianness.
56     </para>
57
58     <table pgwide="1" frame="none" id="control-id">
59       <title>Control IDs</title>
60       <tgroup cols="3">
61         &cs-def;
62         <thead>
63           <row>
64             <entry>ID</entry>
65             <entry>Type</entry>
66             <entry>Description</entry>
67           </row>
68         </thead>
69         <tbody valign="top">
70           <row>
71             <entry><constant>V4L2_CID_BASE</constant></entry>
72             <entry></entry>
73             <entry>First predefined ID, equal to
74 <constant>V4L2_CID_BRIGHTNESS</constant>.</entry>
75           </row>
76           <row>
77             <entry><constant>V4L2_CID_USER_BASE</constant></entry>
78             <entry></entry>
79             <entry>Synonym of <constant>V4L2_CID_BASE</constant>.</entry>
80           </row>
81           <row>
82             <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry>
83             <entry>integer</entry>
84             <entry>Picture brightness, or more precisely, the black
85 level.</entry>
86           </row>
87           <row>
88             <entry><constant>V4L2_CID_CONTRAST</constant></entry>
89             <entry>integer</entry>
90             <entry>Picture contrast or luma gain.</entry>
91           </row>
92           <row>
93             <entry><constant>V4L2_CID_SATURATION</constant></entry>
94             <entry>integer</entry>
95             <entry>Picture color saturation or chroma gain.</entry>
96           </row>
97           <row>
98             <entry><constant>V4L2_CID_HUE</constant></entry>
99             <entry>integer</entry>
100             <entry>Hue or color balance.</entry>
101           </row>
102           <row>
103             <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry>
104             <entry>integer</entry>
105             <entry>Overall audio volume. Note some drivers also
106 provide an OSS or ALSA mixer interface.</entry>
107           </row>
108           <row>
109             <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry>
110             <entry>integer</entry>
111             <entry>Audio stereo balance. Minimum corresponds to all
112 the way left, maximum to right.</entry>
113           </row>
114           <row>
115             <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry>
116             <entry>integer</entry>
117             <entry>Audio bass adjustment.</entry>
118           </row>
119           <row>
120             <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry>
121             <entry>integer</entry>
122             <entry>Audio treble adjustment.</entry>
123           </row>
124           <row>
125             <entry><constant>V4L2_CID_AUDIO_MUTE</constant></entry>
126             <entry>boolean</entry>
127             <entry>Mute audio, &ie; set the volume to zero, however
128 without affecting <constant>V4L2_CID_AUDIO_VOLUME</constant>. Like
129 ALSA drivers, V4L2 drivers must mute at load time to avoid excessive
130 noise. Actually the entire device should be reset to a low power
131 consumption state.</entry>
132           </row>
133           <row>
134             <entry><constant>V4L2_CID_AUDIO_LOUDNESS</constant></entry>
135             <entry>boolean</entry>
136             <entry>Loudness mode (bass boost).</entry>
137           </row>
138           <row>
139             <entry><constant>V4L2_CID_BLACK_LEVEL</constant></entry>
140             <entry>integer</entry>
141             <entry>Another name for brightness (not a synonym of
142 <constant>V4L2_CID_BRIGHTNESS</constant>). This control is deprecated
143 and should not be used in new drivers and applications.</entry>
144           </row>
145           <row>
146             <entry><constant>V4L2_CID_AUTO_WHITE_BALANCE</constant></entry>
147             <entry>boolean</entry>
148             <entry>Automatic white balance (cameras).</entry>
149           </row>
150           <row>
151             <entry><constant>V4L2_CID_DO_WHITE_BALANCE</constant></entry>
152             <entry>button</entry>
153             <entry>This is an action control. When set (the value is
154 ignored), the device will do a white balance and then hold the current
155 setting. Contrast this with the boolean
156 <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant>, which, when
157 activated, keeps adjusting the white balance.</entry>
158           </row>
159           <row>
160             <entry><constant>V4L2_CID_RED_BALANCE</constant></entry>
161             <entry>integer</entry>
162             <entry>Red chroma balance.</entry>
163           </row>
164           <row>
165             <entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry>
166             <entry>integer</entry>
167             <entry>Blue chroma balance.</entry>
168           </row>
169           <row>
170             <entry><constant>V4L2_CID_GAMMA</constant></entry>
171             <entry>integer</entry>
172             <entry>Gamma adjust.</entry>
173           </row>
174           <row>
175             <entry><constant>V4L2_CID_WHITENESS</constant></entry>
176             <entry>integer</entry>
177             <entry>Whiteness for grey-scale devices. This is a synonym
178 for <constant>V4L2_CID_GAMMA</constant>. This control is deprecated
179 and should not be used in new drivers and applications.</entry>
180           </row>
181           <row>
182             <entry><constant>V4L2_CID_EXPOSURE</constant></entry>
183             <entry>integer</entry>
184             <entry>Exposure (cameras). [Unit?]</entry>
185           </row>
186           <row>
187             <entry><constant>V4L2_CID_AUTOGAIN</constant></entry>
188             <entry>boolean</entry>
189             <entry>Automatic gain/exposure control.</entry>
190           </row>
191           <row>
192             <entry><constant>V4L2_CID_GAIN</constant></entry>
193             <entry>integer</entry>
194             <entry>Gain control.</entry>
195           </row>
196           <row>
197             <entry><constant>V4L2_CID_HFLIP</constant></entry>
198             <entry>boolean</entry>
199             <entry>Mirror the picture horizontally.</entry>
200           </row>
201           <row>
202             <entry><constant>V4L2_CID_VFLIP</constant></entry>
203             <entry>boolean</entry>
204             <entry>Mirror the picture vertically.</entry>
205           </row>
206         <row>
207           <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
208             <entry>integer</entry>
209             <entry>Horizontal image centering. This control is
210 deprecated. New drivers and applications should use the <link
211 linkend="camera-controls">Camera class controls</link>
212 <constant>V4L2_CID_PAN_ABSOLUTE</constant>,
213 <constant>V4L2_CID_PAN_RELATIVE</constant> and
214 <constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
215           </row>
216           <row>
217             <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
218             (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
219             <entry>integer</entry>
220             <entry>Vertical image centering. Centering is intended to
221 <emphasis>physically</emphasis> adjust cameras. For image cropping see
222 <xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
223 control is deprecated. New drivers and applications should use the
224 <link linkend="camera-controls">Camera class controls</link>
225 <constant>V4L2_CID_TILT_ABSOLUTE</constant>,
226 <constant>V4L2_CID_TILT_RELATIVE</constant> and
227 <constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
228           </row>
229           <row id="v4l2-power-line-frequency">
230             <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
231             <entry>enum</entry>
232             <entry>Enables a power line frequency filter to avoid
233 flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are:
234 <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
235 <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1),
236 <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2) and
237 <constant>V4L2_CID_POWER_LINE_FREQUENCY_AUTO</constant> (3).</entry>
238           </row>
239           <row>
240             <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
241             <entry>boolean</entry>
242             <entry>Enables automatic hue control by the device. The
243 effect of setting <constant>V4L2_CID_HUE</constant> while automatic
244 hue control is enabled is undefined, drivers should ignore such
245 request.</entry>
246           </row>
247           <row>
248             <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry>
249             <entry>integer</entry>
250             <entry>This control specifies the white balance settings
251 as a color temperature in Kelvin. A driver should have a minimum of
252 2800 (incandescent) to 6500 (daylight). For more information about
253 color temperature see <ulink
254 url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry>
255           </row>
256           <row>
257             <entry><constant>V4L2_CID_SHARPNESS</constant></entry>
258             <entry>integer</entry>
259             <entry>Adjusts the sharpness filters in a camera. The
260 minimum value disables the filters, higher values give a sharper
261 picture.</entry>
262           </row>
263           <row>
264             <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry>
265             <entry>integer</entry>
266             <entry>Adjusts the backlight compensation in a camera. The
267 minimum value disables backlight compensation.</entry>
268           </row>
269           <row>
270             <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
271             <entry>boolean</entry>
272             <entry>Chroma automatic gain control.</entry>
273           </row>
274           <row>
275             <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
276             <entry>integer</entry>
277             <entry>Adjusts the Chroma gain control (for use when chroma AGC
278             is disabled).</entry>
279           </row>
280           <row>
281             <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
282             <entry>boolean</entry>
283             <entry>Enable the color killer (&ie; force a black &amp; white image in case of a weak video signal).</entry>
284           </row>
285           <row id="v4l2-colorfx">
286             <entry><constant>V4L2_CID_COLORFX</constant></entry>
287             <entry>enum</entry>
288             <entry>Selects a color effect. The following values are defined:
289             </entry>
290           </row><row>
291           <entry></entry>
292           <entry></entry>
293             <entrytbl spanname="descr" cols="2">
294               <tbody valign="top">
295                 <row>
296                   <entry><constant>V4L2_COLORFX_NONE</constant>&nbsp;</entry>
297                   <entry>Color effect is disabled.</entry>
298                 </row>
299                 <row>
300                   <entry><constant>V4L2_COLORFX_ANTIQUE</constant>&nbsp;</entry>
301                   <entry>An aging (old photo) effect.</entry>
302                 </row>
303                 <row>
304                   <entry><constant>V4L2_COLORFX_ART_FREEZE</constant>&nbsp;</entry>
305                   <entry>Frost color effect.</entry>
306                 </row>
307                 <row>
308                   <entry><constant>V4L2_COLORFX_AQUA</constant>&nbsp;</entry>
309                   <entry>Water color, cool tone.</entry>
310                 </row>
311                 <row>
312                   <entry><constant>V4L2_COLORFX_BW</constant>&nbsp;</entry>
313                   <entry>Black and white.</entry>
314                 </row>
315                 <row>
316                   <entry><constant>V4L2_COLORFX_EMBOSS</constant>&nbsp;</entry>
317                   <entry>Emboss, the highlights and shadows replace light/dark boundaries
318                   and low contrast areas are set to a gray background.</entry>
319                 </row>
320                 <row>
321                   <entry><constant>V4L2_COLORFX_GRASS_GREEN</constant>&nbsp;</entry>
322                   <entry>Grass green.</entry>
323                 </row>
324                 <row>
325                   <entry><constant>V4L2_COLORFX_NEGATIVE</constant>&nbsp;</entry>
326                   <entry>Negative.</entry>
327                 </row>
328                 <row>
329                   <entry><constant>V4L2_COLORFX_SEPIA</constant>&nbsp;</entry>
330                   <entry>Sepia tone.</entry>
331                 </row>
332                 <row>
333                   <entry><constant>V4L2_COLORFX_SKETCH</constant>&nbsp;</entry>
334                   <entry>Sketch.</entry>
335                 </row>
336                 <row>
337                   <entry><constant>V4L2_COLORFX_SKIN_WHITEN</constant>&nbsp;</entry>
338                   <entry>Skin whiten.</entry>
339                 </row>
340                 <row>
341                   <entry><constant>V4L2_COLORFX_SKY_BLUE</constant>&nbsp;</entry>
342                   <entry>Sky blue.</entry>
343                 </row>
344                 <row>
345                   <entry><constant>V4L2_COLORFX_SOLARIZATION</constant>&nbsp;</entry>
346                   <entry>Solarization, the image is partially reversed in tone,
347                   only color values above or below a certain threshold are inverted.
348                   </entry>
349                 </row>
350                 <row>
351                   <entry><constant>V4L2_COLORFX_SILHOUETTE</constant>&nbsp;</entry>
352                   <entry>Silhouette (outline).</entry>
353                 </row>
354                 <row>
355                   <entry><constant>V4L2_COLORFX_VIVID</constant>&nbsp;</entry>
356                   <entry>Vivid colors.</entry>
357                 </row>
358                 <row>
359                   <entry><constant>V4L2_COLORFX_SET_CBCR</constant>&nbsp;</entry>
360                   <entry>The Cb and Cr chroma components are replaced by fixed
361                   coefficients determined by <constant>V4L2_CID_COLORFX_CBCR</constant>
362                   control.</entry>
363                 </row>
364               </tbody>
365             </entrytbl>
366           </row>
367           <row>
368             <entry><constant>V4L2_CID_COLORFX_CBCR</constant></entry>
369             <entry>integer</entry>
370             <entry>Determines the Cb and Cr coefficients for <constant>V4L2_COLORFX_SET_CBCR</constant>
371             color effect. Bits [7:0] of the supplied 32 bit value are interpreted as
372             Cr component, bits [15:8] as Cb component and bits [31:16] must be zero.
373           </entry>
374           </row>
375           <row>
376             <entry><constant>V4L2_CID_ROTATE</constant></entry>
377             <entry>integer</entry>
378             <entry>Rotates the image by specified angle. Common angles are 90,
379             270 and 180. Rotating the image to 90 and 270 will reverse the height
380             and width of the display window. It is necessary to set the new height and
381             width of the picture using the &VIDIOC-S-FMT; ioctl according to
382             the rotation angle selected.</entry>
383           </row>
384           <row>
385             <entry><constant>V4L2_CID_BG_COLOR</constant></entry>
386             <entry>integer</entry>
387             <entry>Sets the background color on the current output device.
388             Background color needs to be specified in the RGB24 format. The
389             supplied 32 bit value is interpreted as bits 0-7 Red color information,
390             bits 8-15 Green color information, bits 16-23 Blue color
391             information and bits 24-31 must be zero.</entry>
392           </row>
393           <row>
394             <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
395                 <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
396             <entry>boolean</entry>
397             <entry>Switch on or off the illuminator 1 or 2 of the device
398                 (usually a microscope).</entry>
399           </row>
400           <row>
401             <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_CAPTURE</constant></entry>
402             <entry>integer</entry>
403             <entry>This is a read-only control that can be read by the application
404 and used as a hint to determine the number of CAPTURE buffers to pass to REQBUFS.
405 The value is the minimum number of CAPTURE buffers that is necessary for hardware
406 to work.</entry>
407           </row>
408           <row>
409             <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_OUTPUT</constant></entry>
410             <entry>integer</entry>
411             <entry>This is a read-only control that can be read by the application
412 and used as a hint to determine the number of OUTPUT buffers to pass to REQBUFS.
413 The value is the minimum number of OUTPUT buffers that is necessary for hardware
414 to work.</entry>
415           </row>
416           <row id="v4l2-alpha-component">
417             <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry>
418             <entry>integer</entry>
419             <entry> Sets the alpha color component on the capture device or on
420             the capture buffer queue of a mem-to-mem device. When a mem-to-mem
421             device produces frame format that includes an alpha component
422             (e.g. <link linkend="rgb-formats">packed RGB image formats</link>)
423             and the alpha value is not defined by the mem-to-mem input data
424             this control lets you select the alpha component value of all
425             pixels. It is applicable to any pixel format that contains an alpha
426             component.
427             </entry>
428           </row>
429           <row>
430             <entry><constant>V4L2_CID_LASTP1</constant></entry>
431             <entry></entry>
432             <entry>End of the predefined control IDs (currently
433               <constant>V4L2_CID_ALPHA_COMPONENT</constant> + 1).</entry>
434           </row>
435           <row>
436             <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
437             <entry></entry>
438             <entry>ID of the first custom (driver specific) control.
439 Applications depending on particular custom controls should check the
440 driver name and version, see <xref linkend="querycap" />.</entry>
441           </row>
442         </tbody>
443       </tgroup>
444     </table>
445
446     <para>Applications can enumerate the available controls with the
447 &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a
448 control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls.
449 Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
450 <constant>VIDIOC_G_CTRL</constant> and
451 <constant>VIDIOC_S_CTRL</constant> when the device has one or more
452 controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
453 more menu type controls.</para>
454
455     <example>
456       <title>Enumerating all controls</title>
457
458       <programlisting>
459 &v4l2-queryctrl; queryctrl;
460 &v4l2-querymenu; querymenu;
461
462 static void
463 enumerate_menu (void)
464 {
465         printf ("  Menu items:\n");
466
467         memset (&amp;querymenu, 0, sizeof (querymenu));
468         querymenu.id = queryctrl.id;
469
470         for (querymenu.index = queryctrl.minimum;
471              querymenu.index &lt;= queryctrl.maximum;
472               querymenu.index++) {
473                 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
474                         printf ("  %s\n", querymenu.name);
475                 }
476         }
477 }
478
479 memset (&amp;queryctrl, 0, sizeof (queryctrl));
480
481 for (queryctrl.id = V4L2_CID_BASE;
482      queryctrl.id &lt; V4L2_CID_LASTP1;
483      queryctrl.id++) {
484         if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
485                 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
486                         continue;
487
488                 printf ("Control %s\n", queryctrl.name);
489
490                 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
491                         enumerate_menu ();
492         } else {
493                 if (errno == EINVAL)
494                         continue;
495
496                 perror ("VIDIOC_QUERYCTRL");
497                 exit (EXIT_FAILURE);
498         }
499 }
500
501 for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
502      queryctrl.id++) {
503         if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
504                 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
505                         continue;
506
507                 printf ("Control %s\n", queryctrl.name);
508
509                 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
510                         enumerate_menu ();
511         } else {
512                 if (errno == EINVAL)
513                         break;
514
515                 perror ("VIDIOC_QUERYCTRL");
516                 exit (EXIT_FAILURE);
517         }
518 }
519 </programlisting>
520     </example>
521
522     <example>
523       <title>Changing controls</title>
524
525       <programlisting>
526 &v4l2-queryctrl; queryctrl;
527 &v4l2-control; control;
528
529 memset (&amp;queryctrl, 0, sizeof (queryctrl));
530 queryctrl.id = V4L2_CID_BRIGHTNESS;
531
532 if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
533         if (errno != EINVAL) {
534                 perror ("VIDIOC_QUERYCTRL");
535                 exit (EXIT_FAILURE);
536         } else {
537                 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
538         }
539 } else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) {
540         printf ("V4L2_CID_BRIGHTNESS is not supported\n");
541 } else {
542         memset (&amp;control, 0, sizeof (control));
543         control.id = V4L2_CID_BRIGHTNESS;
544         control.value = queryctrl.default_value;
545
546         if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)) {
547                 perror ("VIDIOC_S_CTRL");
548                 exit (EXIT_FAILURE);
549         }
550 }
551
552 memset (&amp;control, 0, sizeof (control));
553 control.id = V4L2_CID_CONTRAST;
554
555 if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &amp;control)) {
556         control.value += 1;
557
558         /* The driver may clamp the value or return ERANGE, ignored here */
559
560         if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)
561             &amp;&amp; errno != ERANGE) {
562                 perror ("VIDIOC_S_CTRL");
563                 exit (EXIT_FAILURE);
564         }
565 /* Ignore if V4L2_CID_CONTRAST is unsupported */
566 } else if (errno != EINVAL) {
567         perror ("VIDIOC_G_CTRL");
568         exit (EXIT_FAILURE);
569 }
570
571 control.id = V4L2_CID_AUDIO_MUTE;
572 control.value = TRUE; /* silence */
573
574 /* Errors ignored */
575 ioctl (fd, VIDIOC_S_CTRL, &amp;control);
576 </programlisting>
577     </example>
578   </section>
579
580   <section id="extended-controls">
581     <title>Extended Controls</title>
582
583     <section>
584       <title>Introduction</title>
585
586       <para>The control mechanism as originally designed was meant
587 to be used for user settings (brightness, saturation, etc). However,
588 it turned out to be a very useful model for implementing more
589 complicated driver APIs where each driver implements only a subset of
590 a larger API.</para>
591
592       <para>The MPEG encoding API was the driving force behind
593 designing and implementing this extended control mechanism: the MPEG
594 standard is quite large and the currently supported hardware MPEG
595 encoders each only implement a subset of this standard. Further more,
596 many parameters relating to how the video is encoded into an MPEG
597 stream are specific to the MPEG encoding chip since the MPEG standard
598 only defines the format of the resulting MPEG stream, not how the
599 video is actually encoded into that format.</para>
600
601       <para>Unfortunately, the original control API lacked some
602 features needed for these new uses and so it was extended into the
603 (not terribly originally named) extended control API.</para>
604
605       <para>Even though the MPEG encoding API was the first effort
606 to use the Extended Control API, nowadays there are also other classes
607 of Extended Controls, such as Camera Controls and FM Transmitter Controls.
608 The Extended Controls API as well as all Extended Controls classes are
609 described in the following text.</para>
610     </section>
611
612     <section>
613       <title>The Extended Control API</title>
614
615       <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;,
616 &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on
617 arrays of controls (as opposed to the &VIDIOC-G-CTRL; and
618 &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed
619 since it is often required to atomically change several controls at
620 once.</para>
621
622       <para>Each of the new ioctls expects a pointer to a
623 &v4l2-ext-controls;. This structure contains a pointer to the control
624 array, a count of the number of controls in that array and a control
625 class. Control classes are used to group similar controls into a
626 single class. For example, control class
627 <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls
628 (&ie; all controls that can also be set using the old
629 <constant>VIDIOC_S_CTRL</constant> ioctl). Control class
630 <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls
631 relating to MPEG encoding, etc.</para>
632
633       <para>All controls in the control array must belong to the
634 specified control class. An error is returned if this is not the
635 case.</para>
636
637       <para>It is also possible to use an empty control array (count
638 == 0) to check whether the specified control class is
639 supported.</para>
640
641       <para>The control array is a &v4l2-ext-control; array. The
642 <structname>v4l2_ext_control</structname> structure is very similar to
643 &v4l2-control;, except for the fact that it also allows for 64-bit
644 values and pointers to be passed.</para>
645
646       <para>It is important to realize that due to the flexibility of
647 controls it is necessary to check whether the control you want to set
648 actually is supported in the driver and what the valid range of values
649 is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to
650 check this. Also note that it is possible that some of the menu
651 indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant>
652 may not be supported (<constant>VIDIOC_QUERYMENU</constant> will
653 return an error). A good example is the list of supported MPEG audio
654 bitrates. Some drivers only support one or two bitrates, others
655 support a wider range.</para>
656
657       <para>
658         All controls use machine endianness.
659       </para>
660     </section>
661
662     <section>
663       <title>Enumerating Extended Controls</title>
664
665       <para>The recommended way to enumerate over the extended
666 controls is by using &VIDIOC-QUERYCTRL; in combination with the
667 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para>
668
669       <informalexample>
670         <programlisting>
671 &v4l2-queryctrl; qctrl;
672
673 qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
674 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
675         /* ... */
676         qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
677 }
678 </programlisting>
679       </informalexample>
680
681       <para>The initial control ID is set to 0 ORed with the
682 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The
683 <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first
684 control with a higher ID than the specified one. When no such controls
685 are found an error is returned.</para>
686
687       <para>If you want to get all controls within a specific control
688 class, then you can set the initial
689 <structfield>qctrl.id</structfield> value to the control class and add
690 an extra check to break out of the loop when a control of another
691 control class is found:</para>
692
693       <informalexample>
694         <programlisting>
695 qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
696 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
697         if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG)
698                 break;
699                 /* ... */
700                 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
701         }
702 </programlisting>
703       </informalexample>
704
705       <para>The 32-bit <structfield>qctrl.id</structfield> value is
706 subdivided into three bit ranges: the top 4 bits are reserved for
707 flags (&eg; <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not
708 actually part of the ID. The remaining 28 bits form the control ID, of
709 which the most significant 12 bits define the control class and the
710 least significant 16 bits identify the control within the control
711 class. It is guaranteed that these last 16 bits are always non-zero
712 for controls. The range of 0x1000 and up are reserved for
713 driver-specific controls. The macro
714 <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class
715 ID based on a control ID.</para>
716
717       <para>If the driver does not support extended controls, then
718 <constant>VIDIOC_QUERYCTRL</constant> will fail when used in
719 combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
720 that case the old method of enumerating control should be used (see
721 1.8). But if it is supported, then it is guaranteed to enumerate over
722 all controls, including driver-private controls.</para>
723     </section>
724
725     <section>
726       <title>Creating Control Panels</title>
727
728       <para>It is possible to create control panels for a graphical
729 user interface where the user can select the various controls.
730 Basically you will have to iterate over all controls using the method
731 described above. Each control class starts with a control of type
732 <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>.
733 <constant>VIDIOC_QUERYCTRL</constant> will return the name of this
734 control class which can be used as the title of a tab page within a
735 control panel.</para>
736
737       <para>The flags field of &v4l2-queryctrl; also contains hints on
738 the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation
739 for more details.</para>
740     </section>
741
742     <section id="mpeg-controls">
743       <title>MPEG Control Reference</title>
744
745       <para>Below all controls within the MPEG control class are
746 described. First the generic controls, then controls specific for
747 certain hardware.</para>
748
749       <section>
750         <title>Generic MPEG Controls</title>
751
752         <table pgwide="1" frame="none" id="mpeg-control-id">
753           <title>MPEG Control IDs</title>
754           <tgroup cols="4">
755             <colspec colname="c1" colwidth="1*" />
756             <colspec colname="c2" colwidth="6*" />
757             <colspec colname="c3" colwidth="2*" />
758             <colspec colname="c4" colwidth="6*" />
759             <spanspec namest="c1" nameend="c2" spanname="id" />
760             <spanspec namest="c2" nameend="c4" spanname="descr" />
761             <thead>
762               <row>
763                 <entry spanname="id" align="left">ID</entry>
764                 <entry align="left">Type</entry>
765               </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
766               </row>
767             </thead>
768             <tbody valign="top">
769               <row><entry></entry></row>
770               <row>
771                 <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant>&nbsp;</entry>
772                 <entry>class</entry>
773               </row><row><entry spanname="descr">The MPEG class
774 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
775 description of this control class. This description can be used as the
776 caption of a Tab page in a GUI, for example.</entry>
777               </row>
778               <row><entry></entry></row>
779               <row id="v4l2-mpeg-stream-type">
780                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant>&nbsp;</entry>
781                 <entry>enum&nbsp;v4l2_mpeg_stream_type</entry>
782               </row><row><entry spanname="descr">The MPEG-1, -2 or -4
783 output stream type. One cannot assume anything here. Each hardware
784 MPEG encoder tends to support different subsets of the available MPEG
785 stream types. This control is specific to multiplexed MPEG streams.
786 The currently defined stream types are:</entry>
787               </row>
788               <row>
789                 <entrytbl spanname="descr" cols="2">
790                   <tbody valign="top">
791                     <row>
792                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant>&nbsp;</entry>
793                       <entry>MPEG-2 program stream</entry>
794                     </row>
795                     <row>
796                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant>&nbsp;</entry>
797                       <entry>MPEG-2 transport stream</entry>
798                     </row>
799                     <row>
800                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant>&nbsp;</entry>
801                       <entry>MPEG-1 system stream</entry>
802                     </row>
803                     <row>
804                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant>&nbsp;</entry>
805                       <entry>MPEG-2 DVD-compatible stream</entry>
806                     </row>
807                     <row>
808                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant>&nbsp;</entry>
809                       <entry>MPEG-1 VCD-compatible stream</entry>
810                     </row>
811                     <row>
812                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant>&nbsp;</entry>
813                       <entry>MPEG-2 SVCD-compatible stream</entry>
814                     </row>
815                   </tbody>
816                 </entrytbl>
817               </row>
818               <row><entry></entry></row>
819               <row>
820                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant>&nbsp;</entry>
821                 <entry>integer</entry>
822               </row><row><entry spanname="descr">Program Map Table
823 Packet ID for the MPEG transport stream (default 16)</entry>
824               </row>
825               <row><entry></entry></row>
826               <row>
827                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant>&nbsp;</entry>
828                 <entry>integer</entry>
829               </row><row><entry spanname="descr">Audio Packet ID for
830 the MPEG transport stream (default 256)</entry>
831               </row>
832               <row><entry></entry></row>
833               <row>
834                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant>&nbsp;</entry>
835                 <entry>integer</entry>
836               </row><row><entry spanname="descr">Video Packet ID for
837 the MPEG transport stream (default 260)</entry>
838               </row>
839               <row><entry></entry></row>
840               <row>
841                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant>&nbsp;</entry>
842                 <entry>integer</entry>
843               </row><row><entry spanname="descr">Packet ID for the
844 MPEG transport stream carrying PCR fields (default 259)</entry>
845               </row>
846               <row><entry></entry></row>
847               <row>
848                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant>&nbsp;</entry>
849                 <entry>integer</entry>
850               </row><row><entry spanname="descr">Audio ID for MPEG
851 PES</entry>
852               </row>
853               <row><entry></entry></row>
854               <row>
855                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant>&nbsp;</entry>
856                 <entry>integer</entry>
857               </row><row><entry spanname="descr">Video ID for MPEG
858 PES</entry>
859               </row>
860               <row><entry></entry></row>
861               <row id="v4l2-mpeg-stream-vbi-fmt">
862                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant>&nbsp;</entry>
863                 <entry>enum&nbsp;v4l2_mpeg_stream_vbi_fmt</entry>
864               </row><row><entry spanname="descr">Some cards can embed
865 VBI data (&eg; Closed Caption, Teletext) into the MPEG stream. This
866 control selects whether VBI data should be embedded, and if so, what
867 embedding method should be used. The list of possible VBI formats
868 depends on the driver. The currently defined VBI format types
869 are:</entry>
870               </row>
871               <row>
872                 <entrytbl spanname="descr" cols="2">
873                   <tbody valign="top">
874                     <row>
875                       <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant>&nbsp;</entry>
876                       <entry>No VBI in the MPEG stream</entry>
877                     </row>
878                     <row>
879                       <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant>&nbsp;</entry>
880                       <entry>VBI in private packets, IVTV format (documented
881 in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry>
882                     </row>
883                   </tbody>
884                 </entrytbl>
885               </row>
886               <row><entry></entry></row>
887               <row id="v4l2-mpeg-audio-sampling-freq">
888                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant>&nbsp;</entry>
889                 <entry>enum&nbsp;v4l2_mpeg_audio_sampling_freq</entry>
890               </row><row><entry spanname="descr">MPEG Audio sampling
891 frequency. Possible values are:</entry>
892               </row>
893               <row>
894                 <entrytbl spanname="descr" cols="2">
895                   <tbody valign="top">
896                     <row>
897                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant>&nbsp;</entry>
898                       <entry>44.1 kHz</entry>
899                     </row>
900                     <row>
901                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant>&nbsp;</entry>
902                       <entry>48 kHz</entry>
903                     </row>
904                     <row>
905                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant>&nbsp;</entry>
906                       <entry>32 kHz</entry>
907                     </row>
908                   </tbody>
909                 </entrytbl>
910               </row>
911               <row><entry></entry></row>
912               <row id="v4l2-mpeg-audio-encoding">
913                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant>&nbsp;</entry>
914                 <entry>enum&nbsp;v4l2_mpeg_audio_encoding</entry>
915               </row><row><entry spanname="descr">MPEG Audio encoding.
916 This control is specific to multiplexed MPEG streams.
917 Possible values are:</entry>
918               </row>
919               <row>
920                 <entrytbl spanname="descr" cols="2">
921                   <tbody valign="top">
922                     <row>
923                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant>&nbsp;</entry>
924                       <entry>MPEG-1/2 Layer I encoding</entry>
925                     </row>
926                     <row>
927                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant>&nbsp;</entry>
928                       <entry>MPEG-1/2 Layer II encoding</entry>
929                     </row>
930                     <row>
931                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant>&nbsp;</entry>
932                       <entry>MPEG-1/2 Layer III encoding</entry>
933                     </row>
934                     <row>
935                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant>&nbsp;</entry>
936                       <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry>
937                     </row>
938                     <row>
939                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant>&nbsp;</entry>
940                       <entry>AC-3 aka ATSC A/52 encoding</entry>
941                     </row>
942                   </tbody>
943                 </entrytbl>
944               </row>
945               <row><entry></entry></row>
946               <row id="v4l2-mpeg-audio-l1-bitrate">
947                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant>&nbsp;</entry>
948                 <entry>enum&nbsp;v4l2_mpeg_audio_l1_bitrate</entry>
949               </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate.
950 Possible values are:</entry>
951               </row>
952               <row>
953                 <entrytbl spanname="descr" cols="2">
954                   <tbody valign="top">
955                     <row>
956                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant>&nbsp;</entry>
957                       <entry>32 kbit/s</entry></row>
958                     <row>
959                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant>&nbsp;</entry>
960                       <entry>64 kbit/s</entry>
961                     </row>
962                     <row>
963                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant>&nbsp;</entry>
964                       <entry>96 kbit/s</entry>
965                     </row>
966                     <row>
967                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant>&nbsp;</entry>
968                       <entry>128 kbit/s</entry>
969                     </row>
970                     <row>
971                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant>&nbsp;</entry>
972                       <entry>160 kbit/s</entry>
973                     </row>
974                     <row>
975                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant>&nbsp;</entry>
976                       <entry>192 kbit/s</entry>
977                     </row>
978                     <row>
979                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant>&nbsp;</entry>
980                       <entry>224 kbit/s</entry>
981                     </row>
982                     <row>
983                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant>&nbsp;</entry>
984                       <entry>256 kbit/s</entry>
985                     </row>
986                     <row>
987                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant>&nbsp;</entry>
988                       <entry>288 kbit/s</entry>
989                     </row>
990                     <row>
991                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant>&nbsp;</entry>
992                       <entry>320 kbit/s</entry>
993                     </row>
994                     <row>
995                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant>&nbsp;</entry>
996                       <entry>352 kbit/s</entry>
997                     </row>
998                     <row>
999                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant>&nbsp;</entry>
1000                       <entry>384 kbit/s</entry>
1001                     </row>
1002                     <row>
1003                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant>&nbsp;</entry>
1004                       <entry>416 kbit/s</entry>
1005                     </row>
1006                     <row>
1007                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant>&nbsp;</entry>
1008                       <entry>448 kbit/s</entry>
1009                     </row>
1010                   </tbody>
1011                 </entrytbl>
1012               </row>
1013               <row><entry></entry></row>
1014               <row id="v4l2-mpeg-audio-l2-bitrate">
1015                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant>&nbsp;</entry>
1016                 <entry>enum&nbsp;v4l2_mpeg_audio_l2_bitrate</entry>
1017               </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate.
1018 Possible values are:</entry>
1019               </row>
1020               <row>
1021                 <entrytbl spanname="descr" cols="2">
1022                   <tbody valign="top">
1023                     <row>
1024                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant>&nbsp;</entry>
1025                       <entry>32 kbit/s</entry>
1026                     </row>
1027                     <row>
1028                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant>&nbsp;</entry>
1029                       <entry>48 kbit/s</entry>
1030                     </row>
1031                     <row>
1032                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant>&nbsp;</entry>
1033                       <entry>56 kbit/s</entry>
1034                     </row>
1035                     <row>
1036                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant>&nbsp;</entry>
1037                       <entry>64 kbit/s</entry>
1038                     </row>
1039                     <row>
1040                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant>&nbsp;</entry>
1041                       <entry>80 kbit/s</entry>
1042                     </row>
1043                     <row>
1044                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant>&nbsp;</entry>
1045                       <entry>96 kbit/s</entry>
1046                     </row>
1047                     <row>
1048                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant>&nbsp;</entry>
1049                       <entry>112 kbit/s</entry>
1050                     </row>
1051                     <row>
1052                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant>&nbsp;</entry>
1053                       <entry>128 kbit/s</entry>
1054                     </row>
1055                     <row>
1056                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant>&nbsp;</entry>
1057                       <entry>160 kbit/s</entry>
1058                     </row>
1059                     <row>
1060                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant>&nbsp;</entry>
1061                       <entry>192 kbit/s</entry>
1062                     </row>
1063                     <row>
1064                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant>&nbsp;</entry>
1065                       <entry>224 kbit/s</entry>
1066                     </row>
1067                     <row>
1068                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant>&nbsp;</entry>
1069                       <entry>256 kbit/s</entry>
1070                     </row>
1071                     <row>
1072                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant>&nbsp;</entry>
1073                       <entry>320 kbit/s</entry>
1074                     </row>
1075                     <row>
1076                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant>&nbsp;</entry>
1077                       <entry>384 kbit/s</entry>
1078                     </row>
1079                   </tbody>
1080                 </entrytbl>
1081               </row>
1082               <row><entry></entry></row>
1083               <row id="v4l2-mpeg-audio-l3-bitrate">
1084                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant>&nbsp;</entry>
1085                 <entry>enum&nbsp;v4l2_mpeg_audio_l3_bitrate</entry>
1086               </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate.
1087 Possible values are:</entry>
1088               </row>
1089               <row>
1090                 <entrytbl spanname="descr" cols="2">
1091                   <tbody valign="top">
1092                     <row>
1093                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant>&nbsp;</entry>
1094                       <entry>32 kbit/s</entry>
1095                     </row>
1096                     <row>
1097                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant>&nbsp;</entry>
1098                       <entry>40 kbit/s</entry>
1099                     </row>
1100                     <row>
1101                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant>&nbsp;</entry>
1102                       <entry>48 kbit/s</entry>
1103                     </row>
1104                     <row>
1105                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant>&nbsp;</entry>
1106                       <entry>56 kbit/s</entry>
1107                     </row>
1108                     <row>
1109                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant>&nbsp;</entry>
1110                       <entry>64 kbit/s</entry>
1111                     </row>
1112                     <row>
1113                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant>&nbsp;</entry>
1114                       <entry>80 kbit/s</entry>
1115                     </row>
1116                     <row>
1117                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant>&nbsp;</entry>
1118                       <entry>96 kbit/s</entry>
1119                     </row>
1120                     <row>
1121                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant>&nbsp;</entry>
1122                       <entry>112 kbit/s</entry>
1123                     </row>
1124                     <row>
1125                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant>&nbsp;</entry>
1126                       <entry>128 kbit/s</entry>
1127                     </row>
1128                     <row>
1129                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant>&nbsp;</entry>
1130                       <entry>160 kbit/s</entry>
1131                     </row>
1132                     <row>
1133                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant>&nbsp;</entry>
1134                       <entry>192 kbit/s</entry>
1135                     </row>
1136                     <row>
1137                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant>&nbsp;</entry>
1138                       <entry>224 kbit/s</entry>
1139                     </row>
1140                     <row>
1141                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant>&nbsp;</entry>
1142                       <entry>256 kbit/s</entry>
1143                     </row>
1144                     <row>
1145                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant>&nbsp;</entry>
1146                       <entry>320 kbit/s</entry>
1147                     </row>
1148                   </tbody>
1149                 </entrytbl>
1150               </row>
1151               <row><entry></entry></row>
1152               <row>
1153                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant>&nbsp;</entry>
1154                 <entry>integer</entry>
1155               </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry>
1156               </row>
1157               <row><entry></entry></row>
1158               <row id="v4l2-mpeg-audio-ac3-bitrate">
1159                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant>&nbsp;</entry>
1160                 <entry>enum&nbsp;v4l2_mpeg_audio_ac3_bitrate</entry>
1161               </row><row><entry spanname="descr">AC-3 bitrate.
1162 Possible values are:</entry>
1163               </row>
1164               <row>
1165                 <entrytbl spanname="descr" cols="2">
1166                   <tbody valign="top">
1167                     <row>
1168                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant>&nbsp;</entry>
1169                       <entry>32 kbit/s</entry>
1170                     </row>
1171                     <row>
1172                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant>&nbsp;</entry>
1173                       <entry>40 kbit/s</entry>
1174                     </row>
1175                     <row>
1176                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant>&nbsp;</entry>
1177                       <entry>48 kbit/s</entry>
1178                     </row>
1179                     <row>
1180                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant>&nbsp;</entry>
1181                       <entry>56 kbit/s</entry>
1182                     </row>
1183                     <row>
1184                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant>&nbsp;</entry>
1185                       <entry>64 kbit/s</entry>
1186                     </row>
1187                     <row>
1188                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant>&nbsp;</entry>
1189                       <entry>80 kbit/s</entry>
1190                     </row>
1191                     <row>
1192                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant>&nbsp;</entry>
1193                       <entry>96 kbit/s</entry>
1194                     </row>
1195                     <row>
1196                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant>&nbsp;</entry>
1197                       <entry>112 kbit/s</entry>
1198                     </row>
1199                     <row>
1200                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant>&nbsp;</entry>
1201                       <entry>128 kbit/s</entry>
1202                     </row>
1203                     <row>
1204                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant>&nbsp;</entry>
1205                       <entry>160 kbit/s</entry>
1206                     </row>
1207                     <row>
1208                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant>&nbsp;</entry>
1209                       <entry>192 kbit/s</entry>
1210                     </row>
1211                     <row>
1212                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant>&nbsp;</entry>
1213                       <entry>224 kbit/s</entry>
1214                     </row>
1215                     <row>
1216                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant>&nbsp;</entry>
1217                       <entry>256 kbit/s</entry>
1218                     </row>
1219                     <row>
1220                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant>&nbsp;</entry>
1221                       <entry>320 kbit/s</entry>
1222                     </row>
1223                     <row>
1224                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant>&nbsp;</entry>
1225                       <entry>384 kbit/s</entry>
1226                     </row>
1227                     <row>
1228                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant>&nbsp;</entry>
1229                       <entry>448 kbit/s</entry>
1230                     </row>
1231                     <row>
1232                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant>&nbsp;</entry>
1233                       <entry>512 kbit/s</entry>
1234                     </row>
1235                     <row>
1236                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant>&nbsp;</entry>
1237                       <entry>576 kbit/s</entry>
1238                     </row>
1239                     <row>
1240                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant>&nbsp;</entry>
1241                       <entry>640 kbit/s</entry>
1242                     </row>
1243                   </tbody>
1244                 </entrytbl>
1245               </row>
1246               <row><entry></entry></row>
1247               <row id="v4l2-mpeg-audio-mode">
1248                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant>&nbsp;</entry>
1249                 <entry>enum&nbsp;v4l2_mpeg_audio_mode</entry>
1250               </row><row><entry spanname="descr">MPEG Audio mode.
1251 Possible values are:</entry>
1252               </row>
1253               <row>
1254                 <entrytbl spanname="descr" cols="2">
1255                   <tbody valign="top">
1256                     <row>
1257                       <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant>&nbsp;</entry>
1258                       <entry>Stereo</entry>
1259                     </row>
1260                     <row>
1261                       <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant>&nbsp;</entry>
1262                       <entry>Joint Stereo</entry>
1263                     </row>
1264                     <row>
1265                       <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant>&nbsp;</entry>
1266                       <entry>Bilingual</entry>
1267                     </row>
1268                     <row>
1269                       <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant>&nbsp;</entry>
1270                       <entry>Mono</entry>
1271                     </row>
1272                   </tbody>
1273                 </entrytbl>
1274               </row>
1275               <row><entry></entry></row>
1276               <row id="v4l2-mpeg-audio-mode-extension">
1277                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant>&nbsp;</entry>
1278                 <entry>enum&nbsp;v4l2_mpeg_audio_mode_extension</entry>
1279               </row><row><entry spanname="descr">Joint Stereo
1280 audio mode extension. In Layer I and II they indicate which subbands
1281 are in intensity stereo. All other subbands are coded in stereo. Layer
1282 III is not (yet) supported. Possible values
1283 are:</entry>
1284               </row>
1285               <row>
1286                 <entrytbl spanname="descr" cols="2">
1287                   <tbody valign="top">
1288                     <row>
1289                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant>&nbsp;</entry>
1290                       <entry>Subbands 4-31 in intensity stereo</entry>
1291                     </row>
1292                     <row>
1293                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant>&nbsp;</entry>
1294                       <entry>Subbands 8-31 in intensity stereo</entry>
1295                     </row>
1296                     <row>
1297                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant>&nbsp;</entry>
1298                       <entry>Subbands 12-31 in intensity stereo</entry>
1299                     </row>
1300                     <row>
1301                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant>&nbsp;</entry>
1302                       <entry>Subbands 16-31 in intensity stereo</entry>
1303                     </row>
1304                   </tbody>
1305                 </entrytbl>
1306               </row>
1307               <row><entry></entry></row>
1308               <row id="v4l2-mpeg-audio-emphasis">
1309                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant>&nbsp;</entry>
1310                 <entry>enum&nbsp;v4l2_mpeg_audio_emphasis</entry>
1311               </row><row><entry spanname="descr">Audio Emphasis.
1312 Possible values are:</entry>
1313               </row>
1314               <row>
1315                 <entrytbl spanname="descr" cols="2">
1316                   <tbody valign="top">
1317                     <row>
1318                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant>&nbsp;</entry>
1319                       <entry>None</entry>
1320                     </row>
1321                     <row>
1322                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant>&nbsp;</entry>
1323                       <entry>50/15 microsecond emphasis</entry>
1324                     </row>
1325                     <row>
1326                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant>&nbsp;</entry>
1327                       <entry>CCITT J.17</entry>
1328                     </row>
1329                   </tbody>
1330                 </entrytbl>
1331               </row>
1332               <row><entry></entry></row>
1333               <row id="v4l2-mpeg-audio-crc">
1334                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant>&nbsp;</entry>
1335                 <entry>enum&nbsp;v4l2_mpeg_audio_crc</entry>
1336               </row><row><entry spanname="descr">CRC method. Possible
1337 values are:</entry>
1338               </row>
1339               <row>
1340                 <entrytbl spanname="descr" cols="2">
1341                   <tbody valign="top">
1342                     <row>
1343                       <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant>&nbsp;</entry>
1344                       <entry>None</entry>
1345                     </row>
1346                     <row>
1347                       <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant>&nbsp;</entry>
1348                       <entry>16 bit parity check</entry>
1349                     </row>
1350                   </tbody>
1351                 </entrytbl>
1352               </row>
1353               <row><entry></entry></row>
1354               <row>
1355                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant>&nbsp;</entry>
1356                 <entry>boolean</entry>
1357               </row><row><entry spanname="descr">Mutes the audio when
1358 capturing. This is not done by muting audio hardware, which can still
1359 produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1360 and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1361               </row>
1362               <row><entry></entry></row>
1363               <row id="v4l2-mpeg-audio-dec-playback">
1364                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</constant>&nbsp;</entry>
1365                 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1366               </row><row><entry spanname="descr">Determines how monolingual audio should be played back.
1367 Possible values are:</entry>
1368               </row>
1369               <row>
1370                 <entrytbl spanname="descr" cols="2">
1371                   <tbody valign="top">
1372                     <row>
1373                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO</constant>&nbsp;</entry>
1374                       <entry>Automatically determines the best playback mode.</entry>
1375                     </row>
1376                     <row>
1377                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO</constant>&nbsp;</entry>
1378                       <entry>Stereo playback.</entry>
1379                     </row>
1380                     <row>
1381                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT</constant>&nbsp;</entry>
1382                       <entry>Left channel playback.</entry>
1383                     </row>
1384                     <row>
1385                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT</constant>&nbsp;</entry>
1386                       <entry>Right channel playback.</entry>
1387                     </row>
1388                     <row>
1389                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO</constant>&nbsp;</entry>
1390                       <entry>Mono playback.</entry>
1391                     </row>
1392                     <row>
1393                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO</constant>&nbsp;</entry>
1394                       <entry>Stereo playback with swapped left and right channels.</entry>
1395                     </row>
1396                   </tbody>
1397                 </entrytbl>
1398               </row>
1399               <row><entry></entry></row>
1400               <row id="v4l2-mpeg-audio-dec-multilingual-playback">
1401                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</constant>&nbsp;</entry>
1402                 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1403               </row><row><entry spanname="descr">Determines how multilingual audio should be played back.</entry>
1404               </row>
1405               <row><entry></entry></row>
1406               <row id="v4l2-mpeg-video-encoding">
1407                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
1408                 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
1409               </row><row><entry spanname="descr">MPEG Video encoding
1410 method. This control is specific to multiplexed MPEG streams.
1411 Possible values are:</entry>
1412               </row>
1413               <row>
1414                 <entrytbl spanname="descr" cols="2">
1415                   <tbody valign="top">
1416                     <row>
1417                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant>&nbsp;</entry>
1418                       <entry>MPEG-1 Video encoding</entry>
1419                     </row>
1420                     <row>
1421                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant>&nbsp;</entry>
1422                       <entry>MPEG-2 Video encoding</entry>
1423                     </row>
1424                     <row>
1425                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant>&nbsp;</entry>
1426                       <entry>MPEG-4 AVC (H.264) Video encoding</entry>
1427                     </row>
1428                   </tbody>
1429                 </entrytbl>
1430               </row>
1431               <row><entry></entry></row>
1432               <row id="v4l2-mpeg-video-aspect">
1433                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant>&nbsp;</entry>
1434                 <entry>enum&nbsp;v4l2_mpeg_video_aspect</entry>
1435               </row><row><entry spanname="descr">Video aspect.
1436 Possible values are:</entry>
1437               </row>
1438               <row>
1439                 <entrytbl spanname="descr" cols="2">
1440                   <tbody valign="top">
1441                     <row>
1442                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant>&nbsp;</entry>
1443                     </row>
1444                     <row>
1445                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant>&nbsp;</entry>
1446                     </row>
1447                     <row>
1448                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant>&nbsp;</entry>
1449                     </row>
1450                     <row>
1451                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant>&nbsp;</entry>
1452                     </row>
1453                   </tbody>
1454                 </entrytbl>
1455               </row>
1456               <row><entry></entry></row>
1457               <row>
1458                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant>&nbsp;</entry>
1459                 <entry>integer</entry>
1460               </row><row><entry spanname="descr">Number of B-Frames
1461 (default 2)</entry>
1462               </row>
1463               <row><entry></entry></row>
1464               <row>
1465                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant>&nbsp;</entry>
1466                 <entry>integer</entry>
1467               </row><row><entry spanname="descr">GOP size (default
1468 12)</entry>
1469               </row>
1470               <row><entry></entry></row>
1471               <row>
1472                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant>&nbsp;</entry>
1473                 <entry>boolean</entry>
1474               </row><row><entry spanname="descr">GOP closure (default
1475 1)</entry>
1476               </row>
1477               <row><entry></entry></row>
1478               <row>
1479                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant>&nbsp;</entry>
1480                 <entry>boolean</entry>
1481               </row><row><entry spanname="descr">Enable 3:2 pulldown
1482 (default 0)</entry>
1483               </row>
1484               <row><entry></entry></row>
1485               <row id="v4l2-mpeg-video-bitrate-mode">
1486                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant>&nbsp;</entry>
1487                 <entry>enum&nbsp;v4l2_mpeg_video_bitrate_mode</entry>
1488               </row><row><entry spanname="descr">Video bitrate mode.
1489 Possible values are:</entry>
1490               </row>
1491               <row>
1492                 <entrytbl spanname="descr" cols="2">
1493                   <tbody valign="top">
1494                     <row>
1495                       <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant>&nbsp;</entry>
1496                       <entry>Variable bitrate</entry>
1497                     </row>
1498                     <row>
1499                       <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant>&nbsp;</entry>
1500                       <entry>Constant bitrate</entry>
1501                     </row>
1502                   </tbody>
1503                 </entrytbl>
1504               </row>
1505               <row><entry></entry></row>
1506               <row>
1507                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant>&nbsp;</entry>
1508                 <entry>integer</entry>
1509               </row><row><entry spanname="descr">Video bitrate in bits
1510 per second.</entry>
1511               </row>
1512               <row><entry></entry></row>
1513               <row>
1514                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant>&nbsp;</entry>
1515                 <entry>integer</entry>
1516               </row><row><entry spanname="descr">Peak video bitrate in
1517 bits per second. Must be larger or equal to the average video bitrate.
1518 It is ignored if the video bitrate mode is set to constant
1519 bitrate.</entry>
1520               </row>
1521               <row><entry></entry></row>
1522               <row>
1523                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant>&nbsp;</entry>
1524                 <entry>integer</entry>
1525               </row><row><entry spanname="descr">For every captured
1526 frame, skip this many subsequent frames (default 0).</entry>
1527               </row>
1528               <row><entry></entry></row>
1529               <row>
1530                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant>&nbsp;</entry>
1531                 <entry>boolean</entry>
1532               </row>
1533               <row><entry spanname="descr">"Mutes" the video to a
1534 fixed color when capturing. This is useful for testing, to produce a
1535 fixed video bitstream. 0 = unmuted, 1 = muted.</entry>
1536               </row>
1537               <row><entry></entry></row>
1538               <row>
1539                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant>&nbsp;</entry>
1540                 <entry>integer</entry>
1541               </row><row><entry spanname="descr">Sets the "mute" color
1542 of the video. The supplied 32-bit integer is interpreted as follows (bit
1543 0 = least significant bit):</entry>
1544               </row>
1545               <row>
1546                 <entrytbl spanname="descr" cols="2">
1547                   <tbody valign="top">
1548                     <row>
1549                       <entry>Bit 0:7</entry>
1550                       <entry>V chrominance information</entry>
1551                     </row>
1552                     <row>
1553                       <entry>Bit 8:15</entry>
1554                       <entry>U chrominance information</entry>
1555                     </row>
1556                     <row>
1557                       <entry>Bit 16:23</entry>
1558                       <entry>Y luminance information</entry>
1559                     </row>
1560                     <row>
1561                       <entry>Bit 24:31</entry>
1562                       <entry>Must be zero.</entry>
1563                     </row>
1564                   </tbody>
1565                 </entrytbl>
1566               </row>
1567               <row><entry></entry></row>
1568               <row id="v4l2-mpeg-video-dec-pts">
1569                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant>&nbsp;</entry>
1570                 <entry>integer64</entry>
1571               </row><row><entry spanname="descr">This read-only control returns the
1572 33-bit video Presentation Time Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of
1573 the currently displayed frame. This is the same PTS as is used in &VIDIOC-DECODER-CMD;.</entry>
1574               </row>
1575               <row><entry></entry></row>
1576               <row id="v4l2-mpeg-video-dec-frame">
1577                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant>&nbsp;</entry>
1578                 <entry>integer64</entry>
1579               </row><row><entry spanname="descr">This read-only control returns the
1580 frame counter of the frame that is currently displayed (decoded). This value is reset to 0 whenever
1581 the decoder is started.</entry>
1582               </row>
1583
1584
1585               <row><entry></entry></row>
1586               <row>
1587                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE</constant>&nbsp;</entry>
1588                 <entry>boolean</entry>
1589               </row>
1590               <row><entry spanname="descr">If enabled the decoder expects to receive a single slice per buffer, otherwise
1591 the decoder expects a single frame in per buffer. Applicable to the decoder, all codecs.
1592 </entry>
1593               </row>
1594
1595               <row><entry></entry></row>
1596               <row>
1597                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE</constant>&nbsp;</entry>
1598                 <entry>boolean</entry>
1599               </row>
1600               <row><entry spanname="descr">Enable writing sample aspect ratio in the Video Usability Information.
1601 Applicable to the H264 encoder.</entry>
1602               </row>
1603
1604               <row><entry></entry></row>
1605               <row id="v4l2-mpeg-video-h264-vui-sar-idc">
1606                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant>&nbsp;</entry>
1607                 <entry>enum&nbsp;v4l2_mpeg_video_h264_vui_sar_idc</entry>
1608               </row>
1609               <row><entry spanname="descr">VUI sample aspect ratio indicator for H.264 encoding. The value
1610 is defined in the table E-1 in the standard. Applicable to the H264 encoder.</entry>
1611               </row>
1612               <row>
1613                 <entrytbl spanname="descr" cols="2">
1614                   <tbody valign="top">
1615
1616                         <row>
1617                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED</constant>&nbsp;</entry>
1618                           <entry>Unspecified</entry>
1619                         </row>
1620                         <row>
1621                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1</constant>&nbsp;</entry>
1622                           <entry>1x1</entry>
1623                         </row>
1624                         <row>
1625                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11</constant>&nbsp;</entry>
1626                           <entry>12x11</entry>
1627                         </row>
1628                         <row>
1629                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11</constant>&nbsp;</entry>
1630                           <entry>10x11</entry>
1631                         </row>
1632                         <row>
1633                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11</constant>&nbsp;</entry>
1634                           <entry>16x11</entry>
1635                         </row>
1636                         <row>
1637                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33</constant>&nbsp;</entry>
1638                           <entry>40x33</entry>
1639                         </row>
1640                         <row>
1641                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11</constant>&nbsp;</entry>
1642                           <entry>24x11</entry>
1643                         </row>
1644                         <row>
1645                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11</constant>&nbsp;</entry>
1646                           <entry>20x11</entry>
1647                         </row>
1648                         <row>
1649                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11</constant>&nbsp;</entry>
1650                           <entry>32x11</entry>
1651                         </row>
1652                         <row>
1653                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33</constant>&nbsp;</entry>
1654                           <entry>80x33</entry>
1655                         </row>
1656                         <row>
1657                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11</constant>&nbsp;</entry>
1658                           <entry>18x11</entry>
1659                         </row>
1660                         <row>
1661                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11</constant>&nbsp;</entry>
1662                           <entry>15x11</entry>
1663                         </row>
1664                         <row>
1665                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33</constant>&nbsp;</entry>
1666                           <entry>64x33</entry>
1667                         </row>
1668                         <row>
1669                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99</constant>&nbsp;</entry>
1670                           <entry>160x99</entry>
1671                         </row>
1672                         <row>
1673                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3</constant>&nbsp;</entry>
1674                           <entry>4x3</entry>
1675                         </row>
1676                         <row>
1677                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2</constant>&nbsp;</entry>
1678                           <entry>3x2</entry>
1679                         </row>
1680                         <row>
1681                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1</constant>&nbsp;</entry>
1682                           <entry>2x1</entry>
1683                         </row>
1684                         <row>
1685                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED</constant>&nbsp;</entry>
1686                           <entry>Extended SAR</entry>
1687                         </row>
1688                   </tbody>
1689                 </entrytbl>
1690               </row>
1691
1692               <row><entry></entry></row>
1693               <row>
1694                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH</constant>&nbsp;</entry>
1695                 <entry>integer</entry>
1696               </row>
1697               <row><entry spanname="descr">Extended sample aspect ratio width for H.264 VUI encoding.
1698 Applicable to the H264 encoder.</entry>
1699               </row>
1700
1701               <row><entry></entry></row>
1702               <row>
1703                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT</constant>&nbsp;</entry>
1704                 <entry>integer</entry>
1705               </row>
1706               <row><entry spanname="descr">Extended sample aspect ratio height for H.264 VUI encoding.
1707 Applicable to the H264 encoder.</entry>
1708               </row>
1709
1710               <row><entry></entry></row>
1711               <row id="v4l2-mpeg-video-h264-level">
1712                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant>&nbsp;</entry>
1713                 <entry>enum&nbsp;v4l2_mpeg_video_h264_level</entry>
1714               </row>
1715               <row><entry spanname="descr">The level information for the H264 video elementary stream.
1716 Applicable to the H264 encoder.
1717 Possible values are:</entry>
1718               </row>
1719               <row>
1720                 <entrytbl spanname="descr" cols="2">
1721                   <tbody valign="top">
1722                     <row>
1723                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_0</constant>&nbsp;</entry>
1724                       <entry>Level 1.0</entry>
1725                     </row>
1726                     <row>
1727                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1B</constant>&nbsp;</entry>
1728                       <entry>Level 1B</entry>
1729                     </row>
1730                     <row>
1731                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_1</constant>&nbsp;</entry>
1732                       <entry>Level 1.1</entry>
1733                     </row>
1734                     <row>
1735                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_2</constant>&nbsp;</entry>
1736                       <entry>Level 1.2</entry>
1737                     </row>
1738                     <row>
1739                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_3</constant>&nbsp;</entry>
1740                       <entry>Level 1.3</entry>
1741                     </row>
1742                     <row>
1743                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_0</constant>&nbsp;</entry>
1744                       <entry>Level 2.0</entry>
1745                     </row>
1746                     <row>
1747                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_1</constant>&nbsp;</entry>
1748                       <entry>Level 2.1</entry>
1749                     </row>
1750                     <row>
1751                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_2</constant>&nbsp;</entry>
1752                       <entry>Level 2.2</entry>
1753                     </row>
1754                     <row>
1755                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_0</constant>&nbsp;</entry>
1756                       <entry>Level 3.0</entry>
1757                     </row>
1758                     <row>
1759                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_1</constant>&nbsp;</entry>
1760                       <entry>Level 3.1</entry>
1761                     </row>
1762                     <row>
1763                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_2</constant>&nbsp;</entry>
1764                       <entry>Level 3.2</entry>
1765                     </row>
1766                     <row>
1767                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_0</constant>&nbsp;</entry>
1768                       <entry>Level 4.0</entry>
1769                     </row>
1770                     <row>
1771                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_1</constant>&nbsp;</entry>
1772                       <entry>Level 4.1</entry>
1773                     </row>
1774                     <row>
1775                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_2</constant>&nbsp;</entry>
1776                       <entry>Level 4.2</entry>
1777                     </row>
1778                     <row>
1779                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_5_0</constant>&nbsp;</entry>
1780                       <entry>Level 5.0</entry>
1781                     </row>
1782                     <row>
1783                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_5_1</constant>&nbsp;</entry>
1784                       <entry>Level 5.1</entry>
1785                     </row>
1786                   </tbody>
1787                 </entrytbl>
1788               </row>
1789
1790               <row><entry></entry></row>
1791               <row id="v4l2-mpeg-video-mpeg4-level">
1792                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant>&nbsp;</entry>
1793                 <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_level</entry>
1794               </row>
1795               <row><entry spanname="descr">The level information for the MPEG4 elementary stream.
1796 Applicable to the MPEG4 encoder.
1797 Possible values are:</entry>
1798               </row>
1799               <row>
1800                 <entrytbl spanname="descr" cols="2">
1801                   <tbody valign="top">
1802                     <row>
1803                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_0</constant>&nbsp;</entry>
1804                       <entry>Level 0</entry>
1805                     </row>
1806                     <row>
1807                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_0B</constant>&nbsp;</entry>
1808                       <entry>Level 0b</entry>
1809                     </row>
1810                     <row>
1811                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_1</constant>&nbsp;</entry>
1812                       <entry>Level 1</entry>
1813                     </row>
1814                     <row>
1815                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_2</constant>&nbsp;</entry>
1816                       <entry>Level 2</entry>
1817                     </row>
1818                     <row>
1819                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_3</constant>&nbsp;</entry>
1820                       <entry>Level 3</entry>
1821                     </row>
1822                     <row>
1823                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_3B</constant>&nbsp;</entry>
1824                       <entry>Level 3b</entry>
1825                     </row>
1826                     <row>
1827                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_4</constant>&nbsp;</entry>
1828                       <entry>Level 4</entry>
1829                     </row>
1830                     <row>
1831                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_5</constant>&nbsp;</entry>
1832                       <entry>Level 5</entry>
1833                     </row>
1834                   </tbody>
1835                 </entrytbl>
1836               </row>
1837
1838               <row><entry></entry></row>
1839               <row id="v4l2-mpeg-video-h264-profile">
1840                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant>&nbsp;</entry>
1841                 <entry>enum&nbsp;v4l2_mpeg_video_h264_profile</entry>
1842               </row>
1843               <row><entry spanname="descr">The profile information for H264.
1844 Applicable to the H264 encoder.
1845 Possible values are:</entry>
1846               </row>
1847               <row>
1848                 <entrytbl spanname="descr" cols="2">
1849                   <tbody valign="top">
1850                     <row>
1851                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE</constant>&nbsp;</entry>
1852                       <entry>Baseline profile</entry>
1853                     </row>
1854                     <row>
1855                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE</constant>&nbsp;</entry>
1856                       <entry>Constrained Baseline profile</entry>
1857                     </row>
1858                     <row>
1859                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_MAIN</constant>&nbsp;</entry>
1860                       <entry>Main profile</entry>
1861                     </row>
1862                     <row>
1863                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED</constant>&nbsp;</entry>
1864                       <entry>Extended profile</entry>
1865                     </row>
1866                     <row>
1867                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH</constant>&nbsp;</entry>
1868                       <entry>High profile</entry>
1869                     </row>
1870                     <row>
1871                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10</constant>&nbsp;</entry>
1872                       <entry>High 10 profile</entry>
1873                     </row>
1874                     <row>
1875                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422</constant>&nbsp;</entry>
1876                       <entry>High 422 profile</entry>
1877                     </row>
1878                     <row>
1879                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE</constant>&nbsp;</entry>
1880                       <entry>High 444 Predictive profile</entry>
1881                     </row>
1882                     <row>
1883                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA</constant>&nbsp;</entry>
1884                       <entry>High 10 Intra profile</entry>
1885                     </row>
1886                     <row>
1887                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA</constant>&nbsp;</entry>
1888                       <entry>High 422 Intra profile</entry>
1889                     </row>
1890                     <row>
1891                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA</constant>&nbsp;</entry>
1892                       <entry>High 444 Intra profile</entry>
1893                     </row>
1894                     <row>
1895                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA</constant>&nbsp;</entry>
1896                       <entry>CAVLC 444 Intra profile</entry>
1897                     </row>
1898                     <row>
1899                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE</constant>&nbsp;</entry>
1900                       <entry>Scalable Baseline profile</entry>
1901                     </row>
1902                     <row>
1903                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH</constant>&nbsp;</entry>
1904                       <entry>Scalable High profile</entry>
1905                     </row>
1906                     <row>
1907                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA</constant>&nbsp;</entry>
1908                       <entry>Scalable High Intra profile</entry>
1909                     </row>
1910                     <row>
1911                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH</constant>&nbsp;</entry>
1912                       <entry>Stereo High profile</entry>
1913                     </row>
1914                     <row>
1915                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH</constant>&nbsp;</entry>
1916                       <entry>Multiview High profile</entry>
1917                     </row>
1918
1919                   </tbody>
1920                 </entrytbl>
1921               </row>
1922
1923               <row><entry></entry></row>
1924               <row id="v4l2-mpeg-video-mpeg4-profile">
1925                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant>&nbsp;</entry>
1926                 <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_profile</entry>
1927               </row>
1928               <row><entry spanname="descr">The profile information for MPEG4.
1929 Applicable to the MPEG4 encoder.
1930 Possible values are:</entry>
1931               </row>
1932               <row>
1933                 <entrytbl spanname="descr" cols="2">
1934                   <tbody valign="top">
1935                     <row>
1936                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_SIMPLE</constant>&nbsp;</entry>
1937                       <entry>Simple profile</entry>
1938                     </row>
1939                     <row>
1940                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_ADVANCED_SIMPLE</constant>&nbsp;</entry>
1941                       <entry>Advanced Simple profile</entry>
1942                     </row>
1943                     <row>
1944                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_CORE</constant>&nbsp;</entry>
1945                       <entry>Core profile</entry>
1946                     </row>
1947                     <row>
1948                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_SIMPLE_SCALABLE</constant>&nbsp;</entry>
1949                       <entry>Simple Scalable profile</entry>
1950                     </row>
1951                     <row>
1952                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY</constant>&nbsp;</entry>
1953                       <entry></entry>
1954                     </row>
1955                   </tbody>
1956                 </entrytbl>
1957               </row>
1958
1959               <row><entry></entry></row>
1960               <row>
1961                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MAX_REF_PIC</constant>&nbsp;</entry>
1962                 <entry>integer</entry>
1963               </row>
1964               <row><entry spanname="descr">The maximum number of reference pictures used for encoding.
1965 Applicable to the encoder.
1966 </entry>
1967               </row>
1968
1969               <row><entry></entry></row>
1970               <row id="v4l2-mpeg-video-multi-slice-mode">
1971                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant>&nbsp;</entry>
1972                 <entry>enum&nbsp;v4l2_mpeg_video_multi_slice_mode</entry>
1973               </row>
1974               <row><entry spanname="descr">Determines how the encoder should handle division of frame into slices.
1975 Applicable to the encoder.
1976 Possible values are:</entry>
1977               </row>
1978               <row>
1979                 <entrytbl spanname="descr" cols="2">
1980                   <tbody valign="top">
1981                     <row>
1982                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE</constant>&nbsp;</entry>
1983                       <entry>Single slice per frame.</entry>
1984                     </row>
1985                     <row>
1986                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB</constant>&nbsp;</entry>
1987                       <entry>Multiple slices with set maximum number of macroblocks per slice.</entry>
1988                     </row>
1989                     <row>
1990                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES</constant>&nbsp;</entry>
1991                       <entry>Multiple slice with set maximum size in bytes per slice.</entry>
1992                     </row>
1993                   </tbody>
1994                 </entrytbl>
1995               </row>
1996
1997               <row><entry></entry></row>
1998               <row>
1999                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB</constant>&nbsp;</entry>
2000                 <entry>integer</entry>
2001               </row>
2002               <row><entry spanname="descr">The maximum number of macroblocks in a slice. Used when
2003 <constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant> is set to <constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB</constant>.
2004 Applicable to the encoder.</entry>
2005               </row>
2006
2007               <row><entry></entry></row>
2008               <row>
2009                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES</constant>&nbsp;</entry>
2010                 <entry>integer</entry>
2011               </row>
2012               <row><entry spanname="descr">The maximum size of a slice in bytes. Used when
2013 <constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant> is set to <constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES</constant>.
2014 Applicable to the encoder.</entry>
2015               </row>
2016
2017               <row><entry></entry></row>
2018               <row id="v4l2-mpeg-video-h264-loop-filter-mode">
2019                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant>&nbsp;</entry>
2020                 <entry>enum&nbsp;v4l2_mpeg_video_h264_loop_filter_mode</entry>
2021               </row>
2022               <row><entry spanname="descr">Loop filter mode for H264 encoder.
2023 Possible values are:</entry>
2024               </row>
2025               <row>
2026                 <entrytbl spanname="descr" cols="2">
2027                   <tbody valign="top">
2028                     <row>
2029                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED</constant>&nbsp;</entry>
2030                       <entry>Loop filter is enabled.</entry>
2031                     </row>
2032                     <row>
2033                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED</constant>&nbsp;</entry>
2034                       <entry>Loop filter is disabled.</entry>
2035                     </row>
2036                     <row>
2037                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY</constant>&nbsp;</entry>
2038                       <entry>Loop filter is disabled at the slice boundary.</entry>
2039                     </row>
2040                   </tbody>
2041                 </entrytbl>
2042               </row>
2043
2044               <row><entry></entry></row>
2045               <row>
2046                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA</constant>&nbsp;</entry>
2047                 <entry>integer</entry>
2048               </row>
2049               <row><entry spanname="descr">Loop filter alpha coefficient, defined in the H264 standard.
2050 Applicable to the H264 encoder.</entry>
2051               </row>
2052
2053               <row><entry></entry></row>
2054               <row>
2055                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA</constant>&nbsp;</entry>
2056                 <entry>integer</entry>
2057               </row>
2058               <row><entry spanname="descr">Loop filter beta coefficient, defined in the H264 standard.
2059 Applicable to the H264 encoder.</entry>
2060               </row>
2061
2062               <row><entry></entry></row>
2063               <row id="v4l2-mpeg-video-h264-entropy-mode">
2064                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant>&nbsp;</entry>
2065                 <entry>enum&nbsp;v4l2_mpeg_video_h264_entropy_mode</entry>
2066               </row>
2067               <row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC.
2068 Applicable to the H264 encoder.
2069 Possible values are:</entry>
2070               </row>
2071               <row>
2072                 <entrytbl spanname="descr" cols="2">
2073                   <tbody valign="top">
2074                     <row>
2075                       <entry><constant>V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC</constant>&nbsp;</entry>
2076                       <entry>Use CAVLC entropy coding.</entry>
2077                     </row>
2078                     <row>
2079                       <entry><constant>V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC</constant>&nbsp;</entry>
2080                       <entry>Use CABAC entropy coding.</entry>
2081                     </row>
2082                   </tbody>
2083                 </entrytbl>
2084               </row>
2085
2086               <row><entry></entry></row>
2087               <row>
2088                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM</constant>&nbsp;</entry>
2089                 <entry>boolean</entry>
2090               </row>
2091               <row><entry spanname="descr">Enable 8X8 transform for H264. Applicable to the H264 encoder.</entry>
2092               </row>
2093
2094               <row><entry></entry></row>
2095               <row>
2096                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB</constant>&nbsp;</entry>
2097                 <entry>integer</entry>
2098               </row>
2099               <row><entry spanname="descr">Cyclic intra macroblock refresh. This is the number of continuous macroblocks
2100 refreshed every frame. Each frame a succesive set of macroblocks is refreshed until the cycle completes and starts from the
2101 top of the frame. Applicable to H264, H263 and MPEG4 encoder.</entry>
2102               </row>
2103
2104               <row><entry></entry></row>
2105               <row>
2106                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE</constant>&nbsp;</entry>
2107                 <entry>boolean</entry>
2108               </row>
2109               <row><entry spanname="descr">Frame level rate control enable.
2110 If this control is disabled then the quantization parameter for each frame type is constant and set with appropriate controls
2111 (e.g. <constant>V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP</constant>).
2112 If frame rate control is enabled then quantization parameter is adjusted to meet the chosen bitrate. Minimum and maximum value
2113 for the quantization parameter can be set with appropriate controls (e.g. <constant>V4L2_CID_MPEG_VIDEO_H263_MIN_QP</constant>).
2114 Applicable to encoders.</entry>
2115               </row>
2116
2117               <row><entry></entry></row>
2118               <row>
2119                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>&nbsp;</entry>
2120                 <entry>boolean</entry>
2121               </row>
2122               <row><entry spanname="descr">Macroblock level rate control enable.
2123 Applicable to the MPEG4 and H264 encoders.</entry>
2124               </row>
2125
2126               <row><entry></entry></row>
2127               <row>
2128                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_QPEL</constant>&nbsp;</entry>
2129                 <entry>boolean</entry>
2130               </row>
2131               <row><entry spanname="descr">Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4 encoder.</entry>
2132               </row>
2133
2134               <row><entry></entry></row>
2135               <row>
2136                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP</constant>&nbsp;</entry>
2137                 <entry>integer</entry>
2138               </row>
2139               <row><entry spanname="descr">Quantization parameter for an I frame for H263. Valid range: from 1 to 31.</entry>
2140               </row>
2141
2142               <row><entry></entry></row>
2143               <row>
2144                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_MIN_QP</constant>&nbsp;</entry>
2145                 <entry>integer</entry>
2146               </row>
2147               <row><entry spanname="descr">Minimum quantization parameter for H263. Valid range: from 1 to 31.</entry>
2148               </row>
2149
2150               <row><entry></entry></row>
2151               <row>
2152                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_MAX_QP</constant>&nbsp;</entry>
2153                 <entry>integer</entry>
2154               </row>
2155               <row><entry spanname="descr">Maximum quantization parameter for H263. Valid range: from 1 to 31.</entry>
2156               </row>
2157
2158               <row><entry></entry></row>
2159               <row>
2160                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP</constant>&nbsp;</entry>
2161                 <entry>integer</entry>
2162               </row>
2163               <row><entry spanname="descr">Quantization parameter for an P frame for H263. Valid range: from 1 to 31.</entry>
2164               </row>
2165
2166               <row><entry></entry></row>
2167               <row>
2168                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP</constant>&nbsp;</entry>
2169                 <entry>integer</entry>
2170               </row>
2171               <row><entry spanname="descr">Quantization parameter for an B frame for H263. Valid range: from 1 to 31.</entry>
2172               </row>
2173
2174               <row><entry></entry></row>
2175               <row>
2176                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP</constant>&nbsp;</entry>
2177                 <entry>integer</entry>
2178               </row>
2179               <row><entry spanname="descr">Quantization parameter for an I frame for H264. Valid range: from 0 to 51.</entry>
2180               </row>
2181
2182               <row><entry></entry></row>
2183               <row>
2184                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_MIN_QP</constant>&nbsp;</entry>
2185                 <entry>integer</entry>
2186               </row>
2187               <row><entry spanname="descr">Minimum quantization parameter for H264. Valid range: from 0 to 51.</entry>
2188               </row>
2189
2190               <row><entry></entry></row>
2191               <row>
2192                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_MAX_QP</constant>&nbsp;</entry>
2193                 <entry>integer</entry>
2194               </row>
2195               <row><entry spanname="descr">Maximum quantization parameter for H264. Valid range: from 0 to 51.</entry>
2196               </row>
2197
2198               <row><entry></entry></row>
2199               <row>
2200                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP</constant>&nbsp;</entry>
2201                 <entry>integer</entry>
2202               </row>
2203               <row><entry spanname="descr">Quantization parameter for an P frame for H264. Valid range: from 0 to 51.</entry>
2204               </row>
2205
2206               <row><entry></entry></row>
2207               <row>
2208                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP</constant>&nbsp;</entry>
2209                 <entry>integer</entry>
2210               </row>
2211               <row><entry spanname="descr">Quantization parameter for an B frame for H264. Valid range: from 0 to 51.</entry>
2212               </row>
2213
2214               <row><entry></entry></row>
2215               <row>
2216                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP</constant>&nbsp;</entry>
2217                 <entry>integer</entry>
2218               </row>
2219               <row><entry spanname="descr">Quantization parameter for an I frame for MPEG4. Valid range: from 1 to 31.</entry>
2220               </row>
2221
2222               <row><entry></entry></row>
2223               <row>
2224                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP</constant>&nbsp;</entry>
2225                 <entry>integer</entry>
2226               </row>
2227               <row><entry spanname="descr">Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.</entry>
2228               </row>
2229
2230               <row><entry></entry></row>
2231               <row>
2232                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP</constant>&nbsp;</entry>
2233                 <entry>integer</entry>
2234               </row>
2235               <row><entry spanname="descr">Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.</entry>
2236               </row>
2237
2238               <row><entry></entry></row>
2239               <row>
2240                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP</constant>&nbsp;</entry>
2241                 <entry>integer</entry>
2242               </row>
2243               <row><entry spanname="descr">Quantization parameter for an P frame for MPEG4. Valid range: from 1 to 31.</entry>
2244               </row>
2245
2246               <row><entry></entry></row>
2247               <row>
2248                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP</constant>&nbsp;</entry>
2249                 <entry>integer</entry>
2250               </row>
2251               <row><entry spanname="descr">Quantization parameter for an B frame for MPEG4. Valid range: from 1 to 31.</entry>
2252               </row>
2253
2254               <row><entry></entry></row>
2255               <row>
2256                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VBV_SIZE</constant>&nbsp;</entry>
2257                 <entry>integer</entry>
2258               </row>
2259               <row><entry spanname="descr">The Video Buffer Verifier size in kilobytes, it is used as a limitation of frame skip.
2260 The VBV is defined in the standard as a mean to verify that the produced stream will be succesfully decoded.
2261 The standard describes it as "Part of a hypothetical decoder that is conceptually connected to the
2262 output of the encoder. Its purpose is to provide a constraint on the variability of the data rate that an
2263 encoder or editing process may produce.".
2264 Applicable to the MPEG1, MPEG2, MPEG4 encoders.</entry>
2265               </row>
2266
2267               <row><entry></entry></row>
2268               <row>
2269                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
2270                 <entry>integer</entry>
2271               </row>
2272               <row><entry spanname="descr">The Coded Picture Buffer size in kilobytes, it is used as a limitation of frame skip.
2273 The CPB is defined in the H264 standard as a mean to verify that the produced stream will be succesfully decoded.
2274 Applicable to the H264 encoder.</entry>
2275               </row>
2276
2277               <row><entry></entry></row>
2278               <row>
2279                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_I_PERIOD</constant>&nbsp;</entry>
2280                 <entry>integer</entry>
2281               </row>
2282               <row><entry spanname="descr">Period between I-frames in the open GOP for H264. In case of an open GOP
2283 this is the period between two I-frames. The period between IDR (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE control.
2284 An IDR frame, which stands for Instantaneous Decoding Refresh is an I-frame after which no prior frames are
2285 referenced. This means that a stream can be restarted from an IDR frame without the need to store or decode any
2286 previous frames. Applicable to the H264 encoder.</entry>
2287               </row>
2288
2289               <row><entry></entry></row>
2290               <row id="v4l2-mpeg-video-header-mode">
2291                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant>&nbsp;</entry>
2292                 <entry>enum&nbsp;v4l2_mpeg_video_header_mode</entry>
2293               </row>
2294               <row><entry spanname="descr">Determines whether the header is returned as the first buffer or is
2295 it returned together with the first frame. Applicable to encoders.
2296 Possible values are:</entry>
2297               </row>
2298               <row>
2299                 <entrytbl spanname="descr" cols="2">
2300                   <tbody valign="top">
2301                     <row>
2302                       <entry><constant>V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE</constant>&nbsp;</entry>
2303                       <entry>The stream header is returned separately in the first buffer.</entry>
2304                     </row>
2305                     <row>
2306                       <entry><constant>V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME</constant>&nbsp;</entry>
2307                       <entry>The stream header is returned together with the first encoded frame.</entry>
2308                     </row>
2309                   </tbody>
2310                 </entrytbl>
2311               </row>
2312               <row><entry></entry></row>
2313               <row>
2314                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER</constant>&nbsp;</entry>
2315                 <entry>boolean</entry>
2316               </row><row><entry spanname="descr">Enabled the deblocking post processing filter for MPEG4 decoder.
2317 Applicable to the MPEG4 decoder.</entry>
2318               </row>
2319               <row><entry></entry></row>
2320               <row>
2321                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES</constant>&nbsp;</entry>
2322                 <entry>integer</entry>
2323               </row><row><entry spanname="descr">vop_time_increment_resolution value for MPEG4. Applicable to the MPEG4 encoder.</entry>
2324               </row>
2325               <row><entry></entry></row>
2326               <row>
2327                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC</constant>&nbsp;</entry>
2328                 <entry>integer</entry>
2329               </row><row><entry spanname="descr">vop_time_increment value for MPEG4. Applicable to the MPEG4 encoder.</entry>
2330               </row>
2331
2332             </tbody>
2333           </tgroup>
2334         </table>
2335       </section>
2336
2337       <section>
2338         <title>MFC 5.1 MPEG Controls</title>
2339
2340         <para>The following MPEG class controls deal with MPEG
2341 decoding and encoding settings that are specific to the Multi Format Codec 5.1 device present
2342 in the S5P family of SoCs by Samsung.
2343 </para>
2344
2345         <table pgwide="1" frame="none" id="mfc51-control-id">
2346           <title>MFC 5.1 Control IDs</title>
2347           <tgroup cols="4">
2348             <colspec colname="c1" colwidth="1*" />
2349             <colspec colname="c2" colwidth="6*" />
2350             <colspec colname="c3" colwidth="2*" />
2351             <colspec colname="c4" colwidth="6*" />
2352             <spanspec namest="c1" nameend="c2" spanname="id" />
2353             <spanspec namest="c2" nameend="c4" spanname="descr" />
2354             <thead>
2355               <row>
2356                 <entry spanname="id" align="left">ID</entry>
2357                 <entry align="left">Type</entry>
2358               </row><row><entry spanname="descr" align="left">Description</entry>
2359               </row>
2360             </thead>
2361             <tbody valign="top">
2362               <row><entry></entry></row>
2363               <row>
2364                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE</constant>&nbsp;</entry>
2365                 <entry>integer</entry>
2366               </row><row><entry spanname="descr">If the display delay is enabled then the decoder has to return a
2367 CAPTURE buffer after processing a certain number of OUTPUT buffers. If this number is low, then it may result in
2368 buffers not being dequeued in display order. In addition hardware may still use those buffers as reference, thus
2369 application should not write to those buffers. This feature can be used for example for generating thumbnails of videos.
2370 Applicable to the H264 decoder.
2371               </entry>
2372               </row>
2373               <row><entry></entry></row>
2374               <row>
2375                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY</constant>&nbsp;</entry>
2376                 <entry>integer</entry>
2377               </row><row><entry spanname="descr">Display delay value for H264 decoder.
2378 The decoder is forced to return a decoded frame after the set 'display delay' number of frames. If this number is
2379 low it may result in frames returned out of dispaly order, in addition the hardware may still be using the returned buffer
2380 as a reference picture for subsequent frames.
2381 </entry>
2382               </row>
2383               <row><entry></entry></row>
2384               <row>
2385                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P</constant>&nbsp;</entry>
2386                 <entry>integer</entry>
2387               </row><row><entry spanname="descr">The number of reference pictures used for encoding a P picture.
2388 Applicable to the H264 encoder.</entry>
2389               </row>
2390               <row><entry></entry></row>
2391               <row>
2392                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_PADDING</constant>&nbsp;</entry>
2393                 <entry>boolean</entry>
2394               </row><row><entry spanname="descr">Padding enable in the encoder - use a color instead of repeating border pixels.
2395 Applicable to encoders.</entry>
2396               </row>
2397               <row><entry></entry></row>
2398               <row>
2399                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV</constant>&nbsp;</entry>
2400                 <entry>integer</entry>
2401               </row><row><entry spanname="descr">Padding color in the encoder. Applicable to encoders. The supplied 32-bit integer is interpreted as follows (bit
2402 0 = least significant bit):</entry>
2403               </row>
2404               <row>
2405                 <entrytbl spanname="descr" cols="2">
2406                   <tbody valign="top">
2407                     <row>
2408                       <entry>Bit 0:7</entry>
2409                       <entry>V chrominance information</entry>
2410                     </row>
2411                     <row>
2412                       <entry>Bit 8:15</entry>
2413                       <entry>U chrominance information</entry>
2414                     </row>
2415                     <row>
2416                       <entry>Bit 16:23</entry>
2417                       <entry>Y luminance information</entry>
2418                     </row>
2419                     <row>
2420                       <entry>Bit 24:31</entry>
2421                       <entry>Must be zero.</entry>
2422                     </row>
2423                   </tbody>
2424                 </entrytbl>
2425               </row>
2426               <row><entry></entry></row>
2427               <row>
2428                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF</constant>&nbsp;</entry>
2429                 <entry>integer</entry>
2430               </row><row><entry spanname="descr">Reaction coefficient for MFC rate control. Applicable to encoders.
2431 <para>Note 1: Valid only when the frame level RC is enabled.</para>
2432 <para>Note 2: For tight CBR, this field must be small (ex. 2 ~ 10).
2433 For VBR, this field must be large (ex. 100 ~ 1000).</para>
2434 <para>Note 3: It is not recommended to use the greater number than FRAME_RATE * (10^9 / BIT_RATE).</para>
2435 </entry>
2436               </row>
2437               <row><entry></entry></row>
2438               <row>
2439                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK</constant>&nbsp;</entry>
2440                 <entry>boolean</entry>
2441               </row><row><entry spanname="descr">Adaptive rate control for dark region.
2442 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2443 Applicable to the H264 encoder.</entry>
2444               </row>
2445               <row><entry></entry></row>
2446               <row>
2447                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH</constant>&nbsp;</entry>
2448                 <entry>boolean</entry>
2449               </row><row><entry spanname="descr">Adaptive rate control for smooth region.
2450 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2451 Applicable to the H264 encoder.</entry>
2452               </row>
2453               <row><entry></entry></row>
2454               <row>
2455                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC</constant>&nbsp;</entry>
2456                 <entry>boolean</entry>
2457               </row><row><entry spanname="descr">Adaptive rate control for static region.
2458 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2459 Applicable to the H264 encoder.</entry>
2460               </row>
2461               <row><entry></entry></row>
2462               <row>
2463                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY</constant>&nbsp;</entry>
2464                 <entry>boolean</entry>
2465               </row><row><entry spanname="descr">Adaptive rate control for activity region.
2466 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2467 Applicable to the H264 encoder.</entry>
2468               </row>
2469               <row><entry></entry></row>
2470               <row id="v4l2-mpeg-mfc51-video-frame-skip-mode">
2471                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant>&nbsp;</entry>
2472                 <entry>enum&nbsp;v4l2_mpeg_mfc51_video_frame_skip_mode</entry>
2473               </row>
2474               <row><entry spanname="descr">
2475 Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then
2476 a chosen data limit then the frame will be skipped.
2477 Possible values are:</entry>
2478               </row>
2479               <row>
2480                 <entrytbl spanname="descr" cols="2">
2481                   <tbody valign="top">
2482                     <row>
2483                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED</constant>&nbsp;</entry>
2484                       <entry>Frame skip mode is disabled.</entry>
2485                     </row>
2486                     <row>
2487                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT</constant>&nbsp;</entry>
2488                       <entry>Frame skip mode enabled and buffer limit is set by the chosen level and is defined by the standard.</entry>
2489                     </row>
2490                     <row>
2491                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT</constant>&nbsp;</entry>
2492                       <entry>Frame skip mode enabled and buffer limit is set by the VBV (MPEG1/2/4) or CPB (H264) buffer size control.</entry>
2493                     </row>
2494                   </tbody>
2495                 </entrytbl>
2496               </row>
2497               <row><entry></entry></row>
2498               <row>
2499                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT</constant>&nbsp;</entry>
2500                 <entry>integer</entry>
2501               </row><row><entry spanname="descr">Enable rate-control with fixed target bit.
2502 If this setting is enabled, then the rate control logic of the encoder will calculate the average bitrate
2503 for a GOP and keep it below or equal the set bitrate target. Otherwise the rate control logic calculates the
2504 overall average bitrate for the stream and keeps it below or equal to the set bitrate. In the first case
2505 the average bitrate for the whole stream will be smaller then the set bitrate. This is caused because the
2506 average is calculated for smaller number of frames, on the other hand enabling this setting will ensure that
2507 the stream will meet tight bandwidth contraints. Applicable to encoders.
2508 </entry>
2509               </row>
2510               <row><entry></entry></row>
2511               <row id="v4l2-mpeg-mfc51-video-force-frame-type">
2512                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant>&nbsp;</entry>
2513                 <entry>enum&nbsp;v4l2_mpeg_mfc51_video_force_frame_type</entry>
2514               </row>
2515               <row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders.
2516 Possible values are:</entry>
2517               </row>
2518               <row>
2519                 <entrytbl spanname="descr" cols="2">
2520                   <tbody valign="top">
2521                     <row>
2522                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED</constant>&nbsp;</entry>
2523                       <entry>Forcing a specific frame type disabled.</entry>
2524                     </row>
2525                     <row>
2526                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME</constant>&nbsp;</entry>
2527                       <entry>Force an I-frame.</entry>
2528                     </row>
2529                     <row>
2530                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED</constant>&nbsp;</entry>
2531                       <entry>Force a non-coded frame.</entry>
2532                     </row>
2533                   </tbody>
2534                 </entrytbl>
2535               </row>
2536             </tbody>
2537           </tgroup>
2538         </table>
2539       </section>
2540
2541       <section>
2542         <title>CX2341x MPEG Controls</title>
2543
2544         <para>The following MPEG class controls deal with MPEG
2545 encoding settings that are specific to the Conexant CX23415 and
2546 CX23416 MPEG encoding chips.</para>
2547
2548         <table pgwide="1" frame="none" id="cx2341x-control-id">
2549           <title>CX2341x Control IDs</title>
2550           <tgroup cols="4">
2551             <colspec colname="c1" colwidth="1*" />
2552             <colspec colname="c2" colwidth="6*" />
2553             <colspec colname="c3" colwidth="2*" />
2554             <colspec colname="c4" colwidth="6*" />
2555             <spanspec namest="c1" nameend="c2" spanname="id" />
2556             <spanspec namest="c2" nameend="c4" spanname="descr" />
2557             <thead>
2558               <row>
2559                 <entry spanname="id" align="left">ID</entry>
2560                 <entry align="left">Type</entry>
2561               </row><row><entry spanname="descr" align="left">Description</entry>
2562               </row>
2563             </thead>
2564             <tbody valign="top">
2565               <row><entry></entry></row>
2566               <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode">
2567                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant>&nbsp;</entry>
2568                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry>
2569               </row><row><entry spanname="descr">Sets the Spatial
2570 Filter mode (default <constant>MANUAL</constant>). Possible values
2571 are:</entry>
2572               </row>
2573               <row>
2574                 <entrytbl spanname="descr" cols="2">
2575                   <tbody valign="top">
2576                     <row>
2577                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
2578                       <entry>Choose the filter manually</entry>
2579                     </row>
2580                     <row>
2581                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
2582                       <entry>Choose the filter automatically</entry>
2583                     </row>
2584                   </tbody>
2585                 </entrytbl>
2586               </row>
2587               <row><entry></entry></row>
2588               <row>
2589                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant>&nbsp;</entry>
2590                 <entry>integer&nbsp;(0-15)</entry>
2591               </row><row><entry spanname="descr">The setting for the
2592 Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry>
2593               </row>
2594               <row><entry></entry></row>
2595               <row id="luma-spatial-filter-type">
2596                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
2597                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry>
2598               </row><row><entry spanname="descr">Select the algorithm
2599 to use for the Luma Spatial Filter (default
2600 <constant>1D_HOR</constant>). Possible values:</entry>
2601               </row>
2602               <row>
2603                 <entrytbl spanname="descr" cols="2">
2604                   <tbody valign="top">
2605                     <row>
2606                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2607                       <entry>No filter</entry>
2608                     </row>
2609                     <row>
2610                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
2611                       <entry>One-dimensional horizontal</entry>
2612                     </row>
2613                     <row>
2614                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant>&nbsp;</entry>
2615                       <entry>One-dimensional vertical</entry>
2616                     </row>
2617                     <row>
2618                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant>&nbsp;</entry>
2619                       <entry>Two-dimensional separable</entry>
2620                     </row>
2621                     <row>
2622                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant>&nbsp;</entry>
2623                       <entry>Two-dimensional symmetrical
2624 non-separable</entry>
2625                     </row>
2626                   </tbody>
2627                 </entrytbl>
2628               </row>
2629               <row><entry></entry></row>
2630               <row id="chroma-spatial-filter-type">
2631                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
2632                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry>
2633               </row><row><entry spanname="descr">Select the algorithm
2634 for the Chroma Spatial Filter (default <constant>1D_HOR</constant>).
2635 Possible values are:</entry>
2636               </row>
2637               <row>
2638                 <entrytbl spanname="descr" cols="2">
2639                   <tbody valign="top">
2640                     <row>
2641                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2642                       <entry>No filter</entry>
2643                     </row>
2644                     <row>
2645                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
2646                       <entry>One-dimensional horizontal</entry>
2647                     </row>
2648                   </tbody>
2649                 </entrytbl>
2650               </row>
2651               <row><entry></entry></row>
2652               <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode">
2653                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant>&nbsp;</entry>
2654                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry>
2655               </row><row><entry spanname="descr">Sets the Temporal
2656 Filter mode (default <constant>MANUAL</constant>). Possible values
2657 are:</entry>
2658               </row>
2659               <row>
2660                 <entrytbl spanname="descr" cols="2">
2661                   <tbody valign="top">
2662                     <row>
2663                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
2664                       <entry>Choose the filter manually</entry>
2665                     </row>
2666                     <row>
2667                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
2668                       <entry>Choose the filter automatically</entry>
2669                     </row>
2670                   </tbody>
2671                 </entrytbl>
2672               </row>
2673               <row><entry></entry></row>
2674               <row>
2675                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant>&nbsp;</entry>
2676                 <entry>integer&nbsp;(0-31)</entry>
2677               </row><row><entry spanname="descr">The setting for the
2678 Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale
2679 capturing and 0 for scaled capturing.)</entry>
2680               </row>
2681               <row><entry></entry></row>
2682               <row id="v4l2-mpeg-cx2341x-video-median-filter-type">
2683                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant>&nbsp;</entry>
2684                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_median_filter_type</entry>
2685               </row><row><entry spanname="descr">Median Filter Type
2686 (default <constant>OFF</constant>). Possible values are:</entry>
2687               </row>
2688               <row>
2689                 <entrytbl spanname="descr" cols="2">
2690                   <tbody valign="top">
2691                     <row>
2692                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2693                       <entry>No filter</entry>
2694                     </row>
2695                     <row>
2696                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant>&nbsp;</entry>
2697                       <entry>Horizontal filter</entry>
2698                     </row>
2699                     <row>
2700                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant>&nbsp;</entry>
2701                       <entry>Vertical filter</entry>
2702                     </row>
2703                     <row>
2704                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant>&nbsp;</entry>
2705                       <entry>Horizontal and vertical filter</entry>
2706                     </row>
2707                     <row>
2708                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant>&nbsp;</entry>
2709                       <entry>Diagonal filter</entry>
2710                     </row>
2711                   </tbody>
2712                 </entrytbl>
2713               </row>
2714               <row><entry></entry></row>
2715               <row>
2716                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
2717                 <entry>integer&nbsp;(0-255)</entry>
2718               </row><row><entry spanname="descr">Threshold above which
2719 the luminance median filter is enabled (default 0)</entry>
2720               </row>
2721               <row><entry></entry></row>
2722               <row>
2723                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
2724                 <entry>integer&nbsp;(0-255)</entry>
2725               </row><row><entry spanname="descr">Threshold below which
2726 the luminance median filter is enabled (default 255)</entry>
2727               </row>
2728               <row><entry></entry></row>
2729               <row>
2730                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
2731                 <entry>integer&nbsp;(0-255)</entry>
2732               </row><row><entry spanname="descr">Threshold above which
2733 the chroma median filter is enabled (default 0)</entry>
2734               </row>
2735               <row><entry></entry></row>
2736               <row>
2737                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
2738                 <entry>integer&nbsp;(0-255)</entry>
2739               </row><row><entry spanname="descr">Threshold below which
2740 the chroma median filter is enabled (default 255)</entry>
2741               </row>
2742               <row><entry></entry></row>
2743               <row>
2744                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant>&nbsp;</entry>
2745                 <entry>boolean</entry>
2746               </row>
2747               <row><entry spanname="descr">The CX2341X MPEG encoder
2748 can insert one empty MPEG-2 PES packet into the stream between every
2749 four video frames. The packet size is 2048 bytes, including the
2750 packet_start_code_prefix and stream_id fields. The stream_id is 0xBF
2751 (private stream 2). The payload consists of 0x00 bytes, to be filled
2752 in by the application. 0 = do not insert, 1 = insert packets.</entry>
2753               </row>
2754             </tbody>
2755           </tgroup>
2756         </table>
2757       </section>
2758     </section>
2759
2760     <section id="camera-controls">
2761       <title>Camera Control Reference</title>
2762
2763       <para>The Camera class includes controls for mechanical (or
2764 equivalent digital) features of a device such as controllable lenses
2765 or sensors.</para>
2766
2767     <table pgwide="1" frame="none" id="camera-control-id">
2768       <title>Camera Control IDs</title>
2769       <tgroup cols="4">
2770         <colspec colname="c1" colwidth="1*" />
2771         <colspec colname="c2" colwidth="6*" />
2772         <colspec colname="c3" colwidth="2*" />
2773         <colspec colname="c4" colwidth="6*" />
2774         <spanspec namest="c1" nameend="c2" spanname="id" />
2775         <spanspec namest="c2" nameend="c4" spanname="descr" />
2776         <thead>
2777           <row>
2778             <entry spanname="id" align="left">ID</entry>
2779             <entry align="left">Type</entry>
2780           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
2781           </row>
2782         </thead>
2783         <tbody valign="top">
2784           <row><entry></entry></row>
2785           <row>
2786             <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant>&nbsp;</entry>
2787             <entry>class</entry>
2788           </row><row><entry spanname="descr">The Camera class
2789 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
2790 description of this control class.</entry>
2791           </row>
2792           <row><entry></entry></row>
2793
2794           <row id="v4l2-exposure-auto-type">
2795             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant>&nbsp;</entry>
2796             <entry>enum&nbsp;v4l2_exposure_auto_type</entry>
2797           </row><row><entry spanname="descr">Enables automatic
2798 adjustments of the exposure time and/or iris aperture. The effect of
2799 manual changes of the exposure time or iris aperture while these
2800 features are enabled is undefined, drivers should ignore such
2801 requests. Possible values are:</entry>
2802           </row>
2803           <row>
2804             <entrytbl spanname="descr" cols="2">
2805               <tbody valign="top">
2806                 <row>
2807                   <entry><constant>V4L2_EXPOSURE_AUTO</constant>&nbsp;</entry>
2808                       <entry>Automatic exposure time, automatic iris
2809 aperture.</entry>
2810                 </row>
2811                 <row>
2812                   <entry><constant>V4L2_EXPOSURE_MANUAL</constant>&nbsp;</entry>
2813                   <entry>Manual exposure time, manual iris.</entry>
2814                 </row>
2815                 <row>
2816                   <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant>&nbsp;</entry>
2817                   <entry>Manual exposure time, auto iris.</entry>
2818                 </row>
2819                 <row>
2820                   <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant>&nbsp;</entry>
2821                   <entry>Auto exposure time, manual iris.</entry>
2822                 </row>
2823               </tbody>
2824             </entrytbl>
2825           </row>
2826           <row><entry></entry></row>
2827
2828           <row>
2829             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant>&nbsp;</entry>
2830             <entry>integer</entry>
2831           </row><row><entry spanname="descr">Determines the exposure
2832 time of the camera sensor. The exposure time is limited by the frame
2833 interval. Drivers should interpret the values as 100 &micro;s units,
2834 where the value 1 stands for 1/10000th of a second, 10000 for 1 second
2835 and 100000 for 10 seconds.</entry>
2836           </row>
2837           <row><entry></entry></row>
2838
2839           <row>
2840             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant>&nbsp;</entry>
2841             <entry>boolean</entry>
2842           </row><row><entry spanname="descr">When
2843 <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to
2844 <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>,
2845 this control determines if the device may dynamically vary the frame
2846 rate. By default this feature is disabled (0) and the frame rate must
2847 remain constant.</entry>
2848           </row>
2849           <row><entry></entry></row>
2850
2851           <row>
2852             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_BIAS</constant>&nbsp;</entry>
2853             <entry>integer menu</entry>
2854           </row><row><entry spanname="descr"> Determines the automatic
2855 exposure compensation, it is effective only when <constant>V4L2_CID_EXPOSURE_AUTO</constant>
2856 control is set to <constant>AUTO</constant>, <constant>SHUTTER_PRIORITY </constant>
2857 or <constant>APERTURE_PRIORITY</constant>.
2858 It is expressed in terms of EV, drivers should interpret the values as 0.001 EV
2859 units, where the value 1000 stands for +1 EV.
2860 <para>Increasing the exposure compensation value is equivalent to decreasing
2861 the exposure value (EV) and will increase the amount of light at the image
2862 sensor. The camera performs the exposure compensation by adjusting absolute
2863 exposure time and/or aperture.</para></entry>
2864           </row>
2865           <row><entry></entry></row>
2866
2867           <row id="v4l2-exposure-metering">
2868             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_METERING</constant>&nbsp;</entry>
2869             <entry>enum&nbsp;v4l2_exposure_metering</entry>
2870           </row><row><entry spanname="descr">Determines how the camera measures
2871 the amount of light available for the frame exposure. Possible values are:</entry>
2872           </row>
2873           <row>
2874             <entrytbl spanname="descr" cols="2">
2875               <tbody valign="top">
2876                 <row>
2877                   <entry><constant>V4L2_EXPOSURE_METERING_AVERAGE</constant>&nbsp;</entry>
2878                   <entry>Use the light information coming from the entire frame
2879 and average giving no weighting to any particular portion of the metered area.
2880                   </entry>
2881                 </row>
2882                 <row>
2883                   <entry><constant>V4L2_EXPOSURE_METERING_CENTER_WEIGHTED</constant>&nbsp;</entry>
2884                   <entry>Average the light information coming from the entire frame
2885 giving priority to the center of the metered area.</entry>
2886                 </row>
2887                 <row>
2888                   <entry><constant>V4L2_EXPOSURE_METERING_SPOT</constant>&nbsp;</entry>
2889                   <entry>Measure only very small area at the center of the frame.</entry>
2890                 </row>
2891               </tbody>
2892             </entrytbl>
2893           </row>
2894           <row><entry></entry></row>
2895
2896           <row>
2897             <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
2898             <entry>integer</entry>
2899           </row><row><entry spanname="descr">This control turns the
2900 camera horizontally by the specified amount. The unit is undefined. A
2901 positive value moves the camera to the right (clockwise when viewed
2902 from above), a negative value to the left. A value of zero does not
2903 cause motion. This is a write-only control.</entry>
2904           </row>
2905           <row><entry></entry></row>
2906
2907           <row>
2908             <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant>&nbsp;</entry>
2909             <entry>integer</entry>
2910           </row><row><entry spanname="descr">This control turns the
2911 camera vertically by the specified amount. The unit is undefined. A
2912 positive value moves the camera up, a negative value down. A value of
2913 zero does not cause motion. This is a write-only control.</entry>
2914           </row>
2915           <row><entry></entry></row>
2916
2917           <row>
2918             <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant>&nbsp;</entry>
2919             <entry>button</entry>
2920           </row><row><entry spanname="descr">When this control is set,
2921 the camera moves horizontally to the default position.</entry>
2922           </row>
2923           <row><entry></entry></row>
2924
2925           <row>
2926             <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant>&nbsp;</entry>
2927             <entry>button</entry>
2928           </row><row><entry spanname="descr">When this control is set,
2929 the camera moves vertically to the default position.</entry>
2930           </row>
2931           <row><entry></entry></row>
2932
2933           <row>
2934             <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant>&nbsp;</entry>
2935             <entry>integer</entry>
2936           </row><row><entry spanname="descr">This control
2937 turns the camera horizontally to the specified position. Positive
2938 values move the camera to the right (clockwise when viewed from above),
2939 negative values to the left. Drivers should interpret the values as arc
2940 seconds, with valid values between -180 * 3600 and +180 * 3600
2941 inclusive.</entry>
2942           </row>
2943           <row><entry></entry></row>
2944
2945           <row>
2946             <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant>&nbsp;</entry>
2947             <entry>integer</entry>
2948           </row><row><entry spanname="descr">This control
2949 turns the camera vertically to the specified position. Positive values
2950 move the camera up, negative values down. Drivers should interpret the
2951 values as arc seconds, with valid values between -180 * 3600 and +180
2952 * 3600 inclusive.</entry>
2953           </row>
2954           <row><entry></entry></row>
2955
2956           <row>
2957             <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant>&nbsp;</entry>
2958             <entry>integer</entry>
2959           </row><row><entry spanname="descr">This control sets the
2960 focal point of the camera to the specified position. The unit is
2961 undefined. Positive values set the focus closer to the camera,
2962 negative values towards infinity.</entry>
2963           </row>
2964           <row><entry></entry></row>
2965
2966           <row>
2967             <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant>&nbsp;</entry>
2968             <entry>integer</entry>
2969           </row><row><entry spanname="descr">This control moves the
2970 focal point of the camera by the specified amount. The unit is
2971 undefined. Positive values move the focus closer to the camera,
2972 negative values towards infinity. This is a write-only control.</entry>
2973           </row>
2974           <row><entry></entry></row>
2975
2976           <row>
2977             <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
2978             <entry>boolean</entry>
2979           </row><row><entry spanname="descr">Enables automatic focus
2980 adjustments. The effect of manual focus adjustments while this feature
2981 is enabled is undefined, drivers should ignore such requests.</entry>
2982           </row>
2983           <row><entry></entry></row>
2984
2985           <row>
2986             <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry>
2987             <entry>integer</entry>
2988           </row><row><entry spanname="descr">Specify the objective lens
2989 focal length as an absolute value. The zoom unit is driver-specific and its
2990 value should be a positive integer.</entry>
2991           </row>
2992           <row><entry></entry></row>
2993
2994           <row>
2995             <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant>&nbsp;</entry>
2996             <entry>integer</entry>
2997           </row><row><entry spanname="descr">Specify the objective lens
2998 focal length relatively to the current value. Positive values move the zoom
2999 lens group towards the telephoto direction, negative values towards the
3000 wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry>
3001           </row>
3002           <row><entry></entry></row>
3003
3004           <row>
3005             <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant>&nbsp;</entry>
3006             <entry>integer</entry>
3007           </row><row><entry spanname="descr">Move the objective lens group
3008 at the specified speed until it reaches physical device limits or until an
3009 explicit request to stop the movement. A positive value moves the zoom lens
3010 group towards the telephoto direction. A value of zero stops the zoom lens
3011 group movement. A negative value moves the zoom lens group towards the
3012 wide-angle direction. The zoom speed unit is driver-specific.</entry>
3013           </row>
3014           <row><entry></entry></row>
3015
3016           <row>
3017             <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant>&nbsp;</entry>
3018             <entry>integer</entry>
3019           </row><row><entry spanname="descr">This control sets the
3020 camera's aperture to the specified value. The unit is undefined.
3021 Larger values open the iris wider, smaller values close it.</entry>
3022           </row>
3023           <row><entry></entry></row>
3024
3025           <row>
3026             <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant>&nbsp;</entry>
3027             <entry>integer</entry>
3028           </row><row><entry spanname="descr">This control modifies the
3029 camera's aperture by the specified amount. The unit is undefined.
3030 Positive values open the iris one step further, negative values close
3031 it one step further. This is a write-only control.</entry>
3032           </row>
3033           <row><entry></entry></row>
3034
3035           <row>
3036             <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry>
3037             <entry>boolean</entry>
3038           </row><row><entry spanname="descr">Prevent video from being acquired
3039 by the camera. When this control is set to <constant>TRUE</constant> (1), no
3040 image can be captured by the camera. Common means to enforce privacy are
3041 mechanical obturation of the sensor and firmware image processing, but the
3042 device is not restricted to these methods. Devices that implement the privacy
3043 control must support read access and may support write access.</entry>
3044           </row>
3045
3046           <row>
3047             <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant>&nbsp;</entry>
3048             <entry>integer</entry>
3049           </row><row><entry spanname="descr">Switch the band-stop filter of a
3050 camera sensor on or off, or specify its strength. Such band-stop filters can
3051 be used, for example, to filter out the fluorescent light component.</entry>
3052           </row>
3053           <row><entry></entry></row>
3054
3055           <row id="v4l2-auto-n-preset-white-balance">
3056             <entry spanname="id"><constant>V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</constant>&nbsp;</entry>
3057             <entry>enum&nbsp;v4l2_auto_n_preset_white_balance</entry>
3058           </row><row><entry spanname="descr">Sets white balance to automatic,
3059 manual or a preset. The presets determine color temperature of the light as
3060 a hint to the camera for white balance adjustments resulting in most accurate
3061 color representation. The following white balance presets are listed in order
3062 of increasing color temperature.</entry>
3063           </row>
3064           <row>
3065             <entrytbl spanname="descr" cols="2">
3066               <tbody valign="top">
3067                 <row>
3068                   <entry><constant>V4L2_WHITE_BALANCE_MANUAL</constant>&nbsp;</entry>
3069                   <entry>Manual white balance.</entry>
3070                 </row>
3071                 <row>
3072                   <entry><constant>V4L2_WHITE_BALANCE_AUTO</constant>&nbsp;</entry>
3073                   <entry>Automatic white balance adjustments.</entry>
3074                 </row>
3075                 <row>
3076                   <entry><constant>V4L2_WHITE_BALANCE_INCANDESCENT</constant>&nbsp;</entry>
3077                   <entry>White balance setting for incandescent (tungsten) lighting.
3078 It generally cools down the colors and corresponds approximately to 2500...3500 K
3079 color temperature range.</entry>
3080                 </row>
3081                 <row>
3082                   <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT</constant>&nbsp;</entry>
3083                   <entry>White balance preset for fluorescent lighting.
3084 It corresponds approximately to 4000...5000 K color temperature.</entry>
3085                 </row>
3086                 <row>
3087                   <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT_H</constant>&nbsp;</entry>
3088                   <entry>With this setting the camera will compensate for
3089 fluorescent H lighting.</entry>
3090                 </row>
3091                 <row>
3092                   <entry><constant>V4L2_WHITE_BALANCE_HORIZON</constant>&nbsp;</entry>
3093                   <entry>White balance setting for horizon daylight.
3094 It corresponds approximately to 5000 K color temperature.</entry>
3095                 </row>
3096                 <row>
3097                   <entry><constant>V4L2_WHITE_BALANCE_DAYLIGHT</constant>&nbsp;</entry>
3098                   <entry>White balance preset for daylight (with clear sky).
3099 It corresponds approximately to 5000...6500 K color temperature.</entry>
3100                 </row>
3101                 <row>
3102                   <entry><constant>V4L2_WHITE_BALANCE_FLASH</constant>&nbsp;</entry>
3103                   <entry>With this setting the camera will compensate for the flash
3104 light. It slightly warms up the colors and corresponds roughly to 5000...5500 K
3105 color temperature.</entry>
3106                 </row>
3107                 <row>
3108                   <entry><constant>V4L2_WHITE_BALANCE_CLOUDY</constant>&nbsp;</entry>
3109                   <entry>White balance preset for moderately overcast sky.
3110 This option corresponds approximately to 6500...8000 K color temperature
3111 range.</entry>
3112                 </row>
3113                 <row>
3114                   <entry><constant>V4L2_WHITE_BALANCE_SHADE</constant>&nbsp;</entry>
3115                   <entry>White balance preset for shade or heavily overcast
3116 sky. It corresponds approximately to 9000...10000 K color temperature.
3117 </entry>
3118                 </row>
3119               </tbody>
3120             </entrytbl>
3121           </row>
3122           <row><entry></entry></row>
3123
3124           <row id="v4l2-wide-dynamic-range">
3125             <entry spanname="id"><constant>V4L2_CID_WIDE_DYNAMIC_RANGE</constant></entry>
3126             <entry>boolean</entry>
3127           </row>
3128           <row>
3129             <entry spanname="descr">Enables or disables the camera's wide dynamic
3130 range feature. This feature allows to obtain clear images in situations where
3131 intensity of the illumination varies significantly throughout the scene, i.e.
3132 there are simultaneously very dark and very bright areas. It is most commonly
3133 realized in cameras by combining two subsequent frames with different exposure
3134 times. <footnote id="ctypeconv"><para> This control may be changed to a menu
3135 control in the future, if more options are required.</para></footnote></entry>
3136           </row>
3137           <row><entry></entry></row>
3138
3139           <row id="v4l2-image-stabilization">
3140             <entry spanname="id"><constant>V4L2_CID_IMAGE_STABILIZATION</constant></entry>
3141             <entry>boolean</entry>
3142           </row>
3143           <row>
3144             <entry spanname="descr">Enables or disables image stabilization.
3145               <footnoteref linkend="ctypeconv"/></entry>
3146           </row>
3147           <row><entry></entry></row>
3148
3149           <row>
3150             <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY</constant>&nbsp;</entry>
3151             <entry>integer menu</entry>
3152           </row><row><entry spanname="descr">Determines ISO equivalent of an
3153 image sensor indicating the sensor's sensitivity to light. The numbers are
3154 expressed in arithmetic scale, as per <xref linkend="iso12232" /> standard,
3155 where doubling the sensor sensitivity is represented by doubling the numerical
3156 ISO value. Applications should interpret the values as standard ISO values
3157 multiplied by 1000, e.g. control value 800 stands for ISO 0.8. Drivers will
3158 usually support only a subset of standard ISO values. The effect of setting
3159 this control while the <constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>
3160 control is set to a value other than <constant>V4L2_CID_ISO_SENSITIVITY_MANUAL
3161 </constant> is undefined, drivers should ignore such requests.</entry>
3162           </row>
3163           <row><entry></entry></row>
3164
3165           <row id="v4l2-iso-sensitivity-auto-type">
3166             <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3167             <entry>enum&nbsp;v4l2_iso_sensitivity_type</entry>
3168           </row><row><entry spanname="descr">Enables or disables automatic ISO
3169 sensitivity adjustments.</entry>
3170           </row>
3171           <row>
3172             <entrytbl spanname="descr" cols="2">
3173               <tbody valign="top">
3174                 <row>
3175                   <entry><constant>V4L2_CID_ISO_SENSITIVITY_MANUAL</constant>&nbsp;</entry>
3176                   <entry>Manual ISO sensitivity.</entry>
3177                 </row>
3178                 <row>
3179                   <entry><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3180                   <entry>Automatic ISO sensitivity adjustments.</entry>
3181                 </row>
3182               </tbody>
3183             </entrytbl>
3184           </row>
3185           <row><entry></entry></row>
3186
3187         </tbody>
3188       </tgroup>
3189     </table>
3190   </section>
3191
3192     <section id="fm-tx-controls">
3193       <title>FM Transmitter Control Reference</title>
3194
3195       <para>The FM Transmitter (FM_TX) class includes controls for common features of
3196 FM transmissions capable devices. Currently this class includes parameters for audio
3197 compression, pilot tone generation, audio deviation limiter, RDS transmission and
3198 tuning power features.</para>
3199
3200       <table pgwide="1" frame="none" id="fm-tx-control-id">
3201       <title>FM_TX Control IDs</title>
3202
3203       <tgroup cols="4">
3204         <colspec colname="c1" colwidth="1*" />
3205         <colspec colname="c2" colwidth="6*" />
3206         <colspec colname="c3" colwidth="2*" />
3207         <colspec colname="c4" colwidth="6*" />
3208         <spanspec namest="c1" nameend="c2" spanname="id" />
3209         <spanspec namest="c2" nameend="c4" spanname="descr" />
3210         <thead>
3211           <row>
3212             <entry spanname="id" align="left">ID</entry>
3213             <entry align="left">Type</entry>
3214           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3215           </row>
3216         </thead>
3217         <tbody valign="top">
3218           <row><entry></entry></row>
3219           <row>
3220             <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant>&nbsp;</entry>
3221             <entry>class</entry>
3222           </row><row><entry spanname="descr">The FM_TX class
3223 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
3224 description of this control class.</entry>
3225           </row>
3226           <row>
3227             <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant>&nbsp;</entry>
3228             <entry>integer</entry>
3229           </row>
3230           <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz.
3231 The range and step are driver-specific.</entry>
3232           </row>
3233           <row>
3234             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant>&nbsp;</entry>
3235             <entry>integer</entry>
3236           </row>
3237           <row><entry spanname="descr">Sets the RDS Programme Identification field
3238 for transmission.</entry>
3239           </row>
3240           <row>
3241             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant>&nbsp;</entry>
3242             <entry>integer</entry>
3243           </row>
3244           <row><entry spanname="descr">Sets the RDS Programme Type field for transmission.
3245 This encodes up to 31 pre-defined programme types.</entry>
3246           </row>
3247           <row>
3248             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant>&nbsp;</entry>
3249             <entry>string</entry>
3250           </row>
3251           <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission.
3252 It is intended for static display on a receiver. It is the primary aid to listeners in programme service
3253 identification and selection.  In Annex E of <xref linkend="en50067" />, the RDS specification,
3254 there is a full description of the correct character encoding for Programme Service name strings.
3255 Also from RDS specification, PS is usually a single eight character text. However, it is also possible
3256 to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
3257 with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
3258           </row>
3259           <row>
3260             <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant>&nbsp;</entry>
3261             <entry>string</entry>
3262           </row>
3263           <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of
3264 what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
3265 programme-related information or any other text. In these cases, RadioText should be used in addition to
3266 <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
3267 in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being
3268 used to transmit it, either 32 (2A block) or 64 (2B block).  However, it is also possible
3269 to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
3270 with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
3271           </row>
3272           <row>
3273             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry>
3274             <entry>boolean</entry>
3275           </row>
3276           <row><entry spanname="descr">Enables or disables the audio deviation limiter feature.
3277 The limiter is useful when trying to maximize the audio volume, minimize receiver-generated
3278 distortion and prevent overmodulation.
3279 </entry>
3280           </row>
3281           <row>
3282             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant>&nbsp;</entry>
3283             <entry>integer</entry>
3284           </row>
3285           <row><entry spanname="descr">Sets the audio deviation limiter feature release time.
3286 Unit is in useconds. Step and range are driver-specific.</entry>
3287           </row>
3288           <row>
3289             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant>&nbsp;</entry>
3290             <entry>integer</entry>
3291           </row>
3292           <row><entry spanname="descr">Configures audio frequency deviation level in Hz.
3293 The range and step are driver-specific.</entry>
3294           </row>
3295           <row>
3296             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant>&nbsp;</entry>
3297             <entry>boolean</entry>
3298           </row>
3299           <row><entry spanname="descr">Enables or disables the audio compression feature.
3300 This feature amplifies signals below the threshold by a fixed gain and compresses audio
3301 signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry>
3302           </row>
3303           <row>
3304             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant>&nbsp;</entry>
3305             <entry>integer</entry>
3306           </row>
3307           <row><entry spanname="descr">Sets the gain for audio compression feature. It is
3308 a dB value. The range and step are driver-specific.</entry>
3309           </row>
3310           <row>
3311             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant>&nbsp;</entry>
3312             <entry>integer</entry>
3313           </row>
3314           <row><entry spanname="descr">Sets the threshold level for audio compression freature.
3315 It is a dB value. The range and step are driver-specific.</entry>
3316           </row>
3317           <row>
3318             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant>&nbsp;</entry>
3319             <entry>integer</entry>
3320           </row>
3321           <row><entry spanname="descr">Sets the attack time for audio compression feature.
3322 It is a useconds value. The range and step are driver-specific.</entry>
3323           </row>
3324           <row>
3325             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant>&nbsp;</entry>
3326             <entry>integer</entry>
3327           </row>
3328           <row><entry spanname="descr">Sets the release time for audio compression feature.
3329 It is a useconds value. The range and step are driver-specific.</entry>
3330           </row>
3331           <row>
3332             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant>&nbsp;</entry>
3333             <entry>boolean</entry>
3334           </row>
3335           <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry>
3336           </row>
3337           <row>
3338             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant>&nbsp;</entry>
3339             <entry>integer</entry>
3340           </row>
3341           <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is
3342 in Hz. The range and step are driver-specific.</entry>
3343           </row>
3344           <row>
3345             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant>&nbsp;</entry>
3346             <entry>integer</entry>
3347           </row>
3348           <row><entry spanname="descr">Configures pilot tone frequency value. Unit is
3349 in Hz. The range and step are driver-specific.</entry>
3350           </row>
3351           <row>
3352             <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant>&nbsp;</entry>
3353             <entry>integer</entry>
3354           </row>
3355           <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting.
3356 A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies.
3357 Depending on the region, a time constant of either 50 or 75 useconds is used. The enum&nbsp;v4l2_preemphasis
3358 defines possible values for pre-emphasis. Here they are:</entry>
3359         </row><row>
3360         <entrytbl spanname="descr" cols="2">
3361                   <tbody valign="top">
3362                     <row>
3363                       <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant>&nbsp;</entry>
3364                       <entry>No pre-emphasis is applied.</entry>
3365                     </row>
3366                     <row>
3367                       <entry><constant>V4L2_PREEMPHASIS_50_uS</constant>&nbsp;</entry>
3368                       <entry>A pre-emphasis of 50 uS is used.</entry>
3369                     </row>
3370                     <row>
3371                       <entry><constant>V4L2_PREEMPHASIS_75_uS</constant>&nbsp;</entry>
3372                       <entry>A pre-emphasis of 75 uS is used.</entry>
3373                     </row>
3374                   </tbody>
3375                 </entrytbl>
3376
3377           </row>
3378           <row>
3379             <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant>&nbsp;</entry>
3380             <entry>integer</entry>
3381           </row>
3382           <row><entry spanname="descr">Sets the output power level for signal transmission.
3383 Unit is in dBuV. Range and step are driver-specific.</entry>
3384           </row>
3385           <row>
3386             <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant>&nbsp;</entry>
3387             <entry>integer</entry>
3388           </row>
3389           <row><entry spanname="descr">This selects the value of antenna tuning capacitor
3390 manually or automatically if set to zero. Unit, range and step are driver-specific.</entry>
3391           </row>
3392           <row><entry></entry></row>
3393         </tbody>
3394       </tgroup>
3395       </table>
3396
3397 <para>For more details about RDS specification, refer to
3398 <xref linkend="en50067" /> document, from CENELEC.</para>
3399     </section>
3400
3401     <section id="flash-controls">
3402       <title>Flash Control Reference</title>
3403
3404       <note>
3405         <title>Experimental</title>
3406
3407         <para>This is an <link linkend="experimental">experimental</link>
3408 interface and may change in the future.</para>
3409       </note>
3410
3411       <para>
3412         The V4L2 flash controls are intended to provide generic access
3413         to flash controller devices. Flash controller devices are
3414         typically used in digital cameras.
3415       </para>
3416
3417       <para>
3418         The interface can support both LED and xenon flash devices. As
3419         of writing this, there is no xenon flash driver using this
3420         interface.
3421       </para>
3422
3423       <section id="flash-controls-use-cases">
3424         <title>Supported use cases</title>
3425
3426         <section>
3427           <title>Unsynchronised LED flash (software strobe)</title>
3428
3429           <para>
3430             Unsynchronised LED flash is controlled directly by the
3431             host as the sensor. The flash must be enabled by the host
3432             before the exposure of the image starts and disabled once
3433             it ends. The host is fully responsible for the timing of
3434             the flash.
3435           </para>
3436
3437           <para>Example of such device: Nokia N900.</para>
3438         </section>
3439
3440         <section>
3441           <title>Synchronised LED flash (hardware strobe)</title>
3442
3443           <para>
3444             The synchronised LED flash is pre-programmed by the host
3445             (power and timeout) but controlled by the sensor through a
3446             strobe signal from the sensor to the flash.
3447           </para>
3448
3449           <para>
3450             The sensor controls the flash duration and timing. This
3451             information typically must be made available to the
3452             sensor.
3453           </para>
3454
3455         </section>
3456
3457         <section>
3458           <title>LED flash as torch</title>
3459
3460           <para>
3461             LED flash may be used as torch in conjunction with another
3462             use case involving camera or individually.
3463           </para>
3464
3465         </section>
3466
3467       </section>
3468
3469       <table pgwide="1" frame="none" id="flash-control-id">
3470       <title>Flash Control IDs</title>
3471
3472       <tgroup cols="4">
3473         <colspec colname="c1" colwidth="1*" />
3474         <colspec colname="c2" colwidth="6*" />
3475         <colspec colname="c3" colwidth="2*" />
3476         <colspec colname="c4" colwidth="6*" />
3477         <spanspec namest="c1" nameend="c2" spanname="id" />
3478         <spanspec namest="c2" nameend="c4" spanname="descr" />
3479         <thead>
3480           <row>
3481             <entry spanname="id" align="left">ID</entry>
3482             <entry align="left">Type</entry>
3483           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3484           </row>
3485         </thead>
3486         <tbody valign="top">
3487           <row><entry></entry></row>
3488           <row>
3489             <entry spanname="id"><constant>V4L2_CID_FLASH_CLASS</constant></entry>
3490             <entry>class</entry>
3491           </row>
3492           <row>
3493             <entry spanname="descr">The FLASH class descriptor.</entry>
3494           </row>
3495           <row>
3496             <entry spanname="id"><constant>V4L2_CID_FLASH_LED_MODE</constant></entry>
3497             <entry>menu</entry>
3498           </row>
3499           <row id="v4l2-flash-led-mode">
3500             <entry spanname="descr">Defines the mode of the flash LED,
3501             the high-power white LED attached to the flash controller.
3502             Setting this control may not be possible in presence of
3503             some faults. See V4L2_CID_FLASH_FAULT.</entry>
3504           </row>
3505           <row>
3506             <entrytbl spanname="descr" cols="2">
3507               <tbody valign="top">
3508                 <row>
3509                   <entry><constant>V4L2_FLASH_LED_MODE_NONE</constant></entry>
3510                   <entry>Off.</entry>
3511                 </row>
3512                 <row>
3513                   <entry><constant>V4L2_FLASH_LED_MODE_FLASH</constant></entry>
3514                   <entry>Flash mode.</entry>
3515                 </row>
3516                 <row>
3517                   <entry><constant>V4L2_FLASH_LED_MODE_TORCH</constant></entry>
3518                   <entry>Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.</entry>
3519                 </row>
3520               </tbody>
3521             </entrytbl>
3522           </row>
3523           <row>
3524             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_SOURCE</constant></entry>
3525             <entry>menu</entry>
3526           </row>
3527           <row id="v4l2-flash-strobe-source"><entry
3528           spanname="descr">Defines the source of the flash LED
3529           strobe.</entry>
3530           </row>
3531           <row>
3532             <entrytbl spanname="descr" cols="2">
3533               <tbody valign="top">
3534                 <row>
3535                   <entry><constant>V4L2_FLASH_STROBE_SOURCE_SOFTWARE</constant></entry>
3536                   <entry>The flash strobe is triggered by using
3537                   the V4L2_CID_FLASH_STROBE control.</entry>
3538                 </row>
3539                 <row>
3540                   <entry><constant>V4L2_FLASH_STROBE_SOURCE_EXTERNAL</constant></entry>
3541                   <entry>The flash strobe is triggered by an
3542                   external source. Typically this is a sensor,
3543                   which makes it possible to synchronises the
3544                   flash strobe start to exposure start.</entry>
3545                 </row>
3546               </tbody>
3547             </entrytbl>
3548           </row>
3549           <row>
3550             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE</constant></entry>
3551             <entry>button</entry>
3552           </row>
3553           <row>
3554             <entry spanname="descr">Strobe flash. Valid when
3555             V4L2_CID_FLASH_LED_MODE is set to
3556             V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
3557             is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
3558             control may not be possible in presence of some faults.
3559             See V4L2_CID_FLASH_FAULT.</entry>
3560           </row>
3561           <row>
3562             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STOP</constant></entry>
3563             <entry>button</entry>
3564           </row>
3565           <row><entry spanname="descr">Stop flash strobe immediately.</entry>
3566           </row>
3567           <row>
3568             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STATUS</constant></entry>
3569             <entry>boolean</entry>
3570           </row>
3571           <row>
3572             <entry spanname="descr">Strobe status: whether the flash
3573             is strobing at the moment or not. This is a read-only
3574             control.</entry>
3575           </row>
3576           <row>
3577             <entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
3578             <entry>integer</entry>
3579           </row>
3580           <row>
3581             <entry spanname="descr">Hardware timeout for flash. The
3582             flash strobe is stopped after this period of time has
3583             passed from the start of the strobe.</entry>
3584           </row>
3585           <row>
3586             <entry spanname="id"><constant>V4L2_CID_FLASH_INTENSITY</constant></entry>
3587             <entry>integer</entry>
3588           </row>
3589           <row>
3590             <entry spanname="descr">Intensity of the flash strobe when
3591             the flash LED is in flash mode
3592             (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps
3593             (mA) if possible.</entry>
3594           </row>
3595           <row>
3596             <entry spanname="id"><constant>V4L2_CID_FLASH_TORCH_INTENSITY</constant></entry>
3597             <entry>integer</entry>
3598           </row>
3599           <row>
3600             <entry spanname="descr">Intensity of the flash LED in
3601             torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be
3602             milliamps (mA) if possible. Setting this control may not
3603             be possible in presence of some faults. See
3604             V4L2_CID_FLASH_FAULT.</entry>
3605           </row>
3606           <row>
3607             <entry spanname="id"><constant>V4L2_CID_FLASH_INDICATOR_INTENSITY</constant></entry>
3608             <entry>integer</entry>
3609           </row>
3610           <row>
3611             <entry spanname="descr">Intensity of the indicator LED.
3612             The indicator LED may be fully independent of the flash
3613             LED. The unit should be microamps (uA) if possible.</entry>
3614           </row>
3615           <row>
3616             <entry spanname="id"><constant>V4L2_CID_FLASH_FAULT</constant></entry>
3617             <entry>bitmask</entry>
3618           </row>
3619           <row>
3620             <entry spanname="descr">Faults related to the flash. The
3621             faults tell about specific problems in the flash chip
3622             itself or the LEDs attached to it. Faults may prevent
3623             further use of some of the flash controls. In particular,
3624             V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
3625             if the fault affects the flash LED. Exactly which faults
3626             have such an effect is chip dependent. Reading the faults
3627             resets the control and returns the chip to a usable state
3628             if possible.</entry>
3629           </row>
3630           <row>
3631             <entrytbl spanname="descr" cols="2">
3632               <tbody valign="top">
3633                 <row>
3634                   <entry><constant>V4L2_FLASH_FAULT_OVER_VOLTAGE</constant></entry>
3635                   <entry>Flash controller voltage to the flash LED
3636                   has exceeded the limit specific to the flash
3637                   controller.</entry>
3638                 </row>
3639                 <row>
3640                   <entry><constant>V4L2_FLASH_FAULT_TIMEOUT</constant></entry>
3641                   <entry>The flash strobe was still on when
3642                   the timeout set by the user ---
3643                   V4L2_CID_FLASH_TIMEOUT control --- has expired.
3644                   Not all flash controllers may set this in all
3645                   such conditions.</entry>
3646                 </row>
3647                 <row>
3648                   <entry><constant>V4L2_FLASH_FAULT_OVER_TEMPERATURE</constant></entry>
3649                   <entry>The flash controller has overheated.</entry>
3650                 </row>
3651                 <row>
3652                   <entry><constant>V4L2_FLASH_FAULT_SHORT_CIRCUIT</constant></entry>
3653                   <entry>The short circuit protection of the flash
3654                   controller has been triggered.</entry>
3655                 </row>
3656                 <row>
3657                   <entry><constant>V4L2_FLASH_FAULT_OVER_CURRENT</constant></entry>
3658                   <entry>Current in the LED power supply has exceeded the limit
3659                   specific to the flash controller.</entry>
3660                 </row>
3661                 <row>
3662                   <entry><constant>V4L2_FLASH_FAULT_INDICATOR</constant></entry>
3663                   <entry>The flash controller has detected a short or open
3664                   circuit condition on the indicator LED.</entry>
3665                 </row>
3666               </tbody>
3667             </entrytbl>
3668           </row>
3669           <row>
3670             <entry spanname="id"><constant>V4L2_CID_FLASH_CHARGE</constant></entry>
3671             <entry>boolean</entry>
3672           </row>
3673           <row><entry spanname="descr">Enable or disable charging of the xenon
3674           flash capacitor.</entry>
3675           </row>
3676           <row>
3677             <entry spanname="id"><constant>V4L2_CID_FLASH_READY</constant></entry>
3678             <entry>boolean</entry>
3679           </row>
3680           <row>
3681             <entry spanname="descr">Is the flash ready to strobe?
3682             Xenon flashes require their capacitors charged before
3683             strobing. LED flashes often require a cooldown period
3684             after strobe during which another strobe will not be
3685             possible. This is a read-only control.</entry>
3686           </row>
3687           <row><entry></entry></row>
3688         </tbody>
3689       </tgroup>
3690       </table>
3691     </section>
3692
3693     <section id="jpeg-controls">
3694       <title>JPEG Control Reference</title>
3695       <para>The JPEG class includes controls for common features of JPEG
3696       encoders and decoders. Currently it includes features for codecs
3697       implementing progressive baseline DCT compression process with
3698       Huffman entrophy coding.</para>
3699       <table pgwide="1" frame="none" id="jpeg-control-id">
3700       <title>JPEG Control IDs</title>
3701
3702       <tgroup cols="4">
3703         <colspec colname="c1" colwidth="1*" />
3704         <colspec colname="c2" colwidth="6*" />
3705         <colspec colname="c3" colwidth="2*" />
3706         <colspec colname="c4" colwidth="6*" />
3707         <spanspec namest="c1" nameend="c2" spanname="id" />
3708         <spanspec namest="c2" nameend="c4" spanname="descr" />
3709         <thead>
3710           <row>
3711             <entry spanname="id" align="left">ID</entry>
3712             <entry align="left">Type</entry>
3713           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3714           </row>
3715         </thead>
3716         <tbody valign="top">
3717           <row><entry></entry></row>
3718           <row>
3719             <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant>&nbsp;</entry>
3720             <entry>class</entry>
3721           </row><row><entry spanname="descr">The JPEG class descriptor. Calling
3722           &VIDIOC-QUERYCTRL; for this control will return a description of this
3723           control class.
3724
3725         </entry>
3726           </row>
3727           <row>
3728             <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry>
3729             <entry>menu</entry>
3730           </row>
3731           <row id="jpeg-chroma-subsampling-control">
3732             <entry spanname="descr">The chroma subsampling factors describe how
3733             each component of an input image is sampled, in respect to maximum
3734             sample rate in each spatial dimension. See <xref linkend="itu-t81"/>,
3735             clause A.1.1. for more details. The <constant>
3736             V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how
3737             Cb and Cr components are downsampled after coverting an input image
3738             from RGB to Y'CbCr color space.
3739             </entry>
3740           </row>
3741           <row id = "v4l2-jpeg-chroma-subsampling">
3742             <entrytbl spanname="descr" cols="2">
3743               <tbody valign="top">
3744                 <row>
3745                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant>
3746                   </entry><entry>No chroma subsampling, each pixel has
3747                   Y, Cr and Cb values.</entry>
3748                 </row>
3749                 <row>
3750                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant>
3751                   </entry><entry>Horizontally subsample Cr, Cb components
3752                   by a factor of 2.</entry>
3753                 </row>
3754                 <row>
3755                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant>
3756                   </entry><entry>Subsample Cr, Cb components horizontally
3757                   and vertically by 2.</entry>
3758                 </row>
3759                 <row>
3760                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant>
3761                   </entry><entry>Horizontally subsample Cr, Cb components
3762                   by a factor of 4.</entry>
3763                 </row>
3764                 <row>
3765                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant>
3766                   </entry><entry>Subsample Cr, Cb components horizontally
3767                   by 4 and vertically by 2.</entry>
3768                 </row>
3769                 <row>
3770                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant>
3771                   </entry><entry>Use only luminance component.</entry>
3772                 </row>
3773               </tbody>
3774             </entrytbl>
3775           </row>
3776           <row>
3777             <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant>
3778             </entry><entry>integer</entry>
3779           </row>
3780           <row><entry spanname="descr">
3781               The restart interval determines an interval of inserting RSTm
3782               markers (m = 0..7). The purpose of these markers is to additionally
3783               reinitialize the encoder process, in order to process blocks of
3784               an image independently.
3785               For the lossy compression processes the restart interval unit is
3786               MCU (Minimum Coded Unit) and its value is contained in DRI
3787               (Define Restart Interval) marker. If <constant>
3788               V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0,
3789               DRI and RSTm markers will not be inserted.
3790             </entry>
3791           </row>
3792           <row id="jpeg-quality-control">
3793             <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant></entry>
3794             <entry>integer</entry>
3795           </row>
3796           <row>
3797             <entry spanname="descr">
3798               <constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control
3799               determines trade-off between image quality and size.
3800               It provides simpler method for applications to control image quality,
3801               without a need for direct reconfiguration of luminance and chrominance
3802               quantization tables.
3803
3804               In cases where a driver uses quantization tables configured directly
3805               by an application, using interfaces defined elsewhere, <constant>
3806               V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control should be set
3807               by driver to 0.
3808
3809               <para>The value range of this control is driver-specific. Only
3810               positive, non-zero values are meaningful. The recommended range
3811               is 1 - 100, where larger values correspond to better image quality.
3812               </para>
3813             </entry>
3814             </row>
3815           <row id="jpeg-active-marker-control">
3816             <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry>
3817             <entry>bitmask</entry>
3818           </row>
3819           <row>
3820             <entry spanname="descr">Specify which JPEG markers are included
3821             in compressed stream. This control is valid only for encoders.
3822             </entry>
3823           </row>
3824           <row>
3825             <entrytbl spanname="descr" cols="2">
3826               <tbody valign="top">
3827                 <row>
3828                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry>
3829                   <entry>Application data segment APP<subscript>0</subscript>.</entry>
3830                 </row><row>
3831                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry>
3832                   <entry>Application data segment APP<subscript>1</subscript>.</entry>
3833                 </row><row>
3834                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry>
3835                   <entry>Comment segment.</entry>
3836                 </row><row>
3837                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry>
3838                   <entry>Quantization tables segment.</entry>
3839                 </row><row>
3840                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry>
3841                   <entry>Huffman tables segment.</entry>
3842                 </row>
3843               </tbody>
3844             </entrytbl>
3845           </row>
3846           <row><entry></entry></row>
3847         </tbody>
3848       </tgroup>
3849       </table>
3850       <para>For more details about JPEG specification, refer
3851       to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>,
3852       <xref linkend="w3c-jpeg-jfif"/>.</para>
3853     </section>
3854
3855     <section id="image-source-controls">
3856       <title>Image Source Control Reference</title>
3857
3858       <note>
3859         <title>Experimental</title>
3860
3861         <para>This is an <link
3862         linkend="experimental">experimental</link> interface and may
3863         change in the future.</para>
3864       </note>
3865
3866       <para>
3867         The Image Source control class is intended for low-level
3868         control of image source devices such as image sensors. The
3869         devices feature an analogue to digital converter and a bus
3870         transmitter to transmit the image data out of the device.
3871       </para>
3872
3873       <table pgwide="1" frame="none" id="image-source-control-id">
3874       <title>Image Source Control IDs</title>
3875
3876       <tgroup cols="4">
3877         <colspec colname="c1" colwidth="1*" />
3878         <colspec colname="c2" colwidth="6*" />
3879         <colspec colname="c3" colwidth="2*" />
3880         <colspec colname="c4" colwidth="6*" />
3881         <spanspec namest="c1" nameend="c2" spanname="id" />
3882         <spanspec namest="c2" nameend="c4" spanname="descr" />
3883         <thead>
3884           <row>
3885             <entry spanname="id" align="left">ID</entry>
3886             <entry align="left">Type</entry>
3887           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3888           </row>
3889         </thead>
3890         <tbody valign="top">
3891           <row><entry></entry></row>
3892           <row>
3893             <entry spanname="id"><constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant></entry>
3894             <entry>class</entry>
3895           </row>
3896           <row>
3897             <entry spanname="descr">The IMAGE_SOURCE class descriptor.</entry>
3898           </row>
3899           <row>
3900             <entry spanname="id"><constant>V4L2_CID_VBLANK</constant></entry>
3901             <entry>integer</entry>
3902           </row>
3903           <row>
3904             <entry spanname="descr">Vertical blanking. The idle period
3905             after every frame during which no image data is produced.
3906             The unit of vertical blanking is a line. Every line has
3907             length of the image width plus horizontal blanking at the
3908             pixel rate defined by
3909             <constant>V4L2_CID_PIXEL_RATE</constant> control in the
3910             same sub-device.</entry>
3911           </row>
3912           <row>
3913             <entry spanname="id"><constant>V4L2_CID_HBLANK</constant></entry>
3914             <entry>integer</entry>
3915           </row>
3916           <row>
3917             <entry spanname="descr">Horizontal blanking. The idle
3918             period after every line of image data during which no
3919             image data is produced. The unit of horizontal blanking is
3920             pixels.</entry>
3921           </row>
3922           <row>
3923             <entry spanname="id"><constant>V4L2_CID_ANALOGUE_GAIN</constant></entry>
3924             <entry>integer</entry>
3925           </row>
3926           <row>
3927             <entry spanname="descr">Analogue gain is gain affecting
3928             all colour components in the pixel matrix. The gain
3929             operation is performed in the analogue domain before A/D
3930             conversion.
3931             </entry>
3932           </row>
3933           <row><entry></entry></row>
3934         </tbody>
3935       </tgroup>
3936       </table>
3937
3938     </section>
3939
3940     <section id="image-process-controls">
3941       <title>Image Process Control Reference</title>
3942
3943       <note>
3944         <title>Experimental</title>
3945
3946         <para>This is an <link
3947         linkend="experimental">experimental</link> interface and may
3948         change in the future.</para>
3949       </note>
3950
3951       <para>
3952         The Image Source control class is intended for low-level control of
3953         image processing functions. Unlike
3954         <constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant>, the controls in
3955         this class affect processing the image, and do not control capturing
3956         of it.
3957       </para>
3958
3959       <table pgwide="1" frame="none" id="image-process-control-id">
3960       <title>Image Source Control IDs</title>
3961
3962       <tgroup cols="4">
3963         <colspec colname="c1" colwidth="1*" />
3964         <colspec colname="c2" colwidth="6*" />
3965         <colspec colname="c3" colwidth="2*" />
3966         <colspec colname="c4" colwidth="6*" />
3967         <spanspec namest="c1" nameend="c2" spanname="id" />
3968         <spanspec namest="c2" nameend="c4" spanname="descr" />
3969         <thead>
3970           <row>
3971             <entry spanname="id" align="left">ID</entry>
3972             <entry align="left">Type</entry>
3973           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3974           </row>
3975         </thead>
3976         <tbody valign="top">
3977           <row><entry></entry></row>
3978           <row>
3979             <entry spanname="id"><constant>V4L2_CID_IMAGE_PROC_CLASS</constant></entry>
3980             <entry>class</entry>
3981           </row>
3982           <row>
3983             <entry spanname="descr">The IMAGE_PROC class descriptor.</entry>
3984           </row>
3985           <row>
3986             <entry spanname="id"><constant>V4L2_CID_LINK_FREQ</constant></entry>
3987             <entry>integer menu</entry>
3988           </row>
3989           <row>
3990             <entry spanname="descr">Data bus frequency. Together with the
3991             media bus pixel code, bus type (clock cycles per sample), the
3992             data bus frequency defines the pixel rate
3993             (<constant>V4L2_CID_PIXEL_RATE</constant>) in the
3994             pixel array (or possibly elsewhere, if the device is not an
3995             image sensor). The frame rate can be calculated from the pixel
3996             clock, image width and height and horizontal and vertical
3997             blanking. While the pixel rate control may be defined elsewhere
3998             than in the subdev containing the pixel array, the frame rate
3999             cannot be obtained from that information. This is because only
4000             on the pixel array it can be assumed that the vertical and
4001             horizontal blanking information is exact: no other blanking is
4002             allowed in the pixel array. The selection of frame rate is
4003             performed by selecting the desired horizontal and vertical
4004             blanking. The unit of this control is Hz. </entry>
4005           </row>
4006           <row>
4007             <entry spanname="id"><constant>V4L2_CID_PIXEL_RATE</constant></entry>
4008             <entry>64-bit integer</entry>
4009           </row>
4010           <row>
4011             <entry spanname="descr">Pixel rate in the source pads of
4012             the subdev. This control is read-only and its unit is
4013             pixels / second.
4014             </entry>
4015           </row>
4016           <row><entry></entry></row>
4017         </tbody>
4018       </tgroup>
4019       </table>
4020
4021     </section>
4022 </section>