1 <refentry id="vidioc-g-jpegcomp">
3 <refentrytitle>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</refentrytitle>
8 <refname>VIDIOC_G_JPEGCOMP</refname>
9 <refname>VIDIOC_S_JPEGCOMP</refname>
10 <refpurpose></refpurpose>
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>
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>
33 <title>Arguments</title>
37 <term><parameter>fd</parameter></term>
43 <term><parameter>request</parameter></term>
45 <para>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</para>
49 <term><parameter>argp</parameter></term>
58 <title>Description</title>
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.
67 <para>Ronald Bultje elaborates:</para>
69 <!-- See video4linux-list@redhat.com on 16 Oct 2002, subject
70 "Re: [V4L] Re: v4l2 api / Zoran v4l2_jpegcompression" -->
72 <para>APP is some application-specific information. The
73 application can set it itself, and it'll be stored in the JPEG-encoded
74 fields (eg; interlacing information for in an AVI or so). COM is the
75 same, but it's comments, like 'encoded by me' or so.</para>
77 <para>jpeg_markers describes whether the huffman tables,
78 quantization tables and the restart interval information (all
79 JPEG-specific stuff) should be stored in the JPEG-encoded fields.
80 These define how the JPEG field is encoded. If you omit them,
81 applications assume you've used standard encoding. You usually do want
84 <!-- NB VIDIOC_S_JPEGCOMP is w/o. -->
86 <table pgwide="1" frame="none" id="v4l2-jpegcompression">
87 <title>struct <structname>v4l2_jpegcompression</structname></title>
93 <entry><structfield>quality</structfield></entry>
94 <entry>Deprecated. If <link linkend="jpeg-quality-control"><constant>
95 V4L2_CID_JPEG_COMPRESSION_QUALITY</constant></link> control is exposed
96 by a driver applications should use it instead and ignore this field.
101 <entry><structfield>APPn</structfield></entry>
106 <entry><structfield>APP_len</structfield></entry>
111 <entry><structfield>APP_data</structfield>[60]</entry>
116 <entry><structfield>COM_len</structfield></entry>
121 <entry><structfield>COM_data</structfield>[60]</entry>
126 <entry><structfield>jpeg_markers</structfield></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>
137 <table pgwide="1" frame="none" id="jpeg-markers">
138 <title>JPEG Markers Flags</title>
143 <entry><constant>V4L2_JPEG_MARKER_DHT</constant></entry>
144 <entry>(1<<3)</entry>
145 <entry>Define Huffman Tables</entry>
148 <entry><constant>V4L2_JPEG_MARKER_DQT</constant></entry>
149 <entry>(1<<4)</entry>
150 <entry>Define Quantization Tables</entry>
153 <entry><constant>V4L2_JPEG_MARKER_DRI</constant></entry>
154 <entry>(1<<5)</entry>
155 <entry>Define Restart Interval</entry>
158 <entry><constant>V4L2_JPEG_MARKER_COM</constant></entry>
159 <entry>(1<<6)</entry>
160 <entry>Comment segment</entry>
163 <entry><constant>V4L2_JPEG_MARKER_APP</constant></entry>
164 <entry>(1<<7)</entry>
165 <entry>App segment, driver will always use APP0</entry>