← Documents Documentation/userspace-api/media/v4l/hist-v4l2.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Video4Linux2 API 이력

1998년 V4L2 초안부터 Linux 4.4까지 ABI, ioctl, 버퍼, 제어, 픽셀 형식과 관련 API가 변한 이유와 호환성 주의를 연대순으로 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/hist-v4l2.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

hist-v4l2.rst:1-1276

이 문서는 V4L2가 V4L의 경직된 설계를 대체한 1998년 초안에서 출발해 Linux 2.5.46의 대개편, 2.6 시대의 ABI 정정과 기능 확장, Linux 4.4의 SDR 지원까지 어떻게 발전했는지 기록한 변경 이력입니다.

가장 큰 분기점은 V4L2 0.20과 Linux 2.5.46입니다. 이때 형식 협상, 버퍼 유형, 메모리 모델, 입력·출력 연결, 비디오 표준과 crop/scaling 구조가 현재의 공통 type/union 및 열거형 중심 모델로 정리되었습니다.

이력에 적힌 `OLD`, 호환성 파괴 경고, ioctl 방향 수정은 단순한 이름 변경이 아닙니다. 구조 크기가 ioctl 번호에 포함되거나 write-only가 write-read로 바뀌는 경우가 있어 구형 드라이버와 응용 프로그램의 실제 동작에 영향을 줍니다.

후반부는 XVideo, Linux DVB, OSS/ALSA와의 경계를 설명하고 실험적 디버깅 ioctl 및 폐기된 MPEGCOMP, DV_PRESET, subdev crop 인터페이스의 대체 경로를 제시합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: V4L
3
4 .. _hist-v4l2:
5
6 ***********************
7 Changes of the V4L2 API
8 ***********************
9
10 Soon after the V4L API was added to the kernel it was criticised as too
11 inflexible. In August 1998 Bill Dirks proposed a number of improvements
12 and began to work on documentation, example drivers and applications.
13 With the help of other volunteers this eventually became the V4L2 API,
14 not just an extension but a replacement for the V4L API. However it took
15 another four years and two stable kernel releases until the new API was
16 finally accepted for inclusion into the kernel in its present form.
17
18 Early Versions
19 ==============
20
21 1998-08-20: First version.
22
23 1998-08-27: The :c:func:`select()` function was introduced.
24
25 1998-09-10: New video standard interface.
26
27 1998-09-18: The ``VIDIOC_NONCAP`` ioctl was replaced by the otherwise
28 meaningless ``O_TRUNC`` :c:func:`open()` flag, and the
29 aliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set
30 this flag if they intend to access controls only, as opposed to capture
31 applications which need exclusive access. The ``VIDEO_STD_XXX``
32 identifiers are now ordinals instead of flags, and the
33 ``video_std_construct()`` helper function takes id and
34 transmission arguments.
35
36 1998-09-28: Revamped video standard. Made video controls individually
37 enumerable.
38
39 1998-10-02: The ``id`` field was removed from
40 struct ``video_standard`` and the color subcarrier fields were
41 renamed. The :ref:`VIDIOC_QUERYSTD` ioctl was
42 renamed to :ref:`VIDIOC_ENUMSTD`,
43 :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` to
44 :ref:`VIDIOC_ENUMINPUT`. A first draft of the
45 Codec API was released.
46
47 1998-11-08: Many minor changes. Most symbols have been renamed. Some
48 material changes to struct v4l2_capability.
49
50 1998-11-12: The read/write direction of some ioctls was misdefined.
51
52 1998-11-14: ``V4L2_PIX_FMT_RGB24`` changed to ``V4L2_PIX_FMT_BGR24``,
53 and ``V4L2_PIX_FMT_RGB32`` changed to ``V4L2_PIX_FMT_BGR32``. Audio
54 controls are now accessible with the
55 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
56 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls under names starting
57 with ``V4L2_CID_AUDIO``. The ``V4L2_MAJOR`` define was removed from
58 ``videodev.h`` since it was only used once in the ``videodev`` kernel
59 module. The ``YUV422`` and ``YUV411`` planar image formats were added.
60
61 1998-11-28: A few ioctl symbols changed. Interfaces for codecs and video
62 output devices were added.
63
64 1999-01-14: A raw VBI capture interface was added.
65
66 1999-01-19: The ``VIDIOC_NEXTBUF`` ioctl was removed.
67
68 V4L2 Version 0.16 1999-01-31
69 ============================
70
71 1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF
72 are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added
73 digital zoom (cropping) controls.
74
75 V4L2 Version 0.18 1999-03-16
76 ============================
77
78 Added a v4l to V4L2 ioctl compatibility layer to videodev.c. Driver
79 writers, this changes how you implement your ioctl handler. See the
80 Driver Writer's Guide. Added some more control id codes.
81
82 V4L2 Version 0.19 1999-06-05
83 ============================
84
85 1999-03-18: Fill in the category and catname fields of v4l2_queryctrl
86 objects before passing them to the driver. Required a minor change to
87 the VIDIOC_QUERYCTRL handlers in the sample drivers.
88
89 1999-03-31: Better compatibility for v4l memory capture ioctls. Requires
90 changes to drivers to fully support new compatibility features, see
91 Driver Writer's Guide and v4l2cap.c. Added new control IDs:
92 V4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P,
93 and _YUV411P to _YUV411P.
94
95 1999-04-04: Added a few more control IDs.
96
97 1999-04-07: Added the button control type.
98
99 1999-05-02: Fixed a typo in videodev.h, and added the
100 V4L2_CTRL_FLAG_GRAYED (later V4L2_CTRL_FLAG_GRABBED) flag.
101
102 1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing a
103 malfunction of this ioctl.
104
105 1999-06-05: Changed the value of V4L2_CID_WHITENESS.
106
107 V4L2 Version 0.20 (1999-09-10)
108 ==============================
109
110 Version 0.20 introduced a number of changes which were *not backward
111 compatible* with 0.19 and earlier versions. Purpose of these changes was
112 to simplify the API, while making it more extensible and following
113 common Linux driver API conventions.
114
115 1. Some typos in ``V4L2_FMT_FLAG`` symbols were fixed. struct v4l2_clip
116 was changed for compatibility with v4l. (1999-08-30)
117
118 2. ``V4L2_TUNER_SUB_LANG1`` was added. (1999-09-05)
119
120 3. All ioctl() commands that used an integer argument now take a pointer
121 to an integer. Where it makes sense, ioctls will return the actual
122 new value in the integer pointed to by the argument, a common
123 convention in the V4L2 API. The affected ioctls are: VIDIOC_PREVIEW,
124 VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ,
125 VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example
126
127 .. code-block:: c
128
129 err = ioctl (fd, VIDIOC_XXX, V4L2_XXX);
130
131 becomes
132
133 .. code-block:: c
134
135 int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &a);
136
137 4. All the different get- and set-format commands were swept into one
138 :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
139 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl taking a union and a
140 type field selecting the union member as parameter. Purpose is to
141 simplify the API by eliminating several ioctls and to allow new and
142 driver private data streams without adding new ioctls.
143
144 This change obsoletes the following ioctls: ``VIDIOC_S_INFMT``,
145 ``VIDIOC_G_INFMT``, ``VIDIOC_S_OUTFMT``, ``VIDIOC_G_OUTFMT``,
146 ``VIDIOC_S_VBIFMT`` and ``VIDIOC_G_VBIFMT``. The image format
147 struct v4l2_format was renamed to struct v4l2_pix_format, while
148 struct v4l2_format is now the enveloping structure
149 for all format negotiations.
150
151 5. Similar to the changes above, the ``VIDIOC_G_PARM`` and
152 ``VIDIOC_S_PARM`` ioctls were merged with ``VIDIOC_G_OUTPARM`` and
153 ``VIDIOC_S_OUTPARM``. A ``type`` field in the new struct v4l2_streamparm
154 selects the respective union member.
155
156 This change obsoletes the ``VIDIOC_G_OUTPARM`` and
157 ``VIDIOC_S_OUTPARM`` ioctls.
158
159 6. Control enumeration was simplified, and two new control flags were
160 introduced and one dropped. The ``catname`` field was replaced by a
161 ``group`` field.
162
163 Drivers can now flag unsupported and temporarily unavailable controls
164 with ``V4L2_CTRL_FLAG_DISABLED`` and ``V4L2_CTRL_FLAG_GRABBED``
165 respectively. The ``group`` name indicates a possibly narrower
166 classification than the ``category``. In other words, there may be
167 multiple groups within a category. Controls within a group would
168 typically be drawn within a group box. Controls in different
169 categories might have a greater separation, or may even appear in
170 separate windows.
171
172 7. The struct v4l2_buffer ``timestamp`` was
173 changed to a 64 bit integer, containing the sampling or output time
174 of the frame in nanoseconds. Additionally timestamps will be in
175 absolute system time, not starting from zero at the beginning of a
176 stream. The data type name for timestamps is stamp_t, defined as a
177 signed 64-bit integer. Output devices should not send a buffer out
178 until the time in the timestamp field has arrived. I would like to
179 follow SGI's lead, and adopt a multimedia timestamping system like
180 their UST (Unadjusted System Time). See
181 http://web.archive.org/web/\*/http://reality.sgi.com
182 /cpirazzi_engr/lg/time/intro.html. UST uses timestamps that are
183 64-bit signed integers (not struct timeval's) and given in nanosecond
184 units. The UST clock starts at zero when the system is booted and
185 runs continuously and uniformly. It takes a little over 292 years for
186 UST to overflow. There is no way to set the UST clock. The regular
187 Linux time-of-day clock can be changed periodically, which would
188 cause errors if it were being used for timestamping a multimedia
189 stream. A real UST style clock will require some support in the
190 kernel that is not there yet. But in anticipation, I will change the
191 timestamp field to a 64-bit integer, and I will change the
192 v4l2_masterclock_gettime() function (used only by drivers) to
193 return a 64-bit integer.
194
195 8. A ``sequence`` field was added to struct v4l2_buffer. The ``sequence``
196 field counts captured frames, it is ignored by output devices. When a
197 capture driver drops a frame, the sequence number of that frame is skipped.
198
199 V4L2 Version 0.20 incremental changes
200 =====================================
201
202 1999-12-23: In struct v4l2_vbi_format the
203 ``reserved1`` field became ``offset``. Previously drivers were required
204 to clear the ``reserved1`` field.
205
206 2000-01-13: The ``V4L2_FMT_FLAG_NOT_INTERLACED`` flag was added.
207
208 2000-07-31: The ``linux/poll.h`` header is now included by
209 ``videodev.h`` for compatibility with the original ``videodev.h`` file.
210
211 2000-11-20: ``V4L2_TYPE_VBI_OUTPUT`` and ``V4L2_PIX_FMT_Y41P`` were
212 added.
213
214 2000-11-25: ``V4L2_TYPE_VBI_INPUT`` was added.
215
216 2000-12-04: A couple typos in symbol names were fixed.
217
218 2001-01-18: To avoid namespace conflicts the ``fourcc`` macro defined in
219 the ``videodev.h`` header file was renamed to ``v4l2_fourcc``.
220
221 2001-01-25: A possible driver-level compatibility problem between the
222 ``videodev.h`` file in Linux 2.4.0 and the ``videodev.h`` file included
223 in the ``videodevX`` patch was fixed. Users of an earlier version of
224 ``videodevX`` on Linux 2.4.0 should recompile their V4L and V4L2
225 drivers.
226
227 2001-01-26: A possible kernel-level incompatibility between the
228 ``videodev.h`` file in the ``videodevX`` patch and the ``videodev.h``
229 file in Linux 2.2.x with devfs patches applied was fixed.
230
231 2001-03-02: Certain V4L ioctls which pass data in both direction
232 although they are defined with read-only parameter, did not work
233 correctly through the backward compatibility layer. [Solution?]
234
235 2001-04-13: Big endian 16-bit RGB formats were added.
236
237 2001-09-17: New YUV formats and the
238 :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
239 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctls were added.
240 (The old ``VIDIOC_G_FREQ`` and ``VIDIOC_S_FREQ`` ioctls did not take
241 multiple tuners into account.)
242
243 2000-09-18: ``V4L2_BUF_TYPE_VBI`` was added. This may *break
244 compatibility* as the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
245 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls may fail now if the
246 struct ``v4l2_fmt`` ``type`` field does not contain
247 ``V4L2_BUF_TYPE_VBI``. In the documentation of the struct v4l2_vbi_format`,
248 the ``offset`` field the ambiguous phrase "rising edge" was changed to
249 "leading edge".
250
251 V4L2 Version 0.20 2000-11-23
252 ============================
253
254 A number of changes were made to the raw VBI interface.
255
256 1. Figures clarifying the line numbering scheme were added to the V4L2
257 API specification. The ``start``\ [0] and ``start``\ [1] fields no
258 longer count line numbers beginning at zero. Rationale: a) The
259 previous definition was unclear. b) The ``start``\ [] values are
260 ordinal numbers. c) There is no point in inventing a new line
261 numbering scheme. We now use line number as defined by ITU-R, period.
262 Compatibility: Add one to the start values. Applications depending on
263 the previous semantics may not function correctly.
264
265 2. The restriction "count[0] > 0 and count[1] > 0" has been relaxed to
266 "(count[0] + count[1]) > 0". Rationale: Drivers may allocate
267 resources at scan line granularity and some data services are
268 transmitted only on the first field. The comment that both ``count``
269 values will usually be equal is misleading and pointless and has been
270 removed. This change *breaks compatibility* with earlier versions:
271 Drivers may return ``EINVAL``, applications may not function correctly.
272
273 3. Drivers are again permitted to return negative (unknown) start values
274 as proposed earlier. Why this feature was dropped is unclear. This
275 change may *break compatibility* with applications depending on the
276 start values being positive. The use of ``EBUSY`` and ``EINVAL``
277 error codes with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl was
278 clarified. The ``EBUSY`` error code was finally documented, and the
279 ``reserved2`` field which was previously mentioned only in the
280 ``videodev.h`` header file.
281
282 4. New buffer types ``V4L2_TYPE_VBI_INPUT`` and ``V4L2_TYPE_VBI_OUTPUT``
283 were added. The former is an alias for the old ``V4L2_TYPE_VBI``, the
284 latter was missing in the ``videodev.h`` file.
285
286 V4L2 Version 0.20 2002-07-25
287 ============================
288
289 Added sliced VBI interface proposal.
290
291 V4L2 in Linux 2.5.46, 2002-10
292 =============================
293
294 Around October-November 2002, prior to an announced feature freeze of
295 Linux 2.5, the API was revised, drawing from experience with V4L2 0.20.
296 This unnamed version was finally merged into Linux 2.5.46.
297
298 1. As specified in :ref:`related`, drivers must make related device
299 functions available under all minor device numbers.
300
301 2. The :c:func:`open()` function requires access mode
302 ``O_RDWR`` regardless of the device type. All V4L2 drivers
303 exchanging data with applications must support the ``O_NONBLOCK``
304 flag. The ``O_NOIO`` flag, a V4L2 symbol which aliased the
305 meaningless ``O_TRUNC`` to indicate accesses without data exchange
306 (panel applications) was dropped. Drivers must stay in "panel mode"
307 until the application attempts to initiate a data exchange, see
308 :ref:`open`.
309
310 3. The struct v4l2_capability changed
311 dramatically. Note that also the size of the structure changed,
312 which is encoded in the ioctl request code, thus older V4L2 devices
313 will respond with an ``EINVAL`` error code to the new
314 :ref:`VIDIOC_QUERYCAP` ioctl.
315
316 There are new fields to identify the driver, a new RDS device
317 function ``V4L2_CAP_RDS_CAPTURE``, the ``V4L2_CAP_AUDIO`` flag
318 indicates if the device has any audio connectors, another I/O
319 capability V4L2_CAP_ASYNCIO can be flagged. In response to these
320 changes the ``type`` field became a bit set and was merged into the
321 ``flags`` field. ``V4L2_FLAG_TUNER`` was renamed to
322 ``V4L2_CAP_TUNER``, ``V4L2_CAP_VIDEO_OVERLAY`` replaced
323 ``V4L2_FLAG_PREVIEW`` and ``V4L2_CAP_VBI_CAPTURE`` and
324 ``V4L2_CAP_VBI_OUTPUT`` replaced ``V4L2_FLAG_DATA_SERVICE``.
325 ``V4L2_FLAG_READ`` and ``V4L2_FLAG_WRITE`` were merged into
326 ``V4L2_CAP_READWRITE``.
327
328 The redundant fields ``inputs``, ``outputs`` and ``audios`` were
329 removed. These properties can be determined as described in
330 :ref:`video` and :ref:`audio`.
331
332 The somewhat volatile and therefore barely useful fields
333 ``maxwidth``, ``maxheight``, ``minwidth``, ``minheight``,
334 ``maxframerate`` were removed. This information is available as
335 described in :ref:`format` and :ref:`standard`.
336
337 ``V4L2_FLAG_SELECT`` was removed. We believe the select() function
338 is important enough to require support of it in all V4L2 drivers
339 exchanging data with applications. The redundant
340 ``V4L2_FLAG_MONOCHROME`` flag was removed, this information is
341 available as described in :ref:`format`.
342
343 4. In struct v4l2_input the ``assoc_audio``
344 field and the ``capability`` field and its only flag
345 ``V4L2_INPUT_CAP_AUDIO`` was replaced by the new ``audioset`` field.
346 Instead of linking one video input to one audio input this field
347 reports all audio inputs this video input combines with.
348
349 New fields are ``tuner`` (reversing the former link from tuners to
350 video inputs), ``std`` and ``status``.
351
352 Accordingly struct v4l2_output lost its
353 ``capability`` and ``assoc_audio`` fields. ``audioset``,
354 ``modulator`` and ``std`` where added instead.
355
356 5. The struct v4l2_audio field ``audio`` was
357 renamed to ``index``, for consistency with other structures. A new
358 capability flag ``V4L2_AUDCAP_STEREO`` was added to indicated if the
359 audio input in question supports stereo sound.
360 ``V4L2_AUDCAP_EFFECTS`` and the corresponding ``V4L2_AUDMODE`` flags
361 where removed. This can be easily implemented using controls.
362 (However the same applies to AVL which is still there.)
363
364 Again for consistency the struct v4l2_audioout field ``audio`` was renamed
365 to ``index``.
366
367 6. The struct v4l2_tuner ``input`` field was
368 replaced by an ``index`` field, permitting devices with multiple
369 tuners. The link between video inputs and tuners is now reversed,
370 inputs point to their tuner. The ``std`` substructure became a
371 simple set (more about this below) and moved into struct v4l2_input.
372 A ``type`` field was added.
373
374 Accordingly in struct v4l2_modulator the
375 ``output`` was replaced by an ``index`` field.
376
377 In struct v4l2_frequency the ``port``
378 field was replaced by a ``tuner`` field containing the respective
379 tuner or modulator index number. A tuner ``type`` field was added
380 and the ``reserved`` field became larger for future extensions
381 (satellite tuners in particular).
382
383 7. The idea of completely transparent video standards was dropped.
384 Experience showed that applications must be able to work with video
385 standards beyond presenting the user a menu. Instead of enumerating
386 supported standards with an ioctl applications can now refer to
387 standards by :ref:`v4l2_std_id <v4l2-std-id>` and symbols
388 defined in the ``videodev2.h`` header file. For details see
389 :ref:`standard`. The :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
390 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` now take a pointer to this
391 type as argument. :ref:`VIDIOC_QUERYSTD` was
392 added to autodetect the received standard, if the hardware has this
393 capability. In struct v4l2_standard an
394 ``index`` field was added for
395 :ref:`VIDIOC_ENUMSTD`. A
396 :ref:`v4l2_std_id <v4l2-std-id>` field named ``id`` was added as
397 machine readable identifier, also replacing the ``transmission``
398 field. The misleading ``framerate`` field was renamed to
399 ``frameperiod``. The now obsolete ``colorstandard`` information,
400 originally needed to distguish between variations of standards, were
401 removed.
402
403 Struct ``v4l2_enumstd`` ceased to be.
404 :ref:`VIDIOC_ENUMSTD` now takes a pointer to a
405 struct v4l2_standard directly. The
406 information which standards are supported by a particular video
407 input or output moved into struct v4l2_input
408 and struct v4l2_output fields named ``std``,
409 respectively.
410
411 8. The struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` fields
412 ``category`` and ``group`` did not catch on and/or were not
413 implemented as expected and therefore removed.
414
415 9. The :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl was added to
416 negotiate data formats as with
417 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, but without the overhead of
418 programming the hardware and regardless of I/O in progress.
419
420 In struct v4l2_format the ``fmt`` union was
421 extended to contain struct v4l2_window. All
422 image format negotiations are now possible with ``VIDIOC_G_FMT``,
423 ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT``; ioctl. The ``VIDIOC_G_WIN``
424 and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were
425 removed. The ``type`` field changed to type enum v4l2_buf_type and
426 the buffer type names changed as follows.
427
428
429 .. flat-table::
430 :header-rows: 1
431 :stub-columns: 0
432
433 * - Old defines
434 - enum v4l2_buf_type
435 * - ``V4L2_BUF_TYPE_CAPTURE``
436 - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
437 * - ``V4L2_BUF_TYPE_CODECIN``
438 - Omitted for now
439 * - ``V4L2_BUF_TYPE_CODECOUT``
440 - Omitted for now
441 * - ``V4L2_BUF_TYPE_EFFECTSIN``
442 - Omitted for now
443 * - ``V4L2_BUF_TYPE_EFFECTSIN2``
444 - Omitted for now
445 * - ``V4L2_BUF_TYPE_EFFECTSOUT``
446 - Omitted for now
447 * - ``V4L2_BUF_TYPE_VIDEOOUT``
448 - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
449 * - ``-``
450 - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
451 * - ``-``
452 - ``V4L2_BUF_TYPE_VBI_CAPTURE``
453 * - ``-``
454 - ``V4L2_BUF_TYPE_VBI_OUTPUT``
455 * - ``-``
456 - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
457 * - ``-``
458 - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
459 * - ``V4L2_BUF_TYPE_PRIVATE_BASE``
460 - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
461
462 10. In struct v4l2_fmtdesc a enum v4l2_buf_type field named ``type`` was
463 added as in struct v4l2_format. The ``VIDIOC_ENUM_FBUFFMT`` ioctl is no
464 longer needed and was removed. These calls can be replaced by
465 :ref:`VIDIOC_ENUM_FMT` with type ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
466
467 11. In struct v4l2_pix_format the ``depth``
468 field was removed, assuming applications which recognize the format
469 by its four-character-code already know the color depth, and others
470 do not care about it. The same rationale lead to the removal of the
471 ``V4L2_FMT_FLAG_COMPRESSED`` flag. The
472 ``V4L2_FMT_FLAG_SWCONVECOMPRESSED`` flag was removed because drivers
473 are not supposed to convert images in kernel space. A user library
474 of conversion functions should be provided instead. The
475 ``V4L2_FMT_FLAG_BYTESPERLINE`` flag was redundant. Applications can
476 set the ``bytesperline`` field to zero to get a reasonable default.
477 Since the remaining flags were replaced as well, the ``flags`` field
478 itself was removed.
479
480 The interlace flags were replaced by a enum v4l2_field value in a
481 newly added ``field`` field.
482
483 .. flat-table::
484 :header-rows: 1
485 :stub-columns: 0
486
487 * - Old flag
488 - enum v4l2_field
489 * - ``V4L2_FMT_FLAG_NOT_INTERLACED``
490 - ?
491 * - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
492 - ``V4L2_FIELD_INTERLACED``
493 * - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
494 - ``V4L2_FIELD_TOP``
495 * - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
496 - ``V4L2_FIELD_BOTTOM``
497 * - ``-``
498 - ``V4L2_FIELD_SEQ_TB``
499 * - ``-``
500 - ``V4L2_FIELD_SEQ_BT``
501 * - ``-``
502 - ``V4L2_FIELD_ALTERNATE``
503
504 The color space flags were replaced by a enum v4l2_colorspace value in
505 a newly added ``colorspace`` field, where one of
506 ``V4L2_COLORSPACE_SMPTE170M``, ``V4L2_COLORSPACE_BT878``,
507 ``V4L2_COLORSPACE_470_SYSTEM_M`` or
508 ``V4L2_COLORSPACE_470_SYSTEM_BG`` replaces ``V4L2_FMT_CS_601YUV``.
509
510 12. In struct v4l2_requestbuffers the
511 ``type`` field was properly defined as enum v4l2_buf_type. Buffer types
512 changed as mentioned above. A new ``memory`` field of type
513 enum v4l2_memory was added to distinguish between
514 I/O methods using buffers allocated by the driver or the
515 application. See :ref:`io` for details.
516
517 13. In struct v4l2_buffer the ``type`` field was
518 properly defined as enum v4l2_buf_type.
519 Buffer types changed as mentioned above. A ``field`` field of type
520 enum v4l2_field was added to indicate if a
521 buffer contains a top or bottom field. The old field flags were
522 removed. Since no unadjusted system time clock was added to the
523 kernel as planned, the ``timestamp`` field changed back from type
524 stamp_t, an unsigned 64 bit integer expressing the sample time in
525 nanoseconds, to struct timeval. With the addition
526 of a second memory mapping method the ``offset`` field moved into
527 union ``m``, and a new ``memory`` field of type enum v4l2_memory
528 was added to distinguish between
529 I/O methods. See :ref:`io` for details.
530
531 The ``V4L2_BUF_REQ_CONTIG`` flag was used by the V4L compatibility
532 layer, after changes to this code it was no longer needed. The
533 ``V4L2_BUF_ATTR_DEVICEMEM`` flag would indicate if the buffer was
534 indeed allocated in device memory rather than DMA-able system
535 memory. It was barely useful and so was removed.
536
537 14. In struct v4l2_framebuffer the
538 ``base[3]`` array anticipating double- and triple-buffering in
539 off-screen video memory, however without defining a synchronization
540 mechanism, was replaced by a single pointer. The
541 ``V4L2_FBUF_CAP_SCALEUP`` and ``V4L2_FBUF_CAP_SCALEDOWN`` flags were
542 removed. Applications can determine this capability more accurately
543 using the new cropping and scaling interface. The
544 ``V4L2_FBUF_CAP_CLIPPING`` flag was replaced by
545 ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
546 ``V4L2_FBUF_CAP_BITMAP_CLIPPING``.
547
548 15. In struct v4l2_clip the ``x``, ``y``,
549 ``width`` and ``height`` field moved into a ``c`` substructure of
550 type struct v4l2_rect. The ``x`` and ``y``
551 fields were renamed to ``left`` and ``top``, i. e. offsets to a
552 context dependent origin.
553
554 16. In struct v4l2_window the ``x``, ``y``,
555 ``width`` and ``height`` field moved into a ``w`` substructure as
556 above. A ``field`` field of type enum v4l2_field was added to
557 distinguish between field and frame (interlaced) overlay.
558
559 17. The digital zoom interface, including struct ``v4l2_zoomcap``,
560 struct ``v4l2_zoom``, ``V4L2_ZOOM_NONCAP`` and
561 ``V4L2_ZOOM_WHILESTREAMING`` was replaced by a new cropping and
562 scaling interface. The previously unused
563 struct v4l2_cropcap and struct v4l2_crop
564 where redefined for this purpose. See :ref:`crop` for details.
565
566 18. In struct v4l2_vbi_format the
567 ``SAMPLE_FORMAT`` field now contains a four-character-code as used
568 to identify video image formats and ``V4L2_PIX_FMT_GREY`` replaces
569 the ``V4L2_VBI_SF_UBYTE`` define. The ``reserved`` field was
570 extended.
571
572 19. In struct v4l2_captureparm the type of
573 the ``timeperframe`` field changed from unsigned long to
574 struct v4l2_fract. This allows the accurate
575 expression of multiples of the NTSC-M frame rate 30000 / 1001. A new
576 field ``readbuffers`` was added to control the driver behaviour in
577 read I/O mode.
578
579 Similar changes were made to struct v4l2_outputparm.
580
581 20. The struct ``v4l2_performance`` and
582 ``VIDIOC_G_PERF`` ioctl were dropped. Except when using the
583 :ref:`read/write I/O method <rw>`, which is limited anyway, this
584 information is already available to applications.
585
586 21. The example transformation from RGB to YCbCr color space in the old
587 V4L2 documentation was inaccurate, this has been corrected in
588 :ref:`pixfmt`.
589
590 V4L2 2003-06-19
591 ===============
592
593 1. A new capability flag ``V4L2_CAP_RADIO`` was added for radio devices.
594 Prior to this change radio devices would identify solely by having
595 exactly one tuner whose type field reads ``V4L2_TUNER_RADIO``.
596
597 2. An optional driver access priority mechanism was added, see
598 :ref:`app-pri` for details.
599
600 3. The audio input and output interface was found to be incomplete.
601
602 Previously the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl would
603 enumerate the available audio inputs. An ioctl to determine the
604 current audio input, if more than one combines with the current video
605 input, did not exist. So ``VIDIOC_G_AUDIO`` was renamed to
606 ``VIDIOC_G_AUDIO_OLD``, this ioctl was removed on Kernel 2.6.39. The
607 :ref:`VIDIOC_ENUMAUDIO` ioctl was added to
608 enumerate audio inputs, while
609 :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` now reports the current
610 audio input.
611
612 The same changes were made to
613 :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDOUT>` and
614 :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>`.
615
616 Until further the "videodev" module will automatically translate
617 between the old and new ioctls, but drivers and applications must be
618 updated to successfully compile again.
619
620 4. The :ref:`VIDIOC_OVERLAY` ioctl was incorrectly
621 defined with write-read parameter. It was changed to write-only,
622 while the write-read version was renamed to ``VIDIOC_OVERLAY_OLD``.
623 The old ioctl was removed on Kernel 2.6.39. Until further the
624 "videodev" kernel module will automatically translate to the new
625 version, so drivers must be recompiled, but not applications.
626
627 5. :ref:`overlay` incorrectly stated that clipping rectangles define
628 regions where the video can be seen. Correct is that clipping
629 rectangles define regions where *no* video shall be displayed and so
630 the graphics surface can be seen.
631
632 6. The :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` and
633 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls were defined with
634 write-only parameter, inconsistent with other ioctls modifying their
635 argument. They were changed to write-read, while a ``_OLD`` suffix
636 was added to the write-only versions. The old ioctls were removed on
637 Kernel 2.6.39. Drivers and applications assuming a constant parameter
638 need an update.
639
640 V4L2 2003-11-05
641 ===============
642
643 1. In :ref:`pixfmt-rgb` the following pixel formats were incorrectly
644 transferred from Bill Dirks' V4L2 specification. Descriptions below
645 refer to bytes in memory, in ascending address order.
646
647
648 .. flat-table::
649 :header-rows: 1
650 :stub-columns: 0
651
652 * - Symbol
653 - In this document prior to revision 0.5
654 - Corrected
655 * - ``V4L2_PIX_FMT_RGB24``
656 - B, G, R
657 - R, G, B
658 * - ``V4L2_PIX_FMT_BGR24``
659 - R, G, B
660 - B, G, R
661 * - ``V4L2_PIX_FMT_RGB32``
662 - B, G, R, X
663 - R, G, B, X
664 * - ``V4L2_PIX_FMT_BGR32``
665 - R, G, B, X
666 - B, G, R, X
667
668 The ``V4L2_PIX_FMT_BGR24`` example was always correct.
669
670 In :ref:`v4l-image-properties` the mapping of the V4L
671 ``VIDEO_PALETTE_RGB24`` and ``VIDEO_PALETTE_RGB32`` formats to V4L2
672 pixel formats was accordingly corrected.
673
674 2. Unrelated to the fixes above, drivers may still interpret some V4L2
675 RGB pixel formats differently. These issues have yet to be addressed,
676 for details see :ref:`pixfmt-rgb`.
677
678 V4L2 in Linux 2.6.6, 2004-05-09
679 ===============================
680
681 1. The :ref:`VIDIOC_CROPCAP` ioctl was incorrectly
682 defined with read-only parameter. It is now defined as write-read
683 ioctl, while the read-only version was renamed to
684 ``VIDIOC_CROPCAP_OLD``. The old ioctl was removed on Kernel 2.6.39.
685
686 V4L2 in Linux 2.6.8
687 ===================
688
689 1. A new field ``input`` (former ``reserved[0]``) was added to the
690 struct v4l2_buffer. Purpose of this
691 field is to alternate between video inputs (e. g. cameras) in step
692 with the video capturing process. This function must be enabled with
693 the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no
694 longer read-only.
695
696 V4L2 spec erratum 2004-08-01
697 ============================
698
699 1. The return value of the :ref:`func-open` function was incorrectly
700 documented.
701
702 2. Audio output ioctls end in -AUDOUT, not -AUDIOOUT.
703
704 3. In the Current Audio Input example the ``VIDIOC_G_AUDIO`` ioctl took
705 the wrong argument.
706
707 4. The documentation of the :ref:`VIDIOC_QBUF` and
708 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctls did not mention the
709 struct v4l2_buffer ``memory`` field. It was
710 also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO``
711 error code was not documented.
712
713 V4L2 in Linux 2.6.14
714 ====================
715
716 1. A new sliced VBI interface was added. It is documented in
717 :ref:`sliced` and replaces the interface first proposed in V4L2
718 specification 0.8.
719
720 V4L2 in Linux 2.6.15
721 ====================
722
723 1. The :ref:`VIDIOC_LOG_STATUS` ioctl was added.
724
725 2. New video standards ``V4L2_STD_NTSC_443``, ``V4L2_STD_SECAM_LC``,
726 ``V4L2_STD_SECAM_DK`` (a set of SECAM D, K and K1), and
727 ``V4L2_STD_ATSC`` (a set of ``V4L2_STD_ATSC_8_VSB`` and
728 ``V4L2_STD_ATSC_16_VSB``) were defined. Note the ``V4L2_STD_525_60``
729 set now includes ``V4L2_STD_NTSC_443``. See also
730 :ref:`v4l2-std-id`.
731
732 3. The ``VIDIOC_G_COMP`` and ``VIDIOC_S_COMP`` ioctl were renamed to
733 ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` respectively. Their
734 argument was replaced by a struct
735 ``v4l2_mpeg_compression`` pointer. (The
736 ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed
737 in Linux 2.6.25.)
738
739 V4L2 spec erratum 2005-11-27
740 ============================
741
742 The capture example in :ref:`capture-example` called the
743 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl without checking if
744 cropping is supported. In the video standard selection example in
745 :ref:`standard` the :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` call used
746 the wrong argument type.
747
748 V4L2 spec erratum 2006-01-10
749 ============================
750
751 1. The ``V4L2_IN_ST_COLOR_KILL`` flag in struct v4l2_input not only
752 indicates if the color killer is enabled, but also if it is active.
753 (The color killer disables color decoding when it detects no color
754 in the video signal to improve the image quality.)
755
756 2. :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` is a write-read ioctl, not
757 write-only as stated on its reference page. The ioctl changed in 2003
758 as noted above.
759
760 V4L2 spec erratum 2006-02-03
761 ============================
762
763 1. In struct v4l2_captureparm and struct v4l2_outputparm the ``timeperframe``
764 field gives the time in seconds, not microseconds.
765
766 V4L2 spec erratum 2006-02-04
767 ============================
768
769 1. The ``clips`` field in struct v4l2_window
770 must point to an array of struct v4l2_clip, not
771 a linked list, because drivers ignore the
772 struct v4l2_clip. ``next`` pointer.
773
774 V4L2 in Linux 2.6.17
775 ====================
776
777 1. New video standard macros were added: ``V4L2_STD_NTSC_M_KR`` (NTSC M
778 South Korea), and the sets ``V4L2_STD_MN``, ``V4L2_STD_B``,
779 ``V4L2_STD_GH`` and ``V4L2_STD_DK``. The ``V4L2_STD_NTSC`` and
780 ``V4L2_STD_SECAM`` sets now include ``V4L2_STD_NTSC_M_KR`` and
781 ``V4L2_STD_SECAM_LC`` respectively.
782
783 2. A new ``V4L2_TUNER_MODE_LANG1_LANG2`` was defined to record both
784 languages of a bilingual program. The use of
785 ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See
786 the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details.
787
788 V4L2 spec erratum 2006-09-23 (Draft 0.15)
789 =========================================
790
791 1. In various places ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` and
792 ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` of the sliced VBI interface were
793 not mentioned along with other buffer types.
794
795 2. In :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` it was clarified that the
796 struct v4l2_audio ``mode`` field is a flags field.
797
798 3. :ref:`VIDIOC_QUERYCAP` did not mention the sliced VBI and radio
799 capability flags.
800
801 4. In :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` it was clarified that
802 applications must initialize the tuner ``type`` field of
803 struct v4l2_frequency before calling
804 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`.
805
806 5. The ``reserved`` array in struct v4l2_requestbuffers has 2 elements,
807 not 32.
808
809 6. In :ref:`output` and :ref:`raw-vbi` the device file names
810 ``/dev/vout`` which never caught on were replaced by ``/dev/video``.
811
812 7. With Linux 2.6.15 the possible range for VBI device minor numbers was
813 extended from 224-239 to 224-255. Accordingly device file names
814 ``/dev/vbi0`` to ``/dev/vbi31`` are possible now.
815
816 V4L2 in Linux 2.6.18
817 ====================
818
819 1. New ioctls :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
820 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
821 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` were added, a
822 flag to skip unsupported controls with
823 :ref:`VIDIOC_QUERYCTRL`, new control types
824 ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_TYPE_CTRL_CLASS``
825 (enum v4l2_ctrl_type), and new control flags
826 ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``,
827 ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER``
828 (:ref:`control-flags`). See :ref:`extended-controls` for details.
829
830 V4L2 in Linux 2.6.19
831 ====================
832
833 1. In struct v4l2_sliced_vbi_cap a
834 buffer type field was added replacing a reserved field. Note on
835 architectures where the size of enum types differs from int types the
836 size of the structure changed. The
837 :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl
838 was redefined from being read-only to write-read. Applications must
839 initialize the type field and clear the reserved fields now. These
840 changes may *break the compatibility* with older drivers and
841 applications.
842
843 2. The ioctls :ref:`VIDIOC_ENUM_FRAMESIZES`
844 and
845 :ref:`VIDIOC_ENUM_FRAMEINTERVALS`
846 were added.
847
848 3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was
849 added.
850
851 V4L2 spec erratum 2006-10-12 (Draft 0.17)
852 =========================================
853
854 1. ``V4L2_PIX_FMT_HM12`` (:ref:`reserved-formats`) is a YUV 4:2:0, not
855 4:2:2 format.
856
857 V4L2 in Linux 2.6.21
858 ====================
859
860 1. The ``videodev2.h`` header file is now dual licensed under GNU
861 General Public License version two or later, and under a 3-clause
862 BSD-style license.
863
864 V4L2 in Linux 2.6.22
865 ====================
866
867 1. Two new field orders ``V4L2_FIELD_INTERLACED_TB`` and
868 ``V4L2_FIELD_INTERLACED_BT`` were added. See enum v4l2_field for
869 details.
870
871 2. Three new clipping/blending methods with a global or straight or
872 inverted local alpha value were added to the video overlay interface.
873 See the description of the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
874 and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls for details.
875
876 A new ``global_alpha`` field was added to struct v4l2_window,
877 extending the structure. This may **break compatibility** with
878 applications using a struct v4l2_window directly. However the
879 :ref:`VIDIOC_G/S/TRY_FMT <VIDIOC_G_FMT>` ioctls, which take a
880 pointer to a struct v4l2_format parent structure
881 with padding bytes at the end, are not affected.
882
883 3. The format of the ``chromakey`` field in struct v4l2_window changed from
884 "host order RGB32" to a pixel value in the same format as the framebuffer.
885 This may **break compatibility** with existing applications. Drivers
886 supporting the "host order RGB32" format are not known.
887
888 V4L2 in Linux 2.6.24
889 ====================
890
891 1. The pixel formats ``V4L2_PIX_FMT_PAL8``, ``V4L2_PIX_FMT_YUV444``,
892 ``V4L2_PIX_FMT_YUV555``, ``V4L2_PIX_FMT_YUV565`` and
893 ``V4L2_PIX_FMT_YUV32`` were added.
894
895 V4L2 in Linux 2.6.25
896 ====================
897
898 1. The pixel formats :ref:`V4L2_PIX_FMT_Y16 <V4L2-PIX-FMT-Y16>` and
899 :ref:`V4L2_PIX_FMT_SBGGR16 <V4L2-PIX-FMT-SBGGR16>` were added.
900
901 2. New :ref:`controls <control>` ``V4L2_CID_POWER_LINE_FREQUENCY``,
902 ``V4L2_CID_HUE_AUTO``, ``V4L2_CID_WHITE_BALANCE_TEMPERATURE``,
903 ``V4L2_CID_SHARPNESS`` and ``V4L2_CID_BACKLIGHT_COMPENSATION`` were
904 added. The controls ``V4L2_CID_BLACK_LEVEL``, ``V4L2_CID_WHITENESS``,
905 ``V4L2_CID_HCENTER`` and ``V4L2_CID_VCENTER`` were deprecated.
906
907 3. A :ref:`Camera controls class <camera-controls>` was added, with
908 the new controls ``V4L2_CID_EXPOSURE_AUTO``,
909 ``V4L2_CID_EXPOSURE_ABSOLUTE``, ``V4L2_CID_EXPOSURE_AUTO_PRIORITY``,
910 ``V4L2_CID_PAN_RELATIVE``, ``V4L2_CID_TILT_RELATIVE``,
911 ``V4L2_CID_PAN_RESET``, ``V4L2_CID_TILT_RESET``,
912 ``V4L2_CID_PAN_ABSOLUTE``, ``V4L2_CID_TILT_ABSOLUTE``,
913 ``V4L2_CID_FOCUS_ABSOLUTE``, ``V4L2_CID_FOCUS_RELATIVE`` and
914 ``V4L2_CID_FOCUS_AUTO``.
915
916 4. The ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls, which
917 were superseded by the :ref:`extended controls <extended-controls>`
918 interface in Linux 2.6.18, where finally removed from the
919 ``videodev2.h`` header file.
920
921 V4L2 in Linux 2.6.26
922 ====================
923
924 1. The pixel formats ``V4L2_PIX_FMT_Y16`` and ``V4L2_PIX_FMT_SBGGR16``
925 were added.
926
927 2. Added user controls ``V4L2_CID_CHROMA_AGC`` and
928 ``V4L2_CID_COLOR_KILLER``.
929
930 V4L2 in Linux 2.6.27
931 ====================
932
933 1. The :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
934 and the ``V4L2_CAP_HW_FREQ_SEEK`` capability were added.
935
936 2. The pixel formats ``V4L2_PIX_FMT_YVYU``, ``V4L2_PIX_FMT_PCA501``,
937 ``V4L2_PIX_FMT_PCA505``, ``V4L2_PIX_FMT_PCA508``,
938 ``V4L2_PIX_FMT_PCA561``, ``V4L2_PIX_FMT_SGBRG8``,
939 ``V4L2_PIX_FMT_PAC207`` and ``V4L2_PIX_FMT_PJPG`` were added.
940
941 V4L2 in Linux 2.6.28
942 ====================
943
944 1. Added ``V4L2_MPEG_AUDIO_ENCODING_AAC`` and
945 ``V4L2_MPEG_AUDIO_ENCODING_AC3`` MPEG audio encodings.
946
947 2. Added ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` MPEG video encoding.
948
949 3. The pixel formats ``V4L2_PIX_FMT_SGRBG10`` and
950 ``V4L2_PIX_FMT_SGRBG10DPCM8`` were added.
951
952 V4L2 in Linux 2.6.29
953 ====================
954
955 1. The ``VIDIOC_G_CHIP_IDENT`` ioctl was renamed to
956 ``VIDIOC_G_CHIP_IDENT_OLD`` and ``VIDIOC_DBG_G_CHIP_IDENT`` was
957 introduced in its place. The old struct ``v4l2_chip_ident`` was renamed to
958 struct ``v4l2_chip_ident_old``.
959
960 2. The pixel formats ``V4L2_PIX_FMT_VYUY``, ``V4L2_PIX_FMT_NV16`` and
961 ``V4L2_PIX_FMT_NV61`` were added.
962
963 3. Added camera controls ``V4L2_CID_ZOOM_ABSOLUTE``,
964 ``V4L2_CID_ZOOM_RELATIVE``, ``V4L2_CID_ZOOM_CONTINUOUS`` and
965 ``V4L2_CID_PRIVACY``.
966
967 V4L2 in Linux 2.6.30
968 ====================
969
970 1. New control flag ``V4L2_CTRL_FLAG_WRITE_ONLY`` was added.
971
972 2. New control ``V4L2_CID_COLORFX`` was added.
973
974 V4L2 in Linux 2.6.32
975 ====================
976
977 1. In order to be easier to compare a V4L2 API and a kernel version, now
978 V4L2 API is numbered using the Linux Kernel version numeration.
979
980 2. Finalized the RDS capture API. See :ref:`rds` for more information.
981
982 3. Added new capabilities for modulators and RDS encoders.
983
984 4. Add description for libv4l API.
985
986 5. Added support for string controls via new type
987 ``V4L2_CTRL_TYPE_STRING``.
988
989 6. Added ``V4L2_CID_BAND_STOP_FILTER`` documentation.
990
991 7. Added FM Modulator (FM TX) Extended Control Class:
992 ``V4L2_CTRL_CLASS_FM_TX`` and their Control IDs.
993
994 8. Added FM Receiver (FM RX) Extended Control Class:
995 ``V4L2_CTRL_CLASS_FM_RX`` and their Control IDs.
996
997 9. Added Remote Controller chapter, describing the default Remote
998 Controller mapping for media devices.
999
1000 V4L2 in Linux 2.6.33
1001 ====================
1003 1. Added support for Digital Video timings in order to support HDTV
1004 receivers and transmitters.
1006 V4L2 in Linux 2.6.34
1007 ====================
1009 1. Added ``V4L2_CID_IRIS_ABSOLUTE`` and ``V4L2_CID_IRIS_RELATIVE``
1010 controls to the :ref:`Camera controls class <camera-controls>`.
1012 V4L2 in Linux 2.6.37
1013 ====================
1015 1. Remove the vtx (videotext/teletext) API. This API was no longer used
1016 and no hardware exists to verify the API. Nor were any userspace
1017 applications found that used it. It was originally scheduled for
1018 removal in 2.6.35.
1020 V4L2 in Linux 2.6.39
1021 ====================
1023 1. The old VIDIOC_*_OLD symbols and V4L1 support were removed.
1025 2. Multi-planar API added. Does not affect the compatibility of current
1026 drivers and applications. See :ref:`multi-planar API <planar-apis>`
1027 for details.
1029 V4L2 in Linux 3.1
1030 =================
1032 1. VIDIOC_QUERYCAP now returns a per-subsystem version instead of a
1033 per-driver one.
1035 Standardize an error code for invalid ioctl.
1037 Added V4L2_CTRL_TYPE_BITMASK.
1039 V4L2 in Linux 3.2
1040 =================
1042 1. V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to
1043 userspace.
1045 2. Add selection API for extended control over cropping and composing.
1046 Does not affect the compatibility of current drivers and
1047 applications. See :ref:`selection API <selection-api>` for details.
1049 V4L2 in Linux 3.3
1050 =================
1052 1. Added ``V4L2_CID_ALPHA_COMPONENT`` control to the
1053 :ref:`User controls class <control>`.
1055 2. Added the device_caps field to struct v4l2_capabilities and added
1056 the new V4L2_CAP_DEVICE_CAPS capability.
1058 V4L2 in Linux 3.4
1059 =================
1061 1. Added :ref:`JPEG compression control class <jpeg-controls>`.
1063 2. Extended the DV Timings API:
1064 :ref:`VIDIOC_ENUM_DV_TIMINGS`,
1065 :ref:`VIDIOC_QUERY_DV_TIMINGS` and
1066 :ref:`VIDIOC_DV_TIMINGS_CAP`.
1068 V4L2 in Linux 3.5
1069 =================
1071 1. Added integer menus, the new type will be
1072 V4L2_CTRL_TYPE_INTEGER_MENU.
1074 2. Added selection API for V4L2 subdev interface:
1075 :ref:`VIDIOC_SUBDEV_G_SELECTION` and
1076 :ref:`VIDIOC_SUBDEV_S_SELECTION <VIDIOC_SUBDEV_G_SELECTION>`.
1078 3. Added ``V4L2_COLORFX_ANTIQUE``, ``V4L2_COLORFX_ART_FREEZE``,
1079 ``V4L2_COLORFX_AQUA``, ``V4L2_COLORFX_SILHOUETTE``,
1080 ``V4L2_COLORFX_SOLARIZATION``, ``V4L2_COLORFX_VIVID`` and
1081 ``V4L2_COLORFX_ARBITRARY_CBCR`` menu items to the
1082 ``V4L2_CID_COLORFX`` control.
1084 4. Added ``V4L2_CID_COLORFX_CBCR`` control.
1086 5. Added camera controls ``V4L2_CID_AUTO_EXPOSURE_BIAS``,
1087 ``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``,
1088 ``V4L2_CID_IMAGE_STABILIZATION``, ``V4L2_CID_ISO_SENSITIVITY``,
1089 ``V4L2_CID_ISO_SENSITIVITY_AUTO``, ``V4L2_CID_EXPOSURE_METERING``,
1090 ``V4L2_CID_SCENE_MODE``, ``V4L2_CID_3A_LOCK``,
1091 ``V4L2_CID_AUTO_FOCUS_START``, ``V4L2_CID_AUTO_FOCUS_STOP``,
1092 ``V4L2_CID_AUTO_FOCUS_STATUS`` and ``V4L2_CID_AUTO_FOCUS_RANGE``.
1094 V4L2 in Linux 3.6
1095 =================
1097 1. Replaced ``input`` in struct v4l2_buffer by
1098 ``reserved2`` and removed ``V4L2_BUF_FLAG_INPUT``.
1100 2. Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE
1101 capabilities.
1103 3. Added support for frequency band enumerations:
1104 :ref:`VIDIOC_ENUM_FREQ_BANDS`.
1106 V4L2 in Linux 3.9
1107 =================
1109 1. Added timestamp types to ``flags`` field in
1110 struct v4l2_buffer. See :ref:`buffer-flags`.
1112 2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See
1113 :ref:`ctrl-changes-flags`.
1115 V4L2 in Linux 3.10
1116 ==================
1118 1. Removed obsolete and unused DV_PRESET ioctls VIDIOC_G_DV_PRESET,
1119 VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and
1120 VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output
1121 capability flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS.
1123 2. Added new debugging ioctl
1124 :ref:`VIDIOC_DBG_G_CHIP_INFO`.
1126 V4L2 in Linux 3.11
1127 ==================
1129 1. Remove obsolete ``VIDIOC_DBG_G_CHIP_IDENT`` ioctl.
1131 V4L2 in Linux 3.14
1132 ==================
1134 1. In struct v4l2_rect, the type of ``width`` and
1135 ``height`` fields changed from _s32 to _u32.
1137 V4L2 in Linux 3.15
1138 ==================
1140 1. Added Software Defined Radio (SDR) Interface.
1142 V4L2 in Linux 3.16
1143 ==================
1145 1. Added event V4L2_EVENT_SOURCE_CHANGE.
1147 V4L2 in Linux 3.17
1148 ==================
1150 1. Extended struct v4l2_pix_format. Added
1151 format flags.
1153 2. Added compound control types and
1154 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
1156 V4L2 in Linux 3.18
1157 ==================
1159 1. Added ``V4L2_CID_PAN_SPEED`` and ``V4L2_CID_TILT_SPEED`` camera
1160 controls.
1162 V4L2 in Linux 3.19
1163 ==================
1165 1. Rewrote Colorspace chapter, added new enum v4l2_ycbcr_encoding
1166 and enum v4l2_quantization fields to struct v4l2_pix_format,
1167 struct v4l2_pix_format_mplane and struct v4l2_mbus_framefmt.
1169 V4L2 in Linux 4.4
1170 =================
1172 1. Renamed ``V4L2_TUNER_ADC`` to ``V4L2_TUNER_SDR``. The use of
1173 ``V4L2_TUNER_ADC`` is deprecated now.
1175 2. Added ``V4L2_CID_RF_TUNER_RF_GAIN`` RF Tuner control.
1177 3. Added transmitter support for Software Defined Radio (SDR) Interface.
1179 .. _other:
1181 Relation of V4L2 to other Linux multimedia APIs
1182 ===============================================
1184 .. _xvideo:
1186 X Video Extension
1187 -----------------
1189 The X Video Extension (abbreviated XVideo or just Xv) is an extension of
1190 the X Window system, implemented for example by the XFree86 project. Its
1191 scope is similar to V4L2, an API to video capture and output devices for
1192 X clients. Xv allows applications to display live video in a window,
1193 send window contents to a TV output, and capture or output still images
1194 in XPixmaps [#f1]_. With their implementation XFree86 makes the extension
1195 available across many operating systems and architectures.
1197 Because the driver is embedded into the X server Xv has a number of
1198 advantages over the V4L2 :ref:`video overlay interface <overlay>`. The
1199 driver can easily determine the overlay target, i. e. visible graphics
1200 memory or off-screen buffers for a destructive overlay. It can program
1201 the RAMDAC for a non-destructive overlay, scaling or color-keying, or
1202 the clipping functions of the video capture hardware, always in sync
1203 with drawing operations or windows moving or changing their stacking
1204 order.
1206 To combine the advantages of Xv and V4L a special Xv driver exists in
1207 XFree86 and XOrg, just programming any overlay capable Video4Linux
1208 device it finds. To enable it ``/etc/X11/XF86Config`` must contain these
1209 lines:
1211 ::
1213 Section "Module"
1214 Load "v4l"
1215 EndSection
1217 As of XFree86 4.2 this driver still supports only V4L ioctls, however it
1218 should work just fine with all V4L2 devices through the V4L2
1219 backward-compatibility layer. Since V4L2 permits multiple opens it is
1220 possible (if supported by the V4L2 driver) to capture video while an X
1221 client requested video overlay. Restrictions of simultaneous capturing
1222 and overlay are discussed in :ref:`overlay` apply.
1224 Only marginally related to V4L2, XFree86 extended Xv to support hardware
1225 YUV to RGB conversion and scaling for faster video playback, and added
1226 an interface to MPEG-2 decoding hardware. This API is useful to display
1227 images captured with V4L2 devices.
1229 Digital Video
1230 -------------
1232 V4L2 does not support digital terrestrial, cable or satellite broadcast.
1233 A separate project aiming at digital receivers exists. You can find its
1234 homepage at `https://linuxtv.org <https://linuxtv.org>`__. The Linux
1235 DVB API has no connection to the V4L2 API except that drivers for hybrid
1236 hardware may support both.
1238 Audio Interfaces
1239 ----------------
1241 [to do - OSS/ALSA]
1243 .. _experimental:
1245 Experimental API Elements
1246 =========================
1248 The following V4L2 API elements are currently experimental and may
1249 change in the future.
1251 - :ref:`VIDIOC_DBG_G_REGISTER` and
1252 :ref:`VIDIOC_DBG_S_REGISTER <VIDIOC_DBG_G_REGISTER>` ioctls.
1254 - :ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl.
1256 .. _obsolete:
1258 Obsolete API Elements
1259 =====================
1261 The following V4L2 API elements were superseded by new interfaces and
1262 should not be implemented in new drivers.
1264 - ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls. Use Extended
1265 Controls, :ref:`extended-controls`.
1267 - VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET,
1268 VIDIOC_ENUM_DV_PRESETS and VIDIOC_QUERY_DV_PRESET ioctls. Use
1269 the DV Timings API (:ref:`dv-timings`).
1271 - ``VIDIOC_SUBDEV_G_CROP`` and ``VIDIOC_SUBDEV_S_CROP`` ioctls. Use
1272 ``VIDIOC_SUBDEV_G_SELECTION`` and ``VIDIOC_SUBDEV_S_SELECTION``,
1273 :ref:`VIDIOC_SUBDEV_G_SELECTION`.
1275 .. [#f1]
1276 This is not implemented in XFree86.

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

V4L2의 출발과 초기 초안

1-67

초기 Video4Linux(V4L) API는 지나치게 경직되어 있다는 비판을 받았습니다. 1998년 8월 Bill Dirks가 개선안을 내고 문서, 예제 드라이버와 응용 프로그램을 작성했으며, 여러 자원자가 이를 확장하고 시험했습니다. 그렇게 만들어진 대체 API가 V4L2이며, 약 4년과 두 번의 안정 커널 릴리스가 지난 뒤 메인라인에 받아들여졌습니다.

1998년 초기 초안
시기/항목변경 내용과 의미
1998-08-20첫 버전이 공개되었습니다.
1998-08-27동기 I/O 대기를 위한 `select()` 지원이 추가되었습니다.
1998-09-10새 비디오 표준 인터페이스가 도입되었습니다.
1998-09-18의미 없는 `O_TRUNC`를 제어 전용 열기에 재사용하던 `VIDIOC_NONCAP`을 없애고 `O_NONCAP`/`O_NOIO` 별칭을 두었습니다. `VIDEO_STD` 서수와 표준의 ID 및 전송 방식을 받는 도우미도 추가되었습니다.
1998-09-28표준 인터페이스를 다시 손보고 제어를 하나씩 열거할 수 있게 했습니다.
1998-10-02`video_standard`의 `id`를 없애고 부반송파 필드 이름을 바꿨습니다. `VIDIOC_QUERYSTD`는 `VIDIOC_ENUMSTD`로, `VIDIOC_G_INPUT`은 `VIDIOC_ENUMINPUT`으로 바뀌었고 Codec API 초안이 더해졌습니다.
1998-11-08여러 기호 이름과 `v4l2_capability` 구조를 정리했습니다.
1998-11-12ioctl 데이터 방향 표기를 바로잡았습니다.
1998-11-14`RGB24`/`RGB32`를 `BGR24`/`BGR32`로 바꾸고 오디오 제어를 `V4L2_CID_AUDIO_*` 제어로 통합했습니다. `V4L2_MAJOR`를 제거하고 planar `YUV422`와 `YUV411` 형식을 추가했습니다.
1998-11-28ioctl 기호를 정리하고 코덱 및 비디오 출력 인터페이스를 추가했습니다.
1999-01-14원시 VBI 캡처 인터페이스가 추가되었습니다.
1999-01-19`VIDIOC_NEXTBUF`를 제거했습니다.

첫 공개안부터 입출력, 표준, 제어와 코덱 인터페이스가 빠르게 다듬어진 과정을 정리합니다.

이 시기의 변경은 이미 완성된 ABI를 보수한 것이 아니라, V4L의 한계를 확인하면서 명명법과 데이터 모델을 반복해 세운 설계 과정입니다. 따라서 뒤의 0.20 및 Linux 2.5.46 개편과 함께 읽어야 현재 구조가 왜 생겼는지 이해할 수 있습니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L

.. _hist-v4l2:

***********************
Changes of the V4L2 API
***********************

Soon after the V4L API was added to the kernel it was criticised as too
inflexible. In August 1998 Bill Dirks proposed a number of improvements
and began to work on documentation, example drivers and applications.
With the help of other volunteers this eventually became the V4L2 API,
not just an extension but a replacement for the V4L API. However it took
another four years and two stable kernel releases until the new API was
finally accepted for inclusion into the kernel in its present form.

Early Versions
==============

1998-08-20: First version.

1998-08-27: The :c:func:`select()` function was introduced.

1998-09-10: New video standard interface.

1998-09-18: The ``VIDIOC_NONCAP`` ioctl was replaced by the otherwise
meaningless ``O_TRUNC`` :c:func:`open()` flag, and the
aliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set
this flag if they intend to access controls only, as opposed to capture
applications which need exclusive access. The ``VIDEO_STD_XXX``
identifiers are now ordinals instead of flags, and the
``video_std_construct()`` helper function takes id and
transmission arguments.

1998-09-28: Revamped video standard. Made video controls individually
enumerable.

1998-10-02: The ``id`` field was removed from
struct ``video_standard`` and the color subcarrier fields were
renamed. The :ref:`VIDIOC_QUERYSTD` ioctl was
renamed to :ref:`VIDIOC_ENUMSTD`,
:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` to
:ref:`VIDIOC_ENUMINPUT`. A first draft of the
Codec API was released.

1998-11-08: Many minor changes. Most symbols have been renamed. Some
material changes to struct v4l2_capability.

1998-11-12: The read/write direction of some ioctls was misdefined.

1998-11-14: ``V4L2_PIX_FMT_RGB24`` changed to ``V4L2_PIX_FMT_BGR24``,
and ``V4L2_PIX_FMT_RGB32`` changed to ``V4L2_PIX_FMT_BGR32``. Audio
controls are now accessible with the
:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls under names starting
with ``V4L2_CID_AUDIO``. The ``V4L2_MAJOR`` define was removed from
``videodev.h`` since it was only used once in the ``videodev`` kernel
module. The ``YUV422`` and ``YUV411`` planar image formats were added.

1998-11-28: A few ioctl symbols changed. Interfaces for codecs and video
output devices were added.

1999-01-14: A raw VBI capture interface was added.

1999-01-19: The ``VIDIOC_NEXTBUF`` ioctl was removed.

0.16에서 0.20까지의 재설계

68-198
0.16, 0.18, 0.19
시기/항목변경 내용과 의미
V4L2 0.16읽기/쓰기 버퍼마다 나뉘던 큐 ioctl을 하나의 `VIDIOC_QBUF`와 `v4l2_buffer` 인자로 합쳤고 `VIDIOC_QWBUF`/`VIDIOC_QRBUF`를 없앴습니다. 디지털 줌을 위한 crop 인터페이스도 추가했습니다.
V4L2 0.18`videodev.c`에 V4L ioctl을 V4L2 ioctl로 바꾸는 호환 계층을 넣었습니다. 이에 맞춰 드라이버 ioctl 처리 방식이 바뀌고 제어 ID가 늘었습니다.
V4L2 0.19커널이 `v4l2_queryctrl`의 `category`와 `catname`을 채운 뒤 드라이버에 넘기도록 했고 V4L 메모리 캡처 호환, `HFLIP`/`VFLIP`, 추가 제어 ID와 버튼 제어를 넣었습니다.
0.19 명칭/오류 수정원문에 기록된 픽셀 형식 이름 변경(`_YUV422P`에서 `_YUV422P` 포함), `GRAYED` 뒤의 `GRABBED` 정리, `VIDIOC_G_CTRL` 정의 수정, `WHITENESS` 값 변경이 포함됩니다.

버퍼 큐, V4L 호환 계층, 제어와 픽셀 형식의 변화입니다.

V4L2 0.20은 이전 초안과 호환되지 않는 대규모 개편입니다. 목표는 인터페이스를 단순화하고 확장 가능하게 만들며 Linux 관례에 맞추는 것이었습니다.

V4L2 0.20 핵심 변경 1-6
시기/항목변경 내용과 의미
1. 오탈자와 호환`V4L2_FMT_FLAG` 관련 오탈자를 고치고 `v4l2_clip`을 V4L 호환에 맞게 조정했습니다.
2. 튜너`V4L2_TUNER_SUB_LANG1`을 추가했습니다.
3. ioctl 정수 인자`VIDIOC_PREVIEW`, `VIDIOC_STREAMON`, `VIDIOC_STREAMOFF`, `VIDIOC_S_FREQ`, `VIDIOC_S_INPUT`, `VIDIOC_S_OUTPUT`, `VIDIOC_S_EFFECT`의 정수 인자를 값이 아니라 포인터로 전달하도록 바꿨습니다. 원문의 두 C 호출 예시는 이 전환 전후를 정확히 보여 줍니다.
4. 데이터 형식입출력과 VBI의 개별 G/S ioctl을 `VIDIOC_G_FMT`/`VIDIOC_S_FMT`로 통합했습니다. 기존 `v4l2_format`은 `v4l2_pix_format`이 되고, 새 `v4l2_format`이 `type`과 형식별 union을 감싸는 봉투가 되었습니다.
5. 스트림 매개변수`VIDIOC_G_PARM`/`VIDIOC_S_PARM`과 출력용 대응 ioctl을 `type`과 union이 있는 공통 인터페이스로 합쳐 별도 OUTPARM 계열을 폐기했습니다.
6. 제어 열거제어 열거를 단순화하고 `DISABLED`, `GRABBED` 상태를 정의했습니다. category/group은 응용 프로그램이 관련 제어를 묶어 UI를 만들 수 있게 하려는 메타데이터였습니다.

형식, 스트림 매개변수와 제어 열거를 공통 구조로 통합했습니다.

V4L2 0.20 시간과 순서
시기/항목변경 내용과 의미
7. 타임스탬프타임스탬프를 절대 시스템 시간 기준의 부호 있는 64비트 나노초로 바꿨습니다. 출력 장치는 지정 시각까지 기다릴 수 있고, 이 아이디어는 SGI UST에서 왔습니다.
연속 시계 요구부팅 뒤 계속 증가하고 사용자가 바꿀 수 없는 시계를 전제로 했으며 292년 뒤 오버플로합니다. Linux 벽시계 변경 문제 때문에 64비트 master clock 반환 함수가 계획되었습니다.
8. 시퀀스`sequence` 필드를 추가해 캡처 중 프레임이 버려졌을 때 번호가 건너뛰도록 했습니다. 응용 프로그램은 이 간격으로 손실을 감지할 수 있습니다.

프레임 시간과 누락을 표현하기 위한 설계입니다.

0.20 통합 방향
형식별 G/S ioctl 제거공통 `v4l2_format`과 buffer type 선택캡처/출력 매개변수 공통화제어 열거와 상태 단순화타임스탬프와 시퀀스로 프레임 추적

분산된 ioctl과 구조를 공통 type/union 모델로 옮긴 흐름입니다.

V4L2 Version 0.16 1999-01-31
============================

1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF
are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added
digital zoom (cropping) controls.

V4L2 Version 0.18 1999-03-16
============================

Added a v4l to V4L2 ioctl compatibility layer to videodev.c. Driver
writers, this changes how you implement your ioctl handler. See the
Driver Writer's Guide. Added some more control id codes.

V4L2 Version 0.19 1999-06-05
============================

1999-03-18: Fill in the category and catname fields of v4l2_queryctrl
objects before passing them to the driver. Required a minor change to
the VIDIOC_QUERYCTRL handlers in the sample drivers.

1999-03-31: Better compatibility for v4l memory capture ioctls. Requires
changes to drivers to fully support new compatibility features, see
Driver Writer's Guide and v4l2cap.c. Added new control IDs:
V4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P,
and _YUV411P to _YUV411P.

1999-04-04: Added a few more control IDs.

1999-04-07: Added the button control type.

1999-05-02: Fixed a typo in videodev.h, and added the
V4L2_CTRL_FLAG_GRAYED (later V4L2_CTRL_FLAG_GRABBED) flag.

1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing a
malfunction of this ioctl.

1999-06-05: Changed the value of V4L2_CID_WHITENESS.

V4L2 Version 0.20 (1999-09-10)
==============================

Version 0.20 introduced a number of changes which were *not backward
compatible* with 0.19 and earlier versions. Purpose of these changes was
to simplify the API, while making it more extensible and following
common Linux driver API conventions.

1. Some typos in ``V4L2_FMT_FLAG`` symbols were fixed. struct v4l2_clip
   was changed for compatibility with v4l. (1999-08-30)

2. ``V4L2_TUNER_SUB_LANG1`` was added. (1999-09-05)

3. All ioctl() commands that used an integer argument now take a pointer
   to an integer. Where it makes sense, ioctls will return the actual
   new value in the integer pointed to by the argument, a common
   convention in the V4L2 API. The affected ioctls are: VIDIOC_PREVIEW,
   VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ,
   VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example

   .. code-block:: c

       err = ioctl (fd, VIDIOC_XXX, V4L2_XXX);

   becomes

   .. code-block:: c

       int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &a);

4. All the different get- and set-format commands were swept into one
   :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
   :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl taking a union and a
   type field selecting the union member as parameter. Purpose is to
   simplify the API by eliminating several ioctls and to allow new and
   driver private data streams without adding new ioctls.

   This change obsoletes the following ioctls: ``VIDIOC_S_INFMT``,
   ``VIDIOC_G_INFMT``, ``VIDIOC_S_OUTFMT``, ``VIDIOC_G_OUTFMT``,
   ``VIDIOC_S_VBIFMT`` and ``VIDIOC_G_VBIFMT``. The image format
   struct v4l2_format was renamed to struct v4l2_pix_format, while
   struct v4l2_format is now the enveloping structure
   for all format negotiations.

5. Similar to the changes above, the ``VIDIOC_G_PARM`` and
   ``VIDIOC_S_PARM`` ioctls were merged with ``VIDIOC_G_OUTPARM`` and
   ``VIDIOC_S_OUTPARM``. A ``type`` field in the new struct v4l2_streamparm
   selects the respective union member.

   This change obsoletes the ``VIDIOC_G_OUTPARM`` and
   ``VIDIOC_S_OUTPARM`` ioctls.

6. Control enumeration was simplified, and two new control flags were
   introduced and one dropped. The ``catname`` field was replaced by a
   ``group`` field.

   Drivers can now flag unsupported and temporarily unavailable controls
   with ``V4L2_CTRL_FLAG_DISABLED`` and ``V4L2_CTRL_FLAG_GRABBED``
   respectively. The ``group`` name indicates a possibly narrower
   classification than the ``category``. In other words, there may be
   multiple groups within a category. Controls within a group would
   typically be drawn within a group box. Controls in different
   categories might have a greater separation, or may even appear in
   separate windows.

7. The struct v4l2_buffer ``timestamp`` was
   changed to a 64 bit integer, containing the sampling or output time
   of the frame in nanoseconds. Additionally timestamps will be in
   absolute system time, not starting from zero at the beginning of a
   stream. The data type name for timestamps is stamp_t, defined as a
   signed 64-bit integer. Output devices should not send a buffer out
   until the time in the timestamp field has arrived. I would like to
   follow SGI's lead, and adopt a multimedia timestamping system like
   their UST (Unadjusted System Time). See
   http://web.archive.org/web/\*/http://reality.sgi.com
   /cpirazzi_engr/lg/time/intro.html. UST uses timestamps that are
   64-bit signed integers (not struct timeval's) and given in nanosecond
   units. The UST clock starts at zero when the system is booted and
   runs continuously and uniformly. It takes a little over 292 years for
   UST to overflow. There is no way to set the UST clock. The regular
   Linux time-of-day clock can be changed periodically, which would
   cause errors if it were being used for timestamping a multimedia
   stream. A real UST style clock will require some support in the
   kernel that is not there yet. But in anticipation, I will change the
   timestamp field to a 64-bit integer, and I will change the
   v4l2_masterclock_gettime() function (used only by drivers) to
   return a 64-bit integer.

8. A ``sequence`` field was added to struct v4l2_buffer. The ``sequence``
   field counts captured frames, it is ignored by output devices. When a
   capture driver drops a frame, the sequence number of that frame is skipped.

0.20 후속 수정과 VBI 규칙

199-290
0.20 후속 변경
시기/항목변경 내용과 의미
VBI와 필드`v4l2_vbi_format.reserved1`을 `offset`으로 바꾸고 `V4L2_FMT_FLAG_NOT_INTERLACED`, `VBI_OUTPUT`, `VBI_INPUT`, `Y41P`를 추가했습니다. 문구의 rising edge는 leading edge로 바로잡았습니다.
헤더와 명칭`poll.h` 포함, 오탈자 수정, `fourcc` 도우미를 `v4l2_fourcc`로 바꾸는 정리가 있었습니다.
커널 호환Linux 2.4와 devfs 호환 수정이 들어갔고 V4L 호환 계층의 ioctl 방향 문제에는 당시 문서의 미해결 표기 `[Solution?]`가 남았습니다.
픽셀 형식빅엔디언 16비트 RGB와 여러 YUV 형식을 추가했습니다.
주파수복수 튜너를 다루기 위해 `VIDIOC_G_FREQ`/`VIDIOC_S_FREQ`를 `VIDIOC_G_FREQUENCY`/`VIDIOC_S_FREQUENCY`로 대체했습니다.
2000-09-18`V4L2_BUF_TYPE_VBI`를 추가했습니다. 구조의 `type` 필드 때문에 이전 구현과 호환되지 않을 수 있음을 명시했습니다.

2000년 동안 누적된 명칭, 형식, 호환성 수정입니다.

2000-11-23 VBI 변경은 실제 방송 신호의 줄 번호와 API 표현을 일치시키는 데 초점을 두었습니다. 기존 응용 프로그램과의 호환성이 깨질 수 있는 항목은 원문이 명시적으로 경고합니다.

VBI 인터페이스 변경
시기/항목변경 내용과 의미
1. 줄 번호ITU-R 줄 번호를 사용하도록 바꾸어 `start`가 더 이상 0 기준이 아니며, 이전 값에서 1을 더해야 합니다. 이는 호환성 변경입니다.
2. 줄 수두 필드의 `count`가 모두 양수여야 하던 요구를 완화해 합계만 0보다 크면 되게 했습니다. 역시 이전 동작과 호환되지 않을 수 있습니다.
3. 알 수 없는 시작점시작 줄을 모르면 음수를 허용하고 `EBUSY`/`EINVAL` 조건을 명확히 했으며 `reserved2`를 문서화했습니다.
4. 버퍼 형식원시 VBI 입력과 출력을 `V4L2_BUF_TYPE_VBI_INPUT`/`V4L2_BUF_TYPE_VBI_OUTPUT` 형식으로 구분했습니다.
2002-07-25Sliced VBI 인터페이스 제안이 추가되었습니다. 뒤의 Linux 2.6.14 인터페이스가 이 0.8 제안을 대체합니다.

ITU-R 줄 번호, 유효 범위와 버퍼 형식을 다시 정의했습니다.

V4L2 Version 0.20 incremental changes
=====================================

1999-12-23: In struct v4l2_vbi_format the
``reserved1`` field became ``offset``. Previously drivers were required
to clear the ``reserved1`` field.

2000-01-13: The ``V4L2_FMT_FLAG_NOT_INTERLACED`` flag was added.

2000-07-31: The ``linux/poll.h`` header is now included by
``videodev.h`` for compatibility with the original ``videodev.h`` file.

2000-11-20: ``V4L2_TYPE_VBI_OUTPUT`` and ``V4L2_PIX_FMT_Y41P`` were
added.

2000-11-25: ``V4L2_TYPE_VBI_INPUT`` was added.

2000-12-04: A couple typos in symbol names were fixed.

2001-01-18: To avoid namespace conflicts the ``fourcc`` macro defined in
the ``videodev.h`` header file was renamed to ``v4l2_fourcc``.

2001-01-25: A possible driver-level compatibility problem between the
``videodev.h`` file in Linux 2.4.0 and the ``videodev.h`` file included
in the ``videodevX`` patch was fixed. Users of an earlier version of
``videodevX`` on Linux 2.4.0 should recompile their V4L and V4L2
drivers.

2001-01-26: A possible kernel-level incompatibility between the
``videodev.h`` file in the ``videodevX`` patch and the ``videodev.h``
file in Linux 2.2.x with devfs patches applied was fixed.

2001-03-02: Certain V4L ioctls which pass data in both direction
although they are defined with read-only parameter, did not work
correctly through the backward compatibility layer. [Solution?]

2001-04-13: Big endian 16-bit RGB formats were added.

2001-09-17: New YUV formats and the
:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctls were added.
(The old ``VIDIOC_G_FREQ`` and ``VIDIOC_S_FREQ`` ioctls did not take
multiple tuners into account.)

2000-09-18: ``V4L2_BUF_TYPE_VBI`` was added. This may *break
compatibility* as the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls may fail now if the
struct ``v4l2_fmt`` ``type`` field does not contain
``V4L2_BUF_TYPE_VBI``. In the documentation of the struct v4l2_vbi_format`,
the ``offset`` field the ambiguous phrase "rising edge" was changed to
"leading edge".

V4L2 Version 0.20 2000-11-23
============================

A number of changes were made to the raw VBI interface.

1. Figures clarifying the line numbering scheme were added to the V4L2
   API specification. The ``start``\ [0] and ``start``\ [1] fields no
   longer count line numbers beginning at zero. Rationale: a) The
   previous definition was unclear. b) The ``start``\ [] values are
   ordinal numbers. c) There is no point in inventing a new line
   numbering scheme. We now use line number as defined by ITU-R, period.
   Compatibility: Add one to the start values. Applications depending on
   the previous semantics may not function correctly.

2. The restriction "count[0] > 0 and count[1] > 0" has been relaxed to
   "(count[0] + count[1]) > 0". Rationale: Drivers may allocate
   resources at scan line granularity and some data services are
   transmitted only on the first field. The comment that both ``count``
   values will usually be equal is misleading and pointless and has been
   removed. This change *breaks compatibility* with earlier versions:
   Drivers may return ``EINVAL``, applications may not function correctly.

3. Drivers are again permitted to return negative (unknown) start values
   as proposed earlier. Why this feature was dropped is unclear. This
   change may *break compatibility* with applications depending on the
   start values being positive. The use of ``EBUSY`` and ``EINVAL``
   error codes with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl was
   clarified. The ``EBUSY`` error code was finally documented, and the
   ``reserved2`` field which was previously mentioned only in the
   ``videodev.h`` header file.

4. New buffer types ``V4L2_TYPE_VBI_INPUT`` and ``V4L2_TYPE_VBI_OUTPUT``
   were added. The former is an alias for the old ``V4L2_TYPE_VBI``, the
   latter was missing in the ``videodev.h`` file.

V4L2 Version 0.20 2002-07-25
============================

Added sliced VBI interface proposal.

Linux 2.5.46 개편: 장치, 능력과 표준

291-410

Linux 2.5의 기능 동결 직전인 2002년 10~11월, V4L2 0.20 사용 경험을 반영한 이름 없는 개정판이 Linux 2.5.46에 병합되었습니다. 이때의 구조가 현대 V4L2 ABI의 직접적인 토대입니다.

Linux 2.5.46 변경 1-3
시기/항목변경 내용과 의미
1. 관련 장치드라이버는 관련 장치 기능을 모든 minor 장치 번호에서 제공해야 합니다.
2. `open()`장치 종류와 무관하게 `O_RDWR`가 필요하고, 응용 프로그램과 데이터를 교환하는 모든 드라이버는 `O_NONBLOCK`을 지원해야 합니다. 제어 전용 열기를 표시하던 `O_NOIO`는 제거되었으며 실제 데이터 교환을 시도하기 전까지 드라이버가 panel mode를 유지합니다.
3. `v4l2_capability` ABI구조 크기와 ioctl 요청 코드가 함께 바뀌어 구형 장치는 새 `VIDIOC_QUERYCAP`에 `EINVAL`을 반환합니다. 드라이버 식별 필드와 `V4L2_CAP_RDS_CAPTURE`, `V4L2_CAP_AUDIO`, `V4L2_CAP_ASYNCIO`가 추가되었습니다.
능력 플래그 통합`type`을 bit set인 `flags`에 합쳤고 TUNER, PREVIEW, DATA_SERVICE, READ/WRITE 이름을 각각 `V4L2_CAP_TUNER`, `V4L2_CAP_VIDEO_OVERLAY`, VBI CAPTURE/OUTPUT, `V4L2_CAP_READWRITE` 체계로 바꿨습니다.
중복/휘발 필드 제거`inputs`, `outputs`, `audios`와 크기·프레임률 한계 필드를 없앴습니다. 각각 입력/오디오 열거, 형식·표준 조회로 얻을 수 있기 때문입니다.
필수 기능데이터 교환 드라이버에 `select()`를 요구하므로 `V4L2_FLAG_SELECT`를 제거했고, 형식으로 알 수 있는 `V4L2_FLAG_MONOCHROME`도 제거했습니다.

장치 노드, 열기 규칙과 능력 보고를 다시 정의했습니다.

Linux 2.5.46 변경 4-6
시기/항목변경 내용과 의미
4. 비디오 입력/출력`assoc_audio`와 단일 AUDIO capability를 `audioset`으로 바꿔 결합 가능한 모든 오디오 입력을 보고합니다. 입력에는 `tuner`, `std`, `status`, 출력에는 `audioset`, `modulator`, `std`가 추가되었습니다.
5. 오디오`v4l2_audio.audio`와 `v4l2_audioout.audio`를 `index`로 바꿨습니다. `V4L2_AUDCAP_STEREO`를 추가하고 controls로 구현 가능한 EFFECTS/AUDMODE 기능은 제거했지만 AVL은 남았습니다.
6. 튜너/모듈레이터`v4l2_tuner.input`과 `v4l2_modulator.output`을 `index`로 바꿔 복수 장치를 허용했습니다. 입력이 튜너를 가리키도록 연결 방향을 뒤집고 `std`를 입력으로 이동했으며 `type`을 추가했습니다.
주파수 구조`v4l2_frequency.port`를 튜너/모듈레이터 인덱스인 `tuner`로 바꾸고 `type`을 추가했습니다. 위성 튜너 같은 확장을 위해 reserved 영역도 늘렸습니다.

입출력, 오디오와 튜너 사이의 연결을 인덱스와 집합으로 표현합니다.

7번 변경에서는 완전히 투명한 비디오 표준이라는 발상을 버렸습니다. 응용 프로그램은 메뉴 표시를 넘어 표준별 동작을 해야 하므로 `v4l2_std_id`와 `videodev2.h` 기호를 직접 사용합니다. `VIDIOC_G_STD`/`VIDIOC_S_STD`는 이 ID의 포인터를 받고 `VIDIOC_QUERYSTD`는 수신 표준 자동 검출을 제공합니다.

`v4l2_standard`에는 `VIDIOC_ENUMSTD`용 `index`와 기계 판독 가능한 `id`가 추가되어 `transmission`을 대체했습니다. `framerate`는 실제 의미에 맞게 `frameperiod`가 되었고 `colorstandard`는 제거되었습니다. 별도 `v4l2_enumstd` 구조도 사라져 `VIDIOC_ENUMSTD`가 `v4l2_standard`를 직접 받으며, 입력과 출력이 지원하는 표준 집합은 각 구조의 `std`에 들어갑니다.

V4L2 in Linux 2.5.46, 2002-10
=============================

Around October-November 2002, prior to an announced feature freeze of
Linux 2.5, the API was revised, drawing from experience with V4L2 0.20.
This unnamed version was finally merged into Linux 2.5.46.

1.  As specified in :ref:`related`, drivers must make related device
    functions available under all minor device numbers.

2.  The :c:func:`open()` function requires access mode
    ``O_RDWR`` regardless of the device type. All V4L2 drivers
    exchanging data with applications must support the ``O_NONBLOCK``
    flag. The ``O_NOIO`` flag, a V4L2 symbol which aliased the
    meaningless ``O_TRUNC`` to indicate accesses without data exchange
    (panel applications) was dropped. Drivers must stay in "panel mode"
    until the application attempts to initiate a data exchange, see
    :ref:`open`.

3.  The struct v4l2_capability changed
    dramatically. Note that also the size of the structure changed,
    which is encoded in the ioctl request code, thus older V4L2 devices
    will respond with an ``EINVAL`` error code to the new
    :ref:`VIDIOC_QUERYCAP` ioctl.

    There are new fields to identify the driver, a new RDS device
    function ``V4L2_CAP_RDS_CAPTURE``, the ``V4L2_CAP_AUDIO`` flag
    indicates if the device has any audio connectors, another I/O
    capability V4L2_CAP_ASYNCIO can be flagged. In response to these
    changes the ``type`` field became a bit set and was merged into the
    ``flags`` field. ``V4L2_FLAG_TUNER`` was renamed to
    ``V4L2_CAP_TUNER``, ``V4L2_CAP_VIDEO_OVERLAY`` replaced
    ``V4L2_FLAG_PREVIEW`` and ``V4L2_CAP_VBI_CAPTURE`` and
    ``V4L2_CAP_VBI_OUTPUT`` replaced ``V4L2_FLAG_DATA_SERVICE``.
    ``V4L2_FLAG_READ`` and ``V4L2_FLAG_WRITE`` were merged into
    ``V4L2_CAP_READWRITE``.

    The redundant fields ``inputs``, ``outputs`` and ``audios`` were
    removed. These properties can be determined as described in
    :ref:`video` and :ref:`audio`.

    The somewhat volatile and therefore barely useful fields
    ``maxwidth``, ``maxheight``, ``minwidth``, ``minheight``,
    ``maxframerate`` were removed. This information is available as
    described in :ref:`format` and :ref:`standard`.

    ``V4L2_FLAG_SELECT`` was removed. We believe the select() function
    is important enough to require support of it in all V4L2 drivers
    exchanging data with applications. The redundant
    ``V4L2_FLAG_MONOCHROME`` flag was removed, this information is
    available as described in :ref:`format`.

4.  In struct v4l2_input the ``assoc_audio``
    field and the ``capability`` field and its only flag
    ``V4L2_INPUT_CAP_AUDIO`` was replaced by the new ``audioset`` field.
    Instead of linking one video input to one audio input this field
    reports all audio inputs this video input combines with.

    New fields are ``tuner`` (reversing the former link from tuners to
    video inputs), ``std`` and ``status``.

    Accordingly struct v4l2_output lost its
    ``capability`` and ``assoc_audio`` fields. ``audioset``,
    ``modulator`` and ``std`` where added instead.

5.  The struct v4l2_audio field ``audio`` was
    renamed to ``index``, for consistency with other structures. A new
    capability flag ``V4L2_AUDCAP_STEREO`` was added to indicated if the
    audio input in question supports stereo sound.
    ``V4L2_AUDCAP_EFFECTS`` and the corresponding ``V4L2_AUDMODE`` flags
    where removed. This can be easily implemented using controls.
    (However the same applies to AVL which is still there.)

    Again for consistency the struct v4l2_audioout field ``audio`` was renamed
    to ``index``.

6.  The struct v4l2_tuner ``input`` field was
    replaced by an ``index`` field, permitting devices with multiple
    tuners. The link between video inputs and tuners is now reversed,
    inputs point to their tuner. The ``std`` substructure became a
    simple set (more about this below) and moved into struct v4l2_input.
    A ``type`` field was added.

    Accordingly in struct v4l2_modulator the
    ``output`` was replaced by an ``index`` field.

    In struct v4l2_frequency the ``port``
    field was replaced by a ``tuner`` field containing the respective
    tuner or modulator index number. A tuner ``type`` field was added
    and the ``reserved`` field became larger for future extensions
    (satellite tuners in particular).

7.  The idea of completely transparent video standards was dropped.
    Experience showed that applications must be able to work with video
    standards beyond presenting the user a menu. Instead of enumerating
    supported standards with an ioctl applications can now refer to
    standards by :ref:`v4l2_std_id <v4l2-std-id>` and symbols
    defined in the ``videodev2.h`` header file. For details see
    :ref:`standard`. The :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
    :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` now take a pointer to this
    type as argument. :ref:`VIDIOC_QUERYSTD` was
    added to autodetect the received standard, if the hardware has this
    capability. In struct v4l2_standard an
    ``index`` field was added for
    :ref:`VIDIOC_ENUMSTD`. A
    :ref:`v4l2_std_id <v4l2-std-id>` field named ``id`` was added as
    machine readable identifier, also replacing the ``transmission``
    field. The misleading ``framerate`` field was renamed to
    ``frameperiod``. The now obsolete ``colorstandard`` information,
    originally needed to distguish between variations of standards, were
    removed.

    Struct ``v4l2_enumstd`` ceased to be.
    :ref:`VIDIOC_ENUMSTD` now takes a pointer to a
    struct v4l2_standard directly. The
    information which standards are supported by a particular video
    input or output moved into struct v4l2_input
    and struct v4l2_output fields named ``std``,
    respectively.

Linux 2.5.46 개편: 형식, 버퍼와 크롭

411-589
Linux 2.5.46 변경 8-10
시기/항목변경 내용과 의미
8. 제어기대한 방식으로 쓰이지 않은 `v4l2_queryctrl.category`와 `group`을 제거했습니다.
9. 형식 협상하드웨어를 프로그래밍하지 않고 I/O 진행 여부와 무관하게 형식을 시험하는 `VIDIOC_TRY_FMT`를 추가했습니다. `v4l2_format.fmt` union에 `v4l2_window`를 넣어 G/S/TRY_FMT로 모든 이미지 형식을 협상하고 `VIDIOC_G_WIN`/`VIDIOC_S_WIN`을 제거했습니다.
10. 형식 열거`v4l2_fmtdesc.type`을 추가하고 `VIDIOC_ENUM_FBUFFMT`를 제거했습니다. 오버레이 형식은 `VIDIOC_ENUM_FMT`와 `V4L2_BUF_TYPE_VIDEO_OVERLAY`로 열거합니다.

제어 메타데이터를 줄이고 모든 이미지 형식 협상을 공통 ioctl로 모았습니다.

버퍼 형식 이름
시기/항목변경 내용과 의미
`V4L2_BUF_TYPE_CAPTURE``V4L2_BUF_TYPE_VIDEO_CAPTURE`
`V4L2_BUF_TYPE_VIDEOOUT``V4L2_BUF_TYPE_VIDEO_OUTPUT`
CODECIN/CODECOUT/EFFECTS 계열당시에는 생략되었습니다.
새 형식`VIDEO_OVERLAY`, `VBI_CAPTURE`, `VBI_OUTPUT`, `SLICED_VBI_CAPTURE`, `SLICED_VBI_OUTPUT`
`V4L2_BUF_TYPE_PRIVATE_BASE`사용 중단된 `V4L2_BUF_TYPE_PRIVATE`

0.20 이름이 enum v4l2_buf_type 체계로 바뀐 대응입니다.

11번 변경에서 `v4l2_pix_format.depth`, COMPRESSED, SWCONVECOMPRESSED, BYTESPERLINE과 최종적으로 `flags` 자체를 제거했습니다. fourcc를 아는 응용 프로그램은 깊이와 압축 여부도 알고, 커널 공간 이미지 변환은 드라이버의 책임이 아니며, `bytesperline=0`으로 합리적인 기본값을 요청할 수 있기 때문입니다.

필드 순서 변환
시기/항목변경 내용과 의미
`NOT_INTERLACED`원문 표에는 대응값이 `?`로 남아 있습니다.
`INTERLACED`/`COMBINED``V4L2_FIELD_INTERLACED`
`TOPFIELD`/`ODDFIELD``V4L2_FIELD_TOP`
`BOTFIELD`/`EVENFIELD``V4L2_FIELD_BOTTOM`
새 값`V4L2_FIELD_SEQ_TB`, `V4L2_FIELD_SEQ_BT`, `V4L2_FIELD_ALTERNATE`

예전 형식 플래그를 `enum v4l2_field` 값으로 대체했습니다.

색 공간 플래그도 새 `colorspace` 필드의 `enum v4l2_colorspace`로 바뀌었습니다. `V4L2_FMT_CS_601YUV` 대신 `V4L2_COLORSPACE_SMPTE170M`, `BT878`, `470_SYSTEM_M`, `470_SYSTEM_BG` 가운데 하나를 사용합니다.

Linux 2.5.46 변경 12-16
시기/항목변경 내용과 의미
12. `v4l2_requestbuffers``type`을 `enum v4l2_buf_type`으로 명시하고, 드라이버/응용 프로그램 할당 버퍼 I/O를 구분하는 `enum v4l2_memory memory`를 추가했습니다.
13. `v4l2_buffer``type`, `field`, `memory`를 명확히 하고 기존 field flag를 없앴습니다. 조정되지 않는 시스템 시계가 커널에 들어오지 않아 나노초 `stamp_t` 타임스탬프를 다시 `struct timeval`로 되돌렸습니다.
버퍼 위치두 번째 메모리 매핑 방식 때문에 `offset`을 union `m`으로 옮겼습니다. 호환 계층용 `V4L2_BUF_REQ_CONTIG`와 실익이 적은 `V4L2_BUF_ATTR_DEVICEMEM`도 제거했습니다.
14. 프레임버퍼동기화 정의가 없던 `base[3]`을 단일 포인터로 바꾸고 SCALEUP/SCALEDOWN을 crop/scaling 조회로 대체했습니다. CLIPPING은 LIST_CLIPPING과 BITMAP_CLIPPING으로 나눴습니다.
15. `v4l2_clip``x`, `y`, `width`, `height`를 `v4l2_rect c`에 넣고 `x`/`y`를 원점 기준 오프셋인 `left`/`top`으로 바꿨습니다.
16. `v4l2_window`같은 좌표를 `w` 하위 구조로 옮기고 field/frame 오버레이를 구분하는 `field`를 추가했습니다.

메모리 방법, 타임스탬프, 프레임버퍼와 사각형 구조를 정리했습니다.

Linux 2.5.46 변경 17-21
시기/항목변경 내용과 의미
17. 디지털 줌`v4l2_zoomcap`, `v4l2_zoom`, `V4L2_ZOOM_NONCAP`, `V4L2_ZOOM_WHILESTREAMING`을 제거하고 `v4l2_cropcap`/`v4l2_crop` 기반 crop 및 scaling 인터페이스로 대체했습니다.
18. VBI 형식`SAMPLE_FORMAT`이 fourcc를 담게 하고 `V4L2_VBI_SF_UBYTE` 대신 `V4L2_PIX_FMT_GREY`를 사용하며 reserved 영역을 늘렸습니다.
19. 프레임 간격`timeperframe`을 `unsigned long`에서 `v4l2_fract`로 바꿔 NTSC-M의 30000/1001 배수를 정확히 표현합니다. read I/O의 드라이버 동작을 제어하는 `readbuffers`를 추가하고 출력에도 같은 변경을 적용했습니다.
20. 성능 ioctlread/write I/O를 제외하면 응용 프로그램이 이미 얻을 수 있는 정보라 `v4l2_performance`와 `VIDIOC_G_PERF`를 제거했습니다.
21. 색 변환기존 문서의 부정확한 RGB에서 YCbCr 변환 예를 바로잡았습니다.

줌, VBI, 프레임률과 진단 인터페이스의 결론입니다.

8.  The struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` fields
    ``category`` and ``group`` did not catch on and/or were not
    implemented as expected and therefore removed.

9.  The :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl was added to
    negotiate data formats as with
    :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, but without the overhead of
    programming the hardware and regardless of I/O in progress.

    In struct v4l2_format the ``fmt`` union was
    extended to contain struct v4l2_window. All
    image format negotiations are now possible with ``VIDIOC_G_FMT``,
    ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT``; ioctl. The ``VIDIOC_G_WIN``
    and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were
    removed. The ``type`` field changed to type enum v4l2_buf_type and
    the buffer type names changed as follows.


    .. flat-table::
	:header-rows:  1
	:stub-columns: 0

	* - Old defines
	  - enum v4l2_buf_type
	* - ``V4L2_BUF_TYPE_CAPTURE``
	  - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
	* - ``V4L2_BUF_TYPE_CODECIN``
	  - Omitted for now
	* - ``V4L2_BUF_TYPE_CODECOUT``
	  - Omitted for now
	* - ``V4L2_BUF_TYPE_EFFECTSIN``
	  - Omitted for now
	* - ``V4L2_BUF_TYPE_EFFECTSIN2``
	  - Omitted for now
	* - ``V4L2_BUF_TYPE_EFFECTSOUT``
	  - Omitted for now
	* - ``V4L2_BUF_TYPE_VIDEOOUT``
	  - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
	* - ``-``
	  - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
	* - ``-``
	  - ``V4L2_BUF_TYPE_VBI_CAPTURE``
	* - ``-``
	  - ``V4L2_BUF_TYPE_VBI_OUTPUT``
	* - ``-``
	  - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
	* - ``-``
	  - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
	* - ``V4L2_BUF_TYPE_PRIVATE_BASE``
	  - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)

10. In struct v4l2_fmtdesc a enum v4l2_buf_type field named ``type`` was
    added as in struct v4l2_format. The ``VIDIOC_ENUM_FBUFFMT`` ioctl is no
    longer needed and was removed. These calls can be replaced by
    :ref:`VIDIOC_ENUM_FMT` with type ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.

11. In struct v4l2_pix_format the ``depth``
    field was removed, assuming applications which recognize the format
    by its four-character-code already know the color depth, and others
    do not care about it. The same rationale lead to the removal of the
    ``V4L2_FMT_FLAG_COMPRESSED`` flag. The
    ``V4L2_FMT_FLAG_SWCONVECOMPRESSED`` flag was removed because drivers
    are not supposed to convert images in kernel space. A user library
    of conversion functions should be provided instead. The
    ``V4L2_FMT_FLAG_BYTESPERLINE`` flag was redundant. Applications can
    set the ``bytesperline`` field to zero to get a reasonable default.
    Since the remaining flags were replaced as well, the ``flags`` field
    itself was removed.

    The interlace flags were replaced by a enum v4l2_field value in a
    newly added ``field`` field.

    .. flat-table::
	:header-rows:  1
	:stub-columns: 0

	* - Old flag
	  - enum v4l2_field
	* - ``V4L2_FMT_FLAG_NOT_INTERLACED``
	  - ?
	* - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
	  - ``V4L2_FIELD_INTERLACED``
	* - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
	  - ``V4L2_FIELD_TOP``
	* - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
	  - ``V4L2_FIELD_BOTTOM``
	* - ``-``
	  - ``V4L2_FIELD_SEQ_TB``
	* - ``-``
	  - ``V4L2_FIELD_SEQ_BT``
	* - ``-``
	  - ``V4L2_FIELD_ALTERNATE``

    The color space flags were replaced by a enum v4l2_colorspace value in
    a newly added ``colorspace`` field, where one of
    ``V4L2_COLORSPACE_SMPTE170M``, ``V4L2_COLORSPACE_BT878``,
    ``V4L2_COLORSPACE_470_SYSTEM_M`` or
    ``V4L2_COLORSPACE_470_SYSTEM_BG`` replaces ``V4L2_FMT_CS_601YUV``.

12. In struct v4l2_requestbuffers the
    ``type`` field was properly defined as enum v4l2_buf_type. Buffer types
    changed as mentioned above. A new ``memory`` field of type
    enum v4l2_memory was added to distinguish between
    I/O methods using buffers allocated by the driver or the
    application. See :ref:`io` for details.

13. In struct v4l2_buffer the ``type`` field was
    properly defined as enum v4l2_buf_type.
    Buffer types changed as mentioned above. A ``field`` field of type
    enum v4l2_field was added to indicate if a
    buffer contains a top or bottom field. The old field flags were
    removed. Since no unadjusted system time clock was added to the
    kernel as planned, the ``timestamp`` field changed back from type
    stamp_t, an unsigned 64 bit integer expressing the sample time in
    nanoseconds, to struct timeval. With the addition
    of a second memory mapping method the ``offset`` field moved into
    union ``m``, and a new ``memory`` field of type enum v4l2_memory
    was added to distinguish between
    I/O methods. See :ref:`io` for details.

    The ``V4L2_BUF_REQ_CONTIG`` flag was used by the V4L compatibility
    layer, after changes to this code it was no longer needed. The
    ``V4L2_BUF_ATTR_DEVICEMEM`` flag would indicate if the buffer was
    indeed allocated in device memory rather than DMA-able system
    memory. It was barely useful and so was removed.

14. In struct v4l2_framebuffer the
    ``base[3]`` array anticipating double- and triple-buffering in
    off-screen video memory, however without defining a synchronization
    mechanism, was replaced by a single pointer. The
    ``V4L2_FBUF_CAP_SCALEUP`` and ``V4L2_FBUF_CAP_SCALEDOWN`` flags were
    removed. Applications can determine this capability more accurately
    using the new cropping and scaling interface. The
    ``V4L2_FBUF_CAP_CLIPPING`` flag was replaced by
    ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
    ``V4L2_FBUF_CAP_BITMAP_CLIPPING``.

15. In struct v4l2_clip the ``x``, ``y``,
    ``width`` and ``height`` field moved into a ``c`` substructure of
    type struct v4l2_rect. The ``x`` and ``y``
    fields were renamed to ``left`` and ``top``, i. e. offsets to a
    context dependent origin.

16. In struct v4l2_window the ``x``, ``y``,
    ``width`` and ``height`` field moved into a ``w`` substructure as
    above. A ``field`` field of type enum v4l2_field was added to
    distinguish between field and frame (interlaced) overlay.

17. The digital zoom interface, including struct ``v4l2_zoomcap``,
    struct ``v4l2_zoom``, ``V4L2_ZOOM_NONCAP`` and
    ``V4L2_ZOOM_WHILESTREAMING`` was replaced by a new cropping and
    scaling interface. The previously unused
    struct v4l2_cropcap and struct v4l2_crop
    where redefined for this purpose. See :ref:`crop` for details.

18. In struct v4l2_vbi_format the
    ``SAMPLE_FORMAT`` field now contains a four-character-code as used
    to identify video image formats and ``V4L2_PIX_FMT_GREY`` replaces
    the ``V4L2_VBI_SF_UBYTE`` define. The ``reserved`` field was
    extended.

19. In struct v4l2_captureparm the type of
    the ``timeperframe`` field changed from unsigned long to
    struct v4l2_fract. This allows the accurate
    expression of multiples of the NTSC-M frame rate 30000 / 1001. A new
    field ``readbuffers`` was added to control the driver behaviour in
    read I/O mode.

    Similar changes were made to struct v4l2_outputparm.

20. The struct ``v4l2_performance`` and
    ``VIDIOC_G_PERF`` ioctl were dropped. Except when using the
    :ref:`read/write I/O method <rw>`, which is limited anyway, this
    information is already available to applications.

21. The example transformation from RGB to YCbCr color space in the old
    V4L2 documentation was inaccurate, this has been corrected in
    :ref:`pixfmt`.

2003년 ABI 정리와 RGB 교정

590-677
V4L2 2003-06-19
시기/항목변경 내용과 의미
1. 라디오`V4L2_CAP_RADIO` 능력을 추가했습니다.
2. 접근 우선순위여러 응용 프로그램이 장치를 열 때 사용할 접근 우선순위 체계를 도입했습니다.
3. 오디오 입력기존 `VIDIOC_G_AUDIO`는 오디오 입력 열거에 쓰여 현재 입력을 조회할 수 없었습니다. 이를 OLD 버전으로 돌리고 `VIDIOC_ENUMAUDIO`를 열거에, 새 `VIDIOC_G_AUDIO`를 현재 입력 조회에 사용했습니다. 오디오 출력에도 같은 방식으로 적용했습니다.
호환 계층임시 변환 계층을 두었지만 드라이버와 응용 프로그램은 새 인터페이스에 맞춰 다시 컴파일해야 했습니다. OLD ioctl은 Linux 2.6.39에서 제거되었습니다.
4. 오버레이 방향`VIDIOC_OVERLAY`를 잘못된 read-write에서 write-only로 바로잡았습니다. videodev 변환 덕분에 드라이버는 재컴파일이 필요하지만 응용 프로그램은 필요 없었고 OLD 버전은 2.6.39에서 제거되었습니다.
5. 클리핑 의미클리핑 사각형은 비디오를 표시할 영역이 아니라 표시하지 않을 영역을 뜻한다고 명확히 했습니다.
6. 쓰고 읽기`VIDIOC_S_PARM`과 `VIDIOC_S_CTRL`을 write-only에서 write-read로 바꿨습니다. 드라이버가 인자가 변하지 않는다고 가정했다면 수정해야 했고 OLD 버전은 2.6.39에서 제거되었습니다.

메인라인 병합 뒤 발견된 능력, 우선순위와 ioctl 방향 문제를 정리했습니다.

2003-11-05에는 RGB 픽셀 형식의 바이트 순서를 바로잡았습니다. 이름은 메모리의 바이트 순서를 의미하므로 기존 문서와 구현의 혼동을 해소하려는 변경입니다.

RGB 이름 교정
시기/항목변경 내용과 의미
`V4L2_PIX_FMT_RGB24`기존 BGR 해석을 RGB 바이트 순서로 교정했습니다.
`V4L2_PIX_FMT_BGR24`기존 RGB 해석을 BGR 바이트 순서로 교정했습니다. BGR24 예제 자체는 항상 올바랐습니다.
`V4L2_PIX_FMT_RGB32`기존 BGRX 해석을 RGBX로 교정했습니다.
`V4L2_PIX_FMT_BGR32`기존 RGBX 해석을 BGRX로 교정했습니다.
V4L 호환V4L과의 매핑도 함께 바로잡았지만 당시 일부 드라이버는 여전히 문서와 다르게 동작할 수 있음을 경고합니다.

옛 의미와 교정된 의미를 비교합니다.

V4L2 2003-06-19
===============

1. A new capability flag ``V4L2_CAP_RADIO`` was added for radio devices.
   Prior to this change radio devices would identify solely by having
   exactly one tuner whose type field reads ``V4L2_TUNER_RADIO``.

2. An optional driver access priority mechanism was added, see
   :ref:`app-pri` for details.

3. The audio input and output interface was found to be incomplete.

   Previously the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl would
   enumerate the available audio inputs. An ioctl to determine the
   current audio input, if more than one combines with the current video
   input, did not exist. So ``VIDIOC_G_AUDIO`` was renamed to
   ``VIDIOC_G_AUDIO_OLD``, this ioctl was removed on Kernel 2.6.39. The
   :ref:`VIDIOC_ENUMAUDIO` ioctl was added to
   enumerate audio inputs, while
   :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` now reports the current
   audio input.

   The same changes were made to
   :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDOUT>` and
   :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>`.

   Until further the "videodev" module will automatically translate
   between the old and new ioctls, but drivers and applications must be
   updated to successfully compile again.

4. The :ref:`VIDIOC_OVERLAY` ioctl was incorrectly
   defined with write-read parameter. It was changed to write-only,
   while the write-read version was renamed to ``VIDIOC_OVERLAY_OLD``.
   The old ioctl was removed on Kernel 2.6.39. Until further the
   "videodev" kernel module will automatically translate to the new
   version, so drivers must be recompiled, but not applications.

5. :ref:`overlay` incorrectly stated that clipping rectangles define
   regions where the video can be seen. Correct is that clipping
   rectangles define regions where *no* video shall be displayed and so
   the graphics surface can be seen.

6. The :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` and
   :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls were defined with
   write-only parameter, inconsistent with other ioctls modifying their
   argument. They were changed to write-read, while a ``_OLD`` suffix
   was added to the write-only versions. The old ioctls were removed on
   Kernel 2.6.39. Drivers and applications assuming a constant parameter
   need an update.

V4L2 2003-11-05
===============

1. In :ref:`pixfmt-rgb` the following pixel formats were incorrectly
   transferred from Bill Dirks' V4L2 specification. Descriptions below
   refer to bytes in memory, in ascending address order.


   .. flat-table::
       :header-rows:  1
       :stub-columns: 0

       * - Symbol
	 - In this document prior to revision 0.5
	 - Corrected
       * - ``V4L2_PIX_FMT_RGB24``
	 - B, G, R
	 - R, G, B
       * - ``V4L2_PIX_FMT_BGR24``
	 - R, G, B
	 - B, G, R
       * - ``V4L2_PIX_FMT_RGB32``
	 - B, G, R, X
	 - R, G, B, X
       * - ``V4L2_PIX_FMT_BGR32``
	 - R, G, B, X
	 - B, G, R, X

   The ``V4L2_PIX_FMT_BGR24`` example was always correct.

   In :ref:`v4l-image-properties` the mapping of the V4L
   ``VIDEO_PALETTE_RGB24`` and ``VIDEO_PALETTE_RGB32`` formats to V4L2
   pixel formats was accordingly corrected.

2. Unrelated to the fixes above, drivers may still interpret some V4L2
   RGB pixel formats differently. These issues have yet to be addressed,
   for details see :ref:`pixfmt-rgb`.

Linux 2.6.6~2.6.17과 명세 정오표

678-815
Linux 2.6.6~2.6.15
시기/항목변경 내용과 의미
2.6.6`VIDIOC_CROPCAP`을 read-only에서 write-read로 바로잡고 이전 코드를 `VIDIOC_CROPCAP_OLD`로 이름 붙였습니다. OLD는 2.6.39에서 제거되었습니다.
2.6.8`v4l2_buffer.reserved[0]`을 `input`으로 바꾸고 캡처 과정과 맞물려 카메라 같은 입력을 교대할 수 있게 했습니다. `V4L2_BUF_FLAG_INPUT`으로 활성화하며 `flags`는 더 이상 read-only가 아닙니다.
2004-08 정오표`open()` 반환값, AUDOUT 접미사, 현재 오디오 입력 예제의 `VIDIOC_G_AUDIO` 인자, QBUF/DQBUF의 `memory` 필드와 DQBUF의 `EIO` 설명을 고쳤습니다.
2.6.14새 sliced VBI 인터페이스를 추가해 명세 0.8의 초기 제안을 대체했습니다.
2.6.15`VIDIOC_LOG_STATUS`를 추가했습니다.
2.6.15 표준`V4L2_STD_NTSC_443`, `SECAM_LC`, `SECAM_DK`, `ATSC`를 정의하고 `V4L2_STD_525_60`에 NTSC_443을 포함했습니다.
2.6.15 MPEG`VIDIOC_G_COMP`/`S_COMP`를 `VIDIOC_G_MPEGCOMP`/`S_MPEGCOMP`와 `v4l2_mpeg_compression` 인자로 바꿨습니다. 이 ioctl은 2.6.25에서 제거되었습니다.

초기 2.6 커널에서 ioctl 방향, 입력 전환과 VBI를 보완했습니다.

2005~2006 정오표
시기/항목변경 내용과 의미
2005-11-27캡처 예제가 crop 지원을 확인한 뒤 `VIDIOC_S_CROP`을 호출하도록 하고 표준 선택 예제의 `VIDIOC_S_STD` 인자 형식을 수정했습니다.
2006-01-10`V4L2_IN_ST_COLOR_KILL`은 color killer가 설정됐는지만 아니라 실제 활성 상태도 뜻합니다. `VIDIOC_S_PARM`도 2003년부터 write-read였음을 재확인했습니다.
2006-02-03capture/output `timeperframe`의 단위는 마이크로초가 아니라 초입니다.
2006-02-04드라이버가 `v4l2_clip.next`를 무시하므로 `v4l2_window.clips`는 연결 목록이 아니라 배열을 가리켜야 합니다.

예제와 구조 설명에서 실제 ABI와 어긋난 부분을 바로잡았습니다.

Linux 2.6.17과 2006-09 정오표
시기/항목변경 내용과 의미
2.6.17 표준`V4L2_STD_NTSC_M_KR`와 `V4L2_STD_MN`, `B`, `GH`, `DK` 집합을 추가하고 NTSC/SECAM 집합에 NTSC_M_KR/SECAM_LC를 포함했습니다.
2.6.17 오디오 모드이중 언어 두 트랙을 함께 기록하는 `V4L2_TUNER_MODE_LANG1_LANG2`를 추가하고 이 목적으로 STEREO를 쓰는 방식을 폐기 예정으로 표시했습니다.
sliced VBI여러 위치에서 빠진 `V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`/`OUTPUT`을 보완했습니다.
오디오/능력`v4l2_audio.mode`가 flag 필드임을 밝히고 QUERYCAP에 sliced VBI와 radio 능력을 추가했습니다.
주파수`VIDIOC_S_FREQUENCY` 전에 응용 프로그램이 `v4l2_frequency.type`을 초기화해야 함을 명시했습니다.
구조 크기`v4l2_requestbuffers.reserved`는 32개가 아니라 2개입니다.
장치 파일정착하지 않은 `/dev/vout`을 `/dev/video`로 바꾸고 VBI minor 224~255에 맞춰 `/dev/vbi0`~`/dev/vbi31`을 허용했습니다.

표준 집합, 이중 언어와 누락된 sliced VBI 조건을 보완했습니다.

V4L2 in Linux 2.6.6, 2004-05-09
===============================

1. The :ref:`VIDIOC_CROPCAP` ioctl was incorrectly
   defined with read-only parameter. It is now defined as write-read
   ioctl, while the read-only version was renamed to
   ``VIDIOC_CROPCAP_OLD``. The old ioctl was removed on Kernel 2.6.39.

V4L2 in Linux 2.6.8
===================

1. A new field ``input`` (former ``reserved[0]``) was added to the
   struct v4l2_buffer. Purpose of this
   field is to alternate between video inputs (e. g. cameras) in step
   with the video capturing process. This function must be enabled with
   the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no
   longer read-only.

V4L2 spec erratum 2004-08-01
============================

1. The return value of the :ref:`func-open` function was incorrectly
   documented.

2. Audio output ioctls end in -AUDOUT, not -AUDIOOUT.

3. In the Current Audio Input example the ``VIDIOC_G_AUDIO`` ioctl took
   the wrong argument.

4. The documentation of the :ref:`VIDIOC_QBUF` and
   :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctls did not mention the
   struct v4l2_buffer ``memory`` field. It was
   also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO``
   error code was not documented.

V4L2 in Linux 2.6.14
====================

1. A new sliced VBI interface was added. It is documented in
   :ref:`sliced` and replaces the interface first proposed in V4L2
   specification 0.8.

V4L2 in Linux 2.6.15
====================

1. The :ref:`VIDIOC_LOG_STATUS` ioctl was added.

2. New video standards ``V4L2_STD_NTSC_443``, ``V4L2_STD_SECAM_LC``,
   ``V4L2_STD_SECAM_DK`` (a set of SECAM D, K and K1), and
   ``V4L2_STD_ATSC`` (a set of ``V4L2_STD_ATSC_8_VSB`` and
   ``V4L2_STD_ATSC_16_VSB``) were defined. Note the ``V4L2_STD_525_60``
   set now includes ``V4L2_STD_NTSC_443``. See also
   :ref:`v4l2-std-id`.

3. The ``VIDIOC_G_COMP`` and ``VIDIOC_S_COMP`` ioctl were renamed to
   ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` respectively. Their
   argument was replaced by a struct
   ``v4l2_mpeg_compression`` pointer. (The
   ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed
   in Linux 2.6.25.)

V4L2 spec erratum 2005-11-27
============================

The capture example in :ref:`capture-example` called the
:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl without checking if
cropping is supported. In the video standard selection example in
:ref:`standard` the :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` call used
the wrong argument type.

V4L2 spec erratum 2006-01-10
============================

1. The ``V4L2_IN_ST_COLOR_KILL`` flag in struct v4l2_input not only
   indicates if the color killer is enabled, but also if it is active.
   (The color killer disables color decoding when it detects no color
   in the video signal to improve the image quality.)

2. :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` is a write-read ioctl, not
   write-only as stated on its reference page. The ioctl changed in 2003
   as noted above.

V4L2 spec erratum 2006-02-03
============================

1. In struct v4l2_captureparm and struct v4l2_outputparm the ``timeperframe``
   field gives the time in seconds, not microseconds.

V4L2 spec erratum 2006-02-04
============================

1. The ``clips`` field in struct v4l2_window
   must point to an array of struct v4l2_clip, not
   a linked list, because drivers ignore the
   struct v4l2_clip. ``next`` pointer.

V4L2 in Linux 2.6.17
====================

1. New video standard macros were added: ``V4L2_STD_NTSC_M_KR`` (NTSC M
   South Korea), and the sets ``V4L2_STD_MN``, ``V4L2_STD_B``,
   ``V4L2_STD_GH`` and ``V4L2_STD_DK``. The ``V4L2_STD_NTSC`` and
   ``V4L2_STD_SECAM`` sets now include ``V4L2_STD_NTSC_M_KR`` and
   ``V4L2_STD_SECAM_LC`` respectively.

2. A new ``V4L2_TUNER_MODE_LANG1_LANG2`` was defined to record both
   languages of a bilingual program. The use of
   ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See
   the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details.

V4L2 spec erratum 2006-09-23 (Draft 0.15)
=========================================

1. In various places ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` and
   ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` of the sliced VBI interface were
   not mentioned along with other buffer types.

2. In :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` it was clarified that the
   struct v4l2_audio ``mode`` field is a flags field.

3. :ref:`VIDIOC_QUERYCAP` did not mention the sliced VBI and radio
   capability flags.

4. In :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` it was clarified that
   applications must initialize the tuner ``type`` field of
   struct v4l2_frequency before calling
   :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`.

5. The ``reserved`` array in struct v4l2_requestbuffers has 2 elements,
   not 32.

6. In :ref:`output` and :ref:`raw-vbi` the device file names
   ``/dev/vout`` which never caught on were replaced by ``/dev/video``.

7. With Linux 2.6.15 the possible range for VBI device minor numbers was
   extended from 224-239 to 224-255. Accordingly device file names
   ``/dev/vbi0`` to ``/dev/vbi31`` are possible now.

Linux 2.6.18~2.6.29 확장

816-960
Linux 2.6.18~2.6.22
시기/항목변경 내용과 의미
2.6.18 확장 제어`VIDIOC_G_EXT_CTRLS`, `S_EXT_CTRLS`, `TRY_EXT_CTRLS`, 미지원 제어 건너뛰기, `INTEGER64`, `CTRL_CLASS` 형식과 `READ_ONLY`, `UPDATE`, `INACTIVE`, `SLIDER` flag를 추가했습니다.
2.6.19 sliced VBI`v4l2_sliced_vbi_cap`의 reserved를 buffer `type`으로 바꾸고 G_SLICED_VBI_CAP을 write-read로 재정의했습니다. 응용 프로그램은 type을 초기화하고 reserved를 지워야 하며 enum 크기가 int와 다른 아키텍처에서는 구조 크기 변화로 호환성이 깨질 수 있습니다.
2.6.19 열거/형식`VIDIOC_ENUM_FRAMESIZES`, `VIDIOC_ENUM_FRAMEINTERVALS`와 `V4L2_PIX_FMT_RGB444`를 추가했습니다.
2006-10 정오표`V4L2_PIX_FMT_HM12`는 YUV 4:2:2가 아니라 4:2:0입니다.
2.6.21`videodev2.h`를 GPL v2 이상과 3-clause BSD의 이중 라이선스로 배포했습니다.
2.6.22 필드`V4L2_FIELD_INTERLACED_TB`와 `V4L2_FIELD_INTERLACED_BT`를 추가했습니다.
2.6.22 오버레이전역 및 정방향/역방향 로컬 알파를 쓰는 세 가지 clipping/blending 방식을 추가하고 `v4l2_window.global_alpha`를 넣었습니다. 구조를 직접 쓰는 응용 프로그램은 깨질 수 있지만 패딩이 있는 부모 `v4l2_format`을 받는 G/S/TRY_FMT ioctl은 영향을 받지 않습니다.
2.6.22 chromakeyhost-order RGB32에서 framebuffer와 같은 형식의 픽셀 값으로 바뀌었습니다. 호환성 위험이 있으나 옛 형식을 지원한 알려진 드라이버는 없었습니다.

확장 제어, 프레임 열거와 오버레이 알파가 추가되었습니다.

Linux 2.6.24~2.6.29
시기/항목변경 내용과 의미
2.6.24`PAL8`, `YUV444`, `YUV555`, `YUV565`, `YUV32` 픽셀 형식을 추가했습니다.
2.6.25 형식`V4L2_PIX_FMT_Y16`과 `V4L2_PIX_FMT_SBGGR16`을 추가했습니다.
2.6.25 사용자 제어전원선 주파수, 자동 hue, 화이트 밸런스 온도, 선명도, 역광 보정을 추가하고 BLACK_LEVEL, WHITENESS, HCENTER, VCENTER를 폐기 예정으로 표시했습니다.
2.6.25 카메라 클래스자동/절대 노출, 자동 노출 우선순위, 상대/절대 pan·tilt와 reset, 절대/상대/자동 focus 제어를 추가했습니다. 확장 제어가 대신하게 된 MPEGCOMP ioctl은 헤더에서 제거했습니다.
2.6.26문서가 Y16/SBGGR16 추가를 다시 기록하며 `V4L2_CID_CHROMA_AGC`, `V4L2_CID_COLOR_KILLER`를 추가했습니다.
2.6.27`VIDIOC_S_HW_FREQ_SEEK`, `V4L2_CAP_HW_FREQ_SEEK`와 `YVYU`, `PCA501/505/508/561`, `SGBRG8`, `PAC207`, `PJPG` 형식을 추가했습니다.
2.6.28AAC/AC3 MPEG 오디오, MPEG-4 AVC 비디오 인코딩과 `SGRBG10`, `SGRBG10DPCM8` 형식을 추가했습니다.
2.6.29`VIDIOC_G_CHIP_IDENT`를 OLD로 바꾸고 `VIDIOC_DBG_G_CHIP_IDENT`를 도입했으며 구조 이름도 old로 바꿨습니다. `VYUY`, `NV16`, `NV61` 형식이 추가되었습니다.

픽셀 형식, 카메라 제어, 주파수 탐색과 코덱 항목을 확장했습니다.

V4L2 in Linux 2.6.18
====================

1. New ioctls :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
   :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
   :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` were added, a
   flag to skip unsupported controls with
   :ref:`VIDIOC_QUERYCTRL`, new control types
   ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_TYPE_CTRL_CLASS``
   (enum v4l2_ctrl_type), and new control flags
   ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``,
   ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER``
   (:ref:`control-flags`). See :ref:`extended-controls` for details.

V4L2 in Linux 2.6.19
====================

1. In struct v4l2_sliced_vbi_cap a
   buffer type field was added replacing a reserved field. Note on
   architectures where the size of enum types differs from int types the
   size of the structure changed. The
   :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl
   was redefined from being read-only to write-read. Applications must
   initialize the type field and clear the reserved fields now. These
   changes may *break the compatibility* with older drivers and
   applications.

2. The ioctls :ref:`VIDIOC_ENUM_FRAMESIZES`
   and
   :ref:`VIDIOC_ENUM_FRAMEINTERVALS`
   were added.

3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was
   added.

V4L2 spec erratum 2006-10-12 (Draft 0.17)
=========================================

1. ``V4L2_PIX_FMT_HM12`` (:ref:`reserved-formats`) is a YUV 4:2:0, not
   4:2:2 format.

V4L2 in Linux 2.6.21
====================

1. The ``videodev2.h`` header file is now dual licensed under GNU
   General Public License version two or later, and under a 3-clause
   BSD-style license.

V4L2 in Linux 2.6.22
====================

1. Two new field orders ``V4L2_FIELD_INTERLACED_TB`` and
   ``V4L2_FIELD_INTERLACED_BT`` were added. See enum v4l2_field for
   details.

2. Three new clipping/blending methods with a global or straight or
   inverted local alpha value were added to the video overlay interface.
   See the description of the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
   and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls for details.

   A new ``global_alpha`` field was added to struct v4l2_window,
   extending the structure. This may **break compatibility** with
   applications using a struct v4l2_window directly. However the
   :ref:`VIDIOC_G/S/TRY_FMT <VIDIOC_G_FMT>` ioctls, which take a
   pointer to a struct v4l2_format parent structure
   with padding bytes at the end, are not affected.

3. The format of the ``chromakey`` field in struct v4l2_window changed from
   "host order RGB32" to a pixel value in the same format as the framebuffer.
   This may **break compatibility** with existing applications. Drivers
   supporting the "host order RGB32" format are not known.

V4L2 in Linux 2.6.24
====================

1. The pixel formats ``V4L2_PIX_FMT_PAL8``, ``V4L2_PIX_FMT_YUV444``,
   ``V4L2_PIX_FMT_YUV555``, ``V4L2_PIX_FMT_YUV565`` and
   ``V4L2_PIX_FMT_YUV32`` were added.

V4L2 in Linux 2.6.25
====================

1. The pixel formats :ref:`V4L2_PIX_FMT_Y16 <V4L2-PIX-FMT-Y16>` and
   :ref:`V4L2_PIX_FMT_SBGGR16 <V4L2-PIX-FMT-SBGGR16>` were added.

2. New :ref:`controls <control>` ``V4L2_CID_POWER_LINE_FREQUENCY``,
   ``V4L2_CID_HUE_AUTO``, ``V4L2_CID_WHITE_BALANCE_TEMPERATURE``,
   ``V4L2_CID_SHARPNESS`` and ``V4L2_CID_BACKLIGHT_COMPENSATION`` were
   added. The controls ``V4L2_CID_BLACK_LEVEL``, ``V4L2_CID_WHITENESS``,
   ``V4L2_CID_HCENTER`` and ``V4L2_CID_VCENTER`` were deprecated.

3. A :ref:`Camera controls class <camera-controls>` was added, with
   the new controls ``V4L2_CID_EXPOSURE_AUTO``,
   ``V4L2_CID_EXPOSURE_ABSOLUTE``, ``V4L2_CID_EXPOSURE_AUTO_PRIORITY``,
   ``V4L2_CID_PAN_RELATIVE``, ``V4L2_CID_TILT_RELATIVE``,
   ``V4L2_CID_PAN_RESET``, ``V4L2_CID_TILT_RESET``,
   ``V4L2_CID_PAN_ABSOLUTE``, ``V4L2_CID_TILT_ABSOLUTE``,
   ``V4L2_CID_FOCUS_ABSOLUTE``, ``V4L2_CID_FOCUS_RELATIVE`` and
   ``V4L2_CID_FOCUS_AUTO``.

4. The ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls, which
   were superseded by the :ref:`extended controls <extended-controls>`
   interface in Linux 2.6.18, where finally removed from the
   ``videodev2.h`` header file.

V4L2 in Linux 2.6.26
====================

1. The pixel formats ``V4L2_PIX_FMT_Y16`` and ``V4L2_PIX_FMT_SBGGR16``
   were added.

2. Added user controls ``V4L2_CID_CHROMA_AGC`` and
   ``V4L2_CID_COLOR_KILLER``.

V4L2 in Linux 2.6.27
====================

1. The :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
   and the ``V4L2_CAP_HW_FREQ_SEEK`` capability were added.

2. The pixel formats ``V4L2_PIX_FMT_YVYU``, ``V4L2_PIX_FMT_PCA501``,
   ``V4L2_PIX_FMT_PCA505``, ``V4L2_PIX_FMT_PCA508``,
   ``V4L2_PIX_FMT_PCA561``, ``V4L2_PIX_FMT_SGBRG8``,
   ``V4L2_PIX_FMT_PAC207`` and ``V4L2_PIX_FMT_PJPG`` were added.

V4L2 in Linux 2.6.28
====================

1. Added ``V4L2_MPEG_AUDIO_ENCODING_AAC`` and
   ``V4L2_MPEG_AUDIO_ENCODING_AC3`` MPEG audio encodings.

2. Added ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` MPEG video encoding.

3. The pixel formats ``V4L2_PIX_FMT_SGRBG10`` and
   ``V4L2_PIX_FMT_SGRBG10DPCM8`` were added.

V4L2 in Linux 2.6.29
====================

1. The ``VIDIOC_G_CHIP_IDENT`` ioctl was renamed to
   ``VIDIOC_G_CHIP_IDENT_OLD`` and ``VIDIOC_DBG_G_CHIP_IDENT`` was
   introduced in its place. The old struct ``v4l2_chip_ident`` was renamed to
   struct ``v4l2_chip_ident_old``.

2. The pixel formats ``V4L2_PIX_FMT_VYUY``, ``V4L2_PIX_FMT_NV16`` and

Linux 2.6.29 후반~3.5

961-1076
Linux 2.6.29~2.6.39
시기/항목변경 내용과 의미
2.6.29 카메라절대/상대/연속 zoom과 privacy 제어를 추가했습니다.
2.6.30`V4L2_CTRL_FLAG_WRITE_ONLY`와 `V4L2_CID_COLORFX`를 추가했습니다.
2.6.32 버전/라디오V4L2 API 번호를 Linux 커널 버전 번호와 맞추고 RDS 캡처를 확정했으며 modulator/RDS encoder 능력과 libv4l 설명을 추가했습니다.
2.6.32 제어문자열 제어 `V4L2_CTRL_TYPE_STRING`, BAND_STOP_FILTER, FM TX/RX 확장 제어 클래스와 ID를 추가했습니다. 미디어 장치 기본 키 매핑을 설명하는 Remote Controller 장도 생겼습니다.
2.6.33HDTV 수신기와 송신기를 위한 Digital Video timing을 추가했습니다.
2.6.34절대/상대 iris 카메라 제어를 추가했습니다.
2.6.37사용자 프로그램과 검증할 하드웨어를 찾지 못한 vtx videotext/teletext API를 제거했습니다.
2.6.39VIDIOC_*_OLD 기호와 V4L1 지원을 제거하고, 기존 호환성을 깨지 않는 multi-planar API를 추가했습니다.

카메라, 라디오, DV timing과 multi-planar API가 축적된 시기입니다.

Linux 3.1~3.5
시기/항목변경 내용과 의미
3.1`VIDIOC_QUERYCAP`이 드라이버별이 아니라 subsystem별 버전을 반환합니다. 잘못된 ioctl의 오류 코드를 표준화하고 `V4L2_CTRL_TYPE_BITMASK`를 추가했습니다.
3.2변동 제어를 userspace에 알리는 `V4L2_CTRL_FLAG_VOLATILE`과 crop/composition을 세밀하게 다루는 selection API를 추가했습니다.
3.3`V4L2_CID_ALPHA_COMPONENT`, `v4l2_capabilities.device_caps`, `V4L2_CAP_DEVICE_CAPS`를 추가했습니다.
3.4JPEG 압축 제어 클래스를 추가하고 DV timing을 `VIDIOC_ENUM_DV_TIMINGS`, `QUERY_DV_TIMINGS`, `DV_TIMINGS_CAP`으로 확장했습니다.
3.5 제어 형식정수 메뉴 `V4L2_CTRL_TYPE_INTEGER_MENU`와 subdev용 G/S_SELECTION을 추가했습니다.
3.5 색 효과ANTIQUE, ART_FREEZE, AQUA, SILHOUETTE, SOLARIZATION, VIVID, ARBITRARY_CBCR 항목과 `V4L2_CID_COLORFX_CBCR`을 추가했습니다.
3.5 카메라자동 노출 bias, preset white balance, 손떨림 보정, ISO와 자동 ISO, 측광, scene mode, 3A lock, autofocus start/stop/status/range를 추가했습니다.

능력 보고, selection, JPEG/DV와 현대 카메라 제어가 추가되었습니다.

   ``V4L2_PIX_FMT_NV61`` were added.

3. Added camera controls ``V4L2_CID_ZOOM_ABSOLUTE``,
   ``V4L2_CID_ZOOM_RELATIVE``, ``V4L2_CID_ZOOM_CONTINUOUS`` and
   ``V4L2_CID_PRIVACY``.

V4L2 in Linux 2.6.30
====================

1. New control flag ``V4L2_CTRL_FLAG_WRITE_ONLY`` was added.

2. New control ``V4L2_CID_COLORFX`` was added.

V4L2 in Linux 2.6.32
====================

1. In order to be easier to compare a V4L2 API and a kernel version, now
   V4L2 API is numbered using the Linux Kernel version numeration.

2. Finalized the RDS capture API. See :ref:`rds` for more information.

3. Added new capabilities for modulators and RDS encoders.

4. Add description for libv4l API.

5. Added support for string controls via new type
   ``V4L2_CTRL_TYPE_STRING``.

6. Added ``V4L2_CID_BAND_STOP_FILTER`` documentation.

7. Added FM Modulator (FM TX) Extended Control Class:
   ``V4L2_CTRL_CLASS_FM_TX`` and their Control IDs.

8. Added FM Receiver (FM RX) Extended Control Class:
   ``V4L2_CTRL_CLASS_FM_RX`` and their Control IDs.

9. Added Remote Controller chapter, describing the default Remote
   Controller mapping for media devices.

V4L2 in Linux 2.6.33
====================

1. Added support for Digital Video timings in order to support HDTV
   receivers and transmitters.

V4L2 in Linux 2.6.34
====================

1. Added ``V4L2_CID_IRIS_ABSOLUTE`` and ``V4L2_CID_IRIS_RELATIVE``
   controls to the :ref:`Camera controls class <camera-controls>`.

V4L2 in Linux 2.6.37
====================

1. Remove the vtx (videotext/teletext) API. This API was no longer used
   and no hardware exists to verify the API. Nor were any userspace
   applications found that used it. It was originally scheduled for
   removal in 2.6.35.

V4L2 in Linux 2.6.39
====================

1. The old VIDIOC_*_OLD symbols and V4L1 support were removed.

2. Multi-planar API added. Does not affect the compatibility of current
   drivers and applications. See :ref:`multi-planar API <planar-apis>`
   for details.

V4L2 in Linux 3.1
=================

1. VIDIOC_QUERYCAP now returns a per-subsystem version instead of a
   per-driver one.

   Standardize an error code for invalid ioctl.

   Added V4L2_CTRL_TYPE_BITMASK.

V4L2 in Linux 3.2
=================

1. V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to
   userspace.

2. Add selection API for extended control over cropping and composing.
   Does not affect the compatibility of current drivers and
   applications. See :ref:`selection API <selection-api>` for details.

V4L2 in Linux 3.3
=================

1. Added ``V4L2_CID_ALPHA_COMPONENT`` control to the
   :ref:`User controls class <control>`.

2. Added the device_caps field to struct v4l2_capabilities and added
   the new V4L2_CAP_DEVICE_CAPS capability.

V4L2 in Linux 3.4
=================

1. Added :ref:`JPEG compression control class <jpeg-controls>`.

2. Extended the DV Timings API:
   :ref:`VIDIOC_ENUM_DV_TIMINGS`,
   :ref:`VIDIOC_QUERY_DV_TIMINGS` and
   :ref:`VIDIOC_DV_TIMINGS_CAP`.

V4L2 in Linux 3.5
=================

1. Added integer menus, the new type will be
   V4L2_CTRL_TYPE_INTEGER_MENU.

2. Added selection API for V4L2 subdev interface:
   :ref:`VIDIOC_SUBDEV_G_SELECTION` and
   :ref:`VIDIOC_SUBDEV_S_SELECTION <VIDIOC_SUBDEV_G_SELECTION>`.

Linux 3.6~4.4

1077-1178
Linux 3.6~3.14
시기/항목변경 내용과 의미
3.6`v4l2_buffer.input`을 `reserved2`로 되돌리고 `V4L2_BUF_FLAG_INPUT`을 제거했습니다. `V4L2_CAP_VIDEO_M2M`, `VIDEO_M2M_MPLANE`과 `VIDIOC_ENUM_FREQ_BANDS`를 추가했습니다.
3.9`v4l2_buffer.flags`에 timestamp 형식을 넣고 제어 범위 변경을 알리는 `V4L2_EVENT_CTRL_CH_RANGE`를 추가했습니다.
3.10사용되지 않는 G/S/QUERY/ENUM_DV_PRESET ioctl과 입력/출력 PRESETS 능력을 제거하고 `VIDIOC_DBG_G_CHIP_INFO`를 추가했습니다.
3.11폐기 예정이던 `VIDIOC_DBG_G_CHIP_IDENT`를 제거했습니다.
3.14`v4l2_rect.width`와 `height`를 `_s32`에서 `_u32`로 바꿨습니다.

버퍼 필드, M2M, timestamp와 오래된 DV/debug 인터페이스를 정리했습니다.

Linux 3.15~4.4
시기/항목변경 내용과 의미
3.15Software Defined Radio(SDR) 인터페이스를 추가했습니다.
3.16`V4L2_EVENT_SOURCE_CHANGE` 이벤트를 추가했습니다.
3.17`v4l2_pix_format`을 확장해 format flag를 넣고 compound control type과 `VIDIOC_QUERY_EXT_CTRL`을 추가했습니다.
3.18`V4L2_CID_PAN_SPEED`, `V4L2_CID_TILT_SPEED` 카메라 제어를 추가했습니다.
3.19Colorspace 장을 다시 쓰고 `v4l2_ycbcr_encoding`과 `v4l2_quantization` 필드를 `v4l2_pix_format`, `v4l2_pix_format_mplane`, `v4l2_mbus_framefmt`에 추가했습니다.
4.4`V4L2_TUNER_ADC`를 `V4L2_TUNER_SDR`로 바꾸고 옛 이름을 폐기 예정으로 표시했습니다. `V4L2_CID_RF_TUNER_RF_GAIN`과 SDR 송신 지원도 추가했습니다.

SDR, 이벤트, 복합 제어와 색 공간 표현을 확장했습니다.

현대 V4L2로의 수렴
V4L1과 OLD ioctl 제거multi-planar 및 M2M 추가selection과 DV timing 확장compound/volatile control 추가색 공간과 SDR 송수신 모델 정교화

2.6.39 이후 API가 확장되는 큰 방향입니다.


3. Added ``V4L2_COLORFX_ANTIQUE``, ``V4L2_COLORFX_ART_FREEZE``,
   ``V4L2_COLORFX_AQUA``, ``V4L2_COLORFX_SILHOUETTE``,
   ``V4L2_COLORFX_SOLARIZATION``, ``V4L2_COLORFX_VIVID`` and
   ``V4L2_COLORFX_ARBITRARY_CBCR`` menu items to the
   ``V4L2_CID_COLORFX`` control.

4. Added ``V4L2_CID_COLORFX_CBCR`` control.

5. Added camera controls ``V4L2_CID_AUTO_EXPOSURE_BIAS``,
   ``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``,
   ``V4L2_CID_IMAGE_STABILIZATION``, ``V4L2_CID_ISO_SENSITIVITY``,
   ``V4L2_CID_ISO_SENSITIVITY_AUTO``, ``V4L2_CID_EXPOSURE_METERING``,
   ``V4L2_CID_SCENE_MODE``, ``V4L2_CID_3A_LOCK``,
   ``V4L2_CID_AUTO_FOCUS_START``, ``V4L2_CID_AUTO_FOCUS_STOP``,
   ``V4L2_CID_AUTO_FOCUS_STATUS`` and ``V4L2_CID_AUTO_FOCUS_RANGE``.

V4L2 in Linux 3.6
=================

1. Replaced ``input`` in struct v4l2_buffer by
   ``reserved2`` and removed ``V4L2_BUF_FLAG_INPUT``.

2. Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE
   capabilities.

3. Added support for frequency band enumerations:
   :ref:`VIDIOC_ENUM_FREQ_BANDS`.

V4L2 in Linux 3.9
=================

1. Added timestamp types to ``flags`` field in
   struct v4l2_buffer. See :ref:`buffer-flags`.

2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See
   :ref:`ctrl-changes-flags`.

V4L2 in Linux 3.10
==================

1. Removed obsolete and unused DV_PRESET ioctls VIDIOC_G_DV_PRESET,
   VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and
   VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output
   capability flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS.

2. Added new debugging ioctl
   :ref:`VIDIOC_DBG_G_CHIP_INFO`.

V4L2 in Linux 3.11
==================

1. Remove obsolete ``VIDIOC_DBG_G_CHIP_IDENT`` ioctl.

V4L2 in Linux 3.14
==================

1. In struct v4l2_rect, the type of ``width`` and
   ``height`` fields changed from _s32 to _u32.

V4L2 in Linux 3.15
==================

1. Added Software Defined Radio (SDR) Interface.

V4L2 in Linux 3.16
==================

1. Added event V4L2_EVENT_SOURCE_CHANGE.

V4L2 in Linux 3.17
==================

1. Extended struct v4l2_pix_format. Added
   format flags.

2. Added compound control types and
   :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.

V4L2 in Linux 3.18
==================

1. Added ``V4L2_CID_PAN_SPEED`` and ``V4L2_CID_TILT_SPEED`` camera
   controls.

V4L2 in Linux 3.19
==================

1. Rewrote Colorspace chapter, added new enum v4l2_ycbcr_encoding
   and enum v4l2_quantization fields to struct v4l2_pix_format,
   struct v4l2_pix_format_mplane and struct v4l2_mbus_framefmt.

V4L2 in Linux 4.4
=================

1. Renamed ``V4L2_TUNER_ADC`` to ``V4L2_TUNER_SDR``. The use of
   ``V4L2_TUNER_ADC`` is deprecated now.

2. Added ``V4L2_CID_RF_TUNER_RF_GAIN`` RF Tuner control.

3. Added transmitter support for Software Defined Radio (SDR) Interface.

실험적 요소와 폐기된 인터페이스

1243-1276
실험적 요소
시기/항목변경 내용과 의미
`VIDIOC_DBG_G_REGISTER`장치 레지스터를 읽는 디버깅 ioctl입니다.
`VIDIOC_DBG_S_REGISTER`장치 레지스터를 쓰는 디버깅 ioctl입니다.
`VIDIOC_DBG_G_CHIP_INFO`칩 정보를 조회하는 디버깅 ioctl입니다.

안정 ABI와 구분해 사용해야 하는 디버깅 인터페이스입니다.

폐기된 요소
시기/항목변경 내용과 의미
`VIDIOC_G_MPEGCOMP`/`VIDIOC_S_MPEGCOMP`Extended Controls 인터페이스로 대체되었습니다.
DV_PRESET ioctlDV Timings 인터페이스로 대체되었습니다.
`VIDIOC_SUBDEV_G_CROP`/`VIDIOC_SUBDEV_S_CROP`subdev G/S_SELECTION 인터페이스로 대체되었습니다.

현재 문서에서 대체 인터페이스로 이동해야 하는 항목입니다.

마지막 각주는 XVideo 절의 X Pixmap 정지 영상 기능이 XFree86에 아직 구현되지 않았음을 다시 확인합니다. 이 주석은 API의 역사적 범위를 설명할 뿐 현재 V4L2 전문 번역이나 원문 좌표를 바꾸지 않습니다.

.. _experimental:

Experimental API Elements
=========================

The following V4L2 API elements are currently experimental and may
change in the future.

-  :ref:`VIDIOC_DBG_G_REGISTER` and
   :ref:`VIDIOC_DBG_S_REGISTER <VIDIOC_DBG_G_REGISTER>` ioctls.

-  :ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl.

.. _obsolete:

Obsolete API Elements
=====================

The following V4L2 API elements were superseded by new interfaces and
should not be implemented in new drivers.

-  ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls. Use Extended
   Controls, :ref:`extended-controls`.

-  VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET,
   VIDIOC_ENUM_DV_PRESETS and VIDIOC_QUERY_DV_PRESET ioctls. Use
   the DV Timings API (:ref:`dv-timings`).

-  ``VIDIOC_SUBDEV_G_CROP`` and ``VIDIOC_SUBDEV_S_CROP`` ioctls. Use
   ``VIDIOC_SUBDEV_G_SELECTION`` and ``VIDIOC_SUBDEV_S_SELECTION``,
   :ref:`VIDIOC_SUBDEV_G_SELECTION`.

.. [#f1]
   This is not implemented in XFree86.