summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-01-23 15:49:23 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-01-30 16:30:43 +0000
commitc204a67bae262945cf5455e475e79a6b626a7827 (patch)
tree0c6ac90296d4d0573b45ff46b7fb9dd34e7db651 /src/ipa/raspberrypi/raspberrypi.cpp
parentd70c38dca8ea9b236e764106bad21ccc0a89b54c (diff)
pipeline: ipa: raspberrypi: Replace entityControls
Replace the legacy entityControls map passed into ipa::configure() with explicit fields for sensor and ISP controls. This removes any ambiguity over which set of controls corresponds with specific integer keys. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index f748b6e2..aa18ed75 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -119,9 +119,7 @@ public:
void start(const ControlList &controls, StartConfig *startConfig) override;
void stop() override {}
- int configure(const IPACameraSensorInfo &sensorInfo,
- const std::map<unsigned int, ControlInfoMap> &entityControls,
- const IPAConfig &data,
+ int configure(const IPACameraSensorInfo &sensorInfo, const IPAConfig &data,
ControlList *controls, IPAConfigResult *result) override;
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
void unmapBuffers(const std::vector<unsigned int> &ids) override;
@@ -380,18 +378,11 @@ void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)
mode_.sensitivity = helper_->getModeSensitivity(mode_);
}
-int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,
- const std::map<unsigned int, ControlInfoMap> &entityControls,
- const IPAConfig &ipaConfig,
+int IPARPi::configure(const IPACameraSensorInfo &sensorInfo, const IPAConfig &ipaConfig,
ControlList *controls, IPAConfigResult *result)
{
- if (entityControls.size() != 2) {
- LOG(IPARPI, Error) << "No ISP or sensor controls found.";
- return -1;
- }
-
- sensorCtrls_ = entityControls.at(0);
- ispCtrls_ = entityControls.at(1);
+ sensorCtrls_ = ipaConfig.sensorControls;
+ ispCtrls_ = ipaConfig.ispControls;
if (!validateSensorControls()) {
LOG(IPARPI, Error) << "Sensor control validation failed.";