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>
62 <para>Ronald Bultje elaborates:</para>
64 <!-- See video4linux-list@redhat.com on 16 Oct 2002, subject
65 "Re: [V4L] Re: v4l2 api / Zoran v4l2_jpegcompression" -->
67 <para>APP is some application-specific information. The
68 application can set it itself, and it'll be stored in the JPEG-encoded
69 fields (eg; interlacing information for in an AVI or so). COM is the
70 same, but it's comments, like 'encoded by me' or so.</para>
72 <para>jpeg_markers describes whether the huffman tables,
73 quantization tables and the restart interval information (all
74 JPEG-specific stuff) should be stored in the JPEG-encoded fields.
75 These define how the JPEG field is encoded. If you omit them,
76 applications assume you've used standard encoding. You usually do want
79 <!-- NB VIDIOC_S_JPEGCOMP is w/o. -->
81 <table pgwide="1" frame="none" id="v4l2-jpegcompression">
82 <title>struct <structname>v4l2_jpegcompression</structname></title>
88 <entry><structfield>quality</structfield></entry>
93 <entry><structfield>APPn</structfield></entry>
98 <entry><structfield>APP_len</structfield></entry>
103 <entry><structfield>APP_data</structfield>[60]</entry>
108 <entry><structfield>COM_len</structfield></entry>
113 <entry><structfield>COM_data</structfield>[60]</entry>
118 <entry><structfield>jpeg_markers</structfield></entry>
119 <entry>See <xref linkend="jpeg-markers" />.</entry>
125 <table pgwide="1" frame="none" id="jpeg-markers">
126 <title>JPEG Markers Flags</title>
131 <entry><constant>V4L2_JPEG_MARKER_DHT</constant></entry>
132 <entry>(1<<3)</entry>
133 <entry>Define Huffman Tables</entry>
136 <entry><constant>V4L2_JPEG_MARKER_DQT</constant></entry>
137 <entry>(1<<4)</entry>
138 <entry>Define Quantization Tables</entry>
141 <entry><constant>V4L2_JPEG_MARKER_DRI</constant></entry>
142 <entry>(1<<5)</entry>
143 <entry>Define Restart Interval</entry>
146 <entry><constant>V4L2_JPEG_MARKER_COM</constant></entry>
147 <entry>(1<<6)</entry>
148 <entry>Comment segment</entry>
151 <entry><constant>V4L2_JPEG_MARKER_APP</constant></entry>
152 <entry>(1<<7)</entry>
153 <entry>App segment, driver will always use APP0</entry>