From 592d1349f719db7c071ba9f4ade272be114b4196 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 21 Jul 2014 10:16:47 -0300 Subject: [media] Docbook/media: improve data_offset/bytesused documentation This patch explicitly documents the relationship between bytesused and data_offset. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media/v4l/io.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index 8c4ee746a73..e5e8325aa3d 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml @@ -870,7 +870,8 @@ should set this to 0. If the application sets this to 0 for an output stream, then bytesused will be set to the size of the plane (see the length field of this struct) - by the driver. + by the driver. Note that the actual image data starts at + data_offset which may not be 0. __u32 @@ -919,6 +920,10 @@ should set this to 0. Offset in bytes to video data in the plane. Drivers must set this field when type refers to an input stream, applications when it refers to an output stream. + Note that data_offset is included in bytesused. + So the size of the image in the plane is + bytesused-data_offset at + offset data_offset from the start of the plane. -- cgit v1.2.3-70-g09d2