[libcamera-devel] [PATCH v1 5/9] ipa: raspberrypi: Add pixel clock rate to the CameraMode structure

Naushir Patuck naush at raspberrypi.com
Mon Oct 3 10:39:31 CEST 2022


The pixel clock rate will be used in subsequent commits to calculate line
length durations.

Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
---
 src/ipa/raspberrypi/controller/camera_mode.h | 2 ++
 src/ipa/raspberrypi/raspberrypi.cpp          | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h
index cda6ac4e200a..b8dae386aee8 100644
--- a/src/ipa/raspberrypi/controller/camera_mode.h
+++ b/src/ipa/raspberrypi/controller/camera_mode.h
@@ -39,4 +39,6 @@ struct CameraMode {
 	uint32_t minFrameLength, maxFrameLength;
 	/* sensitivity of this mode */
 	double sensitivity;
+	/* pixel clock rate */
+	uint64_t pixelRate;
 };
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 9b0ad4361c97..b6289f151677 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -331,6 +331,7 @@ void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)
 	mode_.sensorHeight = sensorInfo.activeAreaSize.height;
 	mode_.cropX = sensorInfo.analogCrop.x;
 	mode_.cropY = sensorInfo.analogCrop.y;
+	mode_.pixelRate = sensorInfo.pixelRate;
 
 	/*
 	 * Calculate scaling parameters. The scale_[xy] factors are determined
-- 
2.25.1



More information about the libcamera-devel mailing list