| Message ID | 20251011160335.50578-6-kieran.bingham@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Hi 2025. 10. 11. 18:03 keltezéssel, Kieran Bingham írta: > Pass the CameraSensorInfo in to the configure phase of the IPA from the > CameraSensor class, allowing the context to be used when configuring the > IPA. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > include/libcamera/ipa/soft.mojom | 1 + > src/libcamera/pipeline/simple/simple.cpp | 10 ++++++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom > index 3acac53981e7..7bdbb65b4458 100644 > --- a/include/libcamera/ipa/soft.mojom > +++ b/include/libcamera/ipa/soft.mojom > @@ -9,6 +9,7 @@ module ipa.soft; > import "include/libcamera/ipa/core.mojom"; > > struct IPAConfigInfo { > + libcamera.IPACameraSensorInfo sensorInfo; > libcamera.ControlInfoMap sensorControls; > }; > > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp > index a7e7ac25bac2..7d56effec50b 100644 > --- a/src/libcamera/pipeline/simple/simple.cpp > +++ b/src/libcamera/pipeline/simple/simple.cpp > @@ -1412,8 +1412,14 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) > if (data->converter_) { > return data->converter_->configure(inputCfg, outputCfgs); > } else { > - ipa::soft::IPAConfigInfo configInfo; > - configInfo.sensorControls = data->sensor_->controls(); > + IPACameraSensorInfo sensorInfo; > + ret = data->sensor_->sensorInfo(&sensorInfo); > + if (ret) > + return ret; > + > + ipa::soft::IPAConfigInfo configInfo{ sensorInfo, I think you could do `std::move(sensorInfo)`, or `data->sensor_->sensorInfo(&configInfo.sensorInfo)`. In any case, is this change a dependency of something else in this patch series? I cannot see anything, so if that's the case, I think it would be preferable to only make this change when it is actually needed. Regards, Barnabás Pőcze > + data->sensor_->controls() }; > + > return data->swIsp_->configure(inputCfg, outputCfgs, configInfo, &data->controlInfo_); > } > }
diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom index 3acac53981e7..7bdbb65b4458 100644 --- a/include/libcamera/ipa/soft.mojom +++ b/include/libcamera/ipa/soft.mojom @@ -9,6 +9,7 @@ module ipa.soft; import "include/libcamera/ipa/core.mojom"; struct IPAConfigInfo { + libcamera.IPACameraSensorInfo sensorInfo; libcamera.ControlInfoMap sensorControls; }; diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index a7e7ac25bac2..7d56effec50b 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -1412,8 +1412,14 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) if (data->converter_) { return data->converter_->configure(inputCfg, outputCfgs); } else { - ipa::soft::IPAConfigInfo configInfo; - configInfo.sensorControls = data->sensor_->controls(); + IPACameraSensorInfo sensorInfo; + ret = data->sensor_->sensorInfo(&sensorInfo); + if (ret) + return ret; + + ipa::soft::IPAConfigInfo configInfo{ sensorInfo, + data->sensor_->controls() }; + return data->swIsp_->configure(inputCfg, outputCfgs, configInfo, &data->controlInfo_); } }
Pass the CameraSensorInfo in to the configure phase of the IPA from the CameraSensor class, allowing the context to be used when configuring the IPA. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- include/libcamera/ipa/soft.mojom | 1 + src/libcamera/pipeline/simple/simple.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)