From patchwork Mon Jul 27 11:58:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 27511 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F1E0FBE080 for ; Mon, 27 Jul 2026 11:58:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DFFAA67F70; Mon, 27 Jul 2026 13:58:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="pEWkCiV5"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="H3C7Byig"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D92FA67EB2 for ; Mon, 27 Jul 2026 13:58:28 +0200 (CEST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66RAMDw23604288 for ; Mon, 27 Jul 2026 11:58:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=P/S7Ji9hDp+1aLrBTOtMpf FZOQ+bqAIB9f5PThRsZfg=; b=pEWkCiV57bxEh91j/ihAzaWk+mp6gu0PqX9pjG pJGUEAEVBkdNoIsjt3HPw2kFuTFj/3tP4l3CYIx2zY3AOT56Rlv7lxn6HM74Nq4f XWwiMMg/fcHGWGjvXA1NIaF8OsW26u1A+V7x/xf7/YI0DLEOpzIn9PZGLwO8wj+F YudtWSLGVV3X76tbSxt9dJDAZjbRIOos+4ixkFB+HUd0MVHiEuxw7h/lKyWpCLHU EKYs6EkLV052bLfAIyYqZDX3ItArcsha2mjOAmoHL7lmIxklwM5w5ArBkDtZksRy irMYSbapucvzleT+pvVdd8yb9srSH94Lkv6ewTkSL9U0s6Sw== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fngysuany-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 27 Jul 2026 11:58:26 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-51bff5c7035so58017921cf.2 for ; Mon, 27 Jul 2026 04:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785153505; x=1785758305; darn=lists.libcamera.org; h=content-transfer-encoding:content-type:subject:to:content-language :from:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=P/S7Ji9hDp+1aLrBTOtMpfFZOQ+bqAIB9f5PThRsZfg=; b=H3C7ByigETzMWRu6qx4h5WwGshB23bzkefxvsqk0JpWyFAuygsQ6Vn80geS9FqVCDb IQRf9M6QNvErcqD7mdTVxGSB7w2Pc+hc+3QUf7Lf7h9x9alNJMGsTf8U0z8p8nDJor1t nUDsjSTHiWhjg9wtOeYDAGoaOr/ayOZl+phrb7QPZrTpUv0Ia85ZCKNvCjxM3eeg9k/V +lsQTkAXoreXTaNv+FDpUgaSfOw/NKDvDszsodmPs82tqpIfnBh6NMjR701VQP2YG9/x 1hboLGKpsXgAgqSlcjIqwhgLfI22x3EmoF61ygYidPIWAAtt3YYANe0PowJYGlSalzwD GByQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785153505; x=1785758305; h=content-transfer-encoding:content-type:subject:to:content-language :from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=P/S7Ji9hDp+1aLrBTOtMpfFZOQ+bqAIB9f5PThRsZfg=; b=rViG07Y/ni/dg/OKq//s/T8mjwEDPv5sMjTZ6BP95Fveoq64PHE4adIrF3+QNVo6tF J5C5wBI1UQ+2FKnRLepZrb2VoOZmb5A2czEgP3cnOhQ3QSfCFEbQy8Y5HQulBS4K6PBN RuegzykG2V46Ui638WHsAtGFkLsPe/vL2kQBe6Wzra4Ar5j3RkDt/It66wuT53olOPOb 1pxN5IxBirA1xMHSWSkQlVjaAnWMdq9JGRI7otaKz1eB2Eud1anRmcluwRKrPcK3zxGa NXEEFKtrumDT27txcNnV6j4YGK9zEk2rViruSFFGoTx3wW/gEeHUQfhsRPdh7GVjuf+X +IEg== X-Gm-Message-State: AOJu0Yxj7SJ0tkLCuq7Wiw4dBeCtuk7eqzSF72SvYt9TGqa2iqt13wov QsBwUJHz/Qkmr36PMCXfvbPG3XQdFOX+hcjAfCO3pxYbwRKEe8iYyfaBuAQUmTOWufXDqctZ4Rn Hq6ETFy22P2mdjM8RhNDlyny6Z5kdt3X/YV0QFllJV4qY61KhzWJCJvu2MZCttR6Un6Xp0MYHl3 bgj/Azs3Kz X-Gm-Gg: AR+sD10l83ecsErzz8Ga0IWP2vtkjLVcxWy9D3y9R3I7TexmA2nPayvMI+dhFvDAdNR bvfAWUtdGy68KtDECq47e3oJLTPqg8B0tHKFBCC10bUZSyVKwUjhPSlLkqnq10QQWsnYHPPhMi7 TGqh+hYvj5kf2vfSvjBmkQGc0nR100KSJ/FBayrc+GNCRIg1xQ5DR+3yJPrhYHLjOUfRpCHDgcs Gg9un6OfUP/uVn3kUt/hllCleZ1uq8gS+P0tNmNtLZ05MSDgsNlH/ymkW25zJWoj0iK6UurkrfJ i+DTua02Mn7Ke/pfSLusDgyu/LbHj2GP98nJDrOlUCqb18rjOfCcsgap2p4dFjNm6NrmM+2w6Z/ zkSkgXYPfQUzYfygBVzw= X-Received: by 2002:ac8:7dc5:0:b0:51c:e6a:1b5a with SMTP id d75a77b69052e-529a8382068mr84560521cf.12.1785153505437; Mon, 27 Jul 2026 04:58:25 -0700 (PDT) X-Received: by 2002:ac8:7dc5:0:b0:51c:e6a:1b5a with SMTP id d75a77b69052e-529a8382068mr84560241cf.12.1785153504970; Mon, 27 Jul 2026 04:58:24 -0700 (PDT) Received: from [10.40.99.10] ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1c32af45ecsm618439066b.28.2026.07.27.04.58.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 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 Content-Language: en-US, nl To: libcamera devel , =?utf-8?q?Barna?= =?utf-8?b?YsOhcyBQxZFjemU=?= Subject: About loading / creating IPAs by (proxy) type name X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI3MDExNyBTYWx0ZWRfX8+6GUJNrKUEi 1uvoqae0T8shgsDW95PbB2t4j3cnmatFtDdMxfH7Q2SzFgU9/eLttMi7SlFyagOj7ZuDGC/j9nX I/cBHiwBZsftFQjuj9/Fx8TcmnCf3Xolhb2wg6Wx/caa6BCJeJbN6VTIUaIetefEAH7jLzI/wSW 11t0gPEytvOPyxdOVpxZEgD77Xb1gFoR4ayr0pmHww+NNs/GYyRIqhTECBqPWakT7/A9jFTgf0D xpaLJlHt0o/cc/E2SrP2tpy+oHhn36FPSdE8Qn2Ff4EIxFkuN+JC9hmAu1nnT+i/wmm8Ay/8MqI 3C5zT3NFdHw5u42gh63CTcNRA5Il4QFwqpzSI9J+tE4rpnoKLwFW8eXo7PHlWWF55kAR49zRU/7 MFjy7LX1gVTvq30ShInCNsoKfAATGJX0B4nF2SlKvt0QwfHuDw67Q8edvRQwwEBdes02GfN+6gt ebneEb6E6R8vKHxOHSw== 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 a=WeENfcodrlLV9YRTxbY/uA==:117 a=rrvG0T/C2D967D07Ol03YQ==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=YAyIRdgMAAAA:8 a=FkqbDAA5nXPtqFkYiiQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 a=o1rO4XtwZBNj6n05oSJ_:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI3MDExNyBTYWx0ZWRfX5xz1V5JPxGpR /j89j1sk3wde1hcBLYORUVOLml2OqUCghp8+Y4rqZCFtsp6jaCO/t2nQJuhmBkA0LPQLj0Bzu6L fNPm1j5l3baFUbxDUc/mji9pqIJztEo= X-Proofpoint-ORIG-GUID: gM1x9KX6pLyUsYlmaEoDsCj_Q5zUfTDf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.134, FMLib:17.12.100.49 definitions=2026-07-27_03,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1031 malwarescore=0 bulkscore=0 adultscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607270117 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi All, As discussed I've been looking into loading / creating IPAs by (proxy) type name. A way to do this was proposed by Barnabás here: https://patchwork.libcamera.org/patch/26503/ Barnabás Pőcze wrote: """ > --- a/include/libcamera/internal/ipa_manager.h > +++ b/include/libcamera/internal/ipa_manager.h > @@ -34,12 +34,13 @@ public: > > template > static std::unique_ptr createIPA(PipelineHandler *pipe, > + const char *name, > uint32_t minVersion, > uint32_t maxVersion) > { I agree with this change, but I wish that the name could be derived from `T`. And that is quite easy to do, just adding a static constexpr const char *name() { return "..."; } and then using `T::name()` here works mostly. But unfortunately the raspberry pi ipa modules are not compatible at the moment with this approach. I have tried to come up with something, but so for has failed. Maybe the `name` argument could be kept like this: const char *name = T::name() and then the rpi pipeline handler could be changed to use the specific names. Not a fan of this in any case. """ This sounds nice and simple, but the being passed to the template here is an IPA proxy which gets auto-generated by mojo. mojo does support const variables so I've tried this: Unfortunately this results in the follow autogenerated code: struct IPAConfigInfo { public: #ifndef __DOXYGEN__ IPAConfigInfo() = default; template< typename T1 = IPACameraSensorInfo, typename T2 = ControlInfoMap, typename T3 = ControlInfoMap, typename T4 = Size, typename T5 = Size, std::enable_if_t> * = nullptr, std::enable_if_t> * = nullptr, std::enable_if_t> * = nullptr, std::enable_if_t> * = nullptr, std::enable_if_t> * = nullptr > IPAConfigInfo(T1 &&_sensorInfo, T2 &&_sensorControls, T3 &&_lensControls, T4 &&_bdsOutputSize, T5 &&_iif) : sensorInfo(std::forward(_sensorInfo)) , sensorControls(std::forward(_sensorControls)) , lensControls(std::forward(_lensControls)) , bdsOutputSize(std::forward(_bdsOutputSize)) , iif(std::forward(_iif)) { } #endif IPACameraSensorInfo sensorInfo; ControlInfoMap sensorControls; ControlInfoMap lensControls; Size bdsOutputSize; Size iif; }; class IPAIPU3Interface : public IPAInterface { public: virtual int32_t init( const IPASettings &settings, const IPACameraSensorInfo &sensorInfo, const ControlInfoMap &sensorControls, ControlInfoMap *ipaControls) = 0; virtual int32_t start() = 0; virtual void stop() = 0; virtual int32_t configure( const IPAConfigInfo &configInfo, ControlInfoMap *ipaControls) = 0; virtual void mapBuffers( const std::vector &buffers) = 0; virtual void unmapBuffers( const std::vector &ids) = 0; virtual void queueRequest( const uint32_t frame, const ControlList &controls) = 0; virtual void computeParams( const uint32_t frame, const uint32_t bufferId) = 0; virtual void processStats( const uint32_t frame, const int64_t frameTimestamp, const uint32_t bufferId, const ControlList &sensorControls) = 0; Signal setSensorControls; Signal paramsComputed; Signal metadataReady; }; which does not change by adding the const lines to the .mojo file. it seems the const declarations inside mojo files are only intended for use inside the mojo files (for e.g. arg default values) and are nor propagated to the generic code. So AFAICT this means that the whole load/create IPA by IPA-proxy type idea will not work. Regards, Hans diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom index d9a50b01d..b430ae5fd 100644 --- a/include/libcamera/ipa/ipu3.mojom +++ b/include/libcamera/ipa/ipu3.mojom @@ -9,6 +9,8 @@ module ipa.ipu3; import "include/libcamera/ipa/core.mojom"; struct IPAConfigInfo { + const string kInterfaceName = "ipu3"; + libcamera.IPACameraSensorInfo sensorInfo; libcamera.ControlInfoMap sensorControls; libcamera.ControlInfoMap lensControls; @@ -17,6 +19,8 @@ struct IPAConfigInfo { }; interface IPAIPU3Interface { + const string kInterfaceName = "ipu3"; + init(libcamera.IPASettings settings, libcamera.IPACameraSensorInfo sensorInfo, libcamera.ControlInfoMap sensorControls)