Patch Detail
Show a patch.
GET /api/1.1/patches/19285/?format=api
{ "id": 19285, "url": "https://patchwork.libcamera.org/api/1.1/patches/19285/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19285/", "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": "<20231206103839.16607-2-david.plowman@raspberrypi.com>", "date": "2023-12-06T10:38:38", "name": "[libcamera-devel,1/2] ipa: rpi: black_level: Add an initialValues method", "commit_ref": "8892d937c55ce2d62a5b0ee24c2b23b64366e73c", "pull_url": null, "state": "accepted", "archived": false, "hash": "c173880ebfdbfeebdb28487ce92770935f4f6466", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19285/mbox/", "series": [ { "id": 4105, "url": "https://patchwork.libcamera.org/api/1.1/series/4105/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4105", "date": "2023-12-06T10:38:37", "name": "IPA initial values for Raspberry Pi", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4105/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19285/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19285/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 26352C32BC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 6 Dec 2023 10:38:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AFC0E629E1;\n\tWed, 6 Dec 2023 11:38:46 +0100 (CET)", "from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50D2361D9D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 6 Dec 2023 11:38:44 +0100 (CET)", "by mail-wr1-x433.google.com with SMTP id\n\tffacd0b85a97d-33340c50af9so612263f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 02:38:44 -0800 (PST)", "from localhost.localdomain ([194.233.231.115])\n\tby smtp.gmail.com with ESMTPSA id\n\tw7-20020a5d6087000000b0033340937da6sm9733697wrt.95.2023.12.06.02.38.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 06 Dec 2023 02:38:43 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701859126;\n\tbh=VHu1D8QcGt3QTtWrGB09AuC+u5A4cHlLLdus5GFWFhc=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=V6xF+rQEvIFzAZvGli+/e5ttX6ShB3RrZTQWQc9jksyJ1p+sPMTKcfMpJeAsMVYgM\n\tn321AOVNx9OKujq0WrvcwhV+AJYKeM6JaNCwzwG4HMo9UQiwYdvzMqOL0uaqWrX77P\n\tUXoBPe9p44BBk3Gcl2QWnkXq58eUP4TmcAkx8wsKEGRW6S5vjrMpR/mu6+YlB65gCO\n\tdNE5GSKvzi9Wh5k+saho1wK7QoXWM/0Is/ZSB0FHw0NGB0180SBwGi9x4QqyyxZTAD\n\tpuSodCmp89NLPSlkx+6Xzy2OpVu5pqptiwX+TuMDHmzbn81KAT0BAUXcLUe7kgo+NQ\n\tkz5fesKoqAByA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701859123; x=1702463923;\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=KfdxpVw/nqOtJSbSlLwQZUu9ot11A/cqlOXqcakgcC0=;\n\tb=Z6bGHpfJaXh5ND1jJu+4iHAbyOS/MigiwweKtTD/4H5RN7m49sfdVErmT37+iMeB2R\n\t6IpjFaxOPFCn7HkOrkGU1TWCnvJMK5NHLJxAq34tWtGNvhVjYoWZ4fORD+W1c8OGiOdx\n\tT7KJ65FMgWVRo0OfGSuGDrLr3zLF9iAvo/0hk35oxjJXCyvi6aiCYUNIOs9q1Ixq5/ev\n\tpcBhqMH3WQV6DpIfV3Im66XwhDaI9Z4k04p21MGhjB6HDmwz/f3DfOB7OQQg2v24ATwt\n\tS0OcOa7srHaK24ntc2h1MOqC/4GqST68HjlDuhlnuIMEL/kq2JJTBvbKi++slD0FcAUJ\n\tvIoQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Z6bGHpfJ\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701859123; x=1702463923;\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=KfdxpVw/nqOtJSbSlLwQZUu9ot11A/cqlOXqcakgcC0=;\n\tb=UoGEmZ0NNNu2K0uyQi2Gpqh3ojwmolt7DnzS/leJNrrsIWP945sUF5ac8t6Vc2ATIB\n\t7I9ksHYHXwPft3CVtQQlmsAwsUn9aPEneuE/3DR+P6Wlgdsku7TsnlO5Nr1KT5V46U8Y\n\tBiKbJ6sDq5uYtELVDHXIMvHV07Ce3R1dGPz1LGoUs20Qjv/XcE3MAXTmKAIRZlnaSsYX\n\tPXgh8ypdKjtCTcyRwA+HlbjNKc7u+TMSMiHAIbOiNhauALWu7rpPutnQAiitBB5OppMg\n\tAd3yizYNXr9QtwrbMWcku2HeNzgO09hitt9qn1Z6ymDGCZikGEkl40h9jpC4WTydBOLt\n\trGlA==", "X-Gm-Message-State": "AOJu0Ywxd0YU9NKF2fEjIGuYUq6OK55jUWCkyeJlnxomViZ9vpnI71bZ\n\tlfSx7HsdQEHgQ/uazwJZiMSqs+gfAoMtScwwKmU=", "X-Google-Smtp-Source": "AGHT+IFDd1R6CByowznNthXLw1sqWQevBn76xueZKdHwnGytaTAddTFI3aXljUHSiMGgP9115RiluQ==", "X-Received": "by 2002:adf:f652:0:b0:333:3cf1:baaa with SMTP id\n\tx18-20020adff652000000b003333cf1baaamr255662wrp.60.1701859123434; \n\tWed, 06 Dec 2023 02:38:43 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 6 Dec 2023 10:38:38 +0000", "Message-Id": "<20231206103839.16607-2-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20231206103839.16607-1-david.plowman@raspberrypi.com>", "References": "<20231206103839.16607-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/2] ipa: rpi: black_level: Add an\n\tinitialValues method", "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>", "From": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "David Plowman <david.plowman@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This allows the IPA to discover the correct black level values even\nbefore any frames have been processed. This is important on the PiSP\nplatform where the front end black level blocks must be programmed in\nadvance.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n .../rpi/controller/black_level_algorithm.h | 23 +++++++++++++++++++\n src/ipa/rpi/controller/rpi/black_level.cpp | 10 +++++++-\n src/ipa/rpi/controller/rpi/black_level.h | 6 +++--\n 3 files changed, 36 insertions(+), 3 deletions(-)\n create mode 100644 src/ipa/rpi/controller/black_level_algorithm.h", "diff": "diff --git a/src/ipa/rpi/controller/black_level_algorithm.h b/src/ipa/rpi/controller/black_level_algorithm.h\nnew file mode 100644\nindex 00000000..c2cff2f5\n--- /dev/null\n+++ b/src/ipa/rpi/controller/black_level_algorithm.h\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) 2023, Raspberry Pi Ltd\n+ *\n+ * black_level_algorithm.h - black level control algorithm interface\n+ */\n+#pragma once\n+\n+#include \"algorithm.h\"\n+\n+namespace RPiController {\n+\n+class BlackLevelAlgorithm : public Algorithm\n+{\n+public:\n+\tBlackLevelAlgorithm(Controller *controller)\n+\t\t: Algorithm(controller) {}\n+\t/* A black level algorithm must provide the following: */\n+\tvirtual void initialValues(uint16_t &blackLevelR, uint16_t &blackLevelG,\n+\t\t\t\t uint16_t &blackLevelB) = 0;\n+};\n+\n+} /* namespace RPiController */\ndiff --git a/src/ipa/rpi/controller/rpi/black_level.cpp b/src/ipa/rpi/controller/rpi/black_level.cpp\nindex 85baec3f..2e3db51f 100644\n--- a/src/ipa/rpi/controller/rpi/black_level.cpp\n+++ b/src/ipa/rpi/controller/rpi/black_level.cpp\n@@ -22,7 +22,7 @@ LOG_DEFINE_CATEGORY(RPiBlackLevel)\n #define NAME \"rpi.black_level\"\n \n BlackLevel::BlackLevel(Controller *controller)\n-\t: Algorithm(controller)\n+\t: BlackLevelAlgorithm(controller)\n {\n }\n \n@@ -45,6 +45,14 @@ int BlackLevel::read(const libcamera::YamlObject ¶ms)\n \treturn 0;\n }\n \n+void BlackLevel::initialValues(uint16_t &blackLevelR, uint16_t &blackLevelG,\n+\t\t\t uint16_t &blackLevelB)\n+{\n+\tblackLevelR = blackLevelR_;\n+\tblackLevelG = blackLevelG_;\n+\tblackLevelB = blackLevelB_;\n+}\n+\n void BlackLevel::prepare(Metadata *imageMetadata)\n {\n \t/*\ndiff --git a/src/ipa/rpi/controller/rpi/black_level.h b/src/ipa/rpi/controller/rpi/black_level.h\nindex 2403f7f7..d8c41c62 100644\n--- a/src/ipa/rpi/controller/rpi/black_level.h\n+++ b/src/ipa/rpi/controller/rpi/black_level.h\n@@ -6,19 +6,21 @@\n */\n #pragma once\n \n-#include \"../algorithm.h\"\n+#include \"../black_level_algorithm.h\"\n #include \"../black_level_status.h\"\n \n /* This is our implementation of the \"black level algorithm\". */\n \n namespace RPiController {\n \n-class BlackLevel : public Algorithm\n+class BlackLevel : public BlackLevelAlgorithm\n {\n public:\n \tBlackLevel(Controller *controller);\n \tchar const *name() const override;\n \tint read(const libcamera::YamlObject ¶ms) override;\n+\tvoid initialValues(uint16_t &blackLevelR, uint16_t &blackLevelG,\n+\t\t\t uint16_t &blackLevelB) override;\n \tvoid prepare(Metadata *imageMetadata) override;\n \n private:\n", "prefixes": [ "libcamera-devel", "1/2" ] }