{"id":27511,"url":"https://patchwork.libcamera.org/api/patches/27511/?format=json","web_url":"https://patchwork.libcamera.org/patch/27511/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<9c7e79d2-1b12-4a30-9126-019607673bb7@oss.qualcomm.com>","date":"2026-07-27T11:58:23","name":"About loading / creating IPAs by (proxy) type name","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8cee098776588223a9e9f9a4dd408f9c6f27f313","submitter":{"id":242,"url":"https://patchwork.libcamera.org/api/people/242/?format=json","name":"Hans de Goede","email":"johannes.goede@oss.qualcomm.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27511/mbox/","series":[{"id":6086,"url":"https://patchwork.libcamera.org/api/series/6086/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6086","date":"2026-07-27T11:58:23","name":"About loading / creating IPAs by (proxy) type name","version":1,"mbox":"https://patchwork.libcamera.org/series/6086/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27511/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27511/checks/","tags":{},"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 F1E0FBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2026 11:58:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DFFAA67F70;\n\tMon, 27 Jul 2026 13:58:30 +0200 (CEST)","from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n\t[205.220.168.131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D92FA67EB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 13:58:28 +0200 (CEST)","from pps.filterd (m0279863.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n\t66RAMDw23604288 for <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 11:58:26 GMT","from mail-qt1-f199.google.com (mail-qt1-f199.google.com\n\t[209.85.160.199])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fngysuany-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 11:58:26 +0000 (GMT)","by mail-qt1-f199.google.com with SMTP id\n\td75a77b69052e-51bff5c7035so58017921cf.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 04:58:26 -0700 (PDT)","from [10.40.99.10] ([78.108.130.194])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-c1c32af45ecsm618439066b.28.2026.07.27.04.58.24\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 27 Jul 2026 04:58:24 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=qualcomm.com header.i=@qualcomm.com\n\theader.b=\"pEWkCiV5\"; dkim=pass (2048-bit key;\n\tunprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n\theader.b=\"H3C7Byig\"; dkim-atps=neutral","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcontent-transfer-encoding:content-type:date:from:message-id\n\t:mime-version:subject:to; s=qcppdkim1; bh=P/S7Ji9hDp+1aLrBTOtMpf\n\tFZOQ+bqAIB9f5PThRsZfg=; b=pEWkCiV57bxEh91j/ihAzaWk+mp6gu0PqX9pjG\n\tpJGUEAEVBkdNoIsjt3HPw2kFuTFj/3tP4l3CYIx2zY3AOT56Rlv7lxn6HM74Nq4f\n\tXWwiMMg/fcHGWGjvXA1NIaF8OsW26u1A+V7x/xf7/YI0DLEOpzIn9PZGLwO8wj+F\n\tYudtWSLGVV3X76tbSxt9dJDAZjbRIOos+4ixkFB+HUd0MVHiEuxw7h/lKyWpCLHU\n\tEKYs6EkLV052bLfAIyYqZDX3ItArcsha2mjOAmoHL7lmIxklwM5w5ArBkDtZksRy\n\tirMYSbapucvzleT+pvVdd8yb9srSH94Lkv6ewTkSL9U0s6Sw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=oss.qualcomm.com; s=google; t=1785153505; x=1785758305;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:content-type:subject:to:content-language\n\t:from:user-agent:mime-version:date:message-id:from:to:cc:subject\n\t:date:message-id:reply-to:content-type;\n\tbh=P/S7Ji9hDp+1aLrBTOtMpfFZOQ+bqAIB9f5PThRsZfg=;\n\tb=H3C7ByigETzMWRu6qx4h5WwGshB23bzkefxvsqk0JpWyFAuygsQ6Vn80geS9FqVCDb\n\tIQRf9M6QNvErcqD7mdTVxGSB7w2Pc+hc+3QUf7Lf7h9x9alNJMGsTf8U0z8p8nDJor1t\n\tnUDsjSTHiWhjg9wtOeYDAGoaOr/ayOZl+phrb7QPZrTpUv0Ia85ZCKNvCjxM3eeg9k/V\n\t+lsQTkAXoreXTaNv+FDpUgaSfOw/NKDvDszsodmPs82tqpIfnBh6NMjR701VQP2YG9/x\n\t1hboLGKpsXgAgqSlcjIqwhgLfI22x3EmoF61ygYidPIWAAtt3YYANe0PowJYGlSalzwD\n\tGByQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1785153505; x=1785758305;\n\th=content-transfer-encoding:content-type:subject:to:content-language\n\t:from:user-agent:mime-version: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Dgyu/LbHj2GP98nJDrOlUCqb18rjOfCcsgap2p4dFjNm6NrmM+2w6Z/\n\tzkSkgXYPfQUzYfygBVzw=","X-Received":["by 2002:ac8:7dc5:0:b0:51c:e6a:1b5a with SMTP id\n\td75a77b69052e-529a8382068mr84560521cf.12.1785153505437; \n\tMon, 27 Jul 2026 04:58:25 -0700 (PDT)","by 2002:ac8:7dc5:0:b0:51c:e6a:1b5a with SMTP id\n\td75a77b69052e-529a8382068mr84560241cf.12.1785153504970; \n\tMon, 27 Jul 2026 04:58:24 -0700 (PDT)"],"Message-ID":"<9c7e79d2-1b12-4a30-9126-019607673bb7@oss.qualcomm.com>","Date":"Mon, 27 Jul 2026 13:58:23 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","From":"Hans de Goede <johannes.goede@oss.qualcomm.com>","Content-Language":"en-US, nl","To":"libcamera devel <libcamera-devel@lists.libcamera.org>, =?utf-8?q?Barna?=\n\t=?utf-8?b?YsOhcyBQxZFjemU=?= <barnabas.pocze@ideasonboard.com>","Subject":"About loading / creating IPAs by (proxy) type name","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNzI3MDExNyBTYWx0ZWRfX8+6GUJNrKUEi\n\t1uvoqae0T8shgsDW95PbB2t4j3cnmatFtDdMxfH7Q2SzFgU9/eLttMi7SlFyagOj7ZuDGC/j9nX\n\tI/cBHiwBZsftFQjuj9/Fx8TcmnCf3Xolhb2wg6Wx/caa6BCJeJbN6VTIUaIetefEAH7jLzI/wSW\n\t11t0gPEytvOPyxdOVpxZEgD77Xb1gFoR4ayr0pmHww+NNs/GYyRIqhTECBqPWakT7/A9jFTgf0D\n\txpaLJlHt0o/cc/E2SrP2tpy+oHhn36FPSdE8Qn2Ff4EIxFkuN+JC9hmAu1nnT+i/wmm8Ay/8MqI\n\t3C5zT3NFdHw5u42gh63CTcNRA5Il4QFwqpzSI9J+tE4rpnoKLwFW8eXo7PHlWWF55kAR49zRU/7\n\tMFjy7LX1gVTvq30ShInCNsoKfAATGJX0B4nF2SlKvt0QwfHuDw67Q8edvRQwwEBdes02GfN+6gt\n\tebneEb6E6R8vKHxOHSw==","X-Proofpoint-GUID":"gM1x9KX6pLyUsYlmaEoDsCj_Q5zUfTDf","X-Authority-Analysis":"v=2.4 cv=DNG/JSNb c=1 sm=1 tr=0 ts=6a6747e2 cx=c_pps\n\ta=WeENfcodrlLV9YRTxbY/uA==:117 a=rrvG0T/C2D967D07Ol03YQ==:17\n\ta=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10\n\ta=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22\n\ta=yOCtJkima9RkubShWh1s:22\n\ta=YAyIRdgMAAAA:8 a=FkqbDAA5nXPtqFkYiiQA:9 a=3ZKOabzyN94A:10\n\ta=QEXdDO2ut3YA:10\n\ta=kacYvNCVWA4VmyqE58fU:22 a=o1rO4XtwZBNj6n05oSJ_:22","X-Proofpoint-Spam-Info":"AW1haW4tMjYwNzI3MDExNyBTYWx0ZWRfX5xz1V5JPxGpR\n\t/j89j1sk3wde1hcBLYORUVOLml2OqUCghp8+Y4rqZCFtsp6jaCO/t2nQJuhmBkA0LPQLj0Bzu6L\n\tfNPm1j5l3baFUbxDUc/mji9pqIJztEo=","X-Proofpoint-ORIG-GUID":"gM1x9KX6pLyUsYlmaEoDsCj_Q5zUfTDf","X-Proofpoint-Virus-Version":"vendor=baseguard\n\tengine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.134,\n\tFMLib:17.12.100.49\n\tdefinitions=2026-07-27_03,2026-07-24_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tpriorityscore=1501 clxscore=1031 malwarescore=0 bulkscore=0\n\tadultscore=0\n\tsuspectscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0\n\tspamscore=0\n\tclassifier=typeunknown authscore=0 authtc= authcc= route=outbound\n\tadjust=0\n\treason=mlx scancount=1 engine=8.22.0-2606150000\n\tdefinitions=main-2607270117","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>"},"content":"Hi All,\n\nAs discussed I've been looking into loading / creating IPAs by (proxy) type name.\n\nA way to do this was proposed by Barnabás here:\n\nhttps://patchwork.libcamera.org/patch/26503/\n\nBarnabás Pőcze wrote:\n\n\"\"\"\n> --- a/include/libcamera/internal/ipa_manager.h\n> +++ b/include/libcamera/internal/ipa_manager.h\n> @@ -34,12 +34,13 @@ public:\n>   \n>   \ttemplate<typename T>\n>   \tstatic std::unique_ptr<T> createIPA(PipelineHandler *pipe,\n> +\t\t\t\t\t    const char *name,\n>   \t\t\t\t\t    uint32_t minVersion,\n>   \t\t\t\t\t    uint32_t maxVersion)\n>   \t{\n\nI agree with this change, but I wish that the name could be derived from `T`.\nAnd that is quite easy to do, just adding a\n\n   static constexpr const char *name() { return \"...\"; }\n\nand then using `T::name()` here works mostly.\n\nBut unfortunately the raspberry pi ipa modules are not compatible at the moment\nwith this approach. I have tried to come up with something, but so for has failed.\n\nMaybe the `name` argument could be kept like this:\n\n   const char *name = T::name()\n\nand then the rpi pipeline handler could be changed to use the specific names. Not\na fan of this in any case.\n\"\"\"\n\nThis sounds nice and simple, but the <typename T> being passed to\nthe template here is an IPA proxy which gets auto-generated by mojo.\n\nmojo does support const variables so I've tried this:\n\n\n\nUnfortunately this results in the follow autogenerated code:\n\nstruct IPAConfigInfo\n{\npublic:\n#ifndef __DOXYGEN__\n\tIPAConfigInfo() = default;\n\n\ttemplate<\n\t\ttypename T1 = IPACameraSensorInfo,\n\t\ttypename T2 = ControlInfoMap,\n\t\ttypename T3 = ControlInfoMap,\n\t\ttypename T4 = Size,\n\t\ttypename T5 = Size,\n\t\tstd::enable_if_t<std::is_convertible_v<T1&&, IPACameraSensorInfo>> * = nullptr,\n\t\tstd::enable_if_t<std::is_convertible_v<T2&&, ControlInfoMap>> * = nullptr,\n\t\tstd::enable_if_t<std::is_convertible_v<T3&&, ControlInfoMap>> * = nullptr,\n\t\tstd::enable_if_t<std::is_convertible_v<T4&&, Size>> * = nullptr,\n\t\tstd::enable_if_t<std::is_convertible_v<T5&&, Size>> * = nullptr\n\t>\n\tIPAConfigInfo(T1 &&_sensorInfo, T2 &&_sensorControls, T3 &&_lensControls, T4 &&_bdsOutputSize, T5 &&_iif)\n\t\t: sensorInfo(std::forward<T1>(_sensorInfo))\n\t\t, sensorControls(std::forward<T2>(_sensorControls))\n\t\t, lensControls(std::forward<T3>(_lensControls))\n\t\t, bdsOutputSize(std::forward<T4>(_bdsOutputSize))\n\t\t, iif(std::forward<T5>(_iif))\n\t{\n\t}\n#endif\n\n\n\tIPACameraSensorInfo sensorInfo;\n\tControlInfoMap sensorControls;\n\tControlInfoMap lensControls;\n\tSize bdsOutputSize;\n\tSize iif;\n};\n\nclass IPAIPU3Interface : public IPAInterface\n{\npublic:\n\n\tvirtual int32_t init(\n\t\tconst IPASettings &settings,\n\t\tconst IPACameraSensorInfo &sensorInfo,\n\t\tconst ControlInfoMap &sensorControls,\n\t\tControlInfoMap *ipaControls) = 0;\n\n\tvirtual int32_t start() = 0;\n\n\tvirtual void stop() = 0;\n\n\tvirtual int32_t configure(\n\t\tconst IPAConfigInfo &configInfo,\n\t\tControlInfoMap *ipaControls) = 0;\n\n\tvirtual void mapBuffers(\n\t\tconst std::vector<libcamera::IPABuffer> &buffers) = 0;\n\n\tvirtual void unmapBuffers(\n\t\tconst std::vector<uint32_t> &ids) = 0;\n\n\tvirtual void queueRequest(\n\t\tconst uint32_t frame,\n\t\tconst ControlList &controls) = 0;\n\n\tvirtual void computeParams(\n\t\tconst uint32_t frame,\n\t\tconst uint32_t bufferId) = 0;\n\n\tvirtual void processStats(\n\t\tconst uint32_t frame,\n\t\tconst int64_t frameTimestamp,\n\t\tconst uint32_t bufferId,\n\t\tconst ControlList &sensorControls) = 0;\n\n\tSignal<uint32_t, const ControlList &, const ControlList &> setSensorControls;\n\n\tSignal<uint32_t> paramsComputed;\n\n\tSignal<uint32_t, const ControlList &> metadataReady;\n};\n\nwhich does not change by adding the const lines to the .mojo file.\n\nit seems the const declarations inside mojo files are only intended for use\ninside the mojo files (for e.g. arg default values) and are nor propagated\nto the generic code.\n\nSo AFAICT this means that the whole load/create IPA by IPA-proxy type idea\nwill not work.\n\nRegards,\n\nHans","diff":"diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom\nindex d9a50b01d..b430ae5fd 100644\n--- a/include/libcamera/ipa/ipu3.mojom\n+++ b/include/libcamera/ipa/ipu3.mojom\n@@ -9,6 +9,8 @@ module ipa.ipu3;\n import \"include/libcamera/ipa/core.mojom\";\n \n struct IPAConfigInfo {\n+\tconst string kInterfaceName = \"ipu3\";\n+\n \tlibcamera.IPACameraSensorInfo sensorInfo;\n \tlibcamera.ControlInfoMap sensorControls;\n \tlibcamera.ControlInfoMap lensControls;\n@@ -17,6 +19,8 @@ struct IPAConfigInfo {\n };\n \n interface IPAIPU3Interface {\n+\tconst string kInterfaceName = \"ipu3\";\n+\n \tinit(libcamera.IPASettings settings,\n \t     libcamera.IPACameraSensorInfo sensorInfo,\n \t     libcamera.ControlInfoMap sensorControls)\n","prefixes":[]}