Merge branch 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-yuyv.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _V4L2-PIX-FMT-YUYV:
11
12 **************************
13 V4L2_PIX_FMT_YUYV ('YUYV')
14 **************************
15
16
17 Packed format with ½ horizontal chroma resolution, also known as YUV
18 4:2:2
19
20
21 Description
22 ===========
23
24 In this format each four bytes is two pixels. Each four bytes is two
25 Y's, a Cb and a Cr. Each Y goes to one of the pixels, and the Cb and Cr
26 belong to both pixels. As you can see, the Cr and Cb components have
27 half the horizontal resolution of the Y component. ``V4L2_PIX_FMT_YUYV``
28 is known in the Windows environment as YUY2.
29
30 **Byte Order.**
31 Each cell is one byte.
32
33
34
35
36 .. flat-table::
37     :header-rows:  0
38     :stub-columns: 0
39
40     * - start + 0:
41       - Y'\ :sub:`00`
42       - Cb\ :sub:`00`
43       - Y'\ :sub:`01`
44       - Cr\ :sub:`00`
45       - Y'\ :sub:`02`
46       - Cb\ :sub:`01`
47       - Y'\ :sub:`03`
48       - Cr\ :sub:`01`
49     * - start + 8:
50       - Y'\ :sub:`10`
51       - Cb\ :sub:`10`
52       - Y'\ :sub:`11`
53       - Cr\ :sub:`10`
54       - Y'\ :sub:`12`
55       - Cb\ :sub:`11`
56       - Y'\ :sub:`13`
57       - Cr\ :sub:`11`
58     * - start + 16:
59       - Y'\ :sub:`20`
60       - Cb\ :sub:`20`
61       - Y'\ :sub:`21`
62       - Cr\ :sub:`20`
63       - Y'\ :sub:`22`
64       - Cb\ :sub:`21`
65       - Y'\ :sub:`23`
66       - Cr\ :sub:`21`
67     * - start + 24:
68       - Y'\ :sub:`30`
69       - Cb\ :sub:`30`
70       - Y'\ :sub:`31`
71       - Cr\ :sub:`30`
72       - Y'\ :sub:`32`
73       - Cb\ :sub:`31`
74       - Y'\ :sub:`33`
75       - Cr\ :sub:`31`
76
77
78 **Color Sample Location:**
79
80
81
82 .. flat-table::
83     :header-rows:  0
84     :stub-columns: 0
85
86     * -
87       - 0
88       -
89       - 1
90       -
91       - 2
92       -
93       - 3
94     * - 0
95       - Y
96       - C
97       - Y
98       -
99       - Y
100       - C
101       - Y
102     * - 1
103       - Y
104       - C
105       - Y
106       -
107       - Y
108       - C
109       - Y
110     * - 2
111       - Y
112       - C
113       - Y
114       -
115       - Y
116       - C
117       - Y
118     * - 3
119       - Y
120       - C
121       - Y
122       -
123       - Y
124       - C
125       - Y