[libcamera-devel] [PATCH v1 2/3] pipeline: ipa: rpi: Return lens controls from ipa->configure()
Naushir Patuck
naush at raspberrypi.com
Thu Jun 1 11:56:29 CEST 2023
In addition to sensor controls, return lens controls from
IpaBase::configure() back to the pipeline handler. If there are lens
controls present in the ControlList, action them in the pipeline handler
as part of the configure routine.
Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
---
include/libcamera/ipa/raspberrypi.mojom | 3 ++-
src/ipa/rpi/common/ipa_base.cpp | 2 +-
src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom
index ba786e647ca1..4f20792e4679 100644
--- a/include/libcamera/ipa/raspberrypi.mojom
+++ b/include/libcamera/ipa/raspberrypi.mojom
@@ -46,7 +46,8 @@ struct ConfigParams {
struct ConfigResult {
float modeSensitivity;
libcamera.ControlInfoMap controlInfo;
- libcamera.ControlList controls;
+ libcamera.ControlList sensorControls;
+ libcamera.ControlList lensControls;
};
struct StartResult {
diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp
index db7a0eb3a1ca..599ad146a863 100644
--- a/src/ipa/rpi/common/ipa_base.cpp
+++ b/src/ipa/rpi/common/ipa_base.cpp
@@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa
applyAGC(&agcStatus, ctrls);
}
- result->controls = std::move(ctrls);
+ result->sensorControls = std::move(ctrls);
/*
* Apply the correct limits to the exposure, gain and frame duration controls
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index 3bb5ec531e4f..2ab0b971149a 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config
return -EPIPE;
}
- if (!result->controls.empty())
- setSensorControls(result->controls);
+ if (!result->sensorControls.empty())
+ setSensorControls(result->sensorControls);
+ if (!result->lensControls.empty())
+ setLensControls(result->lensControls);
return 0;
}
--
2.34.1
More information about the libcamera-devel
mailing list