libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option
If GPUISP support is available make it so an environment variable can switch it on. Given we don't have full feature parity with CPUISP just yet on pixel format output, we should default to CPUISP mode giving the user the option to switch on GPUISP by setting LIBCAMERA_SOFTISP_MODE=gpu 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
999d446475
commit
a92cc12fb5
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <libcamera/base/log.h>
|
||||
#include <libcamera/base/thread.h>
|
||||
#include <libcamera/base/utils.h>
|
||||
|
||||
#include <libcamera/controls.h>
|
||||
#include <libcamera/formats.h>
|
||||
@@ -25,6 +26,9 @@
|
||||
#include "libcamera/internal/software_isp/debayer_params.h"
|
||||
|
||||
#include "debayer_cpu.h"
|
||||
#if HAVE_DEBAYER_EGL
|
||||
#include "debayer_egl.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file software_isp.cpp
|
||||
@@ -117,7 +121,15 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
|
||||
}
|
||||
stats->statsReady.connect(this, &SoftwareIsp::statsReady);
|
||||
|
||||
debayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);
|
||||
#if HAVE_DEBAYER_EGL
|
||||
std::optional<std::string> softISPMode = configuration.envOption("LIBCAMERA_SOFTISP_MODE", { "software_isp", "mode" });
|
||||
|
||||
if (softISPMode && softISPMode == "gpu")
|
||||
debayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);
|
||||
#endif
|
||||
if (!debayer_)
|
||||
debayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);
|
||||
|
||||
debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);
|
||||
debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user