blob: 48748499c097516e9ac39b2e8584eb5a8e92c0f2 [file] [log] [blame]
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001<refentry id="vidioc-g-jpegcomp">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_G_JPEGCOMP</refname>
9 <refname>VIDIOC_S_JPEGCOMP</refname>
10 <refpurpose></refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>v4l2_jpegcompression *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 <funcsynopsis>
23 <funcprototype>
24 <funcdef>int <function>ioctl</function></funcdef>
25 <paramdef>int <parameter>fd</parameter></paramdef>
26 <paramdef>int <parameter>request</parameter></paramdef>
27 <paramdef>const v4l2_jpegcompression *<parameter>argp</parameter></paramdef>
28 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Arguments</title>
34
35 <variablelist>
36 <varlistentry>
37 <term><parameter>fd</parameter></term>
38 <listitem>
39 <para>&fd;</para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>request</parameter></term>
44 <listitem>
45 <para>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>argp</parameter></term>
50 <listitem>
51 <para></para>
52 </listitem>
53 </varlistentry>
54 </variablelist>
55 </refsect1>
56
57 <refsect1>
58 <title>Description</title>
59
Sylwester Nawrocki29fa0ee2012-01-20 15:38:50 -030060 <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
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030065 <para>[to do]</para>
66
67 <para>Ronald Bultje elaborates:</para>
68
69 <!-- See video4linux-list@redhat.com on 16 Oct 2002, subject
70"Re: [V4L] Re: v4l2 api / Zoran v4l2_jpegcompression" -->
71
72 <para>APP is some application-specific information. The
73application can set it itself, and it'll be stored in the JPEG-encoded
74fields (eg; interlacing information for in an AVI or so). COM is the
75same, but it's comments, like 'encoded by me' or so.</para>
76
77 <para>jpeg_markers describes whether the huffman tables,
78quantization tables and the restart interval information (all
79JPEG-specific stuff) should be stored in the JPEG-encoded fields.
80These define how the JPEG field is encoded. If you omit them,
81applications assume you've used standard encoding. You usually do want
82to add them.</para>
83
84 <!-- NB VIDIOC_S_JPEGCOMP is w/o. -->
85
86 <table pgwide="1" frame="none" id="v4l2-jpegcompression">
87 <title>struct <structname>v4l2_jpegcompression</structname></title>
88 <tgroup cols="3">
89 &cs-str;
90 <tbody valign="top">
91 <row>
92 <entry>int</entry>
93 <entry><structfield>quality</structfield></entry>
Sylwester Nawrocki29fa0ee2012-01-20 15:38:50 -030094 <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>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030098 </row>
99 <row>
100 <entry>int</entry>
101 <entry><structfield>APPn</structfield></entry>
102 <entry></entry>
103 </row>
104 <row>
105 <entry>int</entry>
106 <entry><structfield>APP_len</structfield></entry>
107 <entry></entry>
108 </row>
109 <row>
110 <entry>char</entry>
111 <entry><structfield>APP_data</structfield>[60]</entry>
112 <entry></entry>
113 </row>
114 <row>
115 <entry>int</entry>
116 <entry><structfield>COM_len</structfield></entry>
117 <entry></entry>
118 </row>
119 <row>
120 <entry>char</entry>
121 <entry><structfield>COM_data</structfield>[60]</entry>
122 <entry></entry>
123 </row>
124 <row>
125 <entry>__u32</entry>
126 <entry><structfield>jpeg_markers</structfield></entry>
Sylwester Nawrocki29fa0ee2012-01-20 15:38:50 -0300127 <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>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300132 </row>
133 </tbody>
134 </tgroup>
135 </table>
136
137 <table pgwide="1" frame="none" id="jpeg-markers">
138 <title>JPEG Markers Flags</title>
139 <tgroup cols="3">
140 &cs-def;
141 <tbody valign="top">
142 <row>
143 <entry><constant>V4L2_JPEG_MARKER_DHT</constant></entry>
144 <entry>(1&lt;&lt;3)</entry>
145 <entry>Define Huffman Tables</entry>
146 </row>
147 <row>
148 <entry><constant>V4L2_JPEG_MARKER_DQT</constant></entry>
149 <entry>(1&lt;&lt;4)</entry>
150 <entry>Define Quantization Tables</entry>
151 </row>
152 <row>
153 <entry><constant>V4L2_JPEG_MARKER_DRI</constant></entry>
154 <entry>(1&lt;&lt;5)</entry>
155 <entry>Define Restart Interval</entry>
156 </row>
157 <row>
158 <entry><constant>V4L2_JPEG_MARKER_COM</constant></entry>
159 <entry>(1&lt;&lt;6)</entry>
160 <entry>Comment segment</entry>
161 </row>
162 <row>
163 <entry><constant>V4L2_JPEG_MARKER_APP</constant></entry>
164 <entry>(1&lt;&lt;7)</entry>
165 <entry>App segment, driver will always use APP0</entry>
166 </row>
167 </tbody>
168 </tgroup>
169 </table>
170 </refsect1>
171
172 <refsect1>
173 &return-value;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300174 </refsect1>
175</refentry>