{"id":23225,"url":"https://patchwork.libcamera.org/api/1.1/patches/23225/?format=json","web_url":"https://patchwork.libcamera.org/patch/23225/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20250422215920.4297-13-bryan.odonoghue@linaro.org>","date":"2025-04-22T21:59:05","name":"[12/27] libcamera: software_isp: Virtual base class reference in invokeMethod","commit_ref":null,"pull_url":null,"state":"rfc","archived":false,"hash":"bfdbecb1ce12ef3547852b4af27eb3aa7ca75b15","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23225/mbox/","series":[{"id":5142,"url":"https://patchwork.libcamera.org/api/1.1/series/5142/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5142","date":"2025-04-22T21:58:53","name":"RFC: Add in a eGL based GPUISP in libcamera","version":1,"mbox":"https://patchwork.libcamera.org/series/5142/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23225/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23225/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 616C1C331F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 21:59:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BF1B068B37;\n\tTue, 22 Apr 2025 23:59:44 +0200 (CEST)","from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0902068AD9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 23:59:35 +0200 (CEST)","by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-43cfa7e7f54so2379075e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 14:59:35 -0700 (PDT)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-44092d2eccesm2726615e9.20.2025.04.22.14.59.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 14:59:33 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"SIfIwKwY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1745359174; x=1745963974;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=pIYKGEgJHbPpVkSe0i1IAX+OEn10lQm6h+GbVEYh0uM=;\n\tb=SIfIwKwYFSZuJHPc+NTE3USP30p3WgzoYbEmMPJulnJtzOK++e3EB7NXNMk89fnbJi\n\tzAHj2vMhQSUVJB4kmYJj1fskWefeYXIcTkjaMjsiL3xUjPQLLdyR2szv2xl8Jjn3Hqcm\n\tgqkzyY2ZcTuxD9tbDmhDU8DV91SUfgKVB74fsWM367H1jtdT49/usnOTqdxxKuc71vKS\n\tnkTrBKc7EbF4pYvRbBxeTuZqcVTTGXRnwyZhrzK3jTC56z1ZCus2/TRraV+df+zN2222\n\twGNjIXPP1z6Z/mr1ezxu4OrUfWLBo0lDmrkja4CWp6tKueCX0BmccCv16OjwikbwmAz8\n\tacpw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745359174; x=1745963974;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=pIYKGEgJHbPpVkSe0i1IAX+OEn10lQm6h+GbVEYh0uM=;\n\tb=F7i3Tvt4Ayn1c9SfkKcmlFfjCL22AJfx3649Ncq9S5zYKEJipKyziH0N5Ca4cOML1l\n\tmH0l69MPfrxISvcuuHZNjmha2NQpi9vilOa0//Qf0+cexSA2kwac464X9+xClAZDLt2r\n\tml3SiuMNuP0i3cW7RejXE9Dl82r4Mp1DvM8Dtls63KAAy+pdpPD1vciyulzMljnwy27f\n\tHdp1xCmolfDdNxxGlZOTWeGqW4QJNLfODTDwyEAoRTW2RxmM2xfIvr4JKFvYEnCmYYfb\n\teV2NMoqM/wUld6R/WIh2/pG+xR/AL7x84mliqUqN8GKQ7/V074MTOV3EK8nrkfTBRldC\n\tet1w==","X-Gm-Message-State":"AOJu0YxQxDw+rMXtV+UXFdc0OHL57rMQXPqlquZC9wENgj8PQBIMYbTe\n\t8sA5d+ed2U98pxEGcr8URYWAJhvYmdZT3vg7xAzP2F0cVtdrykIYxxjUqtkrDgODit7IskFBvme\n\tBDUU=","X-Gm-Gg":"ASbGncvFw4d7OAr8+JT5EQnK4IZxI3MeYTgfdHcNgrovQweVTj1osocchcQhv/Bt6Ii\n\tBmHwjuvfb98CO/JkSfEPoqm21KmenO1Zf6/69QYmgn0tUbwPHFoaI3oq+f5+mryhQ7nqg37faFr\n\toNhpqQZXEN9CgAYgVZDcLk8yAxUdlrAANZ5L85f8z/D47Q6c922Q58p1DEUH/RZA4195exYffD+\n\tD/jFsk0I2d/P1pDSQJV7kNtjSSXUo4on2onwtv6BB89A0i6+stuwf922yoL8FOreKD+0ZLAkSK+\n\taWdDke2fjJrxSp9d4zLlFGrY7HFnXSfV18knFbwnXbFtvin61cHMbPuXyt7swNCZ/6+kxgcl35a\n\tCfByaRYZ8RrlxTLumC9XK","X-Google-Smtp-Source":"AGHT+IFnWONnQx15SzWWQSn3bPx2mTYSYvL9cjSABg6B9o3vsAw6PHgKh6LHwWk5QUZhUu0NnqIb7g==","X-Received":"by 2002:a05:600c:4e0a:b0:439:5f04:4f8d with SMTP id\n\t5b1f17b1804b1-44091f1facdmr4124395e9.12.1745359174334; \n\tTue, 22 Apr 2025 14:59:34 -0700 (PDT)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie","Subject":"[PATCH 12/27] libcamera: software_isp: Virtual base class reference\n\tin 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","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>"},"content":"Use the virtual base class function pointer in invokeMethod. When we point\nthe debayer_ object to a different class the instantiation of the virtual\nmethod will be invoked. This means we can take a pointer to DebayerCpu or\nDebayerOpenGL and get the desired function @ invokeMethod.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/software_isp.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex e36aa246..c3dc21de 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -263,7 +263,7 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg,\n \tdebayer_->moveToThread(&ispWorkerThread_);\n \tispWorkerThread_.start();\n \n-\treturn debayer_->invokeMethod(&DebayerCpu::configure,\n+\treturn debayer_->invokeMethod(&Debayer::configure,\n \t\t\t\t      ConnectionTypeBlocking, inputCfg,\n \t\t\t\t      outputCfgs, ccmEnabled_);\n }\n@@ -388,7 +388,7 @@ void SoftwareIsp::stop()\n void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output)\n {\n \tipa_->computeParams(frame);\n-\tdebayer_->invokeMethod(&DebayerCpu::process,\n+\tdebayer_->invokeMethod(&Debayer::process,\n \t\t\t       ConnectionTypeQueued, frame, input, output, debayerParams_);\n }\n \n","prefixes":["12/27"]}