From patchwork Thu Jun 18 12:22:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 26951 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 C3A33C3316 for ; Thu, 18 Jun 2026 12:23:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 29689656D4; Thu, 18 Jun 2026 14:23:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FqAEfm7/"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BD98E629A8 for ; Thu, 18 Jun 2026 14:23:12 +0200 (CEST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4905529b933so7824735e9.0 for ; Thu, 18 Jun 2026 05:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781785392; x=1782390192; 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=wZj9cpOKT3N+cE5reFIhRD3D2OdcaGGh41+idBriHE4=; b=FqAEfm7/PvA1u8bGrQvB2QkFzeHx5L1axDBduWEEyzrYL46SkNMN+f4nErRrMox+CJ oAU6kZ8yNZw/94h6yMzbndpKYC5KzzzzX8MPoU1fYypoZ10T5RatUBfJQyWjoV29C2ei 6LSYZYc2tE7kBF7mkJM/sxqfQXidDxu2mcs7sV/M1uCvlJPq+6bDYC67M7FF/mea4/Rz P67JoYcU3qG+AugZKAVbnXilGuKadEXpQ4n33/9IJ5T2XrXJ1oB0B14to0CqvfwUfe9J xNqhhdDn4aQhq4vy824jgU9vFgTIyWKCXYKxIQLHyhOganXVnmtHQqZoSG9qpgBOHYV/ BwJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781785392; x=1782390192; 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=wZj9cpOKT3N+cE5reFIhRD3D2OdcaGGh41+idBriHE4=; b=qynC+Iw4Sj+0MEX7f9p7uRsjZ6Or+3eJ85vskzymafMtWqTHX2Zfeh0AnwuGyq5CS7 psSzavEqn9z/yw8/QbBFm9zPZ2WKq9Wbpxxq50zwJeaICycU75PD/Fbjyp0fFe3GAL5H f/dz7gufYfzqh7GCWLb7VS2yhKc1YNEuPNQ7nGouug43zhETHkcBXONIAiIoPA4HwIzQ B0TuvyvQ8mOOltLvhp3/w+Yopn9W6GtOJsid+2jCHgrUbrGK4Lr9ZOEOLmAhtq55gtWO eVFwPay2SZhAxmi/2T0agh9oJ7QyYXqHWVP4kPQJX7UOd+3Q4UuLbJAJ7SZ/X63CqxQL a6iQ== X-Gm-Message-State: AOJu0YxSBxR5dQe+6vqx2fCY0A/EG7xxUsFHHx3h/7XYEUpjlyYMl7pN FXuTmxuK9KP7DRcLVxNpVej1I00jpisXIISNYRPzeionNpznD9ar6XjzZKZ+oMaWrV1X1PY41fX 2dEEO7uo= X-Gm-Gg: AfdE7clSM3DWQY0Bo9yIM+rR9eQzF1IofZTZYodoIcdHBR/AFO0CyaC2McdVwHatj/O Bb+YRGAxMiID625g/Nrl9f1itYVspI+uGHNj6Z/7rdzYvku7HRzmrbTCuRebOfnxMte8fTbHGuD 83+eTtKYpNE/hgNY75r/wmp+ZgwtTCtmlZWdMRrnHmn1VZUKpLG/zO2/Jry0T+z5L3QJ7OeRVjS VC9kfJbKzhsHnUVtKVdlmsxClXcyDhF1YDyBs3/Ts6FKRhmuqPOaEn3LpMM+RvNwklj71Jcz1aI t9Anf7QMpPBpAotNX9y9P3uDsi/HdGlBU7dyGs/BpZb/MELcmU2lliVCWxLJ+SiF59puhL9hDnj Iyt7MTE5o+jYmRvXT7ATAmDPHE56h70WJA5FhafDV4ZGD7OPBxnfHaPAV42jT3yFzP++geucWTO Bq9ZA809ULu5wCNL4a58JprRS75x5JWHJXQBtDUZw= X-Received: by 2002:a05:600c:828e:b0:490:e5c1:b8bd with SMTP id 5b1f17b1804b1-4923334baa1mr148777985e9.0.1781785392199; Thu, 18 Jun 2026 05:23:12 -0700 (PDT) Received: from inspiron14p-linux ([109.76.144.236]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 05:23:11 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: bryan.odonoghue@linaro.org, pavel@ucw.cz Subject: [PATCH 19/30] libcamera: software_isp: egl: Add Ping/Pong buffers with start/stop bindings only Date: Thu, 18 Jun 2026 13:22:32 +0100 Message-ID: <20260618122245.946138-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260618122245.946138-1-bryan.odonoghue@linaro.org> References: <20260618122245.946138-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" Add in the Ping/Pong texture buffers, don't bind them to anything yet. Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 6 ++++++ src/libcamera/software_isp/software_isp_pipeline_gpu.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp index 458b65854..18a8ae17a 100644 --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp @@ -335,6 +335,10 @@ int SoftwareIspPipelineGpu::start() /* Raw bayer input as texture */ eglImageBayerIn_ = std::make_unique(gpuIspShaderPassDemosiac_.glFormat_, inputConfig_.stride / gpuIspShaderPassDemosiac_.getBytesPerPixel(), height_, inputConfig_.stride, GL_TEXTURE0, 0); + /* Intermediary ping/pong textures */ + eglImagePingPong_[0] = std::make_unique(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1); + eglImagePingPong_[1] = std::make_unique(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE2, 2); + /* Texture we will render to */ eglImageRGBAOut_ = std::make_unique(GL_RGBA, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE3, 3); @@ -344,6 +348,8 @@ int SoftwareIspPipelineGpu::start() void SoftwareIspPipelineGpu::stop() { eglImageRGBAOut_.reset(); + eglImagePingPong_[1].reset(); + eglImagePingPong_[0].reset(); eglImageBayerIn_.reset(); gpuIspShaderPassDemosiac_.stop(); diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h index 1b77bc71d..fcd622492 100644 --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h @@ -65,6 +65,7 @@ private: /* Pointer to object representing input texture */ std::unique_ptr eglImageBayerIn_; + std::unique_ptr eglImagePingPong_[2]; std::unique_ptr eglImageRGBAOut_; std::unique_ptr stats_;