[{"id":34000,"web_url":"https://patchwork.libcamera.org/comment/34000/","msgid":"<20250422223619.GV17813@pendragon.ideasonboard.com>","date":"2025-04-22T22:36:19","subject":"Re: [PATCH 12/27] libcamera: software_isp: Virtual base class\n\treference in invokeMethod","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Bryan,\n\nThank you for the patch.\n\nOn Tue, Apr 22, 2025 at 10:59:05PM +0100, Bryan O'Donoghue wrote:\n> Use the virtual base class function pointer in invokeMethod. When we point\n> the debayer_ object to a different class the instantiation of the virtual\n> method will be invoked. This means we can take a pointer to DebayerCpu or\n> DebayerOpenGL and get the desired function @ invokeMethod.\n\nThis seems to be a fix that could be merged already, along with 18/27.\nThe commit message needs a bit of an update: there's no DebayerOpenGL\nclass yet.\n\nAre there other cleanups, fixes or refactoring patches that you think\ncould be fast-tracked to shrink the series ? I'm thinking of patches\nthat would make sense on their own, without depending on the design\ndecisions of the rest of the series.\n\n> Signed-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(-)\n> \n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index 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>","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 B6856C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 22:36:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8BD7868ACE;\n\tWed, 23 Apr 2025 00:36:23 +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 7DEF868ACA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Apr 2025 00:36:22 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4BCB316A;\n\tWed, 23 Apr 2025 00:36:21 +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=\"pd+9ZWQD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745361381;\n\tbh=ytBYDl8xH4aV4DpQz6AcpLhqVC6S3v7IT4KQZxaEEoA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pd+9ZWQDvnlZIPLof9oajVJFvsBLHy2Vqi7hcPcATM8IC3UN/sjEeIDm8RbOw2I4z\n\tTH5T6OqZe2gbDtufA46DVqj8etFOHZQrtbfjb2AlJjf0Soz7yXAwOScTuK/n9NM/Bp\n\tFuGWNx0AC/awfOrq1D8JBXB1DwGdLWd+yvRG9oZU=","Date":"Wed, 23 Apr 2025 01:36:19 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, hdegoede@redhat.com,\n\tmzamazal@redhat.com, bod.linux@nxsw.ie","Subject":"Re: [PATCH 12/27] libcamera: software_isp: Virtual base class\n\treference in invokeMethod","Message-ID":"<20250422223619.GV17813@pendragon.ideasonboard.com>","References":"<20250422215920.4297-1-bryan.odonoghue@linaro.org>\n\t<20250422215920.4297-13-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250422215920.4297-13-bryan.odonoghue@linaro.org>","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>"}}]