[PATCH 21/27] libcamera: software_isp: debayer_egl: Make DebayerEGL the default debayer method
Bryan O'Donoghue
bryan.odonoghue at linaro.org
Tue Apr 22 23:59:14 CEST 2025
Try the EGL debayer method, if that fails then try the CPU version
before bailing out entirely.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
---
src/libcamera/software_isp/software_isp.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp
index c3dc21de..e4c7fda1 100644
--- a/src/libcamera/software_isp/software_isp.cpp
+++ b/src/libcamera/software_isp/software_isp.cpp
@@ -25,6 +25,7 @@
#include "libcamera/internal/software_isp/debayer_params.h"
#include "debayer_cpu.h"
+#include "debayer_egl.h"
/**
* \file software_isp.cpp
@@ -114,7 +115,17 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
}
stats->statsReady.connect(this, &SoftwareIsp::statsReady);
- debayer_ = std::make_unique<DebayerCpu>(std::move(stats));
+ //TODO: derive the selection from file/environment variable
+ debayer_ = std::make_unique<DebayerEGL>(std::move(stats));
+ if (!debayer_) {
+ LOG(SoftwareIsp, Error) << "Failed to create DebayerEGL object";
+ debayer_ = std::make_unique<DebayerCpu>(std::move(stats));
+ if (!debayer_) {
+ LOG(SoftwareIsp, Error) << "Failed to create DebayerCPUGL object";
+ return;
+ }
+ }
+
debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);
debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);
--
2.49.0
More information about the libcamera-devel
mailing list