From patchwork Thu Dec 11 23:22:41 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: 25510 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 35B9AC3257 for ; Thu, 11 Dec 2025 23:24:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EDD5A61667; Fri, 12 Dec 2025 00:24:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="c+4/aKfw"; dkim-atps=neutral Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 84A7761623 for ; Fri, 12 Dec 2025 00:24:05 +0100 (CET) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7bab7c997eeso761970b3a.0 for ; Thu, 11 Dec 2025 15:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765495444; x=1766100244; 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=+PkMvzCnM9G5wbdm2DgdHRiNaN/qiCPxWjNd922vzx0=; b=c+4/aKfwKrQM95lt53CoN3/b3+6OLtnQvyxdTi/oMiawFt1pdeIgdCLOs8qTZgW8Uh bSQJSqeFltQLa64osxe8b46vilBMkreNhS6mgy2Wk1wBRLNvsRel+tq4YvBwUxQQY8ML n/lpWcxHCuTnvai3wkjQ8dRdSZGy8Xniq6kP5nC9n4wmQINiKH5RMGAATw6c8ZyJivbW fu4pWbV4ygTI1wno4yZWad1nO8IVz/mZkmfUWgGrY+PLiDc1KRXhf90wZcSb5GbasKSZ d2yqDktDNpGozIsfTPoUBC7hKIEQn+acD4GZ3fiAzBcls/VuNknr6vuwEzS0i5ULn3C2 Ho9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765495444; x=1766100244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+PkMvzCnM9G5wbdm2DgdHRiNaN/qiCPxWjNd922vzx0=; b=o7Rbglaa9GmhaauETrFoE/+0VSF9pBDpF2T+IpDIlcvJPNVfYCN3LFzwJWCK5vW2vg yL6ofHMQEB4+U8Dcj1bjJBX+CBrVGIjmrlpEuMM+oIJbLwiSSFBOqwZWioQyoQD+gLW4 qurmN1HNPnVBsZZGDwcIkEyQdE/D3OJw5NoM9fHfHQXsFiqzu8MqmhxbZ2DR8Zv3QZ11 kPAGs23SvkDijuupT0iHbf34uRGz/buCIzMsymvNvnrVbCcQ9U/RRv56x+xsx2auXWM4 R/YAhtGOm84cRpfTlz1LrI7IxWXYna6xNVlL0SVS7ltnxIGfFY//or4WU73DRGN8Azfj kt7g== X-Gm-Message-State: AOJu0YyzyNtQQISgnEmfz04I2S89ebhqKruD5vjNeD/bUQvHgg0Jq/Xy rNMwBhQmfKerI54J3iaH1mWjVijvyX+HM2dXHQ2jRVCv0jCCpCzHsSXbeXBxkQrIF9IGGVkjIL3 cNitY X-Gm-Gg: AY/fxX7Xd1MZE0axF++oo70rRuPKQ6kU8DBrai4zyuiOsajX7pAUn9J74TMx8uJb99I VJ6ln4UZzxmLbCULg4Y0PDPoYrsGZUCj+PNVZ1+CCZaV5YkFXsAxjfQ80gcG7MFt4GPJ9lI0GIK ZnRWQ1XBPl42NOFGdS56GVzfZUhRUulua923/2L12P7haPh9h4ynbTDIu8hAhGKary5j8g4Sus2 qguSEYGMJpqcnd5/TisT1zJjjHt2Hk8jR4fVptEUDUB4Sp4VfOsQl6NjN7ZfbziFlf4g0IoYFvd KuktN2eiiVq1+s5HL8Gq6pEood/e1WSsBfBP7k9QIh5luqByUnV4ryGslIAy2JoP/mKZfrCwKuV 85WtkCLz/zY7w2UJ7RuM2jAlenP0FfFK1jZFt4K2gH2eHM2HOBnW6aRObUiUvQls8mbfHtZXp7U yFeh+p9zzj3vhKThYKCJ26j9TPjO9jdtO6VBt8wHnpyc1N14iNyAlT0x+ZxM+Byw== X-Google-Smtp-Source: AGHT+IER8oGAiRxKjIB+zvgd3sYh4rV/lz7tmlNDxB2LkBQFQQQF6epwLuP5xbRlhYWZz9H7Kn+dBA== X-Received: by 2002:a05:6a00:300d:b0:7e8:4471:ae74 with SMTP id d2e1a72fcca58-7f669e80288mr174678b3a.64.1765495443835; Thu, 11 Dec 2025 15:24:03 -0800 (PST) Received: from inspiron14p-linux (M106185144161.v4.enabler.ne.jp. [106.185.144.161]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7f4c4ab52aasm3399933b3a.38.2025.12.11.15.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 15:24:03 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Kieran Bingham , Milan Zamazal Subject: [PATCH v5 16/20] libcamera: software_isp: debayer: Make the debayer_ object of type class Debayer not DebayerCpu Date: Thu, 11 Dec 2025 23:22:41 +0000 Message-ID: <20251211232246.31330-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251211232246.31330-1-bryan.odonoghue@linaro.org> References: <20251211232246.31330-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" Make the type of object Debayer not DebayerCpu thus allowing us to assign the object to either DebayerCpu or DebayerEGL. Reviewed-by: Kieran Bingham Reviewed-by: Milan Zamazal Signed-off-by: Bryan O'Donoghue --- include/libcamera/internal/software_isp/software_isp.h | 5 ++--- src/libcamera/software_isp/software_isp.cpp | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h index 786246592..ad89c9b3c 100644 --- a/include/libcamera/internal/software_isp/software_isp.h +++ b/include/libcamera/internal/software_isp/software_isp.h @@ -37,7 +37,7 @@ namespace libcamera { -class DebayerCpu; +class Debayer; class FrameBuffer; class PixelFormat; class Stream; @@ -94,8 +94,7 @@ private: void statsReady(uint32_t frame, uint32_t bufferId); void inputReady(FrameBuffer *input); void outputReady(FrameBuffer *output); - - std::unique_ptr debayer_; + std::unique_ptr debayer_; Thread ispWorkerThread_; SharedMemObject sharedParams_; DebayerParams debayerParams_; diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 7c9ad9160..b31a374d8 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -348,7 +348,7 @@ int SoftwareIsp::start() ispWorkerThread_.start(); - return debayer_->invokeMethod(&DebayerCpu::start, + return debayer_->invokeMethod(&Debayer::start, ConnectionTypeBlocking); } @@ -360,7 +360,7 @@ int SoftwareIsp::start() */ void SoftwareIsp::stop() { - debayer_->invokeMethod(&DebayerCpu::stop, + debayer_->invokeMethod(&Debayer::stop, ConnectionTypeBlocking); ispWorkerThread_.exit(); @@ -394,7 +394,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_); }