@@ -18,7 +18,7 @@ interface IPASoftInterface {
libcamera.SharedFD fdParams,
libcamera.IPACameraSensorInfo sensorInfo,
libcamera.ControlInfoMap sensorControls)
- => (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled);
+ => (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled, bool gpuIspEnabled);
start() => (int32 ret);
stop();
configure(IPAConfigInfo configInfo)
@@ -103,6 +103,7 @@ struct IPAContext {
FCQueue<IPAFrameContext> frameContexts;
ControlInfoMap::Map ctrlMap;
bool ccmEnabled = false;
+ bool gpuIspEnabled = false;
};
} /* namespace ipa::soft */
@@ -56,7 +56,8 @@ public:
const IPACameraSensorInfo &sensorInfo,
const ControlInfoMap &sensorControls,
ControlInfoMap *ipaControls,
- bool *ccmEnabled) override;
+ bool *ccmEnabled,
+ bool *gpuIspEnabled) override;
int configure(const IPAConfigInfo &configInfo) override;
int start() override;
@@ -96,7 +97,8 @@ int IPASoftSimple::init(const IPASettings &settings,
const IPACameraSensorInfo &sensorInfo,
const ControlInfoMap &sensorControls,
ControlInfoMap *ipaControls,
- bool *ccmEnabled)
+ bool *ccmEnabled,
+ bool *gpuIspEnabled)
{
camHelper_ = CameraSensorHelperFactoryBase::create(settings.sensorModel);
if (!camHelper_) {
@@ -106,6 +108,7 @@ int IPASoftSimple::init(const IPASettings &settings,
}
context_.sensorInfo = sensorInfo;
+ context_.gpuIspEnabled = *gpuIspEnabled;
/* Load the tuning data file */
File file(settings.configurationFile);
@@ -130,12 +130,18 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
}
}
+ bool gpuIspEnabled;
+
#if HAVE_DEBAYER_EGL
- if (!softISPMode || !strcmp(softISPMode, "gpu"))
+ if (!softISPMode || !strcmp(softISPMode, "gpu")) {
debayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);
+ gpuIspEnabled = true;
+ }
#endif
- if (!debayer_)
+ if (!debayer_) {
debayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);
+ gpuIspEnabled = false;
+ }
if (!debayer_) {
LOG(SoftwareIsp, Error) << "Failed to create Debayer object";
@@ -173,7 +179,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
sensorInfo,
sensor->controls(),
ipaControls,
- &ccmEnabled_);
+ &ccmEnabled_,
+ &gpuIspEnabled);
if (ret) {
LOG(SoftwareIsp, Error) << "IPA init failed";
debayer_.reset();
Flag gpuIspEnabled in the simple IPA context. This flag will allow to selectively avoid some calculations or to generate a default CCM. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- include/libcamera/ipa/soft.mojom | 2 +- src/ipa/simple/ipa_context.h | 1 + src/ipa/simple/soft_simple.cpp | 7 +++++-- src/libcamera/software_isp/software_isp.cpp | 13 ++++++++++--- 4 files changed, 17 insertions(+), 6 deletions(-)