summaryrefslogtreecommitdiffstats
path: root/Documentation/media/uapi/v4l/pixfmt-v4l2.rst
diff options
context:
space:
mode:
authorStanimir Varbanov <stanimir.varbanov@linaro.org>2019-05-30 05:33:12 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-05 12:41:39 -0400
commit84060c65a8fa14ea9974a8f15b8280517b869cdd (patch)
treea12087ff36a5ef5e4ad1f213f3d49a27d9e84892 /Documentation/media/uapi/v4l/pixfmt-v4l2.rst
parente96a8819a6c4fc578809ba79d64abca57145acb7 (diff)
downloadblackbird-op-linux-84060c65a8fa14ea9974a8f15b8280517b869cdd.tar.gz
blackbird-op-linux-84060c65a8fa14ea9974a8f15b8280517b869cdd.zip
media: media/doc: Allow sizeimage to be set by v4l clients
This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage field description to allow v4l clients to set bigger image size in case of variable length compressed data. Presently s5p-mfc and mtk-vcodec codec drivers use that. Lets make it obvious in the documentation. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'Documentation/media/uapi/v4l/pixfmt-v4l2.rst')
-rw-r--r--Documentation/media/uapi/v4l/pixfmt-v4l2.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/Documentation/media/uapi/v4l/pixfmt-v4l2.rst b/Documentation/media/uapi/v4l/pixfmt-v4l2.rst
index 71eebfc6d853..da6da2ef139a 100644
--- a/Documentation/media/uapi/v4l/pixfmt-v4l2.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-v4l2.rst
@@ -89,7 +89,18 @@ Single-planar format structure
- Size in bytes of the buffer to hold a complete image, set by the
driver. Usually this is ``bytesperline`` times ``height``. When
the image consists of variable length compressed data this is the
- maximum number of bytes required to hold an image.
+ number of bytes required by the codec to support the worst-case
+ compression scenario.
+
+ The driver will set the value for uncompressed images.
+
+ Clients are allowed to set the sizeimage field for variable length
+ compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at
+ :ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the
+ value itself, or it may modify the provided value based on
+ alignment requirements or minimum/maximum size requirements.
+ If the client wants to leave this to the driver, then it should
+ set sizeimage to 0.
* - __u32
- ``colorspace``
- Image colorspace, from enum :c:type:`v4l2_colorspace`.
OpenPOWER on IntegriCloud