[{"id":24384,"web_url":"https://patchwork.libcamera.org/comment/24384/","msgid":"<YuxHysyqMc5qH2Z1@pendragon.ideasonboard.com>","date":"2022-08-04T22:27:22","subject":"Re: [libcamera-devel] [PATCH 1/3] ipa: rkisp1: Add enable field for\n\tAWB 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:26PM +0200, Florian Sylvestre via libcamera-devel wrote:\n> Add an enable variable in the awb struct in IPASessionConfiguration which\n> indicates if the awb 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/awb.cpp | 2 ++\n>  src/ipa/rkisp1/ipa_context.cpp    | 3 +++\n>  src/ipa/rkisp1/ipa_context.h      | 1 +\n>  3 files changed, 6 insertions(+)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 9f00364d..d1328f01 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -48,6 +48,8 @@ int Awb::configure(IPAContext &context,\n>  \tcontext.configuration.awb.measureWindow.h_size = 3 * configInfo.outputSize.width / 4;\n>  \tcontext.configuration.awb.measureWindow.v_size = 3 * configInfo.outputSize.height / 4;\n>  \n> +\tcontext.configuration.awb.enabled = true;\n> +\n>  \treturn 0;\n>  }\n>  \n> diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\n> index ef8bb8e9..d833b8c7 100644\n> --- a/src/ipa/rkisp1/ipa_context.cpp\n> +++ b/src/ipa/rkisp1/ipa_context.cpp\n> @@ -87,6 +87,9 @@ namespace libcamera::ipa::rkisp1 {\n>   *\n>   * \\var IPASessionConfiguration::awb.measureWindow\n>   * \\brief AWB measure window\n> + *\n> + * \\var IPASessionConfiguration::awb.enabled\n> + * \\brief Indicates if AWB is enabled\n\nI'm pretty sure someone reading this will interpret the comment as\nmeaning that auto white balance is enabled, as opposed to running in\nmanual mode, while the field indicates if the Algorithm is enabled,\nregardless of whether it runs in manual or automatic mode. I'm OK\nkeeping the member name (unless you can think of a better name), but I'd\nat least update the documentation. Maybe\n\n * \\brief Indicates if the AWB hardware is enabled to apply colour gains\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI've tested it by the way, and I can confirm that the gains are not\napplied when the module is disabled.\n\n>   */\n>  \n>  /**\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 2bdb6a81..7f7b3e4d 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -29,6 +29,7 @@ struct IPASessionConfiguration {\n>  \n>  \tstruct {\n>  \t\tstruct rkisp1_cif_isp_window measureWindow;\n> +\t\tbool enabled;\n>  \t} awb;\n>  \n>  \tstruct {","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 A1A38BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Aug 2022 22:27:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1128B6332B;\n\tFri,  5 Aug 2022 00:27:31 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20722603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Aug 2022 00:27:30 +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 7CE893F1;\n\tFri,  5 Aug 2022 00:27:29 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659652051;\n\tbh=i0DRajfdZkW0NJdf5JCsrowUVFtxrSjQCwq1Rxq2CqQ=;\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=WizYgm3KgWIzXibjOhrEl7q9H42D8ZmLgdm5eim/4uA9Nfg+xcPhMQe0begvOofqy\n\tOSHE8Dg5L6I9Fk2f12uO+Ft/O84EMz8K1NnpltAtYxsc/h+Lt13NpUG1piXMl4Nl4z\n\tZoT/22Fw3dGwP375QSM3CC6GBxl4JmbH+dc5MqUwInR1/cFdhssXbI8LZkTN92q+xW\n\t9wbX+UI9G3ou9uy7Kcnz/pzEwg7v9tZk4D5aD5rqHoDwXCKe3rxvFc70q3FhOOVwWu\n\tZIJKufeOIoX+ZMBvvSgCtbe3ChTkBShyC7fsdHfAQkEZlkY7pa2iLE0q7BkIHJFg9f\n\tyzLXJogFbQOTQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659652049;\n\tbh=i0DRajfdZkW0NJdf5JCsrowUVFtxrSjQCwq1Rxq2CqQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=htYVIsEvoUFS8vN0hXQIfcEzCPS4qTlTLJEmj4Mk2EtmtQzONHpUo7LUI7GXU/6xB\n\t5iL3mqZQDQUlnxwR99wC5VwOUujVqO06uxhb7XFFwL0bwLxftbP/kri58N721g0Co7\n\tFsvII0dqDHqbiro7nU+Unnuxj3rMk07Su2FjloTk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"htYVIsEv\"; dkim-atps=neutral","Date":"Fri, 5 Aug 2022 01:27:22 +0300","To":"Florian Sylvestre <fsylvestre@baylibre.com>","Message-ID":"<YuxHysyqMc5qH2Z1@pendragon.ideasonboard.com>","References":"<20220804141228.417211-1-fsylvestre@baylibre.com>\n\t<20220804141228.417211-2-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220804141228.417211-2-fsylvestre@baylibre.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] ipa: rkisp1: Add enable field for\n\tAWB 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>"}}]