[{"id":24580,"web_url":"https://patchwork.libcamera.org/comment/24580/","msgid":"<e09b91e7-743b-23e8-38b0-ef8bad09822e@ideasonboard.com>","date":"2022-08-15T15:54:45","subject":"Re: [libcamera-devel] [PATCH v3 2/3] ipa: rkisp1: Add enable field\n\tfor LSC algorithm in IPA context","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Florian, Laurent,\n\n\nOn 8/13/22 04:03, Laurent Pinchart via libcamera-devel wrote:\n> From: Florian Sylvestre <fsylvestre@baylibre.com>\n>\n> Add an enable variable in the lsc struct in IPASessionConfiguration which\n> indicates if the lsc algorithm has been configured. This will allow other\n> algorithms to retrieve this information.\n>\n> Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n> Changes 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(+)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index 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>    */\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h\n> index 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:\n> diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\n> index 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\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 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;","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 24448BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Aug 2022 15:54:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E35A761FC0;\n\tMon, 15 Aug 2022 17:54:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8203961FB9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Aug 2022 17:54:51 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a731:6fd:fef1:9e01:7e0f] (unknown\n\t[IPv6:2401:4900:1f3f:a731:6fd:fef1:9e01:7e0f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E4654A8;\n\tMon, 15 Aug 2022 17:54:50 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660578892;\n\tbh=JzigiDGmiVE6Upvprvyqsd4MwqwkORst2qhWNN+8Cwo=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Qycuuu1s3VsKDqc1g3Np5YOKn5A7dXvPMfwBl2NH13xRfXfg1G0yYpMpgYuKujyZY\n\tS50S23xFN2WIEryV+kV+lqMZP2qGnQJHQVHbtkUmNlpuNl+89w2mHZ+eTBfZTgWNaK\n\tpwlXuYHRA2HYbRZuO9udJUTt1e4Kx8hlUZ+4SL2fVP23OwGNn/LANemMH+Z+hth7aB\n\tQVRrgrEnjJhYT+l8cU/d70HnXPI6JioVhjBDRKB1tBZh6ZKL3rnXyYmP9QXyrRa+UT\n\tQI38Z6n8Q4IaDl5+I2nRIPa96FYejlXfZ6YgyIgo5QTgAGsXY6xP0i5xKn7Y6Plwny\n\te9e+RTuT/EGbw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660578891;\n\tbh=JzigiDGmiVE6Upvprvyqsd4MwqwkORst2qhWNN+8Cwo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=UXi0jvjc2YHaVNLaCm/f2+x7y4xE2m2rTx7GOcOQJejxX7L9JflfD8y3zStARqs1w\n\tpdclHnRwxQ0zORdMBjRLRdjJmrfp/fH8sOT6PRm0V4nDNU3Bpz/BI1lFcXTB3mdcCC\n\tpH6USmNUnwgEdvz9sx79wzIZzTokcBA3NO0SWPpM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"UXi0jvjc\"; dkim-atps=neutral","Message-ID":"<e09b91e7-743b-23e8-38b0-ef8bad09822e@ideasonboard.com>","Date":"Mon, 15 Aug 2022 21:24:45 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220812223351.22609-1-laurent.pinchart@ideasonboard.com>\n\t<20220812223351.22609-3-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20220812223351.22609-3-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 2/3] ipa: rkisp1: Add enable field\n\tfor LSC 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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]