[{"id":24385,"web_url":"https://patchwork.libcamera.org/comment/24385/","msgid":"<YuxIdbxyEA+3ozAB@pendragon.ideasonboard.com>","date":"2022-08-04T22:30:13","subject":"Re: [libcamera-devel] [PATCH 2/3] ipa: rkisp1: Add enable field for\n\tLSC algorithm in IPA context","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Florian,\n\nThank you for the patch.\n\nOn Thu, Aug 04, 2022 at 04:12:27PM +0200, Florian Sylvestre via libcamera-devel wrote:\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> ---\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(+)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index 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>   */\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h\n> index 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:\n> diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\n> index 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\nSame comment as for patch 1/3.\n\n> + *\n\nExtra blank line.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\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 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;","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 8F1A8BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Aug 2022 22:30:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F1ACE603E6;\n\tFri,  5 Aug 2022 00:30:22 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BDCCF603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Aug 2022 00:30:21 +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 1A98B3F1;\n\tFri,  5 Aug 2022 00:30:21 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659652223;\n\tbh=ZCWTHBWNSMoH7ODN91JCRX6E/+H16RC1jn6A6YGNP0c=;\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:Cc:\n\tFrom;\n\tb=mEpruj6tNRRLY/Kstn7j+68Sl0FAJXWcnyPOKbUjMxfkOgtvbXyiUtJxaHLQW6YCI\n\tyZgvFL236KGvMJAyQaLkztwL7YsH/O/jzIcAFnodc14iUYRl7c2ozUg9PmUtU6L1UU\n\tbRLiAQfWiRk6Vno6RY1Rn68awC8H6i3rQM9TU5wjRARdCEvx+Ru9/QsZbSxFUgbiFM\n\t3fDoQuTrf49kxyCVeAbquN86I+4l1J6BjKux89k6KesqsS/3dSfn8vnp3I/kJ8BAhb\n\tcfuQzFyYkcbyNAoFYNv1oCuu+erw5Oyxa+6CyowzjK5Kcg9wlzu5W/KWN+nMmGuQTs\n\tw3NVrS9U6LRLA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659652221;\n\tbh=ZCWTHBWNSMoH7ODN91JCRX6E/+H16RC1jn6A6YGNP0c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qgTgRr2Fev/qXKN++G/2tdaEmW1mBwpXBbBA/fdB6xpSJ0OFvfr47CydY9vxCtPFq\n\tKSVNbNdzyjH8tr/7rH4gqKw9i3x8/4HEO8Cl6A9spZwf03MoiOXJaswLpBwWryT1ux\n\txcLJ5FK8g8hQmqVdVf59n4XqHxl2YfNlt0TaHVEg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"qgTgRr2F\"; dkim-atps=neutral","Date":"Fri, 5 Aug 2022 01:30:13 +0300","To":"Florian Sylvestre <fsylvestre@baylibre.com>","Message-ID":"<YuxIdbxyEA+3ozAB@pendragon.ideasonboard.com>","References":"<20220804141228.417211-1-fsylvestre@baylibre.com>\n\t<20220804141228.417211-3-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220804141228.417211-3-fsylvestre@baylibre.com>","Subject":"Re: [libcamera-devel] [PATCH 2/3] 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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]