[{"id":31210,"web_url":"https://patchwork.libcamera.org/comment/31210/","msgid":"<172622255618.3474483.5306102493783669934@ping.linuxembedded.co.uk>","date":"2024-09-13T10:15:56","subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-09-13 08:57:26)\n> For the LSC algorithm to dynamically calculate the LSC tables based on\n> the sensor size and the crop rectangle it needs access to that data.\n> Provide access to it by adding the sensorInfo object to the context.\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/ipa/rkisp1/ipa_context.h | 2 ++\n>  src/ipa/rkisp1/rkisp1.cpp    | 4 +++-\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 3af2774a7fc8..e274d9b01e1c 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -17,6 +17,7 @@\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n> +#include <libcamera/ipa/core_ipa_interface.h>\n>  \n>  #include <libipa/camera_sensor_helper.h>\n>  #include <libipa/fc_queue.h>\n> @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext {\n>  \n>  struct IPAContext {\n>         const IPAHwSettings *hw;\n> +       IPACameraSensorInfo sensorInfo;\n>         IPASessionConfiguration configuration;\n>         IPAActiveState activeState;\n>  \n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 78d2c375d6dc..9e161cabdea4 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{\n>  } /* namespace */\n>  \n>  IPARkISP1::IPARkISP1()\n> -       : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n> +       : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n>  {\n>  }\n>  \n> @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n>  \n>         LOG(IPARkISP1, Debug) << \"Hardware revision is \" << hwRevision;\n>  \n> +       context_.sensorInfo = sensorInfo;\n> +\n>         context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel);\n>         if (!context_.camHelper) {\n>                 LOG(IPARkISP1, Error)\n> -- \n> 2.43.0\n>","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 DD511C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Sep 2024 10:16:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DEB49634FC;\n\tFri, 13 Sep 2024 12:16:01 +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 D2BE3634E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2024 12:15:59 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B09673;\n\tFri, 13 Sep 2024 12:14:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MNgr+eGZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726222480;\n\tbh=FTj6ISiQ6fr8DvjbVsKJfQdfgAR+j+y+XnxH8muJoiA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=MNgr+eGZ8eJHc2jZJx6Z5HJOpUszBwF3JtwbYsem2rPZCdZy7FfL8+82Nsj4MUZlu\n\tJ9eHuFViDBjR6TCqBvB2vKSIz/p6u8JD0SyNhH3OC+hhBsFxYqlvP+jTgCgbUMyRTs\n\t/uCdduHRMxiVhnPrg0AB3df1chc9mN5nTMiDbcf4=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240913075750.35115-9-stefan.klug@ideasonboard.com>","References":"<20240913075750.35115-1-stefan.klug@ideasonboard.com>\n\t<20240913075750.35115-9-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 13 Sep 2024 11:15:56 +0100","Message-ID":"<172622255618.3474483.5306102493783669934@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31219,"web_url":"https://patchwork.libcamera.org/comment/31219/","msgid":"<ZuQdOqG1OFCeXJ7-@pyrite.rasen.tech>","date":"2024-09-13T11:08:42","subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Fri, Sep 13, 2024 at 09:57:26AM +0200, Stefan Klug wrote:\n> For the LSC algorithm to dynamically calculate the LSC tables based on\n> the sensor size and the crop rectangle it needs access to that data.\n> Provide access to it by adding the sensorInfo object to the context.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/ipa_context.h | 2 ++\n>  src/ipa/rkisp1/rkisp1.cpp    | 4 +++-\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 3af2774a7fc8..e274d9b01e1c 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -17,6 +17,7 @@\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n> +#include <libcamera/ipa/core_ipa_interface.h>\n>  \n>  #include <libipa/camera_sensor_helper.h>\n>  #include <libipa/fc_queue.h>\n> @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext {\n>  \n>  struct IPAContext {\n>  \tconst IPAHwSettings *hw;\n> +\tIPACameraSensorInfo sensorInfo;\n>  \tIPASessionConfiguration configuration;\n>  \tIPAActiveState activeState;\n>  \n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 78d2c375d6dc..9e161cabdea4 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{\n>  } /* namespace */\n>  \n>  IPARkISP1::IPARkISP1()\n> -\t: context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n> +\t: context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n>  {\n>  }\n>  \n> @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n>  \n>  \tLOG(IPARkISP1, Debug) << \"Hardware revision is \" << hwRevision;\n>  \n> +\tcontext_.sensorInfo = sensorInfo;\n> +\n>  \tcontext_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel);\n>  \tif (!context_.camHelper) {\n>  \t\tLOG(IPARkISP1, Error)\n> -- \n> 2.43.0\n>","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 A271EC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Sep 2024 11:08:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 45802634F8;\n\tFri, 13 Sep 2024 13:08:48 +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 7FC48634E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2024 13:08:46 +0200 (CEST)","from pyrite.rasen.tech (213-229-8-243.static.upcbusiness.at\n\t[213.229.8.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A017FEA5;\n\tFri, 13 Sep 2024 13:07:27 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IfJwgj5a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726225647;\n\tbh=Z0zQhhiVQZZw3E3Juf9g9YMeLdXvmAqGedmJqynS0Mo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IfJwgj5aCg3VTYQVr12CFigOKm/yccMNMGsu8qzoE8ZH4ezrtUG6DvnNYj7VMxvmp\n\t1S5EERtjZO9n9HDuTCiMweiBSKSE98xmbZypBwAoJ3JwLVAJXyOiG1Z+ZPuIDxA5Wm\n\tRnvyFwwfAKMlo7kuMHcy5mi7Y/9ElJOfAurRZjkk=","Date":"Fri, 13 Sep 2024 13:08:42 +0200","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","Message-ID":"<ZuQdOqG1OFCeXJ7-@pyrite.rasen.tech>","References":"<20240913075750.35115-1-stefan.klug@ideasonboard.com>\n\t<20240913075750.35115-9-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240913075750.35115-9-stefan.klug@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31226,"web_url":"https://patchwork.libcamera.org/comment/31226/","msgid":"<ZuRXhMygKdMzgdrD@pyrite.rasen.tech>","date":"2024-09-13T15:17:24","subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Fri, Sep 13, 2024 at 09:57:26AM +0200, Stefan Klug wrote:\n> For the LSC algorithm to dynamically calculate the LSC tables based on\n> the sensor size and the crop rectangle it needs access to that data.\n> Provide access to it by adding the sensorInfo object to the context.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/ipa/rkisp1/ipa_context.h | 2 ++\nYou probably need to write documentation for this...\n\nPaul\n\n>  src/ipa/rkisp1/rkisp1.cpp    | 4 +++-\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 3af2774a7fc8..e274d9b01e1c 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -17,6 +17,7 @@\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n> +#include <libcamera/ipa/core_ipa_interface.h>\n>  \n>  #include <libipa/camera_sensor_helper.h>\n>  #include <libipa/fc_queue.h>\n> @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext {\n>  \n>  struct IPAContext {\n>  \tconst IPAHwSettings *hw;\n> +\tIPACameraSensorInfo sensorInfo;\n>  \tIPASessionConfiguration configuration;\n>  \tIPAActiveState activeState;\n>  \n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 78d2c375d6dc..9e161cabdea4 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{\n>  } /* namespace */\n>  \n>  IPARkISP1::IPARkISP1()\n> -\t: context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n> +\t: context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} })\n>  {\n>  }\n>  \n> @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n>  \n>  \tLOG(IPARkISP1, Debug) << \"Hardware revision is \" << hwRevision;\n>  \n> +\tcontext_.sensorInfo = sensorInfo;\n> +\n>  \tcontext_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel);\n>  \tif (!context_.camHelper) {\n>  \t\tLOG(IPARkISP1, Error)\n> -- \n> 2.43.0\n>","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 08D07C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Sep 2024 15:17:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 966B4634F8;\n\tFri, 13 Sep 2024 17:17: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 C9656634E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2024 17:17:29 +0200 (CEST)","from pyrite.rasen.tech (213-229-8-243.static.upcbusiness.at\n\t[213.229.8.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B4556EA5;\n\tFri, 13 Sep 2024 17:16:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"sU9Zgrpr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726240570;\n\tbh=4ImR27iP9ugNsdkzZ93mpyxauZyvjxxdfJvNmjfMShM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sU9ZgrpreGXXs/Rfr3gxNo9gX2QGFUEXEjFjgFgDAHlRZXRsgjcljArTZZFrg404y\n\tNJVcDtdpkTXoolNz8tgj9Ag75i+WOHtbYTSqEjauKgGVcy3/uYdzwjlVKyrDnYRnvC\n\t6+T9p4eGesQZ75AuXL/OGTwGQPR/7qCUSsoqAdzU=","Date":"Fri, 13 Sep 2024 17:17:24 +0200","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 8/9] ipa: rkisp1: Add sensor info to context","Message-ID":"<ZuRXhMygKdMzgdrD@pyrite.rasen.tech>","References":"<20240913075750.35115-1-stefan.klug@ideasonboard.com>\n\t<20240913075750.35115-9-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240913075750.35115-9-stefan.klug@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]