summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2023-08-22 18:49:34 +0530
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-08-29 10:40:25 +0300
commitae9bcb2155957da3b6324676d706a901acb8343f (patch)
tree849e02425f25e2bd5c9fb871c9bf1bacd0e40ca4
parent26ac1a8e3fc52cb2035ad88b7d22f034a68f50c7 (diff)
libcamera: stream: Document stride will be 0 for compressed formats
For compressed formats, v4l2_pix_format.bytesperline value will be zero and is documented similarly in the kernel. Since we set the stride to v4l2_pix_format.bytesperline, document the case where it is expected to be zero (i.e. if the format is compressed). Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/libcamera/stream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index 272222b7..f3e00ead 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -311,7 +311,8 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
* The stride value reports the number of bytes between the beginning of
* successive lines in an image buffer for this stream. The value is
* valid after successfully validating the configuration with a call to
- * CameraConfiguration::validate().
+ * CameraConfiguration::validate(). For compressed formats (such as MJPEG),
+ * this value will be zero.
*/
/**