Patch Detail
Show a patch.
GET /api/1.1/patches/25225/?format=api
{ "id": 25225, "url": "https://patchwork.libcamera.org/api/1.1/patches/25225/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25225/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20251127022256.178929-12-bryan.odonoghue@linaro.org>", "date": "2025-11-27T02:22:43", "name": "[v2,11/22] libcamera: software_isp: Move param select code to Debayer base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "44bd0718fe6cad16f30dbbea9a4ea2d753665f5c", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25225/mbox/", "series": [ { "id": 5616, "url": "https://patchwork.libcamera.org/api/1.1/series/5616/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5616", "date": "2025-11-27T02:22:32", "name": "GPUISP precursor series", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5616/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25225/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25225/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 140F7C32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:23:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8895560AB3;\n\tThu, 27 Nov 2025 03:23:30 +0100 (CET)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D8CC8609DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:23:27 +0100 (CET)", "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-4779a637712so1750725e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:23:27 -0800 (PST)", "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4790b0e21e8sm71549495e9.15.2025.11.26.18.23.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:23:26 -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=\"jlAzLN9a\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764210207; x=1764815007;\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=bm3VvIoYtilkRcrlkHwpUjR5oXGGomKqNNLnlTko1eo=;\n\tb=jlAzLN9acVCnUfe8841H8sYcF2aeAVgo3jbuiLRVa7PzUm8UNmYSXkmqK73NgRWcV3\n\tWaGJXqJIIgf1wCMari4fOm/WRFmKU/l5QGXgg7PqNq8ZLQ+de+hOMRg1t1F1mVnFwg7+\n\tkTUjMVK3Gw6rrzXkVn3oIN7wHxWmcYr6OiUV1eA7XfoYa2dTlEPqCNBNxMT/g4ydkaTI\n\ty9AeaIf3BWK1dwng92p7tAQbTYMEIK7uOFpb6Dk1nCgBtQxpbC33BQEEg1k8EAre9PyJ\n\t6AsJ/obm7aR6UwlqF43ACm0+3Ug5zDbR2Ri/yMLeN3vS42dGAdRhege526HIZjRflr9a\n\tu9BQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764210207; x=1764815007;\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=bm3VvIoYtilkRcrlkHwpUjR5oXGGomKqNNLnlTko1eo=;\n\tb=l9oeurKlmt4iu3jggV2Nq9hHyM4LdsL+GW0DmPv809+ibrQcM1N1IBIwC8DU5HZecT\n\tj477oUVdlSi3jluBkeMTHWe62uGI9TmUkL6IpP8alcxGaDFNh79N5x9AzYB+01lWY/I9\n\tCwkzEw0UaK8IwjW+2xdgMzBkef5MTlaMfBLW7LGJZS/5XeGZEG2XEj6dfFdxVun03hl+\n\twS9D787zOQqqhlLhdDKqpif+mXv7PYtrDy9eKEL1oYPBQouBOHyMeBG9QhqfK4XB6HHJ\n\tnvMzchAt1ESAgd1gUIEZmZY49RtQ+9qrrDtsCWXvN6CInnio64/5nZ5KN2LllsiW4jrF\n\tSSuA==", "X-Gm-Message-State": "AOJu0Ywd8VP/7GT6mGAie4dflAgP24zvsQ/lDc0ND14eySFD6nz7gAcl\n\t9v6jcLdv+Z9H/fsslmOCBgEs5yJCnKZRSrA+NMZYaPiTelkicog9dZOF71FIuOCd12x6Pmol+Jv\n\tezXRk2qo=", "X-Gm-Gg": "ASbGncv6e1K8qt/vvUu92oKRptUZNavZOcIR4DTBIlxCZmTKzyEgRKy/TD5SK5zGRzW\n\t8K/iLQUXxMto1afbE2uaW3aB3NQVURnJLOAmxcq3IiCEZq7p4NNI3DlX4RKcWMnNIwrRR+dUKWY\n\tr+NlgoY4a5Es4aLY7lICLX/3vHssbmAl7REhr7ol+xg4rdRkz2hOxOmDYFjQFoi/3FcJjcU9YO7\n\tpwm+ehWvVAKZvooOA4q0dFdAZ90HC6OifxEfk8dEcvfXHcmKaeHj+fDfz+cdXEguVtDiJ0Z71q0\n\tNz0KNg1EJ78UleJVHDTTbYsOCcYZ0m1/f8f3IPqlNRMx452Cv+GTP4RpsoV6hMUpt7yZHPngAuh\n\tiUyGLdSjMkECCpx3XEigFwe0Jqa5IYAvaUEYpBVj+FqvIAlkWtWBdmDXRdMrPn5ixkI6Lrn35IO\n\tXNnnDZRiM65c4dvHalDvloPYHb97Y+aY5BaOU+9Q49pytlYenvgpG6QEe0oRRtamqMsHU=", "X-Google-Smtp-Source": "AGHT+IHUIbsxLRKbPJXH8ntpEMQFKbJjN3FBt5OHbba4Qd7y0U6mD/tVB631aZ5vTxvsEiWYmlPBQg==", "X-Received": "by 2002:a05:600c:4e87:b0:46d:a04:50c6 with SMTP id\n\t5b1f17b1804b1-477c01ebc76mr208671775e9.30.1764210207264; \n\tWed, 26 Nov 2025 18:23:27 -0800 (PST)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>", "Subject": "[PATCH v2 11/22] libcamera: software_isp: Move param select code to\n\tDebayer base class", "Date": "Thu, 27 Nov 2025 02:22:43 +0000", "Message-ID": "<20251127022256.178929-12-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251127022256.178929-1-bryan.odonoghue@linaro.org>", "References": "<20251127022256.178929-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\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.cpp | 28 ++++++++++++++++++++++\n src/libcamera/software_isp/debayer.h | 3 +++\n src/libcamera/software_isp/debayer_cpu.cpp | 20 +---------------\n 3 files changed, 32 insertions(+), 19 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 8cadfaadc..cea30af67 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -336,4 +336,32 @@ Debayer::~Debayer()\n * debayer processing.\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(greenCcm_[i].r, greenCcm_[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 f4373ddeb..6903caae8 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -83,6 +83,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 8f42d706b..6be5cdbd5 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -758,25 +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(greenCcm_[i].r, greenCcm_[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": [ "v2", "11/22" ] }