{"id":16969,"url":"https://patchwork.libcamera.org/api/patches/16969/?format=json","web_url":"https://patchwork.libcamera.org/patch/16969/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20220804141228.417211-3-fsylvestre@baylibre.com>","date":"2022-08-04T14:12:27","name":"[libcamera-devel,2/3] ipa: rkisp1: Add enable field for LSC algorithm in IPA context","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"38b4fba6dc22941a0a9b4eca6139ad23a5e008c3","submitter":{"id":123,"url":"https://patchwork.libcamera.org/api/people/123/?format=json","name":"Florian Sylvestre","email":"fsylvestre@baylibre.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16969/mbox/","series":[{"id":3374,"url":"https://patchwork.libcamera.org/api/series/3374/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3374","date":"2022-08-04T14:12:25","name":"Add DPF tuning support for RkISP1","version":1,"mbox":"https://patchwork.libcamera.org/series/3374/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16969/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16969/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 305E7C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Aug 2022 14:12:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DA15963311;\n\tThu,  4 Aug 2022 16:12:37 +0200 (CEST)","from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EF986330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Aug 2022 16:12:35 +0200 (CEST)","by mail-wr1-x432.google.com with SMTP id l4so25437739wrm.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 04 Aug 2022 07:12:35 -0700 (PDT)","from BL087.. ([2a01:e34:eea9:e630:d073:c231:2c43:c9cf])\n\tby smtp.gmail.com with ESMTPSA id\n\ti5-20020a05600c2d8500b003a325bd8517sm1616948wmg.5.2022.08.04.07.12.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 04 Aug 2022 07:12:34 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659622357;\n\tbh=GNwC3zjC1jCNOZKzZo0kO93iDmDcuxMvGGrXpi0gDqE=;\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=V0z3sLekBZzWfr3U3KQqvnyPPaW2wvDjfNSThJiK2QUNJsJe8RFl8XlWs01//Bv9Q\n\tIAU2atd4kFNvWrXf3RFaw4eUuX6C++2JDL66HI7Y+JCQShuG98ne8Qg9Y+XZ3Xxpd8\n\twww4dAFrhxqDxYoyUyZjLjHSI1Uo5Uh73s11MavwIPB5RF/cXhuw1jMfuLM4I8y31c\n\tWOiu/UnEzZE4Ia8hHZdTAmhzGDVcK4kYzbCJQVPH6PkvfLzi3H7GBoM2WXzTbsMkiU\n\tI+LKTvd3q9QFKQ9fQ0mGXmwgVOe9AVRTN+2Vtc0ca75+STfClymdjWTQIQGagGBajt\n\tG0gMMU5f/10ww==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=m8Kr0OoSI6uJhezdGMoEJR2sU/9PmcsvdeHRShlwbJ0=;\n\tb=lYCzCnWgsQFbGEnpEAJR7sWEhnOl+rwwIWH1weLcHwGU6DmQNSBLLLJCqcbwlrSdAW\n\tYZx1taCxQv9j80XjAiq8f6S1tN5S2pHevPrN1rjTf5VyGh2vAS9d84EVCMG3iZACTPcS\n\td1FHFtScotlGE6DvdBY8J2NHZ7WevpqdH9vrp8kT89DPNSVNGZnyDnmT0qGS5OSnXVMW\n\tS9Q7aYH1ZoZBoH4mEZWnzEzYh0D1mgrxSzYZJod0k1QLvfdNE5shyJPuDI5VQTpvSaUd\n\tm2ZdF4noyAFL951x2mgVuvVtLxUelJYrArWjDtxAv7t2oO33SzHpDalMYYIS7XiwGmIf\n\temLA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"lYCzCnWg\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=m8Kr0OoSI6uJhezdGMoEJR2sU/9PmcsvdeHRShlwbJ0=;\n\tb=D6bDkgtwRRqr3matyPgRXahiXFdpmhDFgo1a1q6HCBFs1QroW3bVzGKTw8zkDxuFZy\n\tiwLCpT6+pgnqvhi0si8ZMpDHPiTMI0T1dz8bggt5xhs6AW8TeySKq5t1XhvbFqZ5kVEY\n\t3MmcpKZShhVmIOyysPvHpUMj0XkRNVnIDRJygOZETkk/0MToqeRnyeVP7tii0q0pO40d\n\ta8XafGsT5qeSjNCpb3NSRAC5YQCRnLgGYjKfbxwcB8X6gWbOdkB7663+NiyS6T2efbf+\n\tYyG93sRqDdeFuqps8wfrliuOEajBH/rhJIW5c0uQGEzmYuGJqq+wihg6k8lVLsEJnEfK\n\t/Dzg==","X-Gm-Message-State":"ACgBeo3sJwH62mQJ7UyOaJMY5nWzNTBcI9P2IIhMEW3zTe3QemXAv3si\n\t7PbuDkJbVbA+hHxLb+5TuEStq/GEsVFZ6/it","X-Google-Smtp-Source":"AA6agR4nFcc1M/7r3E9k/xTnXBr52WPwHMYmVRX1uQMxr/+PJoJKYOJdNNTU2yYF/56ljzO5chxMBg==","X-Received":"by 2002:a5d:6d8f:0:b0:21d:b7d0:a913 with SMTP id\n\tl15-20020a5d6d8f000000b0021db7d0a913mr1548327wrs.462.1659622354877; \n\tThu, 04 Aug 2022 07:12:34 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  4 Aug 2022 16:12:27 +0200","Message-Id":"<20220804141228.417211-3-fsylvestre@baylibre.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220804141228.417211-1-fsylvestre@baylibre.com>","References":"<20220804141228.417211-1-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 2/3] ipa: rkisp1: Add enable field for LSC\n\talgorithm 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":"Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Florian Sylvestre <fsylvestre@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add 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>\n---\n src/ipa/rkisp1/algorithms/lsc.cpp | 10 ++++++++++\n src/ipa/rkisp1/algorithms/lsc.h   |  1 +\n src/ipa/rkisp1/ipa_context.cpp    |  9 +++++++++\n src/ipa/rkisp1/ipa_context.h      |  4 ++++\n 4 files changed, 24 insertions(+)","diff":"diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex 05c8c0da..da287ac7 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 fdb2ec1d..f68602c0 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 d833b8c7..c90bf992 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -92,6 +92,15 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Indicates if AWB is enabled\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 LSC is enabled\n+ *\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 7f7b3e4d..0cd6aadb 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","2/3"]}