aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/v4l/pixfmt-packed-yuv.xml
blob: 3cab5d0ca75df71e6bc9e658ca50a541e1e4a138 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<refentry id="packed-yuv">
  <refmeta>
    <refentrytitle>Packed YUV formats</refentrytitle>
    &manvol;
  </refmeta>
  <refnamediv>
    <refname>Packed YUV formats</refname>
    <refpurpose>Packed YUV formats</refpurpose>
  </refnamediv>
  <refsect1>
    <title>Description</title>

    <para>Similar to the packed RGB formats these formats store
the Y, Cb and Cr component of each pixel in one 16 or 32 bit
word.</para>

    <table pgwide="1" frame="none">
      <title>Packed YUV Image Formats</title>
      <tgroup cols="37" align="center">
	<colspec colname="id" align="left" />
	<colspec colname="fourcc" />
	<colspec colname="bit" />

	<colspec colnum="4" colname="b07" align="center" />
	<colspec colnum="5" colname="b06" align="center" />
	<colspec colnum="6" colname="b05" align="center" />
	<colspec colnum="7" colname="b04" align="center" />
	<colspec colnum="8" colname="b03" align="center" />
	<colspec colnum="9" colname="b02" align="center" />
	<colspec colnum="10" colname="b01" align="center" />
	<colspec colnum="11" colname="b00" align="center" />

	<colspec colnum="13" colname="b17" align="center" />
	<colspec colnum="14" colname="b16" align="center" />
	<colspec colnum="15" colname="b15" align="center" />
	<colspec colnum="16" colname="b14" align="center" />
	<colspec colnum="17" colname="b13" align="center" />
	<colspec colnum="18" colname="b12" align="center" />
	<colspec colnum="19" colname="b11" align="center" />
	<colspec colnum="20" colname="b10" align="center" />

	<colspec colnum="22" colname="b27" align="center" />
	<colspec colnum="23" colname="b26" align="center" />
	<colspec colnum="24" colname="b25" align="center" />
	<colspec colnum="25" colname="b24" align="center" />
	<colspec colnum="26" colname="b23" align="center" />
	<colspec colnum="27" colname="b22" align="center" />
	<colspec colnum="28" colname="b21" align="center" />
	<colspec colnum="29" colname="b20" align="center" />

	<colspec colnum="31" colname="b37" align="center" />
	<colspec colnum="32" colname="b36" align="center" />
	<colspec colnum="33" colname="b35" align="center" />
	<colspec colnum="34" colname="b34" align="center" />
	<colspec colnum="35" colname="b33" align="center" />
	<colspec colnum="36" colname="b32" align="center" />
	<colspec colnum="37" colname="b31" align="center" />
	<colspec colnum="38" colname="b30" align="center" />

	<spanspec namest="b07" nameend="b00" spanname="b0" />
	<spanspec namest="b17" nameend="b10" spanname="b1" />
	<spanspec namest="b27" nameend="b20" spanname="b2" />
	<spanspec namest="b37" nameend="b30" spanname="b3" />
	<thead>
	  <row>
	    <entry>Identifier</entry>
	    <entry>Code</entry>
	    <entry>&nbsp;</entry>
	    <entry spanname="b0">Byte&nbsp;0 in memory</entry>
	    <entry spanname="b1">Byte&nbsp;1</entry>
	    <entry spanname="b2">Byte&nbsp;2</entry>
	    <entry spanname="b3">Byte&nbsp;3</entry>
	  </row>
	  <row>
	    <entry>&nbsp;</entry>
	    <entry>&nbsp;</entry>
	    <entry>Bit</entry>
	    <entry>7</entry>
	    <entry>6</entry>
	    <entry>5</entry>
	    <entry>4</entry>
	    <entry>3</entry>
	    <entry>2</entry>
	    <entry>1</entry>
	    <entry>0</entry>
	    <entry>&nbsp;</entry>
	    <entry>7</entry>
	    <entry>6</entry>
	    <entry>5</entry>
	    <entry>4</entry>
	    <entry>3</entry>
	    <entry>2</entry>
	    <entry>1</entry>
	    <entry>0</entry>
	    <entry>&nbsp;</entry>
	    <entry>7</entry>
	    <entry>6</entry>
	    <entry>5</entry>
	    <entry>4</entry>
	    <entry>3</entry>
	    <entry>2</entry>
	    <entry>1</entry>
	    <entry>0</entry>
	    <entry>&nbsp;</entry>
	    <entry>7</entry>
	    <entry>6</entry>
	    <entry>5</entry>
	    <entry>4</entry>
	    <entry>3</entry>
	    <entry>2</entry>
	    <entry>1</entry>
	    <entry>0</entry>
	  </row>
	</thead>
	<tbody valign="top">
	  <row id="V4L2-PIX-FMT-YUV444">
	    <entry><constant>V4L2_PIX_FMT_YUV444</constant></entry>
	    <entry>'Y444'</entry>
	    <entry></entry>
	    <entry>Cb<subscript>3</subscript></entry>
	    <entry>Cb<subscript>2</subscript></entry>
	    <entry>Cb<subscript>1</subscript></entry>
	    <entry>Cb<subscript>0</subscript></entry>
	    <entry>Cr<subscript>3</subscript></entry>
	    <entry>Cr<subscript>2</subscript></entry>
	    <entry>Cr<subscript>1</subscript></entry>
	    <entry>Cr<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>a<subscript>3</subscript></entry>
	    <entry>a<subscript>2</subscript></entry>
	    <entry>a<subscript>1</subscript></entry>
	    <entry>a<subscript>0</subscript></entry>
	    <entry>Y'<subscript>3</subscript></entry>
	    <entry>Y'<subscript>2</subscript></entry>
	    <entry>Y'<subscript>1</subscript></entry>
	    <entry>Y'<subscript>0</subscript></entry>
	  </row>

	  <row id="V4L2-PIX-FMT-YUV555">
	    <entry><constant>V4L2_PIX_FMT_YUV555</constant></entry>
	    <entry>'YUVO'</entry>
	    <entry></entry>
	    <entry>Cb<subscript>2</subscript></entry>
	    <entry>Cb<subscript>1</subscript></entry>
	    <entry>Cb<subscript>0</subscript></entry>
	    <entry>Cr<subscript>4</subscript></entry>
	    <entry>Cr<subscript>3</subscript></entry>
	    <entry>Cr<subscript>2</subscript></entry>
	    <entry>Cr<subscript>1</subscript></entry>
	    <entry>Cr<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>a</entry>
	    <entry>Y'<subscript>4</subscript></entry>
	    <entry>Y'<subscript>3</subscript></entry>
	    <entry>Y'<subscript>2</subscript></entry>
	    <entry>Y'<subscript>1</subscript></entry>
	    <entry>Y'<subscript>0</subscript></entry>
	    <entry>Cb<subscript>4</subscript></entry>
	    <entry>Cb<subscript>3</subscript></entry>
	  </row>

	  <row id="V4L2-PIX-FMT-YUV565">
	    <entry><constant>V4L2_PIX_FMT_YUV565</constant></entry>
	    <entry>'YUVP'</entry>
	    <entry></entry>
	    <entry>Cb<subscript>2</subscript></entry>
	    <entry>Cb<subscript>1</subscript></entry>
	    <entry>Cb<subscript>0</subscript></entry>
	    <entry>Cr<subscript>4</subscript></entry>
	    <entry>Cr<subscript>3</subscript></entry>
	    <entry>Cr<subscript>2</subscript></entry>
	    <entry>Cr<subscript>1</subscript></entry>
	    <entry>Cr<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>Y'<subscript>4</subscript></entry>
	    <entry>Y'<subscript>3</subscript></entry>
	    <entry>Y'<subscript>2</subscript></entry>
	    <entry>Y'<subscript>1</subscript></entry>
	    <entry>Y'<subscript>0</subscript></entry>
	    <entry>Cb<subscript>5</subscript></entry>
	    <entry>Cb<subscript>4</subscript></entry>
	    <entry>Cb<subscript>3</subscript></entry>
	  </row>

	  <row id="V4L2-PIX-FMT-YUV32">
	    <entry><constant>V4L2_PIX_FMT_YUV32</constant></entry>
	    <entry>'YUV4'</entry>
	    <entry></entry>
	    <entry>a<subscript>7</subscript></entry>
	    <entry>a<subscript>6</subscript></entry>
	    <entry>a<subscript>5</subscript></entry>
	    <entry>a<subscript>4</subscript></entry>
	    <entry>a<subscript>3</subscript></entry>
	    <entry>a<subscript>2</subscript></entry>
	    <entry>a<subscript>1</subscript></entry>
	    <entry>a<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>Y'<subscript>7</subscript></entry>
	    <entry>Y'<subscript>6</subscript></entry>
	    <entry>Y'<subscript>5</subscript></entry>
	    <entry>Y'<subscript>4</subscript></entry>
	    <entry>Y'<subscript>3</subscript></entry>
	    <entry>Y'<subscript>2</subscript></entry>
	    <entry>Y'<subscript>1</subscript></entry>
	    <entry>Y'<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>Cb<subscript>7</subscript></entry>
	    <entry>Cb<subscript>6</subscript></entry>
	    <entry>Cb<subscript>5</subscript></entry>
	    <entry>Cb<subscript>4</subscript></entry>
	    <entry>Cb<subscript>3</subscript></entry>
	    <entry>Cb<subscript>2</subscript></entry>
	    <entry>Cb<subscript>1</subscript></entry>
	    <entry>Cb<subscript>0</subscript></entry>
	    <entry></entry>
	    <entry>Cr<subscript>7</subscript></entry>
	    <entry>Cr<subscript>6</subscript></entry>
	    <entry>Cr<subscript>5</subscript></entry>
	    <entry>Cr<subscript>4</subscript></entry>
	    <entry>Cr<subscript>3</subscript></entry>
	    <entry>Cr<subscript>2</subscript></entry>
	    <entry>Cr<subscript>1</subscript></entry>
	    <entry>Cr<subscript>0</subscript></entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <para>Bit 7 is the most significant bit. The value of a = alpha
bits is undefined when reading from the driver, ignored when writing
to the driver, except when alpha blending has been negotiated for a
<link linkend="overlay">Video Overlay</link> or <link
linkend="osd">Video Output Overlay</link>.</para>

  </refsect1>
    </refentry>

  <!--
Local Variables:
mode: sgml
sgml-parent-document: "pixfmt.sgml"
indent-tabs-mode: nil
End:
  -->