1 <refentry id="vidioc-enumstd">
3 <refentrytitle>ioctl VIDIOC_ENUMSTD</refentrytitle>
8 <refname>VIDIOC_ENUMSTD</refname>
9 <refpurpose>Enumerate supported video standards</refpurpose>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_standard *<parameter>argp</parameter></paramdef>
24 <title>Arguments</title>
28 <term><parameter>fd</parameter></term>
34 <term><parameter>request</parameter></term>
36 <para>VIDIOC_ENUMSTD</para>
40 <term><parameter>argp</parameter></term>
49 <title>Description</title>
51 <para>To query the attributes of a video standard,
52 especially a custom (driver defined) one, applications initialize the
53 <structfield>index</structfield> field of &v4l2-standard; and call the
54 <constant>VIDIOC_ENUMSTD</constant> ioctl with a pointer to this
55 structure. Drivers fill the rest of the structure or return an
56 &EINVAL; when the index is out of bounds. To enumerate all standards
57 applications shall begin at index zero, incrementing by one until the
58 driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a
59 different set of standards after switching the video input or
61 <para>The supported standards may overlap and we need an
62 unambiguous set to find the current standard returned by
63 <constant>VIDIOC_G_STD</constant>.</para>
66 <table pgwide="1" frame="none" id="v4l2-standard">
67 <title>struct <structname>v4l2_standard</structname></title>
73 <entry><structfield>index</structfield></entry>
74 <entry>Number of the video standard, set by the
78 <entry>&v4l2-std-id;</entry>
79 <entry><structfield>id</structfield></entry>
80 <entry>The bits in this field identify the standard as
81 one of the common standards listed in <xref linkend="v4l2-std-id" />,
82 or if bits 32 to 63 are set as custom standards. Multiple bits can be
83 set if the hardware does not distinguish between these standards,
84 however separate indices do not indicate the opposite. The
85 <structfield>id</structfield> must be unique. No other enumerated
86 <structname>v4l2_standard</structname> structure, for this input or
87 output anyway, can contain the same set of bits.</entry>
91 <entry><structfield>name</structfield>[24]</entry>
92 <entry>Name of the standard, a NUL-terminated ASCII
93 string, for example: "PAL-B/G", "NTSC Japan". This information is
94 intended for the user.</entry>
97 <entry>&v4l2-fract;</entry>
98 <entry><structfield>frameperiod</structfield></entry>
99 <entry>The frame period (not field period) is numerator
100 / denominator. For example M/NTSC has a frame period of 1001 /
101 30000 seconds.</entry>
105 <entry><structfield>framelines</structfield></entry>
106 <entry>Total lines per frame including blanking,
107 e. g. 625 for B/PAL.</entry>
111 <entry><structfield>reserved</structfield>[4]</entry>
112 <entry>Reserved for future extensions. Drivers must set
113 the array to zero.</entry>
119 <table pgwide="1" frame="none" id="v4l2-fract">
120 <title>struct <structname>v4l2_fract</structname></title>
126 <entry><structfield>numerator</structfield></entry>
131 <entry><structfield>denominator</structfield></entry>
138 <table pgwide="1" frame="none" id="v4l2-std-id">
139 <title>typedef <structname>v4l2_std_id</structname></title>
145 <entry><structfield>v4l2_std_id</structfield></entry>
146 <entry>This type is a set, each bit representing another
147 video standard as listed below and in <xref
148 linkend="video-standards" />. The 32 most significant bits are reserved
149 for custom (driver defined) video standards.</entry>
155 <para><programlisting>
156 #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
157 #define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
158 #define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
159 #define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
160 #define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
161 #define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
162 #define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
163 #define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
165 #define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
166 #define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
167 #define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
168 #define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
169 </programlisting></para><para><constant>V4L2_STD_PAL_60</constant> is
170 a hybrid standard with 525 lines, 60 Hz refresh rate, and PAL color
171 modulation with a 4.43 MHz color subcarrier. Some PAL video recorders
172 can play back NTSC tapes in this mode for display on a 50/60 Hz agnostic
173 PAL TV.</para><para><programlisting>
174 #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
175 #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
176 #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
177 </programlisting></para><para><constant>V4L2_STD_NTSC_443</constant>
178 is a hybrid standard with 525 lines, 60 Hz refresh rate, and NTSC
179 color modulation with a 4.43 MHz color
180 subcarrier.</para><para><programlisting>
181 #define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
183 #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
184 #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
185 #define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
186 #define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
187 #define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
188 #define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
189 #define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
190 #define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
193 #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
194 #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
195 </programlisting></para><para><!-- ATSC proposal by Mark McClelland,
196 video4linux-list@redhat.com on 17 Oct 2002
197 --><constant>V4L2_STD_ATSC_8_VSB</constant> and
198 <constant>V4L2_STD_ATSC_16_VSB</constant> are U.S. terrestrial digital
199 TV standards. Presently the V4L2 API does not support digital TV. See
200 also the Linux DVB API at <ulink
201 url="http://linuxtv.org">http://linuxtv.org</ulink>.</para>
202 <para><programlisting>
203 #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\
206 #define V4L2_STD_B (V4L2_STD_PAL_B |\
209 #define V4L2_STD_GH (V4L2_STD_PAL_G |\
213 #define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\
216 #define V4L2_STD_PAL (V4L2_STD_PAL_BG |\
220 #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\
221 V4L2_STD_NTSC_M_JP |\
223 #define V4L2_STD_MN (V4L2_STD_PAL_M |\
227 #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\
230 #define V4L2_STD_DK (V4L2_STD_PAL_DK |\
233 #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\
240 #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\
244 #define V4L2_STD_625_50 (V4L2_STD_PAL |\
249 #define V4L2_STD_UNKNOWN 0
250 #define V4L2_STD_ALL (V4L2_STD_525_60 |\
252 </programlisting></para>
254 <table pgwide="1" id="video-standards" orient="land">
255 <title>Video Standards (based on [<xref linkend="itu470" />])</title>
256 <tgroup cols="12" colsep="1" rowsep="1" align="center">
257 <colspec colname="c1" align="left" />
258 <colspec colname="c2" />
259 <colspec colname="c3" />
260 <colspec colname="c4" />
261 <colspec colname="c5" />
262 <colspec colnum="7" colname="c7" />
263 <colspec colnum="9" colname="c9" />
264 <colspec colnum="12" colname="c12" />
265 <spanspec namest="c2" nameend="c3" spanname="m" align="center" />
266 <spanspec namest="c4" nameend="c12" spanname="x" align="center" />
267 <spanspec namest="c5" nameend="c7" spanname="b" align="center" />
268 <spanspec namest="c9" nameend="c12" spanname="s" align="center" />
271 <entry>Characteristics</entry>
272 <entry><para>M/NTSC<footnote><para>Japan uses a standard
274 (V4L2_STD_NTSC_M_JP).</para></footnote></para></entry>
276 <entry><para>N/PAL<footnote><para> The values in
277 brackets apply to the combination N/PAL a.k.a.
278 N<subscript>C</subscript> used in Argentina
279 (V4L2_STD_PAL_Nc).</para></footnote></para></entry>
280 <entry align="center">B, B1, G/PAL</entry>
281 <entry align="center">D, D1, K/PAL</entry>
282 <entry align="center">H/PAL</entry>
283 <entry align="center">I/PAL</entry>
284 <entry align="center">B, G/SECAM</entry>
285 <entry align="center">D, K/SECAM</entry>
286 <entry align="center">K1/SECAM</entry>
287 <entry align="center">L/SECAM</entry>
292 <entry>Frame lines</entry>
293 <entry spanname="m">525</entry>
294 <entry spanname="x">625</entry>
297 <entry>Frame period (s)</entry>
298 <entry spanname="m">1001/30000</entry>
299 <entry spanname="x">1/25</entry>
302 <entry>Chrominance sub-carrier frequency (Hz)</entry>
303 <entry>3579545 ± 10</entry>
304 <entry>3579611.49 ± 10</entry>
305 <entry>4433618.75 ± 5 (3582056.25
306 ± 5)</entry>
307 <entry spanname="b">4433618.75 ± 5</entry>
308 <entry>4433618.75 ± 1</entry>
309 <entry spanname="s">f<subscript>OR</subscript> =
310 4406250 ± 2000, f<subscript>OB</subscript> = 4250000
311 ± 2000</entry>
314 <entry>Nominal radio-frequency channel bandwidth
319 <entry>B: 7; B1, G: 8</entry>
329 <entry>Sound carrier relative to vision carrier
331 <entry>+ 4.5</entry>
332 <entry>+ 4.5</entry>
333 <entry>+ 4.5</entry>
334 <entry><para>+ 5.5 ± 0.001
335 <footnote><para>In the Federal Republic of Germany, Austria, Italy,
336 the Netherlands, Slovakia and Switzerland a system of two sound
337 carriers is used, the frequency of the second carrier being
338 242.1875 kHz above the frequency of the first sound carrier. For
339 stereophonic sound transmissions a similar system is used in
340 Australia.</para></footnote> <footnote><para>New Zealand uses a sound
341 carrier displaced 5.4996 ± 0.0005 MHz from the vision
342 carrier.</para></footnote> <footnote><para>In Denmark, Finland, New
343 Zealand, Sweden and Spain a system of two sound carriers is used. In
344 Iceland, Norway and Poland the same system is being introduced. The
345 second carrier is 5.85 MHz above the vision carrier and is DQPSK
346 modulated with 728 kbit/s sound and data multiplex. (NICAM
347 system)</para></footnote> <footnote><para>In the United Kingdom, a
348 system of two sound carriers is used. The second sound carrier is
349 6.552 MHz above the vision carrier and is DQPSK modulated with a
350 728 kbit/s sound and data multiplex able to carry two sound
351 channels. (NICAM system)</para></footnote></para></entry>
352 <entry>+ 6.5 ± 0.001</entry>
353 <entry>+ 5.5</entry>
354 <entry>+ 5.9996 ± 0.0005</entry>
355 <entry>+ 5.5 ± 0.001</entry>
356 <entry>+ 6.5 ± 0.001</entry>
357 <entry>+ 6.5</entry>
358 <entry><para>+ 6.5 <footnote><para>In France, a
359 digital carrier 5.85 MHz away from the vision carrier may be used in
360 addition to the main sound carrier. It is modulated in differentially
361 encoded QPSK with a 728 kbit/s sound and data multiplexer capable of
362 carrying two sound channels. (NICAM
363 system)</para></footnote></para></entry>
375 <term><errorcode>EINVAL</errorcode></term>
377 <para>The &v4l2-standard; <structfield>index</structfield>
378 is out of bounds.</para>
388 sgml-parent-document: "v4l2.sgml"
389 indent-tabs-mode: nil