Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
46609297 926977e0

+16 -7
+16 -7
Documentation/DocBook/media/v4l/pixfmt.xml
··· 25 25 <row> 26 26 <entry>__u32</entry> 27 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 34 </row> 30 35 <row> 31 36 <entry spanname="hspan">Applications set these fields to ··· 59 54 can request to capture or output only the top or bottom field, or both 60 55 fields interlaced or sequentially stored in one buffer or alternating 61 56 in separate buffers. Drivers return the actual field order selected. 62 - For details see <xref linkend="field-order" />.</entry> 57 + For more details on fields see <xref linkend="field-order" />.</entry> 63 58 </row> 64 59 <row> 65 60 <entry>__u32</entry> ··· 86 81 example the Cb and Cr planes of a YUV 4:2:0 image have half as many 87 82 padding bytes following each line as the Y plane. To avoid ambiguities 88 83 drivers must return a <structfield>bytesperline</structfield> value 89 - rounded up to a multiple of the scale factor.</para></entry> 84 + rounded up to a multiple of the scale factor.</para> 85 + <para>For compressed formats the <structfield>bytesperline</structfield> 86 + value makes no sense. Applications and drivers must set this to 0 in 87 + that case.</para></entry> 90 88 </row> 91 89 <row> 92 90 <entry>__u32</entry> ··· 105 97 <entry>&v4l2-colorspace;</entry> 106 98 <entry><structfield>colorspace</structfield></entry> 107 99 <entry>This information supplements the 108 - <structfield>pixelformat</structfield> and must be set by the driver, 100 + <structfield>pixelformat</structfield> and must be set by the driver for 101 + capture streams and by the application for output streams, 109 102 see <xref linkend="colorspaces" />.</entry> 110 103 </row> 111 104 <row> ··· 144 135 <entry>__u16</entry> 145 136 <entry><structfield>bytesperline</structfield></entry> 146 137 <entry>Distance in bytes between the leftmost pixels in two adjacent 147 - lines.</entry> 138 + lines. See &v4l2-pix-format;.</entry> 148 139 </row> 149 140 <row> 150 141 <entry>__u16</entry> ··· 163 154 <row> 164 155 <entry>__u32</entry> 165 156 <entry><structfield>width</structfield></entry> 166 - <entry>Image width in pixels.</entry> 157 + <entry>Image width in pixels. See &v4l2-pix-format;.</entry> 167 158 </row> 168 159 <row> 169 160 <entry>__u32</entry> 170 161 <entry><structfield>height</structfield></entry> 171 - <entry>Image height in pixels.</entry> 162 + <entry>Image height in pixels. See &v4l2-pix-format;.</entry> 172 163 </row> 173 164 <row> 174 165 <entry>__u32</entry>