ipa: simple: Add a flag to indicate gpuIspEnabled
Flag gpuIspEnabled in the simple IPA context. This flag will allow to selectively avoid some calculations or to generate a default CCM. Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Tested-by: Robert Mader <robert.mader@collabora.com> Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen 6 (arm64) ov02c10 + X1c gen 12 ov08x40 Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # Lenovo X13s Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
a92cc12fb5
commit
fe9e143702
@@ -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();
|
||||
|
||||
@@ -105,6 +105,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);
|
||||
|
||||
@@ -121,14 +121,20 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
|
||||
}
|
||||
stats->statsReady.connect(this, &SoftwareIsp::statsReady);
|
||||
|
||||
bool gpuIspEnabled;
|
||||
|
||||
#if HAVE_DEBAYER_EGL
|
||||
std::optional<std::string> softISPMode = configuration.envOption("LIBCAMERA_SOFTISP_MODE", { "software_isp", "mode" });
|
||||
|
||||
if (softISPMode && softISPMode == "gpu")
|
||||
if (softISPMode && 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;
|
||||
}
|
||||
|
||||
debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);
|
||||
debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);
|
||||
@@ -160,6 +166,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
|
||||
sharedParams_.fd(),
|
||||
sensorInfo,
|
||||
sensor->controls(),
|
||||
gpuIspEnabled,
|
||||
ipaControls,
|
||||
&ccmEnabled_);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user