{"id":25434,"url":"https://patchwork.libcamera.org/api/1.1/patches/25434/?format=json","web_url":"https://patchwork.libcamera.org/patch/25434/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251210005354.44726-18-bryan.odonoghue@linaro.org>","date":"2025-12-10T00:53:45","name":"[v7,17/26] libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"a86e6818e4a2bdcb146de7b82a1a6d9608104c0d","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25434/mbox/","series":[{"id":5645,"url":"https://patchwork.libcamera.org/api/1.1/series/5645/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5645","date":"2025-12-10T00:53:28","name":"Add GLES 2.0 GPUISP to libcamera","version":7,"mbox":"https://patchwork.libcamera.org/series/5645/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25434/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25434/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 00BF5C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:55:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B36F061424;\n\tWed, 10 Dec 2025 01:55:00 +0100 (CET)","from mail-pg1-x529.google.com (mail-pg1-x529.google.com\n\t[IPv6:2607:f8b0:4864:20::529])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1192961424\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:54:59 +0100 (CET)","by mail-pg1-x529.google.com with SMTP id\n\t41be03b00d2f7-ba599137cf8so136085a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:54:59 -0800 (PST)","from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-bf6875cc8eesm16057762a12.16.2025.12.09.16.54.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:54:57 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"xSf2bPqr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765328097; x=1765932897;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=jTYJymtzCsAowl8rGw3I7fYJccogJGKzN/gwiM7FOBQ=;\n\tb=xSf2bPqrvTu2CEERzEwM2oyIpIoVEJDhTIwJLytvsB6CGa5tcF2gzCcE7eZfqhSIM5\n\toPI+rs2mRp8UkJWBZci00Dqh3UxDRzhpZ+hgHuQqf4TgExC9VP7B723+THPpBcnQZTUS\n\tKEgFnhShJVLJtIF7aBlTz8IWc9uKnTtpNjMwozTPYHIxBkX33wTG58CioJjpZ6DP5cTl\n\ts7IwPhJJMoX2DWkj+1TD9egqzqAfucKMi9sUMOXsuAObhLP2Na92/zuIEMrDt7Vo/P3E\n\tXpKtNejr/kXVr/wWjfLru5RJyNTXlYMrVemhQlc4CfKM4r3qQTZJjSgBx4W05axoM6hj\n\tf6dw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765328097; x=1765932897;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=jTYJymtzCsAowl8rGw3I7fYJccogJGKzN/gwiM7FOBQ=;\n\tb=PBsUKQ/Y9QVcDlYj0ZW/LVVjHt4lZL+40f1d9bRlgZxFDBX3dr3RbfqvE4ZlfoukMs\n\tzuXsfkYemVgJIxkoF2atHNYrS/wIG300n9fTxfL0qvebDNBJuRHCyenIEDeDfTBQ7IJI\n\tmifNrpFHqJMxNW5b2L8V6RWupzkH+FEyzeQqlytDVD9xILaBguAguLKc88yqnKWkHOKK\n\th53VFe11a/ySWYUXAQwD6/RfPj+HPi2MQAJJggi2BxifhEKnG3tQQ3xFbCAwVWnfiCRd\n\t//P9cWwtTdF48hHTqiyp3Shnd34USxE2ZRXkxHUmpxk4fG5U8+ICrHlyzFfGMu6WFyA5\n\tWzhA==","X-Gm-Message-State":"AOJu0YwdG7w7XfBpIM7puNhrEjav0PTfiEKHGt9oaN2y+i/brNG0A/9D\n\t8TvvZ/kWnnguGRetGkVJD5O65U/VtkFm92qR3YstrBnSCWs9sO0Udeg+DRJDoQ5xYvc4bKsQm2L\n\tLB7ft","X-Gm-Gg":"ASbGnctt28b9jCItflNJkUK87M33B2CVlUFKu7T8aakskC96XIkWCWTaxnE19+EXbUu\n\tOKIeRjwOQXjwLTxNXTb3tF8EaSphKGRswbgDhCiWg6US3k90MhIsZqnwUuDoGQp+G8n1dCCs2pe\n\tb5y2ZG3rDpqOFlgOfuiLxz49SPv1hPAOpk/l2IqXAV4dmGrb393s8GYy9Q/PWLuTk+h4OmCPpBZ\n\t8ZDCuI2dYr897VFQPITZfrOubOxTEYU/eFcPLNW4ed+RSOsBLi8dBQ5ZwxaHT+vuR4+k/YGpzVy\n\tIdUMq04CLWi0pJkGqt9+Vi8Gg0G/uC3p95FkYvD/bSMpu3688aEAV6IajgYHA6LSorU1trwozjZ\n\tqr4ctRYgK92HsE9oWv50rQDJ0spAN8w9OQSMhzYW21QajCrimJdVeKSn5ZXKyrV39PBieBpTBvh\n\t2i3JTWrmqMhvm6HhGF++SfbDez+lJED3szZkfVel0bpiJIaMFTBLKW2BPpNF2T2KyM4K/ArU22r\n\twE=","X-Google-Smtp-Source":"AGHT+IEU3W3HXMVS2I/E0KyX8rep6aN5YVZW/R0NdvJ974rw8rN0CrbabZYu8HYePTsaM+kM7BXlog==","X-Received":"by 2002:a05:6a20:e293:b0:35f:84c7:4012 with SMTP id\n\tadf61e73a8af0-366db3fdc6fmr556527637.29.1765328097408; \n\tTue, 09 Dec 2025 16:54:57 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH v7 17/26] libcamera: software_isp: debayer_egl: Make\n\tDebayerEGL an environment option","Date":"Wed, 10 Dec 2025 00:53:45 +0000","Message-ID":"<20251210005354.44726-18-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251210005354.44726-1-bryan.odonoghue@linaro.org>","References":"<20251210005354.44726-1-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"If GPUISP support is available make it so an environment variable can\nswitch it on.\n\nGiven we don't have full feature parity with CPUISP just yet on pixel\nformat output, we should default to CPUISP mode giving the user the option\nto switch on GPUISP by setting LIBCAMERA_SOFTISP_MODE=gpu\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/software_isp.cpp | 24 ++++++++++++++++++++-\n 1 file changed, 23 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex b31a374d8..efe44e393 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -15,6 +15,7 @@\n \n #include <libcamera/base/log.h>\n #include <libcamera/base/thread.h>\n+#include <libcamera/base/utils.h>\n \n #include <libcamera/controls.h>\n #include <libcamera/formats.h>\n@@ -25,6 +26,9 @@\n #include \"libcamera/internal/software_isp/debayer_params.h\"\n \n #include \"debayer_cpu.h\"\n+#if HAVE_DEBAYER_EGL\n+#include \"debayer_egl.h\"\n+#endif\n \n /**\n  * \\file software_isp.cpp\n@@ -117,7 +121,25 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n \t}\n \tstats->statsReady.connect(this, &SoftwareIsp::statsReady);\n \n-\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+#if HAVE_DEBAYER_EGL\n+\tstd::optional<std::string> softISPMode = configuration.envOption(\"LIBCAMERA_SOFTISP_MODE\", { \"software_isp\", \"mode\" });\n+\n+\tif (softISPMode && softISPMode == \"gpu\") {\n+\t\tdebayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);\n+\t\tif (!debayer_) {\n+\t\t\tLOG(SoftwareIsp, Error) << \"Failed to instantiate GPUISP\";\n+\t\t\treturn;\n+\t\t}\n+\t}\n+#endif\n+\tif (!debayer_)\n+\t\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+\n+\tif (!debayer_) {\n+\t\tLOG(SoftwareIsp, Error) << \"Failed to create Debayer object\";\n+\t\treturn;\n+\t}\n+\n \tdebayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);\n \tdebayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);\n \n","prefixes":["v7","17/26"]}