Patch Detail
Show a patch.
GET /api/patches/25414/?format=api
{ "id": 25414, "url": "https://patchwork.libcamera.org/api/patches/25414/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25414/", "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": "<20251210003139.43606-19-bryan.odonoghue@linaro.org>", "date": "2025-12-10T00:31:35", "name": "[v4,18/20] libcamera: software_isp: blacklevel: Make black level available in debayer params", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "be9658f023e730c939ef09754cec17d1cee8a74c", "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/25414/mbox/", "series": [ { "id": 5644, "url": "https://patchwork.libcamera.org/api/series/5644/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5644", "date": "2025-12-10T00:31:17", "name": "GPUISP precursor series", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5644/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25414/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25414/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 71FCDBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:32:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 225936146D;\n\tWed, 10 Dec 2025 01:32:46 +0100 (CET)", "from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com\n\t[IPv6:2607:f8b0:4864:20::1029])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1C2760C8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:32:43 +0100 (CET)", "by mail-pj1-x1029.google.com with SMTP id\n\t98e67ed59e1d1-34374febdefso6438861a91.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:32:43 -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\t98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:32:41 -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=\"yhfqAPYj\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765326762; x=1765931562;\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=Kru8M1HJGgHeXu29L+zRVlgMziV5HaccffXT1tFN0HU=;\n\tb=yhfqAPYjDEYOt7M9bsaFvy0lRIfiRgSs8n9beDGy4StoxqfUaCtifhxAI46HGMd7bP\n\tSRI67W859Y3Jbgea9urSY0deP22R+8dlw6OO5qAkXrYN/HUsUYCgYbdcoQGw3IMjlN20\n\t6RM82FvVyitILWyVvOyqmaGKcJ/XNcdYgD/GpeQtcYFJ4ZasMxyc0RNmIw5igDFplV7h\n\tvusZkNgfYbXw/n2+WxKEzDrkWUD1azaqVRyHpCSTKm/kttYhxPKRCNUeqBc1n40RIcp7\n\ti6R+Q/Nu1NNKdPissCX5EiROrDif8x7i8NA9nopi/0HiNvw1reDx+wk0T3SuZpJ0P5Yt\n\tdAVw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765326762; x=1765931562;\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=Kru8M1HJGgHeXu29L+zRVlgMziV5HaccffXT1tFN0HU=;\n\tb=ehL4dFNe6omcj8QMkmvqootugb3YISltEEACYqVYJFNJzxIEGTj8conWNo8+F7uWZR\n\tirqWb9ASTKwIK0ssiUUJZFGeKNKc95KfA842HQQddF5xJ4ekj8bbfMTJGdswzQHel3xS\n\tbuEdyEklEOrxNqJtg6YgfSIPZ2IJxJgYOVbGyU30I7aHizLiXO15La74ey6KP6NYrdvf\n\tUSLIUG4Ql0vKh5TeZ9oavgEd8JVu5mrzKkSUi7WE4NnKnleJaq1GL7uBRZi0QTFYbwi6\n\tAPualawX1YYGQgUgClX7D2Ng24JQ1BmhjXMYzBAoX7UYKn9aVt4Rpbs59QWz1x+mcX3O\n\tQAPQ==", "X-Gm-Message-State": "AOJu0YwFvpgEv9ZYjryDQsb2eRrzDMixBxabMENXfUv9itPr+rg4cIoZ\n\thHthEoUduNG83TAC85CATLjvjerdqUTFOs07p23+UnDUqAcngWvntBt00/TvWypqb5Qk26yV2TZ\n\t8zdEc", "X-Gm-Gg": "AY/fxX4BZqkqX9y0R1nehGkm3MypXvOhkEPqLxgKRRwhSRXkJS2j/gZKGSqg6mpe/6F\n\ty3A66TpEmRMg0HPvfh/zOtDw3jqXHTOuvakvTKId17ICusJPdHBVMXBZYkvwTjKhetj+LBi0mT4\n\t6aB6VMGJiy5hvkt5UisXBLaNDp0Z5OmkyuED0O9nKmtfhSPFrLqbCpAghn/zB5XKK2JJV72K1h1\n\t9N1BeNGDVBZkNe5mMfxbxXBlxLHXkE8y/71F7+x8f3WCh4X+sedAoEjGR0RHY4PSNs8v1/9ESKu\n\tKJVg5t+MOuoHt/9Febs43XngIZHAvfXZyXnzctROc1OF6yKu8Zj53Fpu3WKkexgRkaUTkj38kdp\n\tQYVq47PAo5xQ3ZRv1U/qqIkd8lngXiR8o4dZOU+Agh03Oubjmb5OstGLuo7W1Zbl56ep0tgyfFY\n\tCwuzRypxXhcdaULON0+fPI7/Sr8n42zgxSLU34CZ7orhUakOGU+EvvcHF7rz01xgLU", "X-Google-Smtp-Source": "AGHT+IHCNvs/v7Pq1S4v6HwvljFJyjYcIidV9rnvz0A48/opndAVgHAD+kOXLfny76fELl8V6FTPYw==", "X-Received": "by 2002:a17:90b:4d:b0:341:719b:768e with SMTP id\n\t98e67ed59e1d1-34a72890df4mr486861a91.2.1765326762110; \n\tTue, 09 Dec 2025 16:32:42 -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 v4 18/20] libcamera: software_isp: blacklevel: Make black\n\tlevel available in debayer params", "Date": "Wed, 10 Dec 2025 00:31:35 +0000", "Message-ID": "<20251210003139.43606-19-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251210003139.43606-1-bryan.odonoghue@linaro.org>", "References": "<20251210003139.43606-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": "Populate black level gain in blacklevel::prepare(). A copy is made of the gain\nvalue in the DebayerParams structure.\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 include/libcamera/internal/software_isp/debayer_params.h | 2 ++\n src/ipa/simple/algorithms/blc.cpp | 9 +++++++++\n src/ipa/simple/algorithms/blc.h | 4 ++++\n src/libcamera/software_isp/debayer.cpp | 5 +++++\n 4 files changed, 20 insertions(+)", "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 4b203e211..5a0d9438f 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -14,6 +14,7 @@\n #include <stdint.h>\n \n #include \"libcamera/internal/matrix.h\"\n+#include \"libcamera/internal/vector.h\"\n \n namespace libcamera {\n \n@@ -56,6 +57,7 @@ struct DebayerParams {\n \t * Per frame corrections as calculated by the IPA\n \t */\n \tMatrix<float, 3, 3> ccm;\n+\tRGB<float> blackLevel;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp\nindex 370385afc..464e43c27 100644\n--- a/src/ipa/simple/algorithms/blc.cpp\n+++ b/src/ipa/simple/algorithms/blc.cpp\n@@ -47,6 +47,15 @@ int BlackLevel::configure(IPAContext &context,\n \treturn 0;\n }\n \n+void BlackLevel::prepare(IPAContext &context,\n+\t\t\t [[maybe_unused]] const uint32_t frame,\n+\t\t\t [[maybe_unused]] IPAFrameContext &frameContext,\n+\t\t\t DebayerParams *params)\n+{\n+\t/* Latch the blacklevel gain so GPUISP can apply. */\n+\tparams->blackLevel = RGB<float>(context.activeState.blc.level / 255.0f);\n+}\n+\n void BlackLevel::process(IPAContext &context,\n \t\t\t [[maybe_unused]] const uint32_t frame,\n \t\t\t IPAFrameContext &frameContext,\ndiff --git a/src/ipa/simple/algorithms/blc.h b/src/ipa/simple/algorithms/blc.h\nindex db9e6d639..a5592d087 100644\n--- a/src/ipa/simple/algorithms/blc.h\n+++ b/src/ipa/simple/algorithms/blc.h\n@@ -24,6 +24,10 @@ public:\n \n \tint init(IPAContext &context, const YamlObject &tuningData) override;\n \tint configure(IPAContext &context, const IPAConfigInfo &configInfo) override;\n+\tvoid prepare(IPAContext &context,\n+\t\t const uint32_t frame,\n+\t\t IPAFrameContext &frameContext,\n+\t\t DebayerParams *params) override;\n \tvoid process(IPAContext &context, const uint32_t frame,\n \t\t IPAFrameContext &frameContext,\n \t\t const SwIspStats *stats,\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 0ee23f36c..34460f316 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -105,6 +105,11 @@ namespace libcamera {\n * \\brief Per frame colour correction matrix for GPUISP\n */\n \n+/**\n+ * \\var DebayerParams::blackLevel\n+ * \\brief Blacklevel gains for the GPUISP\n+ */\n+\n /**\n * \\class Debayer\n * \\brief Base debayering class\n", "prefixes": [ "v4", "18/20" ] }