[{"id":30778,"web_url":"https://patchwork.libcamera.org/comment/30778/","msgid":"<76fab352-9169-4fbf-a2dc-634226c0f36f@ideasonboard.com>","date":"2024-08-13T08:36:30","subject":"Re: [PATCH v3 14/23] libcamera: software_isp: Call\n\tAlgorithm::configure","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Milan\n\nOn 17/07/2024 09:54, Milan Zamazal wrote:\n> This patch adds Algorithm::configure call for the defined algorithms.\n> This is preparation only since there are currently no Algorithm based\n> algorithms defined.\n>\n> A part of this change is passing IPAConfigInfo instead of ControlInfoMap\n> to configure() calls as this is what Algorithm::configure expects.\n\nAh-ha - I thought that looked strange before. In that case can the definition of IPAConfigInfo move \nto patch #8 instead of using the ControlInfoMap there in module.h? Or does that make the series more \nmessy somehow?\n\n\nThe rest of this looks ok to me:\n\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\n>\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>   .../libcamera/internal/software_isp/software_isp.h   |  2 +-\n>   include/libcamera/ipa/soft.mojom                     |  6 +++++-\n>   src/ipa/simple/module.h                              |  4 +++-\n>   src/ipa/simple/soft_simple.cpp                       | 12 +++++++++---\n>   src/libcamera/pipeline/simple/simple.cpp             | 11 +++++++----\n>   src/libcamera/software_isp/software_isp.cpp          |  7 ++++---\n>   6 files changed, 29 insertions(+), 13 deletions(-)\n>\n> diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h\n> index 3a84418e..c5d5a46f 100644\n> --- a/include/libcamera/internal/software_isp/software_isp.h\n> +++ b/include/libcamera/internal/software_isp/software_isp.h\n> @@ -62,7 +62,7 @@ public:\n>   \n>   \tint configure(const StreamConfiguration &inputCfg,\n>   \t\t      const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,\n> -\t\t      const ControlInfoMap &sensorControls);\n> +\t\t      const ipa::soft::IPAConfigInfo &configInfo);\n>   \n>   \tint exportBuffers(const Stream *stream, unsigned int count,\n>   \t\t\t  std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n> diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\n> index bd48ece9..5e124016 100644\n> --- a/include/libcamera/ipa/soft.mojom\n> +++ b/include/libcamera/ipa/soft.mojom\n> @@ -8,6 +8,10 @@ module ipa.soft;\n>   \n>   import \"include/libcamera/ipa/core.mojom\";\n>   \n> +struct IPAConfigInfo {\n> +\tlibcamera.ControlInfoMap sensorControls;\n> +};\n> +\n>   interface IPASoftInterface {\n>   \tinit(libcamera.IPASettings settings,\n>   \t     libcamera.SharedFD fdStats,\n> @@ -16,7 +20,7 @@ interface IPASoftInterface {\n>   \t\t=> (int32 ret);\n>   \tstart() => (int32 ret);\n>   \tstop();\n> -\tconfigure(libcamera.ControlInfoMap sensorCtrlInfoMap)\n> +\tconfigure(IPAConfigInfo configInfo)\n>   \t\t=> (int32 ret);\n>   \n>   \t[async] processStats(uint32 frame, uint32 bufferId, libcamera.ControlList sensorControls);\n> diff --git a/src/ipa/simple/module.h b/src/ipa/simple/module.h\n> index 33a7d1db..8d4d53fb 100644\n> --- a/src/ipa/simple/module.h\n> +++ b/src/ipa/simple/module.h\n> @@ -9,6 +9,8 @@\n>   \n>   #include <libcamera/controls.h>\n>   \n> +#include <libcamera/ipa/soft_ipa_interface.h>\n> +\n>   #include \"libcamera/internal/software_isp/debayer_params.h\"\n>   #include \"libcamera/internal/software_isp/swisp_stats.h\"\n>   \n> @@ -20,7 +22,7 @@ namespace libcamera {\n>   \n>   namespace ipa::soft {\n>   \n> -using Module = ipa::Module<IPAContext, IPAFrameContext, ControlInfoMap,\n> +using Module = ipa::Module<IPAContext, IPAFrameContext, IPAConfigInfo,\n>   \t\t\t   DebayerParams, SwIspStats>;\n>   \n>   } /* namespace ipa::soft */\n> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n> index dd300387..49fff312 100644\n> --- a/src/ipa/simple/soft_simple.cpp\n> +++ b/src/ipa/simple/soft_simple.cpp\n> @@ -72,7 +72,7 @@ public:\n>   \t\t const SharedFD &fdStats,\n>   \t\t const SharedFD &fdParams,\n>   \t\t const ControlInfoMap &sensorInfoMap) override;\n> -\tint configure(const ControlInfoMap &sensorInfoMap) override;\n> +\tint configure(const IPAConfigInfo &configInfo) override;\n>   \n>   \tint start() override;\n>   \tvoid stop() override;\n> @@ -206,9 +206,9 @@ int IPASoftSimple::init(const IPASettings &settings,\n>   \treturn 0;\n>   }\n>   \n> -int IPASoftSimple::configure(const ControlInfoMap &sensorInfoMap)\n> +int IPASoftSimple::configure(const IPAConfigInfo &configInfo)\n>   {\n> -\tsensorInfoMap_ = sensorInfoMap;\n> +\tsensorInfoMap_ = configInfo.sensorControls;\n>   \n>   \tconst ControlInfo &exposureInfo = sensorInfoMap_.find(V4L2_CID_EXPOSURE)->second;\n>   \tconst ControlInfo &gainInfo = sensorInfoMap_.find(V4L2_CID_ANALOGUE_GAIN)->second;\n> @@ -247,6 +247,12 @@ int IPASoftSimple::configure(const ControlInfoMap &sensorInfoMap)\n>   \t\tagainMinStep_ = 1.0;\n>   \t}\n>   \n> +\tfor (auto const &algo : algorithms()) {\n> +\t\tint ret = algo->configure(context_, configInfo);\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\t}\n> +\n>   \tLOG(IPASoft, Info) << \"Exposure \" << exposureMin_ << \"-\" << exposureMax_\n>   \t\t\t   << \", gain \" << againMin_ << \"-\" << againMax_\n>   \t\t\t   << \" (\" << againMinStep_ << \")\";\n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 2cb2fee8..4326d14c 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1295,10 +1295,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>   \tinputCfg.stride = captureFormat.planes[0].bpl;\n>   \tinputCfg.bufferCount = kNumInternalBuffers;\n>   \n> -\treturn data->converter_\n> -\t\t       ? data->converter_->configure(inputCfg, outputCfgs)\n> -\t\t       : data->swIsp_->configure(inputCfg, outputCfgs,\n> -\t\t\t\t\t\t data->sensor_->controls());\n> +\tif (data->converter_) {\n> +\t\treturn data->converter_->configure(inputCfg, outputCfgs);\n> +\t} else {\n> +\t\tipa::soft::IPAConfigInfo configInfo;\n> +\t\tconfigInfo.sensorControls = data->sensor_->controls();\n> +\t\treturn data->swIsp_->configure(inputCfg, outputCfgs, configInfo);\n> +\t}\n>   }\n>   \n>   int SimplePipelineHandler::exportFrameBuffers(Camera *camera, Stream *stream,\n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index 09e33361..9793df18 100644\n> --- a/src/libcamera/software_isp/software_isp.cpp\n> +++ b/src/libcamera/software_isp/software_isp.cpp\n> @@ -224,16 +224,17 @@ SoftwareIsp::strideAndFrameSize(const PixelFormat &outputFormat, const Size &siz\n>    * \\brief Configure the SoftwareIsp object according to the passed in parameters\n>    * \\param[in] inputCfg The input configuration\n>    * \\param[in] outputCfgs The output configurations\n> - * \\param[in] sensorControls ControlInfoMap of the controls supported by the sensor\n> + * \\param[in] configInfo The IPA configuration data, received from the pipeline\n> + * handler\n>    * \\return 0 on success, a negative errno on failure\n>    */\n>   int SoftwareIsp::configure(const StreamConfiguration &inputCfg,\n>   \t\t\t   const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,\n> -\t\t\t   const ControlInfoMap &sensorControls)\n> +\t\t\t   const ipa::soft::IPAConfigInfo &configInfo)\n>   {\n>   \tASSERT(ipa_ && debayer_);\n>   \n> -\tint ret = ipa_->configure(sensorControls);\n> +\tint ret = ipa_->configure(configInfo);\n>   \tif (ret < 0)\n>   \t\treturn ret;\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 6E9FABDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Aug 2024 08:36:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8AADC633BD;\n\tTue, 13 Aug 2024 10:36:35 +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 AB497633B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Aug 2024 10:36:33 +0200 (CEST)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B65D9A1A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Aug 2024 10:35:36 +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=\"p1iaj2py\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723538136;\n\tbh=F/Xfw0se55+ff04hw+d7xZ7ae0AMWNdBGxp1iqGZOPk=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=p1iaj2pyJ1RgLv7Igw9NTN/HNvs+XUDjvy0//+SrgJq4NO0dsHq9j5LpXjhvd10bI\n\tl1rKRLPOfUc8vZ96BO7fm4+Hj2RHoDSpgB/f80IvqPzS7aGCHA9yld2aLRUdXwAuHx\n\t+ZJLo+d0a/4CudnXgiUEj/Leb+L9EDE5DJ49EwWw=","Message-ID":"<76fab352-9169-4fbf-a2dc-634226c0f36f@ideasonboard.com>","Date":"Tue, 13 Aug 2024 09:36:30 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 14/23] libcamera: software_isp: Call\n\tAlgorithm::configure","To":"libcamera-devel@lists.libcamera.org","References":"<20240717085444.289997-1-mzamazal@redhat.com>\n\t<20240717085444.289997-15-mzamazal@redhat.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","Autocrypt":"addr=dan.scally@ideasonboard.com; keydata=\n\txsFNBGLydlEBEADa5O2s0AbUguprfvXOQun/0a8y2Vk6BqkQALgeD6KnXSWwaoCULp18etYW\n\tB31bfgrdphXQ5kUQibB0ADK8DERB4wrzrUb5CMxLBFE7mQty+v5NsP0OFNK9XTaAOcmD+Ove\n\teIjYvqurAaro91jrRVrS1gBRxIFqyPgNvwwL+alMZhn3/2jU2uvBmuRrgnc/e9cHKiuT3Dtq\n\tMHGPKL2m+plk+7tjMoQFfexoQ1JKugHAjxAhJfrkXh6uS6rc01bYCyo7ybzg53m1HLFJdNGX\n\tsUKR+dQpBs3SY4s66tc1sREJqdYyTsSZf80HjIeJjU/hRunRo4NjRIJwhvnK1GyjOvvuCKVU\n\tRWpY8dNjNu5OeAfdrlvFJOxIE9M8JuYCQTMULqd1NuzbpFMjc9524U3Cngs589T7qUMPb1H1\n\tNTA81LmtJ6Y+IV5/kiTUANflpzBwhu18Ok7kGyCq2a2jsOcVmk8gZNs04gyjuj8JziYwwLbf\n\tvzABwpFVcS8aR+nHIZV1HtOzyw8CsL8OySc3K9y+Y0NRpziMRvutrppzgyMb9V+N31mK9Mxl\n\t1YkgaTl4ciNWpdfUe0yxH03OCuHi3922qhPLF4XX5LN+NaVw5Xz2o3eeWklXdouxwV7QlN33\n\tu4+u2FWzKxDqO6WLQGjxPE0mVB4Gh5Pa1Vb0ct9Ctg0qElvtGQ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tD+N9SjIwrbVhhSyUXYnSUb8F+9g2RDY42Sk7GcYxIeON4VzKqWM7hpkXZ47pkK0YodO+dRKM\n\tyMcoUWrTK0Uz6UzUGKoJVbxmSW/EJLEGoI5p3NWxWtScEVv8mO49gqQdrRIOheZycDmHnItt\n\t9Qjv00uFhEwv2YfiyGk6iGF2W40s2pH2t6oeuGgmiZ7g6d0MEK8Ql/4zPItvr1c1rpwpXUC1\n\tu1kQWgtnNjFHX3KiYdqjcZeRBiry1X0zY+4Y24wUU0KsEewJwjhmCKAsju1RpdlPg2kC","In-Reply-To":"<20240717085444.289997-15-mzamazal@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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":30789,"web_url":"https://patchwork.libcamera.org/comment/30789/","msgid":"<875xs4y5u2.fsf@redhat.com>","date":"2024-08-13T12:17:57","subject":"Re: [PATCH v3 14/23] libcamera: software_isp: Call\n\tAlgorithm::configure","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Dan,\n\nthank you for review.\n\nDan Scally <dan.scally@ideasonboard.com> writes:\n\n> Hi Milan\n>\n> On 17/07/2024 09:54, Milan Zamazal wrote:\n>> This patch adds Algorithm::configure call for the defined algorithms.\n>> This is preparation only since there are currently no Algorithm based\n>> algorithms defined.\n>>\n>> A part of this change is passing IPAConfigInfo instead of ControlInfoMap\n>> to configure() calls as this is what Algorithm::configure expects.\n>\n> Ah-ha - I thought that looked strange before. In that case can the definition of IPAConfigInfo move to patch #8 instead of using the\n> ControlInfoMap there in module.h? Or does that make the series more messy somehow?\n\nI think it can be done easily, will do.\n\n> The rest of this looks ok to me:\n>\n> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n>\n>>\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>> ---\n>>   .../libcamera/internal/software_isp/software_isp.h   |  2 +-\n>>   include/libcamera/ipa/soft.mojom                     |  6 +++++-\n>>   src/ipa/simple/module.h                              |  4 +++-\n>>   src/ipa/simple/soft_simple.cpp                       | 12 +++++++++---\n>>   src/libcamera/pipeline/simple/simple.cpp             | 11 +++++++----\n>>   src/libcamera/software_isp/software_isp.cpp          |  7 ++++---\n>>   6 files changed, 29 insertions(+), 13 deletions(-)\n>>\n>> diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h\n>> index 3a84418e..c5d5a46f 100644\n>> --- a/include/libcamera/internal/software_isp/software_isp.h\n>> +++ b/include/libcamera/internal/software_isp/software_isp.h\n>> @@ -62,7 +62,7 @@ public:\n>>     \tint configure(const StreamConfiguration &inputCfg,\n>>   \t\t      const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,\n>> -\t\t      const ControlInfoMap &sensorControls);\n>> +\t\t      const ipa::soft::IPAConfigInfo &configInfo);\n>>     \tint exportBuffers(const Stream *stream, unsigned int count,\n>>   \t\t\t  std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n>> diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\n>> index bd48ece9..5e124016 100644\n>> --- a/include/libcamera/ipa/soft.mojom\n>> +++ b/include/libcamera/ipa/soft.mojom\n>> @@ -8,6 +8,10 @@ module ipa.soft;\n>>     import \"include/libcamera/ipa/core.mojom\";\n>>   +struct IPAConfigInfo {\n>> +\tlibcamera.ControlInfoMap sensorControls;\n>> +};\n>> +\n>>   interface IPASoftInterface {\n>>   \tinit(libcamera.IPASettings settings,\n>>   \t     libcamera.SharedFD fdStats,\n>> @@ -16,7 +20,7 @@ interface IPASoftInterface {\n>>   \t\t=> (int32 ret);\n>>   \tstart() => (int32 ret);\n>>   \tstop();\n>> -\tconfigure(libcamera.ControlInfoMap sensorCtrlInfoMap)\n>> +\tconfigure(IPAConfigInfo configInfo)\n>>   \t\t=> (int32 ret);\n>>     \t[async] processStats(uint32 frame, uint32 bufferId, libcamera.ControlList sensorControls);\n>> diff --git a/src/ipa/simple/module.h b/src/ipa/simple/module.h\n>> index 33a7d1db..8d4d53fb 100644\n>> --- a/src/ipa/simple/module.h\n>> +++ b/src/ipa/simple/module.h\n>> @@ -9,6 +9,8 @@\n>>     #include <libcamera/controls.h>\n>>   +#include <libcamera/ipa/soft_ipa_interface.h>\n>> +\n>>   #include \"libcamera/internal/software_isp/debayer_params.h\"\n>>   #include \"libcamera/internal/software_isp/swisp_stats.h\"\n>>   @@ -20,7 +22,7 @@ namespace libcamera {\n>>     namespace ipa::soft {\n>>   -using Module = ipa::Module<IPAContext, IPAFrameContext, ControlInfoMap,\n>> +using Module = ipa::Module<IPAContext, IPAFrameContext, IPAConfigInfo,\n>>   \t\t\t   DebayerParams, SwIspStats>;\n>>     } /* namespace ipa::soft */\n>> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n>> index dd300387..49fff312 100644\n>> --- a/src/ipa/simple/soft_simple.cpp\n>> +++ b/src/ipa/simple/soft_simple.cpp\n>> @@ -72,7 +72,7 @@ public:\n>>   \t\t const SharedFD &fdStats,\n>>   \t\t const SharedFD &fdParams,\n>>   \t\t const ControlInfoMap &sensorInfoMap) override;\n>> -\tint configure(const ControlInfoMap &sensorInfoMap) override;\n>> +\tint configure(const IPAConfigInfo &configInfo) override;\n>>     \tint start() override;\n>>   \tvoid stop() override;\n>> @@ -206,9 +206,9 @@ int IPASoftSimple::init(const IPASettings &settings,\n>>   \treturn 0;\n>>   }\n>>   -int IPASoftSimple::configure(const ControlInfoMap &sensorInfoMap)\n>> +int IPASoftSimple::configure(const IPAConfigInfo &configInfo)\n>>   {\n>> -\tsensorInfoMap_ = sensorInfoMap;\n>> +\tsensorInfoMap_ = configInfo.sensorControls;\n>>     \tconst ControlInfo &exposureInfo = sensorInfoMap_.find(V4L2_CID_EXPOSURE)->second;\n>>   \tconst ControlInfo &gainInfo = sensorInfoMap_.find(V4L2_CID_ANALOGUE_GAIN)->second;\n>> @@ -247,6 +247,12 @@ int IPASoftSimple::configure(const ControlInfoMap &sensorInfoMap)\n>>   \t\tagainMinStep_ = 1.0;\n>>   \t}\n>>   +\tfor (auto const &algo : algorithms()) {\n>> +\t\tint ret = algo->configure(context_, configInfo);\n>> +\t\tif (ret)\n>> +\t\t\treturn ret;\n>> +\t}\n>> +\n>>   \tLOG(IPASoft, Info) << \"Exposure \" << exposureMin_ << \"-\" << exposureMax_\n>>   \t\t\t   << \", gain \" << againMin_ << \"-\" << againMax_\n>>   \t\t\t   << \" (\" << againMinStep_ << \")\";\n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index 2cb2fee8..4326d14c 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -1295,10 +1295,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>>   \tinputCfg.stride = captureFormat.planes[0].bpl;\n>>   \tinputCfg.bufferCount = kNumInternalBuffers;\n>>   -\treturn data->converter_\n>> -\t\t       ? data->converter_->configure(inputCfg, outputCfgs)\n>> -\t\t       : data->swIsp_->configure(inputCfg, outputCfgs,\n>> -\t\t\t\t\t\t data->sensor_->controls());\n>> +\tif (data->converter_) {\n>> +\t\treturn data->converter_->configure(inputCfg, outputCfgs);\n>> +\t} else {\n>> +\t\tipa::soft::IPAConfigInfo configInfo;\n>> +\t\tconfigInfo.sensorControls = data->sensor_->controls();\n>> +\t\treturn data->swIsp_->configure(inputCfg, outputCfgs, configInfo);\n>> +\t}\n>>   }\n>>     int SimplePipelineHandler::exportFrameBuffers(Camera *camera, Stream *stream,\n>> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n>> index 09e33361..9793df18 100644\n>> --- a/src/libcamera/software_isp/software_isp.cpp\n>> +++ b/src/libcamera/software_isp/software_isp.cpp\n>> @@ -224,16 +224,17 @@ SoftwareIsp::strideAndFrameSize(const PixelFormat &outputFormat, const Size &siz\n>>    * \\brief Configure the SoftwareIsp object according to the passed in parameters\n>>    * \\param[in] inputCfg The input configuration\n>>    * \\param[in] outputCfgs The output configurations\n>> - * \\param[in] sensorControls ControlInfoMap of the controls supported by the sensor\n>> + * \\param[in] configInfo The IPA configuration data, received from the pipeline\n>> + * handler\n>>    * \\return 0 on success, a negative errno on failure\n>>    */\n>>   int SoftwareIsp::configure(const StreamConfiguration &inputCfg,\n>>   \t\t\t   const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,\n>> -\t\t\t   const ControlInfoMap &sensorControls)\n>> +\t\t\t   const ipa::soft::IPAConfigInfo &configInfo)\n>>   {\n>>   \tASSERT(ipa_ && debayer_);\n>>   -\tint ret = ipa_->configure(sensorControls);\n>> +\tint ret = ipa_->configure(configInfo);\n>>   \tif (ret < 0)\n>>   \t\treturn ret;\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 2AC5EC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Aug 2024 12:18:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D6DAA633B5;\n\tTue, 13 Aug 2024 14:18:04 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 280A563382\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Aug 2024 14:18:03 +0200 (CEST)","from mail-wr1-f72.google.com (mail-wr1-f72.google.com\n\t[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-461-AP3_Qti-O4CMxkq-MgRWzQ-1; Tue, 13 Aug 2024 08:18:00 -0400","by mail-wr1-f72.google.com with SMTP id\n\tffacd0b85a97d-36873a449dfso3145079f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Aug 2024 05:18:00 -0700 (PDT)","from nuthatch (nat-pool-brq-t.redhat.com. [213.175.37.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-36e4cfee74csm10081618f8f.48.2024.08.13.05.17.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 13 Aug 2024 05:17:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"Ep9iREpl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1723551482;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=e5TqdzCs7LP7EstJY5HvvlvE1uqNuk82ZEUhkobYB6E=;\n\tb=Ep9iREpllN9rtnU34+HIJ6qbPsxAq5IZnc2pVJYNdX+iMv6TTQz/jGy+2rQvPRnNTMd9JC\n\tFYjxcMwhFpYwrWpZkhwV9EcE2tMZgoQnyLdHve9Gr6EfkifTD6ouwUWrD+5V5CkecQxeLY\n\t+2WU4GHcImIrrquTGjBoykGxoZlp43U=","X-MC-Unique":"AP3_Qti-O4CMxkq-MgRWzQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1723551479; x=1724156279;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=e5TqdzCs7LP7EstJY5HvvlvE1uqNuk82ZEUhkobYB6E=;\n\tb=i4ZEYut+X2WFnyMBCKZjILTQovvJi24vxs0GNVhokBU8fv3hrcgDfXowI+tU1II+Mu\n\tZR5nJqtOfqufIxHySDYp5x2RZQOujKZUWwm0mGXAVxXu+TZfELEmzD5J/EDnyjjZ+GTR\n\tO/bEpXmqereYSqnQ7iLlAXCKpIxN3Cgm4qQG/dSruA6eCC75V9QLsGJNQixOmK49uGce\n\tocTRt+xEgfl53lZXx9Zc9Tz8NSxvpI3ZcDWHka/KeJCLasDUqDK0p9hpH7AeRTroey+Y\n\txBvJ0rIpCYFIHiohCqzmYXewuCDzvPG5Ydrkv/4niGB3gfh2xaFK8xmDZ9nmjR3ZcgVm\n\tUMTQ==","X-Gm-Message-State":"AOJu0YxeJJhCmr4r/5hMEHcd7y3mLgHDvJrp9bshwRFIiT8fIAYsXkoS\n\tdBgrD7oh/BGSNvhioxj41XxFpSuIKLpMRu1DdhR3kktSPMJ//dz/zhyJhGWpnmW3VKilcKfC/HG\n\tkqum+O0VBFu2ua2DBGVuKWlDQfKSNyGpdm2O9MZcVFWQL3utQkW8BqHGnjHxBn1S88Qdc9j94u5\n\t6v0wRSyniFrGYSyTvsAB2B5Bk6vIizFkDND+wq2k2iwwgYyDasAtMDbos=","X-Received":["by 2002:adf:f48d:0:b0:367:89b0:f584 with SMTP id\n\tffacd0b85a97d-3716e43cabdmr1961692f8f.11.1723551478995; \n\tTue, 13 Aug 2024 05:17:58 -0700 (PDT)","by 2002:adf:f48d:0:b0:367:89b0:f584 with SMTP id\n\tffacd0b85a97d-3716e43cabdmr1961662f8f.11.1723551478307; \n\tTue, 13 Aug 2024 05:17:58 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHSBjlF9YxeRw7kswYw0bI/7P3NVwPpOXPmtxpO4Dn1IRV1m2SmTwxTlEw67EcG3tbbuyku+Q==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Dan Scally <dan.scally@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v3 14/23] libcamera: software_isp: Call\n\tAlgorithm::configure","In-Reply-To":"<76fab352-9169-4fbf-a2dc-634226c0f36f@ideasonboard.com> (Dan\n\tScally's message of \"Tue, 13 Aug 2024 09:36:30 +0100\")","References":"<20240717085444.289997-1-mzamazal@redhat.com>\n\t<20240717085444.289997-15-mzamazal@redhat.com>\n\t<76fab352-9169-4fbf-a2dc-634226c0f36f@ideasonboard.com>","Date":"Tue, 13 Aug 2024 14:17:57 +0200","Message-ID":"<875xs4y5u2.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]