aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-03-14 07:57:07 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-14 08:53:59 -0400
commit46609297e373c74a87acbb7e9f052a3ed8a8212c (patch)
tree20422a974f1676d674ac029508e52e412f8fc14c /Documentation
parent926977e0ae75567a87d95b245eea589a8bbb8682 (diff)
[media] DocBook media: clarify v4l2_pix_format and v4l2_pix_format_mplane fields
Be more specific with regards to how some of these fields are interpreted. In particular the height value and which fields can be set by the application. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml23
1 files changed, 16 insertions, 7 deletions
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index f535d9ba5111..ea514d6075c5 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -25,7 +25,12 @@ capturing and output, for overlay frame buffer formats see also
25 <row> 25 <row>
26 <entry>__u32</entry> 26 <entry>__u32</entry>
27 <entry><structfield>height</structfield></entry> 27 <entry><structfield>height</structfield></entry>
28 <entry>Image height in pixels.</entry> 28 <entry>Image height in pixels. If <structfield>field</structfield> is
29 one of <constant>V4L2_FIELD_TOP</constant>, <constant>V4L2_FIELD_BOTTOM</constant>
30 or <constant>V4L2_FIELD_ALTERNATE</constant> then height refers to the
31 number of lines in the field, otherwise it refers to the number of
32 lines in the frame (which is twice the field height for interlaced
33 formats).</entry>
29 </row> 34 </row>
30 <row> 35 <row>
31 <entry spanname="hspan">Applications set these fields to 36 <entry spanname="hspan">Applications set these fields to
@@ -54,7 +59,7 @@ linkend="reserved-formats" /></entry>
54can request to capture or output only the top or bottom field, or both 59can request to capture or output only the top or bottom field, or both
55fields interlaced or sequentially stored in one buffer or alternating 60fields interlaced or sequentially stored in one buffer or alternating
56in separate buffers. Drivers return the actual field order selected. 61in separate buffers. Drivers return the actual field order selected.
57For details see <xref linkend="field-order" />.</entry> 62For more details on fields see <xref linkend="field-order" />.</entry>
58 </row> 63 </row>
59 <row> 64 <row>
60 <entry>__u32</entry> 65 <entry>__u32</entry>
@@ -81,7 +86,10 @@ plane and is divided by the same factor as the
81example the Cb and Cr planes of a YUV 4:2:0 image have half as many 86example the Cb and Cr planes of a YUV 4:2:0 image have half as many
82padding bytes following each line as the Y plane. To avoid ambiguities 87padding bytes following each line as the Y plane. To avoid ambiguities
83drivers must return a <structfield>bytesperline</structfield> value 88drivers must return a <structfield>bytesperline</structfield> value
84rounded up to a multiple of the scale factor.</para></entry> 89rounded up to a multiple of the scale factor.</para>
90<para>For compressed formats the <structfield>bytesperline</structfield>
91value makes no sense. Applications and drivers must set this to 0 in
92that case.</para></entry>
85 </row> 93 </row>
86 <row> 94 <row>
87 <entry>__u32</entry> 95 <entry>__u32</entry>
@@ -97,7 +105,8 @@ hold an image.</entry>
97 <entry>&v4l2-colorspace;</entry> 105 <entry>&v4l2-colorspace;</entry>
98 <entry><structfield>colorspace</structfield></entry> 106 <entry><structfield>colorspace</structfield></entry>
99 <entry>This information supplements the 107 <entry>This information supplements the
100<structfield>pixelformat</structfield> and must be set by the driver, 108<structfield>pixelformat</structfield> and must be set by the driver for
109capture streams and by the application for output streams,
101see <xref linkend="colorspaces" />.</entry> 110see <xref linkend="colorspaces" />.</entry>
102 </row> 111 </row>
103 <row> 112 <row>
@@ -135,7 +144,7 @@ set this field to zero.</entry>
135 <entry>__u16</entry> 144 <entry>__u16</entry>
136 <entry><structfield>bytesperline</structfield></entry> 145 <entry><structfield>bytesperline</structfield></entry>
137 <entry>Distance in bytes between the leftmost pixels in two adjacent 146 <entry>Distance in bytes between the leftmost pixels in two adjacent
138 lines.</entry> 147 lines. See &v4l2-pix-format;.</entry>
139 </row> 148 </row>
140 <row> 149 <row>
141 <entry>__u16</entry> 150 <entry>__u16</entry>
@@ -154,12 +163,12 @@ set this field to zero.</entry>
154 <row> 163 <row>
155 <entry>__u32</entry> 164 <entry>__u32</entry>
156 <entry><structfield>width</structfield></entry> 165 <entry><structfield>width</structfield></entry>
157 <entry>Image width in pixels.</entry> 166 <entry>Image width in pixels. See &v4l2-pix-format;.</entry>
158 </row> 167 </row>
159 <row> 168 <row>
160 <entry>__u32</entry> 169 <entry>__u32</entry>
161 <entry><structfield>height</structfield></entry> 170 <entry><structfield>height</structfield></entry>
162 <entry>Image height in pixels.</entry> 171 <entry>Image height in pixels. See &v4l2-pix-format;.</entry>
163 </row> 172 </row>
164 <row> 173 <row>
165 <entry>__u32</entry> 174 <entry>__u32</entry>