About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

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




Custom Search

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