[PATCH 7/7] libcamera: mali-c55: Record stride in rawConfig

Daniel Scally dan.scally at ideasonboard.com
Thu Jun 13 17:59:49 CEST 2024


The DNGWriter class needs to know the stride of a RAW image for some
of its uses. Add stride to rawConfig in the mali-c55 pipeline handler
so that it's available to DNGWriter.

Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---
 src/libcamera/pipeline/mali-c55/mali-c55.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
index 9cd243a3..a9ea2e04 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -382,6 +382,9 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate()
 
 		maxSize = rawSize;
 
+		const PixelFormatInfo &info = PixelFormatInfo::info(rawConfig->pixelFormat);
+		rawConfig->stride = info.stride(rawConfig->size.width, 0, 64);
+
 		rawConfig->setStream(const_cast<Stream *>(&data_->frStream_));
 		frPipeAvailable = false;
 	}
-- 
2.30.2



More information about the libcamera-devel mailing list