[v3,3/3] libcamera: ipa: core: Add IPACameraSensorInfo::pixelArraySize property
diff mbox series

Message ID 20260908135949.3842255-4-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Clarify rectangle behavior
Related show

Commit Message

Stefan Klug Sept. 8, 2026, 1:56 p.m. UTC
Add a IPACameraSensorInfo::pixelArraySize property to communicate the
full size of the pixel array to the IPA. This property is not used today
but will be useful to do sanity checks on coordinates handled in the
algorithms.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

---

Changes in v3:
- Collected tag
---
 include/libcamera/ipa/core.mojom              | 6 ++++++
 src/libcamera/sensor/camera_sensor_legacy.cpp | 1 +
 src/libcamera/sensor/camera_sensor_raw.cpp    | 1 +
 3 files changed, 8 insertions(+)

Patch
diff mbox series

diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
index 32ff25bbfc2b..4e7d75b02c04 100644
--- a/include/libcamera/ipa/core.mojom
+++ b/include/libcamera/ipa/core.mojom
@@ -152,6 +152,11 @@  module libcamera;
  * RGB for sensors that don't have a CFA.
  */
 
+/**
+ * \var IPACameraSensorInfo::pixelArraySize
+ * \brief The size of the physical pixel array of the sensor in pixels
+ */
+
 /**
  * \var IPACameraSensorInfo::activeArea
  * \brief The active pixel area of the sensor, relative to the physical pixel
@@ -250,6 +255,7 @@  struct IPACameraSensorInfo {
 	uint32 bitsPerPixel;
 	uint32 cfaPattern;
 
+	Size pixelArraySize;
 	Rectangle activeArea;
 	Rectangle analogCrop;
 	Size outputSize;
diff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp
index a4d94a25690b..e8d2f21e6175 100644
--- a/src/libcamera/sensor/camera_sensor_legacy.cpp
+++ b/src/libcamera/sensor/camera_sensor_legacy.cpp
@@ -887,6 +887,7 @@  int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const
 		return -EINVAL;
 
 	info->model = model();
+	info->pixelArraySize = pixelArraySize_;
 
 	/*
 	 * The active area is a static property, while the crop rectangle needs
diff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp
index 3974295ee418..34558478b2a6 100644
--- a/src/libcamera/sensor/camera_sensor_raw.cpp
+++ b/src/libcamera/sensor/camera_sensor_raw.cpp
@@ -1007,6 +1007,7 @@  int CameraSensorRaw::setEmbeddedDataEnabled(bool enable)
 int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const
 {
 	info->model = model();
+	info->pixelArraySize = pixelArraySize_;
 
 	/*
 	 * The active area is a static property, while the crop rectangle needs