From patchwork Wed Dec 10 00:31:33 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: 25412 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 3EEA8BD1F1 for ; Wed, 10 Dec 2025 00:32:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E80CC6145F; Wed, 10 Dec 2025 01:32:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="bZNGlaYe"; dkim-atps=neutral Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E61FB61450 for ; Wed, 10 Dec 2025 01:32:38 +0100 (CET) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-343dfb673a8so6335009a91.0 for ; Tue, 09 Dec 2025 16:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765326757; x=1765931557; 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=bZNGlaYe83XDuyn2+h6mDw40pa7r+jRwzZJgR+8ZQ4SOJDrsAugypfFn1FPImgcNGJ mw4ov1HeYHlxhVj9joxiGSiMvNrejQh6i8Jy88SYpBKgXiMfWqmGF771eIrd9BOVcEFf 7fvqX2/OILKeZ1qB6EGKoEiuVBXKMQF9s7BLp2sjr/MQIRPCNXmAzoR/16ZFir//lyW4 mGVbFxfniTkVv+98Cl1GnZqUodIbMQJ91AggaCaHL1Hu5IxY186+poqRst3Br4fsX+7+ fjK+BJzwfYH6a7L1v51jvCdwabynnDmH2ruxx2Yso2yC7TJCZbVIGe3Lub13Miy5XfVv uTbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765326757; x=1765931557; 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=bIaVnnQ+MEaHzC5yUNRZb5yksnLzrB9TRmyyN9GMTfjoYiMQfnZ8PZcH64uBCWIQEr nG5hIL6vtiJGhEJoxFZOkzln6x1tyCuS+fxmX8eaS69pln6NQ4fVxyCAPl+i48w/pow3 qV/bypmRDSB+QZMSPc+T+9QezeNR/WkCiI+c0J27tu51EGQcQnvzdzURyRuIeBv2f2rk hWlPgBwjduht/zHIC/eDC6QZU9P4aLV/OKvxmIJM6zoVDBBJbrPZ6uTw+CQFkfBV/qQ5 IWfwKf+IW4TD4ByHnl6qyQiAXy3EwzGisM1ku0hHgNZMU0U+pK+9JhUZm5JkdzC8EhdQ PDIw== X-Gm-Message-State: AOJu0YxMSlYWyF9dQvvGb/BuIo7pJkLwm72ooczwXuEHyx/UEX1HybN3 Z/HxahA6o/m0BQ0Ximm1J4tWTynako/ax3wGK7MVfru0xHHTwDKN5zT5YIUuAYLeBidNHc+JWYB j9tRc X-Gm-Gg: AY/fxX42Hq4fYpw/P1Y5zA/mc6mAQb99MgSvtL27asasm4RTUd1Q+0olbNHdD84CnE3 K7JDjeeuomOtnyEGxVEs+SIJRhIQWKjW3PAcEmJT/zt6NFFWfOkz+cwVl2dBPbZU76QDkI5GQWS 3RhLnu+MqrjoSkrwgRqEn0+0wcVXaPEfhyKkMyJJ8ERe+Dvr41WlbpRWxgSV+8dorXPus7YFLxW 7sOgvYa9qnyH7QW52oKizTu6oVsKwmckq+ioYtLZgO5X1ZwzSlNVw1thlTrElXON3vnic2iAsra HWuf77H0DpYb7w7Mma2/3lf8SA/yIArzMxMk3DvL+S/SKQdY4jx2BOMaaw1O0Mhnn2t2yLOZFHW 07z32mRVZCI3fXwWEVBIvUM+lSJ0Kl4w3AZOLNz7F6OfD77Dk/hBdMdre+z5x6ObKoR3M2yxTcy tJfABxVa3Dfiggd66gHW72I/uXdUjeNjdUZFE+6Ql2KrRtQcSrdy8bUpyDC74Ap/to X-Google-Smtp-Source: AGHT+IF5FbmLerbJDwuDom+J2hLRXmYO6e2U51570nu+Ud3t5HAruhuaKAu3T84AIzb43Dnz2HSHlA== X-Received: by 2002:a17:90a:d44d:b0:341:8ca8:ae64 with SMTP id 98e67ed59e1d1-34a7289e773mr496227a91.35.1765326757254; Tue, 09 Dec 2025 16:32:37 -0800 (PST) Received: from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp. [150.147.107.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Dec 2025 16:32:36 -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 v4 16/20] libcamera: software_isp: debayer: Make the debayer_ object of type class Debayer not DebayerCpu Date: Wed, 10 Dec 2025 00:31:33 +0000 Message-ID: <20251210003139.43606-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251210003139.43606-1-bryan.odonoghue@linaro.org> References: <20251210003139.43606-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_); }