Patch Detail
Show a patch.
GET /api/patches/24656/?format=api
{ "id": 24656, "url": "https://patchwork.libcamera.org/api/patches/24656/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24656/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251015012251.17508-12-bryan.odonoghue@linaro.org>", "date": "2025-10-15T01:22:23", "name": "[v3,11/39] libcamera: software_isp: Move param select code to Debayer base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5c86a0f719ecc9ddd3bf345138568e668d75648b", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24656/mbox/", "series": [ { "id": 5503, "url": "https://patchwork.libcamera.org/api/series/5503/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5503", "date": "2025-10-15T01:22:12", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5503/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24656/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24656/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 80303C3331\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 01:23:16 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F4986061D;\n\tWed, 15 Oct 2025 03:23:16 +0200 (CEST)", "from mail-ej1-x629.google.com (mail-ej1-x629.google.com\n\t[IPv6:2a00:1450:4864:20::629])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1303060622\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 03:23:06 +0200 (CEST)", "by mail-ej1-x629.google.com with SMTP id\n\ta640c23a62f3a-b3f5e0e2bf7so1113267166b.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 18:23:06 -0700 (PDT)", "from inspiron14p-linux.nxsw.local (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b5ccd7b202dsm98348466b.82.2025.10.14.18.23.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Oct 2025 18:23:04 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"AwPr4qEC\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1760491385; x=1761096185;\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=FfMDGj8P0x7z1LvkPhcFidNlN8u1agxdsMEloe1hujg=;\n\tb=AwPr4qECFBQ78mGqmarLNLW1X1gOPlbFEu4m/Y6T3yiui/pedZD5z7pynHeHpMpy4I\n\t3drfhWwLOaPyrAd+PlaVlRVYZOrFZPRkNk6KAnjFpyIFcDcm1gTXmmiGGEV6et5mPLHN\n\tpXYT1VJEf8rXN/FWr8KmopHQ5Dj1XUKXiZabgaCy1YUAlnaDpxQA8pxgYqSzuDmSbhyv\n\tckHQyvBUecC2V4Pcgjgq+mCF4LGecG6lcj23te++lwcAp9QpK9aLM8ru3672e3F5Crzp\n\tXVdOQjTvhliSslseidybo8MCNpaKqL0JYTZS95qGM28ix8qdAOPo8hhCz7DJhqsKNnOt\n\tZjfA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1760491385; x=1761096185;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=FfMDGj8P0x7z1LvkPhcFidNlN8u1agxdsMEloe1hujg=;\n\tb=UI6wNY6RZAHf30IEuAnffQX8h/ux3Sf0QEUNrVPesjxXSGwVx0Fi71KHxg17ICDC+x\n\txcDbZHqjauAVcPnkSmM4IlxjIrmolgovvLbiDHVLlytk+HRMlU2fXz7legteW7vzV7sH\n\thWBACOSQyBM579ORpcTXX8WDLsi9LdeaWQTdQ6aN/kMXgj6gJKgBItzd33q6lFSMVGZ4\n\ttxWAUa74jYET1GMIAAK/rv5BYIWMI3qy79Xo9VwB8zzAhYqd2maxTcuEX3GIXJhWyoVN\n\tGBgoLYILH7lGZIWEjJOVWjcaCz2n2Tb8nV5KeUsnwKvl338KQ2/bn7TdIpRAv8HEWRhd\n\trrfw==", "X-Gm-Message-State": "AOJu0YxCCk3+/kIymkDRrXrqzouAM1wcSByUB+zpH8ChNZprdE2swWtT\n\tro62DlX+ZrlDnXv4mPXNkJqmOLTvNOUNFsXHuA7qvV2EHuqBU4WSeJVylv6z+5v6kiCWyMLXPG7\n\tidLLr", "X-Gm-Gg": "ASbGnctTTyn9JRRN3irE821Dvc30zpZlvVV5WOl0CJ4BHZ4XMGW5Em6FWDJaf1rBgE5\n\tPIucEG3dF1QeaA/6Lxy/tLYEfUgHCI9dPHxym91ZqrUYU9D4RJ0Tt5aXD4ana2FxSLKOffwd9bL\n\t/Yi9lUtovhY7CZGbD4a7XXfiFJgd5YvRCQzBnhUq0zhsMagdETI4w1iAkZBkPOUfMeRwL81Jt6U\n\tx8bW6W2f1cWOJNTggzYzOmQsBe0zcuj6hq4PyROLslppbGSMZpOc6XjCu0i0vmeWiwfQPRUGQnj\n\ty6nxeD4RKM+hoh89gMh7I6N+b3co52LaKhDryPdkroJEB8w/M6X+FP5PWljM03kBWiDRng1vkEO\n\t+FgpZwaidCRx4k9sBq4LJLEG9K00tcAqSLG35dR5fckSpX9GfQDflMVdyKLCN6pCqmHekVWC5l8\n\teHp3w5Q3rPBUgY4Sa5ut9Bmt9B6nAiQh5r9VYpv0Hl", "X-Google-Smtp-Source": "AGHT+IEdriDcKM4RN1llZOayHWGsZIX6OrNV5NzV2kfdl2PFxSWnluIcPy9vFpV2AwikpZThgJ+Vvw==", "X-Received": "by 2002:a17:907:72d3:b0:b4f:4940:6a23 with SMTP id\n\ta640c23a62f3a-b50aa899e80mr2831672766b.24.1760491385306; \n\tTue, 14 Oct 2025 18:23:05 -0700 (PDT)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie", "Subject": "[PATCH v3 11/39] libcamera: software_isp: Move param select code to\n\tDebayer base class", "Date": "Wed, 15 Oct 2025 02:22:23 +0100", "Message-ID": "<20251015012251.17508-12-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251015012251.17508-1-bryan.odonoghue@linaro.org>", "References": "<20251015012251.17508-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": "Move the parameter selection code into the Debayer base class in-order to\nfacilitate reuse of the lookup tables in the eGL shaders.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.cpp | 27 ++++++++++++++++++++++\n src/libcamera/software_isp/debayer.h | 3 +++\n src/libcamera/software_isp/debayer_cpu.cpp | 19 +--------------\n 3 files changed, 31 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 937d5e2e..cf74b92b 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -187,4 +187,31 @@ Debayer::~Debayer()\n * \\brief Signals when the output buffer is ready\n */\n \n+/**\n+ * \\fn void Debayer::setParams(DebayerParams ¶ms)\n+ * \\brief Select the bayer params to use for the next frame debayer\n+ * \\param[in] params The parameters to be used in debayering\n+ */\n+void Debayer::setParams(DebayerParams ¶ms)\n+{\n+\tgreen_ = params.green;\n+\tgreenCcm_ = params.greenCcm;\n+\tif (swapRedBlueGains_) {\n+\t\tred_ = params.blue;\n+\t\tblue_ = params.red;\n+\t\tredCcm_ = params.blueCcm;\n+\t\tblueCcm_ = params.redCcm;\n+\t\tfor (unsigned int i = 0; i < 256; i++) {\n+\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n+\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n+\t\t}\n+\t} else {\n+\t\tred_ = params.red;\n+\t\tblue_ = params.blue;\n+\t\tredCcm_ = params.redCcm;\n+\t\tblueCcm_ = params.blueCcm;\n+\t}\n+\tgammaLut_ = params.gammaLut;\n+}\n+\n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex 2cbf0823..c04c289d 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -93,6 +93,9 @@ public:\n \n private:\n \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n+\n+protected:\n+\tvoid setParams(DebayerParams ¶ms);\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 42a0f374..6be5cdbd 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -758,24 +758,7 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n \tfor (const FrameBuffer::Plane &plane : output->planes())\n \t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n \n-\tgreen_ = params.green;\n-\tgreenCcm_ = params.greenCcm;\n-\tif (swapRedBlueGains_) {\n-\t\tred_ = params.blue;\n-\t\tblue_ = params.red;\n-\t\tredCcm_ = params.blueCcm;\n-\t\tblueCcm_ = params.redCcm;\n-\t\tfor (unsigned int i = 0; i < 256; i++) {\n-\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n-\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n-\t\t}\n-\t} else {\n-\t\tred_ = params.red;\n-\t\tblue_ = params.blue;\n-\t\tredCcm_ = params.redCcm;\n-\t\tblueCcm_ = params.blueCcm;\n-\t}\n-\tgammaLut_ = params.gammaLut;\n+\tsetParams(params);\n \n \t/* Copy metadata from the input buffer */\n \tFrameMetadata &metadata = output->_d()->metadata();\n", "prefixes": [ "v3", "11/39" ] }