From: Hans Verkuil <hverkuil@xs4all.nl>
To: Linux Media Mailing List <linux-media@vger.kernel.org>,
"nicolas.dufresne@collabora.com >> Nicolas Dufresne"
<nicolas.dufresne@collabora.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Pawel Osciak <pawel@osciak.com>
Subject: [RFC PATCH] Docbook/media: improve data_offset/bytesused documentation
Date: Mon, 21 Jul 2014 15:16:47 +0200 [thread overview]
Message-ID: <53CD12BF.9050202@xs4all.nl> (raw)
This patch explicitly documents the relationship between bytesused and data_offset.
But looking in the kernel there isn't a single driver that actually sets data_offset.
Do such beasts exist? It's also annoying that there is no such equivalent for the
single planar API, so it is asymmetrical. What was the reason that we never did that
for single planar? Because existing applications wouldn't know what to do with it?
Regards,
Hans
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 8c4ee74..e5e8325 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -870,7 +870,8 @@ should set this to 0.</entry>
If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the
plane (see the <structfield>length</structfield> field of this struct)
- by the driver.</entry>
+ by the driver. Note that the actual image data starts at
+ <structfield>data_offset</structfield> which may not be 0.</entry>
</row>
<row>
<entry>__u32</entry>
@@ -919,6 +920,10 @@ should set this to 0.</entry>
<entry>Offset in bytes to video data in the plane.
Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream.
+ Note that data_offset is included in <structfield>bytesused</structfield>.
+ So the size of the image in the plane is
+ <structfield>bytesused</structfield>-<structfield>data_offset</structfield> at
+ offset <structfield>data_offset</structfield> from the start of the plane.
</entry>
</row>
<row>
next reply other threads:[~2014-07-21 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 13:16 Hans Verkuil [this message]
2014-07-21 13:30 ` [RFC PATCH] Docbook/media: improve data_offset/bytesused documentation Nicolas Dufresne
2014-07-25 7:59 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CD12BF.9050202@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=nicolas.dufresne@collabora.com \
--cc=pawel@osciak.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.