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