From patchwork Tue Apr 22 21:59:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 23225 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 616C1C331F for ; Tue, 22 Apr 2025 21:59:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BF1B068B37; Tue, 22 Apr 2025 23:59:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SIfIwKwY"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0902068AD9 for ; Tue, 22 Apr 2025 23:59:35 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43cfa7e7f54so2379075e9.1 for ; Tue, 22 Apr 2025 14:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745359174; x=1745963974; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pIYKGEgJHbPpVkSe0i1IAX+OEn10lQm6h+GbVEYh0uM=; b=SIfIwKwYFSZuJHPc+NTE3USP30p3WgzoYbEmMPJulnJtzOK++e3EB7NXNMk89fnbJi zAHj2vMhQSUVJB4kmYJj1fskWefeYXIcTkjaMjsiL3xUjPQLLdyR2szv2xl8Jjn3Hqcm gqkzyY2ZcTuxD9tbDmhDU8DV91SUfgKVB74fsWM367H1jtdT49/usnOTqdxxKuc71vKS nkTrBKc7EbF4pYvRbBxeTuZqcVTTGXRnwyZhrzK3jTC56z1ZCus2/TRraV+df+zN2222 wGNjIXPP1z6Z/mr1ezxu4OrUfWLBo0lDmrkja4CWp6tKueCX0BmccCv16OjwikbwmAz8 acpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745359174; x=1745963974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pIYKGEgJHbPpVkSe0i1IAX+OEn10lQm6h+GbVEYh0uM=; b=F7i3Tvt4Ayn1c9SfkKcmlFfjCL22AJfx3649Ncq9S5zYKEJipKyziH0N5Ca4cOML1l mH0l69MPfrxISvcuuHZNjmha2NQpi9vilOa0//Qf0+cexSA2kwac464X9+xClAZDLt2r ml3SiuMNuP0i3cW7RejXE9Dl82r4Mp1DvM8Dtls63KAAy+pdpPD1vciyulzMljnwy27f Hdp1xCmolfDdNxxGlZOTWeGqW4QJNLfODTDwyEAoRTW2RxmM2xfIvr4JKFvYEnCmYYfb eV2NMoqM/wUld6R/WIh2/pG+xR/AL7x84mliqUqN8GKQ7/V074MTOV3EK8nrkfTBRldC et1w== X-Gm-Message-State: AOJu0YxQxDw+rMXtV+UXFdc0OHL57rMQXPqlquZC9wENgj8PQBIMYbTe 8sA5d+ed2U98pxEGcr8URYWAJhvYmdZT3vg7xAzP2F0cVtdrykIYxxjUqtkrDgODit7IskFBvme BDUU= X-Gm-Gg: ASbGncvFw4d7OAr8+JT5EQnK4IZxI3MeYTgfdHcNgrovQweVTj1osocchcQhv/Bt6Ii BmHwjuvfb98CO/JkSfEPoqm21KmenO1Zf6/69QYmgn0tUbwPHFoaI3oq+f5+mryhQ7nqg37faFr oNhpqQZXEN9CgAYgVZDcLk8yAxUdlrAANZ5L85f8z/D47Q6c922Q58p1DEUH/RZA4195exYffD+ D/jFsk0I2d/P1pDSQJV7kNtjSSXUo4on2onwtv6BB89A0i6+stuwf922yoL8FOreKD+0ZLAkSK+ aWdDke2fjJrxSp9d4zLlFGrY7HFnXSfV18knFbwnXbFtvin61cHMbPuXyt7swNCZ/6+kxgcl35a CfByaRYZ8RrlxTLumC9XK X-Google-Smtp-Source: AGHT+IFnWONnQx15SzWWQSn3bPx2mTYSYvL9cjSABg6B9o3vsAw6PHgKh6LHwWk5QUZhUu0NnqIb7g== X-Received: by 2002:a05:600c:4e0a:b0:439:5f04:4f8d with SMTP id 5b1f17b1804b1-44091f1facdmr4124395e9.12.1745359174334; Tue, 22 Apr 2025 14:59:34 -0700 (PDT) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-44092d2eccesm2726615e9.20.2025.04.22.14.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 14:59:33 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org, bod.linux@nxsw.ie Subject: [PATCH 12/27] libcamera: software_isp: Virtual base class reference in invokeMethod Date: Tue, 22 Apr 2025 22:59:05 +0100 Message-ID: <20250422215920.4297-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250422215920.4297-1-bryan.odonoghue@linaro.org> References: <20250422215920.4297-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 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" Use the virtual base class function pointer in invokeMethod. When we point the debayer_ object to a different class the instantiation of the virtual method will be invoked. This means we can take a pointer to DebayerCpu or DebayerOpenGL and get the desired function @ invokeMethod. Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index e36aa246..c3dc21de 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -263,7 +263,7 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg, debayer_->moveToThread(&ispWorkerThread_); ispWorkerThread_.start(); - return debayer_->invokeMethod(&DebayerCpu::configure, + return debayer_->invokeMethod(&Debayer::configure, ConnectionTypeBlocking, inputCfg, outputCfgs, ccmEnabled_); } @@ -388,7 +388,7 @@ void SoftwareIsp::stop() void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output) { ipa_->computeParams(frame); - debayer_->invokeMethod(&DebayerCpu::process, + debayer_->invokeMethod(&Debayer::process, ConnectionTypeQueued, frame, input, output, debayerParams_); }