@@ -17,7 +17,8 @@ interface IPASoftInterface {
libcamera.SharedFD fdStats,
libcamera.SharedFD fdParams,
libcamera.IPACameraSensorInfo sensorInfo,
- libcamera.ControlInfoMap sensorControls)
+ libcamera.ControlInfoMap sensorControls,
+ bool gpuIspEnabled)
=> (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled);
start() => (int32 ret);
stop();
@@ -103,6 +103,7 @@ struct IPAContext {
FCQueue<IPAFrameContext> frameContexts;
ControlInfoMap::Map ctrlMap;
bool ccmEnabled = false;
+ bool gpuIspEnabled = false;
};
} /* namespace ipa::soft */
@@ -55,6 +55,7 @@ public:
const SharedFD &fdParams,
const IPACameraSensorInfo &sensorInfo,
const ControlInfoMap &sensorControls,
+ bool gpuIspEnabled,
ControlInfoMap *ipaControls,
bool *ccmEnabled) override;
int configure(const IPAConfigInfo &configInfo) override;
@@ -95,6 +96,7 @@ int IPASoftSimple::init(const IPASettings &settings,
const SharedFD &fdParams,
const IPACameraSensorInfo &sensorInfo,
const ControlInfoMap &sensorControls,
+ bool gpuIspEnabled,
ControlInfoMap *ipaControls,
bool *ccmEnabled)
{
@@ -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,6 +130,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
}
}
+ bool gpuIspEnabled;
+
#if HAVE_DEBAYER_EGL
if (!softISPMode || !strcmp(softISPMode, "gpu")) {
debayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);
@@ -137,10 +139,13 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
LOG(SoftwareIsp, Error) << "Failed to instantiate GPUISP";
return;
}
+ 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";
@@ -177,6 +182,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
sharedParams_.fd(),
sensorInfo,
sensor->controls(),
+ gpuIspEnabled,
ipaControls,
&ccmEnabled_);
if (ret) {
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 | 3 ++- src/ipa/simple/ipa_context.h | 1 + src/ipa/simple/soft_simple.cpp | 3 +++ src/libcamera/software_isp/software_isp.cpp | 8 +++++++- 4 files changed, 13 insertions(+), 2 deletions(-)