[{"id":36413,"web_url":"https://patchwork.libcamera.org/comment/36413/","msgid":"<f488597c-67e3-444a-8230-21aa60819b90@ideasonboard.com>","date":"2025-10-23T18:14:03","subject":"Re: [RFC PATCH 5/7] ipa: softipa: Pass IPACameraSensorInfo to\n\tconfigure","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 10. 11. 18:03 keltezéssel, Kieran Bingham írta:\n> Pass the CameraSensorInfo in to the configure phase of the IPA from the\n> CameraSensor class, allowing the context to be used when configuring the\n> IPA.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>   include/libcamera/ipa/soft.mojom         |  1 +\n>   src/libcamera/pipeline/simple/simple.cpp | 10 ++++++++--\n>   2 files changed, 9 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\n> index 3acac53981e7..7bdbb65b4458 100644\n> --- a/include/libcamera/ipa/soft.mojom\n> +++ b/include/libcamera/ipa/soft.mojom\n> @@ -9,6 +9,7 @@ module ipa.soft;\n>   import \"include/libcamera/ipa/core.mojom\";\n>   \n>   struct IPAConfigInfo {\n> +\tlibcamera.IPACameraSensorInfo sensorInfo;\n>   \tlibcamera.ControlInfoMap sensorControls;\n>   };\n>   \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index a7e7ac25bac2..7d56effec50b 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1412,8 +1412,14 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\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\tIPACameraSensorInfo sensorInfo;\n> +\t\tret = data->sensor_->sensorInfo(&sensorInfo);\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\n> +\t\tipa::soft::IPAConfigInfo configInfo{ sensorInfo,\n\nI think you could do `std::move(sensorInfo)`, or `data->sensor_->sensorInfo(&configInfo.sensorInfo)`.\n\nIn any case, is this change a dependency of something else in this patch series?\nI cannot see anything, so if that's the case, I think it would be preferable to\nonly make this change when it is actually needed.\n\n\nRegards,\nBarnabás Pőcze\n\n> +\t\t\t\t\t\t     data->sensor_->controls() };\n> +\n>   \t\treturn data->swIsp_->configure(inputCfg, outputCfgs, configInfo, &data->controlInfo_);\n>   \t}\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 48B4BC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Oct 2025 18:14:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 407B760838;\n\tThu, 23 Oct 2025 20:14:10 +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 139CC607F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Oct 2025 20:14:08 +0200 (CEST)","from [192.168.33.33] (185.221.141.231.nat.pool.zt.hu\n\t[185.221.141.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C50C9EFE;\n\tThu, 23 Oct 2025 20:12:22 +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=\"R/eCyzDZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761243142;\n\tbh=0p0rqNWvCFnQ95dfOevaHGe6PNl9JGGi723sIqQ5ft0=;\n\th=Date:Subject:To:References:From:Cc:In-Reply-To:From;\n\tb=R/eCyzDZcKU5UTbaBbCh+MiiUHjUI1ZjUWf6N1cPVgYM5fe3gNGaPAe8G7+IcXzXj\n\tzfYO0mzOVfXIfmmithCDzvuVSRscvZ4bGIWsbfGM/epn1sgijxGL2NQNrCAEAV793D\n\t72t8bTVwsrW8D8WG7/oY1G9TqLLIte948hsmlD+g=","Message-ID":"<f488597c-67e3-444a-8230-21aa60819b90@ideasonboard.com>","Date":"Thu, 23 Oct 2025 20:14:03 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH 5/7] ipa: softipa: Pass IPACameraSensorInfo to\n\tconfigure","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20251011160335.50578-1-kieran.bingham@ideasonboard.com>\n\t<20251011160335.50578-6-kieran.bingham@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","In-Reply-To":"<20251011160335.50578-6-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>"}}]