From ae9bcb2155957da3b6324676d706a901acb8343f Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Tue, 22 Aug 2023 18:49:34 +0530 Subject: 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 Reviewed-by: Nicolas Dufresne Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- src/libcamera/stream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libcamera/stream.cpp') 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. */ /** -- cgit v1.2.1