summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/vimc/vimc.cpp13
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp16
2 files changed, 29 insertions, 0 deletions
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index 0c0ee006..fb134084 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -34,6 +34,10 @@ public:
int start() override;
void stop() override;
+ int configure(const IPACameraSensorInfo &sensorInfo,
+ const std::map<unsigned int, IPAStream> &streamConfig,
+ const std::map<unsigned int, ControlInfoMap> &entityControls) override;
+
private:
void initTrace();
void trace(enum ipa::vimc::IPAOperationCode operation);
@@ -86,6 +90,15 @@ void IPAVimc::stop()
LOG(IPAVimc, Debug) << "stop vimc IPA!";
}
+int IPAVimc::configure([[maybe_unused]] const IPACameraSensorInfo &sensorInfo,
+ [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,
+ [[maybe_unused]] const std::map<unsigned int, ControlInfoMap> &entityControls)
+{
+ LOG(IPAVimc, Debug) << "configure()";
+
+ return 0;
+}
+
void IPAVimc::initTrace()
{
struct stat fifoStat;
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index d4b041d3..4c92729d 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -295,6 +295,22 @@ int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)
cfg.setStream(&data->stream_);
+ if (data->ipa_) {
+ /* Inform IPA of stream configuration and sensor controls. */
+ std::map<unsigned int, IPAStream> streamConfig;
+ streamConfig.emplace(std::piecewise_construct,
+ std::forward_as_tuple(0),
+ std::forward_as_tuple(cfg.pixelFormat, cfg.size));
+
+ std::map<unsigned int, ControlInfoMap> entityControls;
+ entityControls.emplace(0, data->sensor_->controls());
+
+ IPACameraSensorInfo sensorInfo;
+ data->sensor_->sensorInfo(&sensorInfo);
+
+ data->ipa_->configure(sensorInfo, streamConfig, entityControls);
+ }
+
return 0;
}