About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / pixfmt-packed-rgb.xml




Custom Search

Based on kernel version 4.0. Page generated on 2015-04-14 21:23 EST.

1	<refentry id="packed-rgb">
2	  <refmeta>
3	    <refentrytitle>Packed RGB formats</refentrytitle>
4	    &manvol;
5	  </refmeta>
6	  <refnamediv>
7	    <refname>Packed RGB formats</refname>
8	    <refpurpose>Packed RGB formats</refpurpose>
9	  </refnamediv>
10	  <refsect1>
11	    <title>Description</title>
12	
13	    <para>These formats are designed to match the pixel formats of
14	typical PC graphics frame buffers. They occupy 8, 16, 24 or 32 bits
15	per pixel. These are all packed-pixel formats, meaning all the data
16	for a pixel lie next to each other in memory.</para>
17	
18	    <table pgwide="1" frame="none" id="rgb-formats">
19	      <title>Packed RGB Image Formats</title>
20	      <tgroup cols="37" align="center">
21		<colspec colname="id" align="left" />
22		<colspec colname="fourcc" />
23		<colspec colname="bit" />
24	
25		<colspec colnum="4" colname="b07" align="center" />
26		<colspec colnum="5" colname="b06" align="center" />
27		<colspec colnum="6" colname="b05" align="center" />
28		<colspec colnum="7" colname="b04" align="center" />
29		<colspec colnum="8" colname="b03" align="center" />
30		<colspec colnum="9" colname="b02" align="center" />
31		<colspec colnum="10" colname="b01" align="center" />
32		<colspec colnum="11" colname="b00" align="center" />
33	
34		<colspec colnum="13" colname="b17" align="center" />
35		<colspec colnum="14" colname="b16" align="center" />
36		<colspec colnum="15" colname="b15" align="center" />
37		<colspec colnum="16" colname="b14" align="center" />
38		<colspec colnum="17" colname="b13" align="center" />
39		<colspec colnum="18" colname="b12" align="center" />
40		<colspec colnum="19" colname="b11" align="center" />
41		<colspec colnum="20" colname="b10" align="center" />
42	
43		<colspec colnum="22" colname="b27" align="center" />
44		<colspec colnum="23" colname="b26" align="center" />
45		<colspec colnum="24" colname="b25" align="center" />
46		<colspec colnum="25" colname="b24" align="center" />
47		<colspec colnum="26" colname="b23" align="center" />
48		<colspec colnum="27" colname="b22" align="center" />
49		<colspec colnum="28" colname="b21" align="center" />
50		<colspec colnum="29" colname="b20" align="center" />
51	
52		<colspec colnum="31" colname="b37" align="center" />
53		<colspec colnum="32" colname="b36" align="center" />
54		<colspec colnum="33" colname="b35" align="center" />
55		<colspec colnum="34" colname="b34" align="center" />
56		<colspec colnum="35" colname="b33" align="center" />
57		<colspec colnum="36" colname="b32" align="center" />
58		<colspec colnum="37" colname="b31" align="center" />
59		<colspec colnum="38" colname="b30" align="center" />
60	
61		<spanspec namest="b07" nameend="b00" spanname="b0" />
62		<spanspec namest="b17" nameend="b10" spanname="b1" />
63		<spanspec namest="b27" nameend="b20" spanname="b2" />
64		<spanspec namest="b37" nameend="b30" spanname="b3" />
65		<thead>
66		  <row>
67		    <entry>Identifier</entry>
68		    <entry>Code</entry>
69		    <entry>&nbsp;</entry>
70		    <entry spanname="b0">Byte&nbsp;0 in memory</entry>
71		    <entry spanname="b1">Byte&nbsp;1</entry>
72		    <entry spanname="b2">Byte&nbsp;2</entry>
73		    <entry spanname="b3">Byte&nbsp;3</entry>
74		  </row>
75		  <row>
76		    <entry>&nbsp;</entry>
77		    <entry>&nbsp;</entry>
78		    <entry>Bit</entry>
79		    <entry>7</entry>
80		    <entry>6</entry>
81		    <entry>5</entry>
82		    <entry>4</entry>
83		    <entry>3</entry>
84		    <entry>2</entry>
85		    <entry>1</entry>
86		    <entry>0</entry>
87		    <entry>&nbsp;</entry>
88		    <entry>7</entry>
89		    <entry>6</entry>
90		    <entry>5</entry>
91		    <entry>4</entry>
92		    <entry>3</entry>
93		    <entry>2</entry>
94		    <entry>1</entry>
95		    <entry>0</entry>
96		    <entry>&nbsp;</entry>
97		    <entry>7</entry>
98		    <entry>6</entry>
99		    <entry>5</entry>
100		    <entry>4</entry>
101		    <entry>3</entry>
102		    <entry>2</entry>
103		    <entry>1</entry>
104		    <entry>0</entry>
105		    <entry>&nbsp;</entry>
106		    <entry>7</entry>
107		    <entry>6</entry>
108		    <entry>5</entry>
109		    <entry>4</entry>
110		    <entry>3</entry>
111		    <entry>2</entry>
112		    <entry>1</entry>
113		    <entry>0</entry>
114		  </row>
115		</thead>
116		<tbody valign="top">
117		  <row id="V4L2-PIX-FMT-RGB332">
118		    <entry><constant>V4L2_PIX_FMT_RGB332</constant></entry>
119		    <entry>'RGB1'</entry>
120		    <entry></entry>
121		    <entry>r<subscript>2</subscript></entry>
122		    <entry>r<subscript>1</subscript></entry>
123		    <entry>r<subscript>0</subscript></entry>
124		    <entry>g<subscript>2</subscript></entry>
125		    <entry>g<subscript>1</subscript></entry>
126		    <entry>g<subscript>0</subscript></entry>
127		    <entry>b<subscript>1</subscript></entry>
128		    <entry>b<subscript>0</subscript></entry>
129		  </row>
130		  <row id="V4L2-PIX-FMT-ARGB444">
131		    <entry><constant>V4L2_PIX_FMT_ARGB444</constant></entry>
132		    <entry>'AR12'</entry>
133		    <entry></entry>
134		    <entry>g<subscript>3</subscript></entry>
135		    <entry>g<subscript>2</subscript></entry>
136		    <entry>g<subscript>1</subscript></entry>
137		    <entry>g<subscript>0</subscript></entry>
138		    <entry>b<subscript>3</subscript></entry>
139		    <entry>b<subscript>2</subscript></entry>
140		    <entry>b<subscript>1</subscript></entry>
141		    <entry>b<subscript>0</subscript></entry>
142		    <entry></entry>
143		    <entry>a<subscript>3</subscript></entry>
144		    <entry>a<subscript>2</subscript></entry>
145		    <entry>a<subscript>1</subscript></entry>
146		    <entry>a<subscript>0</subscript></entry>
147		    <entry>r<subscript>3</subscript></entry>
148		    <entry>r<subscript>2</subscript></entry>
149		    <entry>r<subscript>1</subscript></entry>
150		    <entry>r<subscript>0</subscript></entry>
151		  </row>
152		  <row id="V4L2-PIX-FMT-XRGB444">
153		    <entry><constant>V4L2_PIX_FMT_XRGB444</constant></entry>
154		    <entry>'XR12'</entry>
155		    <entry></entry>
156		    <entry>g<subscript>3</subscript></entry>
157		    <entry>g<subscript>2</subscript></entry>
158		    <entry>g<subscript>1</subscript></entry>
159		    <entry>g<subscript>0</subscript></entry>
160		    <entry>b<subscript>3</subscript></entry>
161		    <entry>b<subscript>2</subscript></entry>
162		    <entry>b<subscript>1</subscript></entry>
163		    <entry>b<subscript>0</subscript></entry>
164		    <entry></entry>
165		    <entry>-</entry>
166		    <entry>-</entry>
167		    <entry>-</entry>
168		    <entry>-</entry>
169		    <entry>r<subscript>3</subscript></entry>
170		    <entry>r<subscript>2</subscript></entry>
171		    <entry>r<subscript>1</subscript></entry>
172		    <entry>r<subscript>0</subscript></entry>
173		  </row>
174		  <row id="V4L2-PIX-FMT-ARGB555">
175		    <entry><constant>V4L2_PIX_FMT_ARGB555</constant></entry>
176		    <entry>'AR15'</entry>
177		    <entry></entry>
178		    <entry>g<subscript>2</subscript></entry>
179		    <entry>g<subscript>1</subscript></entry>
180		    <entry>g<subscript>0</subscript></entry>
181		    <entry>b<subscript>4</subscript></entry>
182		    <entry>b<subscript>3</subscript></entry>
183		    <entry>b<subscript>2</subscript></entry>
184		    <entry>b<subscript>1</subscript></entry>
185		    <entry>b<subscript>0</subscript></entry>
186		    <entry></entry>
187		    <entry>a</entry>
188		    <entry>r<subscript>4</subscript></entry>
189		    <entry>r<subscript>3</subscript></entry>
190		    <entry>r<subscript>2</subscript></entry>
191		    <entry>r<subscript>1</subscript></entry>
192		    <entry>r<subscript>0</subscript></entry>
193		    <entry>g<subscript>4</subscript></entry>
194		    <entry>g<subscript>3</subscript></entry>
195		  </row>
196		  <row id="V4L2-PIX-FMT-XRGB555">
197		    <entry><constant>V4L2_PIX_FMT_XRGB555</constant></entry>
198		    <entry>'XR15'</entry>
199		    <entry></entry>
200		    <entry>g<subscript>2</subscript></entry>
201		    <entry>g<subscript>1</subscript></entry>
202		    <entry>g<subscript>0</subscript></entry>
203		    <entry>b<subscript>4</subscript></entry>
204		    <entry>b<subscript>3</subscript></entry>
205		    <entry>b<subscript>2</subscript></entry>
206		    <entry>b<subscript>1</subscript></entry>
207		    <entry>b<subscript>0</subscript></entry>
208		    <entry></entry>
209		    <entry>-</entry>
210		    <entry>r<subscript>4</subscript></entry>
211		    <entry>r<subscript>3</subscript></entry>
212		    <entry>r<subscript>2</subscript></entry>
213		    <entry>r<subscript>1</subscript></entry>
214		    <entry>r<subscript>0</subscript></entry>
215		    <entry>g<subscript>4</subscript></entry>
216		    <entry>g<subscript>3</subscript></entry>
217		  </row>
218		  <row id="V4L2-PIX-FMT-RGB565">
219		    <entry><constant>V4L2_PIX_FMT_RGB565</constant></entry>
220		    <entry>'RGBP'</entry>
221		    <entry></entry>
222		    <entry>g<subscript>2</subscript></entry>
223		    <entry>g<subscript>1</subscript></entry>
224		    <entry>g<subscript>0</subscript></entry>
225		    <entry>b<subscript>4</subscript></entry>
226		    <entry>b<subscript>3</subscript></entry>
227		    <entry>b<subscript>2</subscript></entry>
228		    <entry>b<subscript>1</subscript></entry>
229		    <entry>b<subscript>0</subscript></entry>
230		    <entry></entry>
231		    <entry>r<subscript>4</subscript></entry>
232		    <entry>r<subscript>3</subscript></entry>
233		    <entry>r<subscript>2</subscript></entry>
234		    <entry>r<subscript>1</subscript></entry>
235		    <entry>r<subscript>0</subscript></entry>
236		    <entry>g<subscript>5</subscript></entry>
237		    <entry>g<subscript>4</subscript></entry>
238		    <entry>g<subscript>3</subscript></entry>
239		  </row>
240		  <row id="V4L2-PIX-FMT-ARGB555X">
241		    <entry><constant>V4L2_PIX_FMT_ARGB555X</constant></entry>
242		    <entry>'AR15' | (1 &lt;&lt; 31)</entry>
243		    <entry></entry>
244		    <entry>a</entry>
245		    <entry>r<subscript>4</subscript></entry>
246		    <entry>r<subscript>3</subscript></entry>
247		    <entry>r<subscript>2</subscript></entry>
248		    <entry>r<subscript>1</subscript></entry>
249		    <entry>r<subscript>0</subscript></entry>
250		    <entry>g<subscript>4</subscript></entry>
251		    <entry>g<subscript>3</subscript></entry>
252		    <entry></entry>
253		    <entry>g<subscript>2</subscript></entry>
254		    <entry>g<subscript>1</subscript></entry>
255		    <entry>g<subscript>0</subscript></entry>
256		    <entry>b<subscript>4</subscript></entry>
257		    <entry>b<subscript>3</subscript></entry>
258		    <entry>b<subscript>2</subscript></entry>
259		    <entry>b<subscript>1</subscript></entry>
260		    <entry>b<subscript>0</subscript></entry>
261		  </row>
262		  <row id="V4L2-PIX-FMT-XRGB555X">
263		    <entry><constant>V4L2_PIX_FMT_XRGB555X</constant></entry>
264		    <entry>'XR15' | (1 &lt;&lt; 31)</entry>
265		    <entry></entry>
266		    <entry>-</entry>
267		    <entry>r<subscript>4</subscript></entry>
268		    <entry>r<subscript>3</subscript></entry>
269		    <entry>r<subscript>2</subscript></entry>
270		    <entry>r<subscript>1</subscript></entry>
271		    <entry>r<subscript>0</subscript></entry>
272		    <entry>g<subscript>4</subscript></entry>
273		    <entry>g<subscript>3</subscript></entry>
274		    <entry></entry>
275		    <entry>g<subscript>2</subscript></entry>
276		    <entry>g<subscript>1</subscript></entry>
277		    <entry>g<subscript>0</subscript></entry>
278		    <entry>b<subscript>4</subscript></entry>
279		    <entry>b<subscript>3</subscript></entry>
280		    <entry>b<subscript>2</subscript></entry>
281		    <entry>b<subscript>1</subscript></entry>
282		    <entry>b<subscript>0</subscript></entry>
283		  </row>
284		  <row id="V4L2-PIX-FMT-RGB565X">
285		    <entry><constant>V4L2_PIX_FMT_RGB565X</constant></entry>
286		    <entry>'RGBR'</entry>
287		    <entry></entry>
288		    <entry>r<subscript>4</subscript></entry>
289		    <entry>r<subscript>3</subscript></entry>
290		    <entry>r<subscript>2</subscript></entry>
291		    <entry>r<subscript>1</subscript></entry>
292		    <entry>r<subscript>0</subscript></entry>
293		    <entry>g<subscript>5</subscript></entry>
294		    <entry>g<subscript>4</subscript></entry>
295		    <entry>g<subscript>3</subscript></entry>
296		    <entry></entry>
297		    <entry>g<subscript>2</subscript></entry>
298		    <entry>g<subscript>1</subscript></entry>
299		    <entry>g<subscript>0</subscript></entry>
300		    <entry>b<subscript>4</subscript></entry>
301		    <entry>b<subscript>3</subscript></entry>
302		    <entry>b<subscript>2</subscript></entry>
303		    <entry>b<subscript>1</subscript></entry>
304		    <entry>b<subscript>0</subscript></entry>
305		  </row>
306		  <row id="V4L2-PIX-FMT-BGR666">
307		    <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry>
308		    <entry>'BGRH'</entry>
309		    <entry></entry>
310		    <entry>b<subscript>5</subscript></entry>
311		    <entry>b<subscript>4</subscript></entry>
312		    <entry>b<subscript>3</subscript></entry>
313		    <entry>b<subscript>2</subscript></entry>
314		    <entry>b<subscript>1</subscript></entry>
315		    <entry>b<subscript>0</subscript></entry>
316		    <entry>g<subscript>5</subscript></entry>
317		    <entry>g<subscript>4</subscript></entry>
318		    <entry></entry>
319		    <entry>g<subscript>3</subscript></entry>
320		    <entry>g<subscript>2</subscript></entry>
321		    <entry>g<subscript>1</subscript></entry>
322		    <entry>g<subscript>0</subscript></entry>
323		    <entry>r<subscript>5</subscript></entry>
324		    <entry>r<subscript>4</subscript></entry>
325		    <entry>r<subscript>3</subscript></entry>
326		    <entry>r<subscript>2</subscript></entry>
327		    <entry></entry>
328		    <entry>r<subscript>1</subscript></entry>
329		    <entry>r<subscript>0</subscript></entry>
330		    <entry></entry>
331		    <entry></entry>
332		    <entry></entry>
333		    <entry></entry>
334		    <entry></entry>
335		    <entry></entry>
336		    <entry></entry>
337		    <entry></entry>
338		    <entry></entry>
339		    <entry></entry>
340		    <entry></entry>
341		    <entry></entry>
342		    <entry></entry>
343		    <entry></entry>
344		  </row>
345		  <row id="V4L2-PIX-FMT-BGR24">
346		    <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry>
347		    <entry>'BGR3'</entry>
348		    <entry></entry>
349		    <entry>b<subscript>7</subscript></entry>
350		    <entry>b<subscript>6</subscript></entry>
351		    <entry>b<subscript>5</subscript></entry>
352		    <entry>b<subscript>4</subscript></entry>
353		    <entry>b<subscript>3</subscript></entry>
354		    <entry>b<subscript>2</subscript></entry>
355		    <entry>b<subscript>1</subscript></entry>
356		    <entry>b<subscript>0</subscript></entry>
357		    <entry></entry>
358		    <entry>g<subscript>7</subscript></entry>
359		    <entry>g<subscript>6</subscript></entry>
360		    <entry>g<subscript>5</subscript></entry>
361		    <entry>g<subscript>4</subscript></entry>
362		    <entry>g<subscript>3</subscript></entry>
363		    <entry>g<subscript>2</subscript></entry>
364		    <entry>g<subscript>1</subscript></entry>
365		    <entry>g<subscript>0</subscript></entry>
366		    <entry></entry>
367		    <entry>r<subscript>7</subscript></entry>
368		    <entry>r<subscript>6</subscript></entry>
369		    <entry>r<subscript>5</subscript></entry>
370		    <entry>r<subscript>4</subscript></entry>
371		    <entry>r<subscript>3</subscript></entry>
372		    <entry>r<subscript>2</subscript></entry>
373		    <entry>r<subscript>1</subscript></entry>
374		    <entry>r<subscript>0</subscript></entry>
375		  </row>
376		  <row id="V4L2-PIX-FMT-RGB24">
377		    <entry><constant>V4L2_PIX_FMT_RGB24</constant></entry>
378		    <entry>'RGB3'</entry>
379		    <entry></entry>
380		    <entry>r<subscript>7</subscript></entry>
381		    <entry>r<subscript>6</subscript></entry>
382		    <entry>r<subscript>5</subscript></entry>
383		    <entry>r<subscript>4</subscript></entry>
384		    <entry>r<subscript>3</subscript></entry>
385		    <entry>r<subscript>2</subscript></entry>
386		    <entry>r<subscript>1</subscript></entry>
387		    <entry>r<subscript>0</subscript></entry>
388		    <entry></entry>
389		    <entry>g<subscript>7</subscript></entry>
390		    <entry>g<subscript>6</subscript></entry>
391		    <entry>g<subscript>5</subscript></entry>
392		    <entry>g<subscript>4</subscript></entry>
393		    <entry>g<subscript>3</subscript></entry>
394		    <entry>g<subscript>2</subscript></entry>
395		    <entry>g<subscript>1</subscript></entry>
396		    <entry>g<subscript>0</subscript></entry>
397		    <entry></entry>
398		    <entry>b<subscript>7</subscript></entry>
399		    <entry>b<subscript>6</subscript></entry>
400		    <entry>b<subscript>5</subscript></entry>
401		    <entry>b<subscript>4</subscript></entry>
402		    <entry>b<subscript>3</subscript></entry>
403		    <entry>b<subscript>2</subscript></entry>
404		    <entry>b<subscript>1</subscript></entry>
405		    <entry>b<subscript>0</subscript></entry>
406		  </row>
407		  <row id="V4L2-PIX-FMT-ABGR32">
408		    <entry><constant>V4L2_PIX_FMT_ABGR32</constant></entry>
409		    <entry>'AR24'</entry>
410		    <entry></entry>
411		    <entry>b<subscript>7</subscript></entry>
412		    <entry>b<subscript>6</subscript></entry>
413		    <entry>b<subscript>5</subscript></entry>
414		    <entry>b<subscript>4</subscript></entry>
415		    <entry>b<subscript>3</subscript></entry>
416		    <entry>b<subscript>2</subscript></entry>
417		    <entry>b<subscript>1</subscript></entry>
418		    <entry>b<subscript>0</subscript></entry>
419		    <entry></entry>
420		    <entry>g<subscript>7</subscript></entry>
421		    <entry>g<subscript>6</subscript></entry>
422		    <entry>g<subscript>5</subscript></entry>
423		    <entry>g<subscript>4</subscript></entry>
424		    <entry>g<subscript>3</subscript></entry>
425		    <entry>g<subscript>2</subscript></entry>
426		    <entry>g<subscript>1</subscript></entry>
427		    <entry>g<subscript>0</subscript></entry>
428		    <entry></entry>
429		    <entry>r<subscript>7</subscript></entry>
430		    <entry>r<subscript>6</subscript></entry>
431		    <entry>r<subscript>5</subscript></entry>
432		    <entry>r<subscript>4</subscript></entry>
433		    <entry>r<subscript>3</subscript></entry>
434		    <entry>r<subscript>2</subscript></entry>
435		    <entry>r<subscript>1</subscript></entry>
436		    <entry>r<subscript>0</subscript></entry>
437		    <entry></entry>
438		    <entry>a<subscript>7</subscript></entry>
439		    <entry>a<subscript>6</subscript></entry>
440		    <entry>a<subscript>5</subscript></entry>
441		    <entry>a<subscript>4</subscript></entry>
442		    <entry>a<subscript>3</subscript></entry>
443		    <entry>a<subscript>2</subscript></entry>
444		    <entry>a<subscript>1</subscript></entry>
445		    <entry>a<subscript>0</subscript></entry>
446		  </row>
447		  <row id="V4L2-PIX-FMT-XBGR32">
448		    <entry><constant>V4L2_PIX_FMT_XBGR32</constant></entry>
449		    <entry>'XR24'</entry>
450		    <entry></entry>
451		    <entry>b<subscript>7</subscript></entry>
452		    <entry>b<subscript>6</subscript></entry>
453		    <entry>b<subscript>5</subscript></entry>
454		    <entry>b<subscript>4</subscript></entry>
455		    <entry>b<subscript>3</subscript></entry>
456		    <entry>b<subscript>2</subscript></entry>
457		    <entry>b<subscript>1</subscript></entry>
458		    <entry>b<subscript>0</subscript></entry>
459		    <entry></entry>
460		    <entry>g<subscript>7</subscript></entry>
461		    <entry>g<subscript>6</subscript></entry>
462		    <entry>g<subscript>5</subscript></entry>
463		    <entry>g<subscript>4</subscript></entry>
464		    <entry>g<subscript>3</subscript></entry>
465		    <entry>g<subscript>2</subscript></entry>
466		    <entry>g<subscript>1</subscript></entry>
467		    <entry>g<subscript>0</subscript></entry>
468		    <entry></entry>
469		    <entry>r<subscript>7</subscript></entry>
470		    <entry>r<subscript>6</subscript></entry>
471		    <entry>r<subscript>5</subscript></entry>
472		    <entry>r<subscript>4</subscript></entry>
473		    <entry>r<subscript>3</subscript></entry>
474		    <entry>r<subscript>2</subscript></entry>
475		    <entry>r<subscript>1</subscript></entry>
476		    <entry>r<subscript>0</subscript></entry>
477		    <entry></entry>
478		    <entry>-</entry>
479		    <entry>-</entry>
480		    <entry>-</entry>
481		    <entry>-</entry>
482		    <entry>-</entry>
483		    <entry>-</entry>
484		    <entry>-</entry>
485		    <entry>-</entry>
486		  </row>
487		  <row id="V4L2-PIX-FMT-ARGB32">
488		    <entry><constant>V4L2_PIX_FMT_ARGB32</constant></entry>
489		    <entry>'BA24'</entry>
490		    <entry></entry>
491		    <entry>a<subscript>7</subscript></entry>
492		    <entry>a<subscript>6</subscript></entry>
493		    <entry>a<subscript>5</subscript></entry>
494		    <entry>a<subscript>4</subscript></entry>
495		    <entry>a<subscript>3</subscript></entry>
496		    <entry>a<subscript>2</subscript></entry>
497		    <entry>a<subscript>1</subscript></entry>
498		    <entry>a<subscript>0</subscript></entry>
499		    <entry></entry>
500		    <entry>r<subscript>7</subscript></entry>
501		    <entry>r<subscript>6</subscript></entry>
502		    <entry>r<subscript>5</subscript></entry>
503		    <entry>r<subscript>4</subscript></entry>
504		    <entry>r<subscript>3</subscript></entry>
505		    <entry>r<subscript>2</subscript></entry>
506		    <entry>r<subscript>1</subscript></entry>
507		    <entry>r<subscript>0</subscript></entry>
508		    <entry></entry>
509		    <entry>g<subscript>7</subscript></entry>
510		    <entry>g<subscript>6</subscript></entry>
511		    <entry>g<subscript>5</subscript></entry>
512		    <entry>g<subscript>4</subscript></entry>
513		    <entry>g<subscript>3</subscript></entry>
514		    <entry>g<subscript>2</subscript></entry>
515		    <entry>g<subscript>1</subscript></entry>
516		    <entry>g<subscript>0</subscript></entry>
517		    <entry></entry>
518		    <entry>b<subscript>7</subscript></entry>
519		    <entry>b<subscript>6</subscript></entry>
520		    <entry>b<subscript>5</subscript></entry>
521		    <entry>b<subscript>4</subscript></entry>
522		    <entry>b<subscript>3</subscript></entry>
523		    <entry>b<subscript>2</subscript></entry>
524		    <entry>b<subscript>1</subscript></entry>
525		    <entry>b<subscript>0</subscript></entry>
526		  </row>
527		  <row id="V4L2-PIX-FMT-XRGB32">
528		    <entry><constant>V4L2_PIX_FMT_XRGB32</constant></entry>
529		    <entry>'BX24'</entry>
530		    <entry></entry>
531		    <entry>-</entry>
532		    <entry>-</entry>
533		    <entry>-</entry>
534		    <entry>-</entry>
535		    <entry>-</entry>
536		    <entry>-</entry>
537		    <entry>-</entry>
538		    <entry>-</entry>
539		    <entry></entry>
540		    <entry>r<subscript>7</subscript></entry>
541		    <entry>r<subscript>6</subscript></entry>
542		    <entry>r<subscript>5</subscript></entry>
543		    <entry>r<subscript>4</subscript></entry>
544		    <entry>r<subscript>3</subscript></entry>
545		    <entry>r<subscript>2</subscript></entry>
546		    <entry>r<subscript>1</subscript></entry>
547		    <entry>r<subscript>0</subscript></entry>
548		    <entry></entry>
549		    <entry>g<subscript>7</subscript></entry>
550		    <entry>g<subscript>6</subscript></entry>
551		    <entry>g<subscript>5</subscript></entry>
552		    <entry>g<subscript>4</subscript></entry>
553		    <entry>g<subscript>3</subscript></entry>
554		    <entry>g<subscript>2</subscript></entry>
555		    <entry>g<subscript>1</subscript></entry>
556		    <entry>g<subscript>0</subscript></entry>
557		    <entry></entry>
558		    <entry>b<subscript>7</subscript></entry>
559		    <entry>b<subscript>6</subscript></entry>
560		    <entry>b<subscript>5</subscript></entry>
561		    <entry>b<subscript>4</subscript></entry>
562		    <entry>b<subscript>3</subscript></entry>
563		    <entry>b<subscript>2</subscript></entry>
564		    <entry>b<subscript>1</subscript></entry>
565		    <entry>b<subscript>0</subscript></entry>
566		  </row>
567		</tbody>
568	      </tgroup>
569	    </table>
570	
571	    <para>Bit 7 is the most significant bit.</para>
572	
573	    <para>The usage and value of the alpha bits (a) in the ARGB and ABGR formats
574	    (collectively referred to as alpha formats) depend on the device type and
575	    hardware operation. <link linkend="capture">Capture</link> devices
576	    (including capture queues of mem-to-mem devices) fill the alpha component in
577	    memory. When the device outputs an alpha channel the alpha component will
578	    have a meaningful value. Otherwise, when the device doesn't output an alpha
579	    channel but can set the alpha bit to a user-configurable value, the <link
580	    linkend="v4l2-alpha-component"><constant>V4L2_CID_ALPHA_COMPONENT</constant>
581	    </link> control is used to specify that alpha value, and the alpha component
582	    of all pixels will be set to the value specified by that control. Otherwise
583	    a corresponding format without an alpha component (XRGB or XBGR) must be
584	    used instead of an alpha format.</para>
585	
586	    <para><link linkend="output">Output</link> devices (including output queues
587	    of mem-to-mem devices and <link linkend="osd">video output overlay</link>
588	    devices) read the alpha component from memory. When the device processes the
589	    alpha channel the alpha component must be filled with meaningful values by
590	    applications. Otherwise a corresponding format without an alpha component
591	    (XRGB or XBGR) must be used instead of an alpha format.</para>
592	
593	    <para>The XRGB and XBGR formats contain undefined bits (-). Applications,
594	    devices and drivers must ignore those bits, for both <link
595	    linkend="capture">capture</link> and <link linkend="output">output</link>
596	    devices.</para>
597	
598	    <example>
599	      <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 &times; 4 pixel
600	image</title>
601	
602	      <formalpara>
603		<title>Byte Order.</title>
604		<para>Each cell is one byte.
605		      <informaltable frame="none">
606		    <tgroup cols="13" align="center">
607		      <colspec align="left" colwidth="2*" />
608		      <tbody valign="top">
609			<row>
610			  <entry>start&nbsp;+&nbsp;0:</entry>
611			  <entry>B<subscript>00</subscript></entry>
612			  <entry>G<subscript>00</subscript></entry>
613			  <entry>R<subscript>00</subscript></entry>
614			  <entry>B<subscript>01</subscript></entry>
615			  <entry>G<subscript>01</subscript></entry>
616			  <entry>R<subscript>01</subscript></entry>
617			  <entry>B<subscript>02</subscript></entry>
618			  <entry>G<subscript>02</subscript></entry>
619			  <entry>R<subscript>02</subscript></entry>
620			  <entry>B<subscript>03</subscript></entry>
621			  <entry>G<subscript>03</subscript></entry>
622			  <entry>R<subscript>03</subscript></entry>
623			</row>
624			<row>
625			  <entry>start&nbsp;+&nbsp;12:</entry>
626			  <entry>B<subscript>10</subscript></entry>
627			  <entry>G<subscript>10</subscript></entry>
628			  <entry>R<subscript>10</subscript></entry>
629			  <entry>B<subscript>11</subscript></entry>
630			  <entry>G<subscript>11</subscript></entry>
631			  <entry>R<subscript>11</subscript></entry>
632			  <entry>B<subscript>12</subscript></entry>
633			  <entry>G<subscript>12</subscript></entry>
634			  <entry>R<subscript>12</subscript></entry>
635			  <entry>B<subscript>13</subscript></entry>
636			  <entry>G<subscript>13</subscript></entry>
637			  <entry>R<subscript>13</subscript></entry>
638			</row>
639			<row>
640			  <entry>start&nbsp;+&nbsp;24:</entry>
641			  <entry>B<subscript>20</subscript></entry>
642			  <entry>G<subscript>20</subscript></entry>
643			  <entry>R<subscript>20</subscript></entry>
644			  <entry>B<subscript>21</subscript></entry>
645			  <entry>G<subscript>21</subscript></entry>
646			  <entry>R<subscript>21</subscript></entry>
647			  <entry>B<subscript>22</subscript></entry>
648			  <entry>G<subscript>22</subscript></entry>
649			  <entry>R<subscript>22</subscript></entry>
650			  <entry>B<subscript>23</subscript></entry>
651			  <entry>G<subscript>23</subscript></entry>
652			  <entry>R<subscript>23</subscript></entry>
653			</row>
654			<row>
655			  <entry>start&nbsp;+&nbsp;36:</entry>
656			  <entry>B<subscript>30</subscript></entry>
657			  <entry>G<subscript>30</subscript></entry>
658			  <entry>R<subscript>30</subscript></entry>
659			  <entry>B<subscript>31</subscript></entry>
660			  <entry>G<subscript>31</subscript></entry>
661			  <entry>R<subscript>31</subscript></entry>
662			  <entry>B<subscript>32</subscript></entry>
663			  <entry>G<subscript>32</subscript></entry>
664			  <entry>R<subscript>32</subscript></entry>
665			  <entry>B<subscript>33</subscript></entry>
666			  <entry>G<subscript>33</subscript></entry>
667			  <entry>R<subscript>33</subscript></entry>
668			</row>
669		      </tbody>
670		    </tgroup>
671		      </informaltable>
672		    </para>
673	      </formalpara>
674	    </example>
675	
676	    <para>Formats defined in <xref linkend="rgb-formats-deprecated"/> are
677	    deprecated and must not be used by new drivers. They are documented here for
678	    reference. The meaning of their alpha bits (a) is ill-defined and
679	    interpreted as in either the corresponding ARGB or XRGB format, depending on
680	    the driver.</para>
681	
682	    <table pgwide="1" frame="none" id="rgb-formats-deprecated">
683	      <title>Deprecated Packed RGB Image Formats</title>
684	      <tgroup cols="37" align="center">
685		<colspec colname="id" align="left" />
686		<colspec colname="fourcc" />
687		<colspec colname="bit" />
688	
689		<colspec colnum="4" colname="b07" align="center" />
690		<colspec colnum="5" colname="b06" align="center" />
691		<colspec colnum="6" colname="b05" align="center" />
692		<colspec colnum="7" colname="b04" align="center" />
693		<colspec colnum="8" colname="b03" align="center" />
694		<colspec colnum="9" colname="b02" align="center" />
695		<colspec colnum="10" colname="b01" align="center" />
696		<colspec colnum="11" colname="b00" align="center" />
697	
698		<colspec colnum="13" colname="b17" align="center" />
699		<colspec colnum="14" colname="b16" align="center" />
700		<colspec colnum="15" colname="b15" align="center" />
701		<colspec colnum="16" colname="b14" align="center" />
702		<colspec colnum="17" colname="b13" align="center" />
703		<colspec colnum="18" colname="b12" align="center" />
704		<colspec colnum="19" colname="b11" align="center" />
705		<colspec colnum="20" colname="b10" align="center" />
706	
707		<colspec colnum="22" colname="b27" align="center" />
708		<colspec colnum="23" colname="b26" align="center" />
709		<colspec colnum="24" colname="b25" align="center" />
710		<colspec colnum="25" colname="b24" align="center" />
711		<colspec colnum="26" colname="b23" align="center" />
712		<colspec colnum="27" colname="b22" align="center" />
713		<colspec colnum="28" colname="b21" align="center" />
714		<colspec colnum="29" colname="b20" align="center" />
715	
716		<colspec colnum="31" colname="b37" align="center" />
717		<colspec colnum="32" colname="b36" align="center" />
718		<colspec colnum="33" colname="b35" align="center" />
719		<colspec colnum="34" colname="b34" align="center" />
720		<colspec colnum="35" colname="b33" align="center" />
721		<colspec colnum="36" colname="b32" align="center" />
722		<colspec colnum="37" colname="b31" align="center" />
723		<colspec colnum="38" colname="b30" align="center" />
724	
725		<spanspec namest="b07" nameend="b00" spanname="b0" />
726		<spanspec namest="b17" nameend="b10" spanname="b1" />
727		<spanspec namest="b27" nameend="b20" spanname="b2" />
728		<spanspec namest="b37" nameend="b30" spanname="b3" />
729		<thead>
730		  <row>
731		    <entry>Identifier</entry>
732		    <entry>Code</entry>
733		    <entry>&nbsp;</entry>
734		    <entry spanname="b0">Byte&nbsp;0 in memory</entry>
735		    <entry spanname="b1">Byte&nbsp;1</entry>
736		    <entry spanname="b2">Byte&nbsp;2</entry>
737		    <entry spanname="b3">Byte&nbsp;3</entry>
738		  </row>
739		  <row>
740		    <entry>&nbsp;</entry>
741		    <entry>&nbsp;</entry>
742		    <entry>Bit</entry>
743		    <entry>7</entry>
744		    <entry>6</entry>
745		    <entry>5</entry>
746		    <entry>4</entry>
747		    <entry>3</entry>
748		    <entry>2</entry>
749		    <entry>1</entry>
750		    <entry>0</entry>
751		    <entry>&nbsp;</entry>
752		    <entry>7</entry>
753		    <entry>6</entry>
754		    <entry>5</entry>
755		    <entry>4</entry>
756		    <entry>3</entry>
757		    <entry>2</entry>
758		    <entry>1</entry>
759		    <entry>0</entry>
760		    <entry>&nbsp;</entry>
761		    <entry>7</entry>
762		    <entry>6</entry>
763		    <entry>5</entry>
764		    <entry>4</entry>
765		    <entry>3</entry>
766		    <entry>2</entry>
767		    <entry>1</entry>
768		    <entry>0</entry>
769		    <entry>&nbsp;</entry>
770		    <entry>7</entry>
771		    <entry>6</entry>
772		    <entry>5</entry>
773		    <entry>4</entry>
774		    <entry>3</entry>
775		    <entry>2</entry>
776		    <entry>1</entry>
777		    <entry>0</entry>
778		  </row>
779		</thead>
780		<tbody>
781		  <row id="V4L2-PIX-FMT-RGB444">
782		    <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry>
783		    <entry>'R444'</entry>
784		    <entry></entry>
785		    <entry>g<subscript>3</subscript></entry>
786		    <entry>g<subscript>2</subscript></entry>
787		    <entry>g<subscript>1</subscript></entry>
788		    <entry>g<subscript>0</subscript></entry>
789		    <entry>b<subscript>3</subscript></entry>
790		    <entry>b<subscript>2</subscript></entry>
791		    <entry>b<subscript>1</subscript></entry>
792		    <entry>b<subscript>0</subscript></entry>
793		    <entry></entry>
794		    <entry>a<subscript>3</subscript></entry>
795		    <entry>a<subscript>2</subscript></entry>
796		    <entry>a<subscript>1</subscript></entry>
797		    <entry>a<subscript>0</subscript></entry>
798		    <entry>r<subscript>3</subscript></entry>
799		    <entry>r<subscript>2</subscript></entry>
800		    <entry>r<subscript>1</subscript></entry>
801		    <entry>r<subscript>0</subscript></entry>
802		  </row>
803		  <row id="V4L2-PIX-FMT-RGB555">
804		    <entry><constant>V4L2_PIX_FMT_RGB555</constant></entry>
805		    <entry>'RGBO'</entry>
806		    <entry></entry>
807		    <entry>g<subscript>2</subscript></entry>
808		    <entry>g<subscript>1</subscript></entry>
809		    <entry>g<subscript>0</subscript></entry>
810		    <entry>b<subscript>4</subscript></entry>
811		    <entry>b<subscript>3</subscript></entry>
812		    <entry>b<subscript>2</subscript></entry>
813		    <entry>b<subscript>1</subscript></entry>
814		    <entry>b<subscript>0</subscript></entry>
815		    <entry></entry>
816		    <entry>a</entry>
817		    <entry>r<subscript>4</subscript></entry>
818		    <entry>r<subscript>3</subscript></entry>
819		    <entry>r<subscript>2</subscript></entry>
820		    <entry>r<subscript>1</subscript></entry>
821		    <entry>r<subscript>0</subscript></entry>
822		    <entry>g<subscript>4</subscript></entry>
823		    <entry>g<subscript>3</subscript></entry>
824		  </row>
825		  <row id="V4L2-PIX-FMT-RGB555X">
826		    <entry><constant>V4L2_PIX_FMT_RGB555X</constant></entry>
827		    <entry>'RGBQ'</entry>
828		    <entry></entry>
829		    <entry>a</entry>
830		    <entry>r<subscript>4</subscript></entry>
831		    <entry>r<subscript>3</subscript></entry>
832		    <entry>r<subscript>2</subscript></entry>
833		    <entry>r<subscript>1</subscript></entry>
834		    <entry>r<subscript>0</subscript></entry>
835		    <entry>g<subscript>4</subscript></entry>
836		    <entry>g<subscript>3</subscript></entry>
837		    <entry></entry>
838		    <entry>g<subscript>2</subscript></entry>
839		    <entry>g<subscript>1</subscript></entry>
840		    <entry>g<subscript>0</subscript></entry>
841		    <entry>b<subscript>4</subscript></entry>
842		    <entry>b<subscript>3</subscript></entry>
843		    <entry>b<subscript>2</subscript></entry>
844		    <entry>b<subscript>1</subscript></entry>
845		    <entry>b<subscript>0</subscript></entry>
846		  </row>
847		  <row id="V4L2-PIX-FMT-BGR32">
848		    <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry>
849		    <entry>'BGR4'</entry>
850		    <entry></entry>
851		    <entry>b<subscript>7</subscript></entry>
852		    <entry>b<subscript>6</subscript></entry>
853		    <entry>b<subscript>5</subscript></entry>
854		    <entry>b<subscript>4</subscript></entry>
855		    <entry>b<subscript>3</subscript></entry>
856		    <entry>b<subscript>2</subscript></entry>
857		    <entry>b<subscript>1</subscript></entry>
858		    <entry>b<subscript>0</subscript></entry>
859		    <entry></entry>
860		    <entry>g<subscript>7</subscript></entry>
861		    <entry>g<subscript>6</subscript></entry>
862		    <entry>g<subscript>5</subscript></entry>
863		    <entry>g<subscript>4</subscript></entry>
864		    <entry>g<subscript>3</subscript></entry>
865		    <entry>g<subscript>2</subscript></entry>
866		    <entry>g<subscript>1</subscript></entry>
867		    <entry>g<subscript>0</subscript></entry>
868		    <entry></entry>
869		    <entry>r<subscript>7</subscript></entry>
870		    <entry>r<subscript>6</subscript></entry>
871		    <entry>r<subscript>5</subscript></entry>
872		    <entry>r<subscript>4</subscript></entry>
873		    <entry>r<subscript>3</subscript></entry>
874		    <entry>r<subscript>2</subscript></entry>
875		    <entry>r<subscript>1</subscript></entry>
876		    <entry>r<subscript>0</subscript></entry>
877		    <entry></entry>
878		    <entry>a<subscript>7</subscript></entry>
879		    <entry>a<subscript>6</subscript></entry>
880		    <entry>a<subscript>5</subscript></entry>
881		    <entry>a<subscript>4</subscript></entry>
882		    <entry>a<subscript>3</subscript></entry>
883		    <entry>a<subscript>2</subscript></entry>
884		    <entry>a<subscript>1</subscript></entry>
885		    <entry>a<subscript>0</subscript></entry>
886		  </row>
887		  <row id="V4L2-PIX-FMT-RGB32">
888		    <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry>
889		    <entry>'RGB4'</entry>
890		    <entry></entry>
891		    <entry>a<subscript>7</subscript></entry>
892		    <entry>a<subscript>6</subscript></entry>
893		    <entry>a<subscript>5</subscript></entry>
894		    <entry>a<subscript>4</subscript></entry>
895		    <entry>a<subscript>3</subscript></entry>
896		    <entry>a<subscript>2</subscript></entry>
897		    <entry>a<subscript>1</subscript></entry>
898		    <entry>a<subscript>0</subscript></entry>
899		    <entry></entry>
900		    <entry>r<subscript>7</subscript></entry>
901		    <entry>r<subscript>6</subscript></entry>
902		    <entry>r<subscript>5</subscript></entry>
903		    <entry>r<subscript>4</subscript></entry>
904		    <entry>r<subscript>3</subscript></entry>
905		    <entry>r<subscript>2</subscript></entry>
906		    <entry>r<subscript>1</subscript></entry>
907		    <entry>r<subscript>0</subscript></entry>
908		    <entry></entry>
909		    <entry>g<subscript>7</subscript></entry>
910		    <entry>g<subscript>6</subscript></entry>
911		    <entry>g<subscript>5</subscript></entry>
912		    <entry>g<subscript>4</subscript></entry>
913		    <entry>g<subscript>3</subscript></entry>
914		    <entry>g<subscript>2</subscript></entry>
915		    <entry>g<subscript>1</subscript></entry>
916		    <entry>g<subscript>0</subscript></entry>
917		    <entry></entry>
918		    <entry>b<subscript>7</subscript></entry>
919		    <entry>b<subscript>6</subscript></entry>
920		    <entry>b<subscript>5</subscript></entry>
921		    <entry>b<subscript>4</subscript></entry>
922		    <entry>b<subscript>3</subscript></entry>
923		    <entry>b<subscript>2</subscript></entry>
924		    <entry>b<subscript>1</subscript></entry>
925		    <entry>b<subscript>0</subscript></entry>
926		  </row>
927		</tbody>
928	      </tgroup>
929	    </table>
930	
931	    <para>A test utility to determine which RGB formats a driver
932	actually supports is available from the LinuxTV v4l-dvb repository.
933	See &v4l-dvb; for access instructions.</para>
934	
935	  </refsect1>
936	    </refentry>
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.