[libcamera-devel] [PATCH] pipeline: rpi: Respect provided stride

William Vinnicombe william.vinnicombe at raspberrypi.com
Mon Dec 11 18:14:06 CET 2023


When converting from StreamConfiguration to V4L2DeviceFormat, the stride
was being dropped.

Set the stride in the V4L2DeviceFormat to prevent this happening.

Signed-off-by: William Vinnicombe <william.vinnicombe at raspberrypi.com>
---
 src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index 9f788c9d..5afa8dbb 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -367,6 +367,7 @@ V4L2DeviceFormat PipelineHandlerBase::toV4L2DeviceFormat(const V4L2VideoDevice *
 	deviceFormat.planesCount = info.numPlanes();
 	deviceFormat.fourcc = dev->toV4L2PixelFormat(stream->pixelFormat);
 	deviceFormat.size = stream->size;
+	deviceFormat.planes[0].bpl = stream->stride;
 	deviceFormat.colorSpace = stream->colorSpace;
 
 	return deviceFormat;
-- 
2.39.2



More information about the libcamera-devel mailing list