{"id":17135,"url":"https://patchwork.libcamera.org/api/1.1/patches/17135/?format=json","web_url":"https://patchwork.libcamera.org/patch/17135/","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":"<20220816015414.7462-9-laurent.pinchart@ideasonboard.com>","date":"2022-08-16T01:54:13","name":"[libcamera-devel,v4,8/9] ipa: rkisp1: Add enable field for LSC algorithm in IPA context","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"0161a65903ac6d4d2584b1ffd02b2d2c80609ab4","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17135/mbox/","series":[{"id":3418,"url":"https://patchwork.libcamera.org/api/1.1/series/3418/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3418","date":"2022-08-16T01:54:05","name":"Add DPF tuning support for RkISP1","version":4,"mbox":"https://patchwork.libcamera.org/series/3418/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17135/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17135/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 2D76DC3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Aug 2022 01:54:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF7FC61FD0;\n\tTue, 16 Aug 2022 03:54:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7783661FC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Aug 2022 03:54:39 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 12A4D496;\n\tTue, 16 Aug 2022 03:54:39 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660614882;\n\tbh=sDaSbu1INieInB7Qjnm73vNt08k2g+vxXl857Mh5A0M=;\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=dJFpEEx5rEgJM9Q4H3IUjGZaswc4oYX7Xk/jVd8xZiWGBJKOJF4LnNQg/GuM7oLKy\n\t2sDCfli7VwHvVlTSoLuoutBSZdRQqXSAhymhBqfsqzJ25kTOoPUNA17riSu8DyHi1X\n\tYO3qU4CoWKqmDPpZuCft8cIiZ8UFC7Itzq97McJ6xDPB8IepbpUA8iHQHvP+8aMpkv\n\tI1UKs1UkVlQ0EHOrQkzut70fA1ro2RL3LljxmzOHatDJSjDm01sfmxnFX9MQIfiBIE\n\thIxSdqhyUPS1B3Fq/FJpwZOnQ2lYxPVObLNHxA6kaWo08Q1VpOiwIMQQOy6u5cScA9\n\tmzeSI+Uw5fzDA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660614879;\n\tbh=sDaSbu1INieInB7Qjnm73vNt08k2g+vxXl857Mh5A0M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Da9HOl7RgSoYsXg4Xf8p1A9I9fuurruzRtDxqaFDGW2q4V+zqgX//WNXacCz4XUrp\n\tdUrorjagz531x56A6I2jS2QAE8h0D+ZwEfaSMDBm4TaGKK9ZASer65tLxO5qVC6mfn\n\tW8T6oxJaLtCFeUBNZTBNwemhNfkr4F1N4ZJp10Dw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Da9HOl7R\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 16 Aug 2022 04:54:13 +0300","Message-Id":"<20220816015414.7462-9-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220816015414.7462-1-laurent.pinchart@ideasonboard.com>","References":"<20220816015414.7462-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 8/9] ipa: rkisp1: Add enable field for\n\tLSC algorithm in IPA context","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Florian Sylvestre <fsylvestre@baylibre.com>\n\nAdd an enable variable in the lsc struct in IPASessionConfiguration which\nindicates if the lsc algorithm has been configured. This will allow other\nalgorithms to retrieve this information.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\nChanges since v1:\n\n- Improve documentation\n---\n src/ipa/rkisp1/algorithms/lsc.cpp | 10 ++++++++++\n src/ipa/rkisp1/algorithms/lsc.h   |  1 +\n src/ipa/rkisp1/ipa_context.cpp    |  8 ++++++++\n src/ipa/rkisp1/ipa_context.h      |  4 ++++\n 4 files changed, 23 insertions(+)","diff":"diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex 05c8c0dab5c8..da287ac7af75 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.cpp\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -119,6 +119,16 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,\n \treturn 0;\n }\n \n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::configure\n+ */\n+int LensShadingCorrection::configure(IPAContext &context,\n+\t\t\t\t     [[maybe_unused]] const IPACameraSensorInfo &configInfo)\n+{\n+\tcontext.configuration.lsc.enabled = initialized_;\n+\treturn 0;\n+}\n+\n /**\n  * \\copydoc libcamera::ipa::Algorithm::prepare\n  */\ndiff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h\nindex fdb2ec1dd27d..f68602c005c4 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.h\n+++ b/src/ipa/rkisp1/algorithms/lsc.h\n@@ -20,6 +20,7 @@ public:\n \t~LensShadingCorrection() = default;\n \n \tint init(IPAContext &context, const YamlObject &tuningData) override;\n+\tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n \n private:\ndiff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 23a63f8c6e25..1a549c092d73 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -92,6 +92,14 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Indicates if the AWB hardware is enabled to apply colour gains\n  */\n \n+/**\n+ * \\var IPASessionConfiguration::lsc\n+ * \\brief Lens Shading Correction configuration of the IPA\n+ *\n+ * \\var IPASessionConfiguration::lsc.enabled\n+ * \\brief Indicates if the LSC hardware is enabled\n+ */\n+\n /**\n  * \\var IPASessionConfiguration::sensor\n  * \\brief Sensor-specific configuration of the IPA\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex 7f7b3e4d88fa..0cd6aadb83ed 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -32,6 +32,10 @@ struct IPASessionConfiguration {\n \t\tbool enabled;\n \t} awb;\n \n+\tstruct {\n+\t\tbool enabled;\n+\t} lsc;\n+\n \tstruct {\n \t\tutils::Duration lineDuration;\n \t\tSize size;\n","prefixes":["libcamera-devel","v4","8/9"]}