diff options
Diffstat (limited to 'Documentation/DocBook/media/v4l')
-rw-r--r-- | Documentation/DocBook/media/v4l/biblio.xml | 20 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 10 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 161 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/v4l2.xml | 9 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml | 16 |
5 files changed, 214 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml index cea6fd3ed428..7dc65c592a87 100644 --- a/Documentation/DocBook/media/v4l/biblio.xml +++ b/Documentation/DocBook/media/v4l/biblio.xml | |||
@@ -128,6 +128,26 @@ url="http://www.ijg.org">http://www.ijg.org</ulink>)</corpauthor> | |||
128 | <subtitle>Version 1.02</subtitle> | 128 | <subtitle>Version 1.02</subtitle> |
129 | </biblioentry> | 129 | </biblioentry> |
130 | 130 | ||
131 | <biblioentry id="itu-t81"> | ||
132 | <abbrev>ITU-T.81</abbrev> | ||
133 | <authorgroup> | ||
134 | <corpauthor>International Telecommunication Union | ||
135 | (<ulink url="http://www.itu.int">http://www.itu.int</ulink>)</corpauthor> | ||
136 | </authorgroup> | ||
137 | <title>ITU-T Recommendation T.81 | ||
138 | "Information Technology — Digital Compression and Coding of Continous-Tone | ||
139 | Still Images — Requirements and Guidelines"</title> | ||
140 | </biblioentry> | ||
141 | |||
142 | <biblioentry id="w3c-jpeg-jfif"> | ||
143 | <abbrev>W3C JPEG JFIF</abbrev> | ||
144 | <authorgroup> | ||
145 | <corpauthor>The World Wide Web Consortium (<ulink | ||
146 | url="http://www.w3.org/Graphics/JPEG">http://www.w3.org</ulink>)</corpauthor> | ||
147 | </authorgroup> | ||
148 | <title>JPEG JFIF</title> | ||
149 | </biblioentry> | ||
150 | |||
131 | <biblioentry id="smpte12m"> | 151 | <biblioentry id="smpte12m"> |
132 | <abbrev>SMPTE 12M</abbrev> | 152 | <abbrev>SMPTE 12M</abbrev> |
133 | <authorgroup> | 153 | <authorgroup> |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index c93298ff3279..dd958b5a34e6 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2400,6 +2400,16 @@ details.</para> | |||
2400 | </orderedlist> | 2400 | </orderedlist> |
2401 | </section> | 2401 | </section> |
2402 | 2402 | ||
2403 | <section> | ||
2404 | <title>V4L2 in Linux 3.4</title> | ||
2405 | <orderedlist> | ||
2406 | <listitem> | ||
2407 | <para>Added <link linkend="jpeg-controls">JPEG compression control | ||
2408 | class</link>.</para> | ||
2409 | </listitem> | ||
2410 | </orderedlist> | ||
2411 | </section> | ||
2412 | |||
2403 | <section id="other"> | 2413 | <section id="other"> |
2404 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2414 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2405 | 2415 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 3f3d2e2d424e..b84f25e9cc87 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -3436,6 +3436,167 @@ interface and may change in the future.</para> | |||
3436 | </tbody> | 3436 | </tbody> |
3437 | </tgroup> | 3437 | </tgroup> |
3438 | </table> | 3438 | </table> |
3439 | </section> | ||
3440 | |||
3441 | <section id="jpeg-controls"> | ||
3442 | <title>JPEG Control Reference</title> | ||
3443 | <para>The JPEG class includes controls for common features of JPEG | ||
3444 | encoders and decoders. Currently it includes features for codecs | ||
3445 | implementing progressive baseline DCT compression process with | ||
3446 | Huffman entrophy coding.</para> | ||
3447 | <table pgwide="1" frame="none" id="jpeg-control-id"> | ||
3448 | <title>JPEG Control IDs</title> | ||
3449 | |||
3450 | <tgroup cols="4"> | ||
3451 | <colspec colname="c1" colwidth="1*" /> | ||
3452 | <colspec colname="c2" colwidth="6*" /> | ||
3453 | <colspec colname="c3" colwidth="2*" /> | ||
3454 | <colspec colname="c4" colwidth="6*" /> | ||
3455 | <spanspec namest="c1" nameend="c2" spanname="id" /> | ||
3456 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | ||
3457 | <thead> | ||
3458 | <row> | ||
3459 | <entry spanname="id" align="left">ID</entry> | ||
3460 | <entry align="left">Type</entry> | ||
3461 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | ||
3462 | </row> | ||
3463 | </thead> | ||
3464 | <tbody valign="top"> | ||
3465 | <row><entry></entry></row> | ||
3466 | <row> | ||
3467 | <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant> </entry> | ||
3468 | <entry>class</entry> | ||
3469 | </row><row><entry spanname="descr">The JPEG class descriptor. Calling | ||
3470 | &VIDIOC-QUERYCTRL; for this control will return a description of this | ||
3471 | control class. | ||
3472 | |||
3473 | </entry> | ||
3474 | </row> | ||
3475 | <row> | ||
3476 | <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry> | ||
3477 | <entry>menu</entry> | ||
3478 | </row> | ||
3479 | <row id="jpeg-chroma-subsampling-control"> | ||
3480 | <entry spanname="descr">The chroma subsampling factors describe how | ||
3481 | each component of an input image is sampled, in respect to maximum | ||
3482 | sample rate in each spatial dimension. See <xref linkend="itu-t81"/>, | ||
3483 | clause A.1.1. for more details. The <constant> | ||
3484 | V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how | ||
3485 | Cb and Cr components are downsampled after coverting an input image | ||
3486 | from RGB to Y'CbCr color space. | ||
3487 | </entry> | ||
3488 | </row> | ||
3489 | <row> | ||
3490 | <entrytbl spanname="descr" cols="2"> | ||
3491 | <tbody valign="top"> | ||
3492 | <row> | ||
3493 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant> | ||
3494 | </entry><entry>No chroma subsampling, each pixel has | ||
3495 | Y, Cr and Cb values.</entry> | ||
3496 | </row> | ||
3497 | <row> | ||
3498 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant> | ||
3499 | </entry><entry>Horizontally subsample Cr, Cb components | ||
3500 | by a factor of 2.</entry> | ||
3501 | </row> | ||
3502 | <row> | ||
3503 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant> | ||
3504 | </entry><entry>Subsample Cr, Cb components horizontally | ||
3505 | and vertically by 2.</entry> | ||
3506 | </row> | ||
3507 | <row> | ||
3508 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant> | ||
3509 | </entry><entry>Horizontally subsample Cr, Cb components | ||
3510 | by a factor of 4.</entry> | ||
3511 | </row> | ||
3512 | <row> | ||
3513 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant> | ||
3514 | </entry><entry>Subsample Cr, Cb components horizontally | ||
3515 | by 4 and vertically by 2.</entry> | ||
3516 | </row> | ||
3517 | <row> | ||
3518 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant> | ||
3519 | </entry><entry>Use only luminance component.</entry> | ||
3520 | </row> | ||
3521 | </tbody> | ||
3522 | </entrytbl> | ||
3523 | </row> | ||
3524 | <row> | ||
3525 | <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant> | ||
3526 | </entry><entry>integer</entry> | ||
3527 | </row> | ||
3528 | <row><entry spanname="descr"> | ||
3529 | The restart interval determines an interval of inserting RSTm | ||
3530 | markers (m = 0..7). The purpose of these markers is to additionally | ||
3531 | reinitialize the encoder process, in order to process blocks of | ||
3532 | an image independently. | ||
3533 | For the lossy compression processes the restart interval unit is | ||
3534 | MCU (Minimum Coded Unit) and its value is contained in DRI | ||
3535 | (Define Restart Interval) marker. If <constant> | ||
3536 | V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0, | ||
3537 | DRI and RSTm markers will not be inserted. | ||
3538 | </entry> | ||
3539 | </row> | ||
3540 | <row id="jpeg-quality-control"> | ||
3541 | <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant></entry> | ||
3542 | <entry>integer</entry> | ||
3543 | </row> | ||
3544 | <row> | ||
3545 | <entry spanname="descr"> | ||
3546 | <constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control | ||
3547 | determines trade-off between image quality and size. | ||
3548 | It provides simpler method for applications to control image quality, | ||
3549 | without a need for direct reconfiguration of luminance and chrominance | ||
3550 | quantization tables. | ||
3551 | |||
3552 | In cases where a driver uses quantization tables configured directly | ||
3553 | by an application, using interfaces defined elsewhere, <constant> | ||
3554 | V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control should be set | ||
3555 | by driver to 0. | ||
3439 | 3556 | ||
3557 | <para>The value range of this control is driver-specific. Only | ||
3558 | positive, non-zero values are meaningful. The recommended range | ||
3559 | is 1 - 100, where larger values correspond to better image quality. | ||
3560 | </para> | ||
3561 | </entry> | ||
3562 | </row> | ||
3563 | <row id="jpeg-active-marker-control"> | ||
3564 | <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry> | ||
3565 | <entry>bitmask</entry> | ||
3566 | </row> | ||
3567 | <row> | ||
3568 | <entry spanname="descr">Specify which JPEG markers are included | ||
3569 | in compressed stream. This control is valid only for encoders. | ||
3570 | </entry> | ||
3571 | </row> | ||
3572 | <row> | ||
3573 | <entrytbl spanname="descr" cols="2"> | ||
3574 | <tbody valign="top"> | ||
3575 | <row> | ||
3576 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry> | ||
3577 | <entry>Application data segment APP<subscript>0</subscript>.</entry> | ||
3578 | </row><row> | ||
3579 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry> | ||
3580 | <entry>Application data segment APP<subscript>1</subscript>.</entry> | ||
3581 | </row><row> | ||
3582 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry> | ||
3583 | <entry>Comment segment.</entry> | ||
3584 | </row><row> | ||
3585 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry> | ||
3586 | <entry>Quantization tables segment.</entry> | ||
3587 | </row><row> | ||
3588 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry> | ||
3589 | <entry>Huffman tables segment.</entry> | ||
3590 | </row> | ||
3591 | </tbody> | ||
3592 | </entrytbl> | ||
3593 | </row> | ||
3594 | <row><entry></entry></row> | ||
3595 | </tbody> | ||
3596 | </tgroup> | ||
3597 | </table> | ||
3598 | <para>For more details about JPEG specification, refer | ||
3599 | to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>, | ||
3600 | <xref linkend="w3c-jpeg-jfif"/>.</para> | ||
3440 | </section> | 3601 | </section> |
3441 | </section> | 3602 | </section> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index dcf9e33b695f..8ae38876172e 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -128,6 +128,15 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
128 | applications. --> | 128 | applications. --> |
129 | 129 | ||
130 | <revision> | 130 | <revision> |
131 | <revnumber>3.4</revnumber> | ||
132 | <date>2012-01-25</date> | ||
133 | <authorinitials>sn</authorinitials> | ||
134 | <revremark>Added <link linkend="jpeg-controls">JPEG compression | ||
135 | control class.</link> | ||
136 | </revremark> | ||
137 | </revision> | ||
138 | |||
139 | <revision> | ||
131 | <revnumber>3.3</revnumber> | 140 | <revnumber>3.3</revnumber> |
132 | <date>2012-01-11</date> | 141 | <date>2012-01-11</date> |
133 | <authorinitials>hv</authorinitials> | 142 | <authorinitials>hv</authorinitials> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml index 01ea24b84385..48748499c097 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml | |||
@@ -57,6 +57,11 @@ | |||
57 | <refsect1> | 57 | <refsect1> |
58 | <title>Description</title> | 58 | <title>Description</title> |
59 | 59 | ||
60 | <para>These ioctls are <emphasis role="bold">deprecated</emphasis>. | ||
61 | New drivers and applications should use <link linkend="jpeg-controls"> | ||
62 | JPEG class controls</link> for image quality and JPEG markers control. | ||
63 | </para> | ||
64 | |||
60 | <para>[to do]</para> | 65 | <para>[to do]</para> |
61 | 66 | ||
62 | <para>Ronald Bultje elaborates:</para> | 67 | <para>Ronald Bultje elaborates:</para> |
@@ -86,7 +91,10 @@ to add them.</para> | |||
86 | <row> | 91 | <row> |
87 | <entry>int</entry> | 92 | <entry>int</entry> |
88 | <entry><structfield>quality</structfield></entry> | 93 | <entry><structfield>quality</structfield></entry> |
89 | <entry></entry> | 94 | <entry>Deprecated. If <link linkend="jpeg-quality-control"><constant> |
95 | V4L2_CID_JPEG_IMAGE_QUALITY</constant></link> control is exposed by | ||
96 | a driver applications should use it instead and ignore this field. | ||
97 | </entry> | ||
90 | </row> | 98 | </row> |
91 | <row> | 99 | <row> |
92 | <entry>int</entry> | 100 | <entry>int</entry> |
@@ -116,7 +124,11 @@ to add them.</para> | |||
116 | <row> | 124 | <row> |
117 | <entry>__u32</entry> | 125 | <entry>__u32</entry> |
118 | <entry><structfield>jpeg_markers</structfield></entry> | 126 | <entry><structfield>jpeg_markers</structfield></entry> |
119 | <entry>See <xref linkend="jpeg-markers" />.</entry> | 127 | <entry>See <xref linkend="jpeg-markers"/>. Deprecated. |
128 | If <link linkend="jpeg-active-marker-control"><constant> | ||
129 | V4L2_CID_JPEG_ACTIVE_MARKER</constant></link> control | ||
130 | is exposed by a driver applications should use it instead | ||
131 | and ignore this field.</entry> | ||
120 | </row> | 132 | </row> |
121 | </tbody> | 133 | </tbody> |
122 | </tgroup> | 134 | </tgroup> |