diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2011-01-09 07:01:10 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:31:35 -0400 |
commit | 269da4027c9a3466150308a9fe5f2a3a58336cd8 (patch) | |
tree | 6b94305caee3a233201852c834b5ba73d7ec5473 | |
parent | 4a3c9b4f0df43207eb0b4d0da9cb51e185506bd5 (diff) |
[media] v4l: Add DocBook documentation for YU12M, NV12M image formats
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/DocBook/media-entities.tmpl | 4 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt-nv12m.xml | 154 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt-yuv420m.xml | 162 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt.xml | 2 |
4 files changed, 322 insertions, 0 deletions
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 74923d745535..d2f99e5a3a2f 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl | |||
@@ -237,6 +237,7 @@ | |||
237 | <!ENTITY sub-io SYSTEM "v4l/io.xml"> | 237 | <!ENTITY sub-io SYSTEM "v4l/io.xml"> |
238 | <!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> | 238 | <!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> |
239 | <!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> | 239 | <!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> |
240 | <!ENTITY sub-nv12m SYSTEM "v4l/pixfmt-nv12m.xml"> | ||
240 | <!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> | 241 | <!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> |
241 | <!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> | 242 | <!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> |
242 | <!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> | 243 | <!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> |
@@ -251,6 +252,7 @@ | |||
251 | <!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> | 252 | <!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> |
252 | <!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> | 253 | <!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> |
253 | <!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> | 254 | <!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> |
255 | <!ENTITY sub-yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml"> | ||
254 | <!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> | 256 | <!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> |
255 | <!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> | 257 | <!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> |
256 | <!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> | 258 | <!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> |
@@ -337,6 +339,7 @@ | |||
337 | <!ENTITY write SYSTEM "v4l/func-write.xml"> | 339 | <!ENTITY write SYSTEM "v4l/func-write.xml"> |
338 | <!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml"> | 340 | <!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml"> |
339 | <!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml"> | 341 | <!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml"> |
342 | <!ENTITY nv12m SYSTEM "v4l/pixfmt-nv12m.xml"> | ||
340 | <!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml"> | 343 | <!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml"> |
341 | <!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> | 344 | <!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> |
342 | <!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> | 345 | <!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> |
@@ -351,6 +354,7 @@ | |||
351 | <!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> | 354 | <!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> |
352 | <!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> | 355 | <!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> |
353 | <!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> | 356 | <!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> |
357 | <!ENTITY yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml"> | ||
354 | <!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> | 358 | <!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> |
355 | <!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> | 359 | <!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> |
356 | <!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> | 360 | <!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> |
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/v4l/pixfmt-nv12m.xml new file mode 100644 index 000000000000..c9e166d9ded8 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-nv12m.xml | |||
@@ -0,0 +1,154 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-NV12M"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname> <constant>V4L2_PIX_FMT_NV12M</constant></refname> | ||
8 | <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> with planes | ||
9 | non contiguous in memory. </refpurpose> | ||
10 | </refnamediv> | ||
11 | <refsect1> | ||
12 | <title>Description</title> | ||
13 | |||
14 | <para>This is a multi-planar, two-plane version of the YUV 4:2:0 format. | ||
15 | The three components are separated into two sub-images or planes. | ||
16 | <constant>V4L2_PIX_FMT_NV12M</constant> differs from <constant>V4L2_PIX_FMT_NV12 | ||
17 | </constant> in that the two planes are non-contiguous in memory, i.e. the chroma | ||
18 | plane do not necessarily immediately follows the luma plane. | ||
19 | The luminance data occupies the first plane. The Y plane has one byte per pixel. | ||
20 | In the second plane there is a chrominance data with alternating chroma samples. | ||
21 | The CbCr plane is the same width, in bytes, as the Y plane (and of the image), | ||
22 | but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example, | ||
23 | Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to | ||
24 | Y'<subscript>00</subscript>, Y'<subscript>01</subscript>, | ||
25 | Y'<subscript>10</subscript>, Y'<subscript>11</subscript>. </para> | ||
26 | |||
27 | <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be | ||
28 | used only in drivers and applications that support the multi-planar API, | ||
29 | described in <xref linkend="planar-apis"/>. </para> | ||
30 | |||
31 | <para>If the Y plane has pad bytes after each row, then the | ||
32 | CbCr plane has as many pad bytes after its rows.</para> | ||
33 | |||
34 | <example> | ||
35 | <title><constant>V4L2_PIX_FMT_NV12M</constant> 4 × 4 pixel image</title> | ||
36 | |||
37 | <formalpara> | ||
38 | <title>Byte Order.</title> | ||
39 | <para>Each cell is one byte. | ||
40 | <informaltable frame="none"> | ||
41 | <tgroup cols="5" align="center"> | ||
42 | <colspec align="left" colwidth="2*" /> | ||
43 | <tbody valign="top"> | ||
44 | <row> | ||
45 | <entry>start0 + 0:</entry> | ||
46 | <entry>Y'<subscript>00</subscript></entry> | ||
47 | <entry>Y'<subscript>01</subscript></entry> | ||
48 | <entry>Y'<subscript>02</subscript></entry> | ||
49 | <entry>Y'<subscript>03</subscript></entry> | ||
50 | </row> | ||
51 | <row> | ||
52 | <entry>start0 + 4:</entry> | ||
53 | <entry>Y'<subscript>10</subscript></entry> | ||
54 | <entry>Y'<subscript>11</subscript></entry> | ||
55 | <entry>Y'<subscript>12</subscript></entry> | ||
56 | <entry>Y'<subscript>13</subscript></entry> | ||
57 | </row> | ||
58 | <row> | ||
59 | <entry>start0 + 8:</entry> | ||
60 | <entry>Y'<subscript>20</subscript></entry> | ||
61 | <entry>Y'<subscript>21</subscript></entry> | ||
62 | <entry>Y'<subscript>22</subscript></entry> | ||
63 | <entry>Y'<subscript>23</subscript></entry> | ||
64 | </row> | ||
65 | <row> | ||
66 | <entry>start0 + 12:</entry> | ||
67 | <entry>Y'<subscript>30</subscript></entry> | ||
68 | <entry>Y'<subscript>31</subscript></entry> | ||
69 | <entry>Y'<subscript>32</subscript></entry> | ||
70 | <entry>Y'<subscript>33</subscript></entry> | ||
71 | </row> | ||
72 | <row> | ||
73 | <entry></entry> | ||
74 | </row> | ||
75 | <row> | ||
76 | <entry>start1 + 0:</entry> | ||
77 | <entry>Cb<subscript>00</subscript></entry> | ||
78 | <entry>Cr<subscript>00</subscript></entry> | ||
79 | <entry>Cb<subscript>01</subscript></entry> | ||
80 | <entry>Cr<subscript>01</subscript></entry> | ||
81 | </row> | ||
82 | <row> | ||
83 | <entry>start1 + 4:</entry> | ||
84 | <entry>Cb<subscript>10</subscript></entry> | ||
85 | <entry>Cr<subscript>10</subscript></entry> | ||
86 | <entry>Cb<subscript>11</subscript></entry> | ||
87 | <entry>Cr<subscript>11</subscript></entry> | ||
88 | </row> | ||
89 | </tbody> | ||
90 | </tgroup> | ||
91 | </informaltable> | ||
92 | </para> | ||
93 | </formalpara> | ||
94 | |||
95 | <formalpara> | ||
96 | <title>Color Sample Location.</title> | ||
97 | <para> | ||
98 | <informaltable frame="none"> | ||
99 | <tgroup cols="7" align="center"> | ||
100 | <tbody valign="top"> | ||
101 | <row> | ||
102 | <entry></entry> | ||
103 | <entry>0</entry><entry></entry><entry>1</entry><entry></entry> | ||
104 | <entry>2</entry><entry></entry><entry>3</entry> | ||
105 | </row> | ||
106 | <row> | ||
107 | <entry>0</entry> | ||
108 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
109 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
110 | </row> | ||
111 | <row> | ||
112 | <entry></entry> | ||
113 | <entry></entry><entry>C</entry><entry></entry><entry></entry> | ||
114 | <entry></entry><entry>C</entry><entry></entry> | ||
115 | </row> | ||
116 | <row> | ||
117 | <entry>1</entry> | ||
118 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
119 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
120 | </row> | ||
121 | <row> | ||
122 | <entry></entry> | ||
123 | </row> | ||
124 | <row> | ||
125 | <entry>2</entry> | ||
126 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
127 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
128 | </row> | ||
129 | <row> | ||
130 | <entry></entry> | ||
131 | <entry></entry><entry>C</entry><entry></entry><entry></entry> | ||
132 | <entry></entry><entry>C</entry><entry></entry> | ||
133 | </row> | ||
134 | <row> | ||
135 | <entry>3</entry> | ||
136 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
137 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
138 | </row> | ||
139 | </tbody> | ||
140 | </tgroup> | ||
141 | </informaltable> | ||
142 | </para> | ||
143 | </formalpara> | ||
144 | </example> | ||
145 | </refsect1> | ||
146 | </refentry> | ||
147 | |||
148 | <!-- | ||
149 | Local Variables: | ||
150 | mode: sgml | ||
151 | sgml-parent-document: "pixfmt.sgml" | ||
152 | indent-tabs-mode: nil | ||
153 | End: | ||
154 | --> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt-yuv420m.xml b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml new file mode 100644 index 000000000000..f5d8f57495c8 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml | |||
@@ -0,0 +1,162 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-YUV420M"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname> <constant>V4L2_PIX_FMT_YUV420M</constant></refname> | ||
8 | <refpurpose>Variation of <constant>V4L2_PIX_FMT_YUV420</constant> | ||
9 | with planes non contiguous in memory. </refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsect1> | ||
13 | <title>Description</title> | ||
14 | |||
15 | <para>This is a multi-planar format, as opposed to a packed format. | ||
16 | The three components are separated into three sub- images or planes. | ||
17 | |||
18 | The Y plane is first. The Y plane has one byte per pixel. The Cb data | ||
19 | constitutes the second plane which is half the width and half | ||
20 | the height of the Y plane (and of the image). Each Cb belongs to four | ||
21 | pixels, a two-by-two square of the image. For example, | ||
22 | Cb<subscript>0</subscript> belongs to Y'<subscript>00</subscript>, | ||
23 | Y'<subscript>01</subscript>, Y'<subscript>10</subscript>, and | ||
24 | Y'<subscript>11</subscript>. The Cr data, just like the Cb plane, is | ||
25 | in the third plane. </para> | ||
26 | |||
27 | <para>If the Y plane has pad bytes after each row, then the Cb | ||
28 | and Cr planes have half as many pad bytes after their rows. In other | ||
29 | words, two Cx rows (including padding) is exactly as long as one Y row | ||
30 | (including padding).</para> | ||
31 | |||
32 | <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be | ||
33 | used only in drivers and applications that support the multi-planar API, | ||
34 | described in <xref linkend="planar-apis"/>. </para> | ||
35 | |||
36 | <example> | ||
37 | <title><constant>V4L2_PIX_FMT_YVU420M</constant> 4 × 4 | ||
38 | pixel image</title> | ||
39 | |||
40 | <formalpara> | ||
41 | <title>Byte Order.</title> | ||
42 | <para>Each cell is one byte. | ||
43 | <informaltable frame="none"> | ||
44 | <tgroup cols="5" align="center"> | ||
45 | <colspec align="left" colwidth="2*" /> | ||
46 | <tbody valign="top"> | ||
47 | <row> | ||
48 | <entry>start0 + 0:</entry> | ||
49 | <entry>Y'<subscript>00</subscript></entry> | ||
50 | <entry>Y'<subscript>01</subscript></entry> | ||
51 | <entry>Y'<subscript>02</subscript></entry> | ||
52 | <entry>Y'<subscript>03</subscript></entry> | ||
53 | </row> | ||
54 | <row> | ||
55 | <entry>start0 + 4:</entry> | ||
56 | <entry>Y'<subscript>10</subscript></entry> | ||
57 | <entry>Y'<subscript>11</subscript></entry> | ||
58 | <entry>Y'<subscript>12</subscript></entry> | ||
59 | <entry>Y'<subscript>13</subscript></entry> | ||
60 | </row> | ||
61 | <row> | ||
62 | <entry>start0 + 8:</entry> | ||
63 | <entry>Y'<subscript>20</subscript></entry> | ||
64 | <entry>Y'<subscript>21</subscript></entry> | ||
65 | <entry>Y'<subscript>22</subscript></entry> | ||
66 | <entry>Y'<subscript>23</subscript></entry> | ||
67 | </row> | ||
68 | <row> | ||
69 | <entry>start0 + 12:</entry> | ||
70 | <entry>Y'<subscript>30</subscript></entry> | ||
71 | <entry>Y'<subscript>31</subscript></entry> | ||
72 | <entry>Y'<subscript>32</subscript></entry> | ||
73 | <entry>Y'<subscript>33</subscript></entry> | ||
74 | </row> | ||
75 | <row><entry></entry></row> | ||
76 | <row> | ||
77 | <entry>start1 + 0:</entry> | ||
78 | <entry>Cb<subscript>00</subscript></entry> | ||
79 | <entry>Cb<subscript>01</subscript></entry> | ||
80 | </row> | ||
81 | <row> | ||
82 | <entry>start1 + 2:</entry> | ||
83 | <entry>Cb<subscript>10</subscript></entry> | ||
84 | <entry>Cb<subscript>11</subscript></entry> | ||
85 | </row> | ||
86 | <row><entry></entry></row> | ||
87 | <row> | ||
88 | <entry>start2 + 0:</entry> | ||
89 | <entry>Cr<subscript>00</subscript></entry> | ||
90 | <entry>Cr<subscript>01</subscript></entry> | ||
91 | </row> | ||
92 | <row> | ||
93 | <entry>start2 + 2:</entry> | ||
94 | <entry>Cr<subscript>10</subscript></entry> | ||
95 | <entry>Cr<subscript>11</subscript></entry> | ||
96 | </row> | ||
97 | </tbody> | ||
98 | </tgroup> | ||
99 | </informaltable> | ||
100 | </para> | ||
101 | </formalpara> | ||
102 | |||
103 | <formalpara> | ||
104 | <title>Color Sample Location.</title> | ||
105 | <para> | ||
106 | <informaltable frame="none"> | ||
107 | <tgroup cols="7" align="center"> | ||
108 | <tbody valign="top"> | ||
109 | <row> | ||
110 | <entry></entry> | ||
111 | <entry>0</entry><entry></entry><entry>1</entry><entry></entry> | ||
112 | <entry>2</entry><entry></entry><entry>3</entry> | ||
113 | </row> | ||
114 | <row> | ||
115 | <entry>0</entry> | ||
116 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
117 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
118 | </row> | ||
119 | <row> | ||
120 | <entry></entry> | ||
121 | <entry></entry><entry>C</entry><entry></entry><entry></entry> | ||
122 | <entry></entry><entry>C</entry><entry></entry> | ||
123 | </row> | ||
124 | <row> | ||
125 | <entry>1</entry> | ||
126 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
127 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
128 | </row> | ||
129 | <row> | ||
130 | <entry></entry> | ||
131 | </row> | ||
132 | <row> | ||
133 | <entry>2</entry> | ||
134 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
135 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
136 | </row> | ||
137 | <row> | ||
138 | <entry></entry> | ||
139 | <entry></entry><entry>C</entry><entry></entry><entry></entry> | ||
140 | <entry></entry><entry>C</entry><entry></entry> | ||
141 | </row> | ||
142 | <row> | ||
143 | <entry>3</entry> | ||
144 | <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry> | ||
145 | <entry>Y</entry><entry></entry><entry>Y</entry> | ||
146 | </row> | ||
147 | </tbody> | ||
148 | </tgroup> | ||
149 | </informaltable> | ||
150 | </para> | ||
151 | </formalpara> | ||
152 | </example> | ||
153 | </refsect1> | ||
154 | </refentry> | ||
155 | |||
156 | <!-- | ||
157 | Local Variables: | ||
158 | mode: sgml | ||
159 | sgml-parent-document: "pixfmt.sgml" | ||
160 | indent-tabs-mode: nil | ||
161 | End: | ||
162 | --> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index 28f9c700f752..f8436dcb7414 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -703,10 +703,12 @@ information.</para> | |||
703 | &sub-vyuy; | 703 | &sub-vyuy; |
704 | &sub-y41p; | 704 | &sub-y41p; |
705 | &sub-yuv420; | 705 | &sub-yuv420; |
706 | &sub-yuv420m; | ||
706 | &sub-yuv410; | 707 | &sub-yuv410; |
707 | &sub-yuv422p; | 708 | &sub-yuv422p; |
708 | &sub-yuv411p; | 709 | &sub-yuv411p; |
709 | &sub-nv12; | 710 | &sub-nv12; |
711 | &sub-nv12m; | ||
710 | &sub-nv16; | 712 | &sub-nv16; |
711 | </section> | 713 | </section> |
712 | 714 | ||