[v6,06/14] libcamera: mali-c55: Add stride and size to rawConfig
diff mbox series

Message ID 20241115101334.453104-7-dan.scally@ideasonboard.com
State Accepted
Headers show
Series
  • Miscellaneous Mali-C55 Pipeline Fixes
Related show

Commit Message

Dan Scally Nov. 15, 2024, 10:13 a.m. UTC
Complete the RAW StreamConfiguration by populating the frame stride and
the frame size.

Set the minimum required alignment to 4 bytes as the Mali C55 ISP output
expands RAW output to 16 bits and a RAW Bayer macro-pixel requires
two samples to be complete.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
---
Changes in v6:

	- None

Changes in v5:

	- None

 src/libcamera/pipeline/mali-c55/mali-c55.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
index 330006db..a35aa92a 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -366,6 +366,10 @@  CameraConfiguration::Status MaliC55CameraConfiguration::validate()
 
 		maxSize = rawSize;
 
+		const PixelFormatInfo &info = PixelFormatInfo::info(rawConfig->pixelFormat);
+		rawConfig->stride = info.stride(rawConfig->size.width, 0, 4);
+		rawConfig->frameSize = info.frameSize(rawConfig->size, 4);
+
 		rawConfig->setStream(const_cast<Stream *>(&data_->frStream_));
 		frPipeAvailable = false;
 	}