{"id":26942,"url":"https://patchwork.libcamera.org/api/1.1/patches/26942/?format=json","web_url":"https://patchwork.libcamera.org/patch/26942/","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":"<20260618122245.946138-10-bryan.odonoghue@linaro.org>","date":"2026-06-18T12:22:22","name":"[09/30] libcamera: software_isp: gpu: Make Rectangle window_ a local variable in configure()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"bccc88f70ae9eec3cd9f945bcf4fb322f246f762","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/26942/mbox/","series":[{"id":6005,"url":"https://patchwork.libcamera.org/api/1.1/series/6005/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6005","date":"2026-06-18T12:22:13","name":"RFC/RFT: gpuisp: Multipass with speed optimisations on top","version":1,"mbox":"https://patchwork.libcamera.org/series/6005/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26942/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26942/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 69F0EC3301\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 12:23:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 509BE656BD;\n\tThu, 18 Jun 2026 14:23:18 +0200 (CEST)","from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 94A7362C6E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 14:23:04 +0200 (CEST)","by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-490b8ac62baso19678345e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 05:23:04 -0700 (PDT)","from inspiron14p-linux ([109.76.144.236])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2026 05:23:03 -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=\"xvaTIubi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1781785384; x=1782390184;\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=Im+zzqwJ00458QMQzuv8XikugjegTVaGOsoHOKzuyZo=;\n\tb=xvaTIubilviPD2qvOjRw10ApZdNOGJCcjzAoUW2Mj+/1LEAyPG8mDdww6Rrzy6wkWZ\n\tHhzbjVdXJBSj1DD9+CWYqN/Sl//CSB7WHuvMJ++AlQxqctOnjX7PX73Pk360i6YhNfb5\n\txr7/0qQeIAdUU3tG2Kb6ag/D3ZFju/ccyoiTZOe27YDJUifA4QgmskN+dksWcavCZxEZ\n\tKeMd4xa2i6yaVOUtfls9TwaOPYcLxSwbwvS5ZaD4PdnWNuQFkQmWXALffMqP4FbE5HCS\n\tIkUJwVrfGInKQCmbpYJS0qXcnCyKDCdD+GzcWPzpsTQ+Q5xaOpTGtnipopFp2bKS9ljE\n\t7FnQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1781785384; x=1782390184;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=Im+zzqwJ00458QMQzuv8XikugjegTVaGOsoHOKzuyZo=;\n\tb=Fy8luTS5rnxw9WekCnNWky/1By7ThBwm6dyZMD+EXAqa5LTI5w7mKe7IZbtPnJQ8Hc\n\tLf9lntdGyNM8UxsJPc+aoBU9Cn3ScDqSr7ycGChwSQzYriJ2HNiVQiKIxuTNsQaC4Rnf\n\tMcSJ0rtxrhTwxAJfXJ/Cb3BY6015pQY8jyHNkRuVRHwaGAv/VD5sJTVeR+z7bTsCSbT5\n\tVTmCs/FfcWlLtrci2XrPXIhlUoFi1c5bzWxKuWxUUMvdssHcK4Uua/D0Ep+asrsFx+2S\n\tygmeoUcUsqcfrEZHjxYYfFvjGmBXrR+id7nYKrLxlT5aFJBnvlK0y481xOkZ4giKUBml\n\tPYlQ==","X-Gm-Message-State":"AOJu0YxcwmemWrtajJUUCaz+sZ18rGMt8NugaV3UlW6s9JrILkxARor8\n\tJdb/qXn9IGX/lmbiSfZeiWPe1F/m09cfvCK3ue6MidJNIiM/APZocDjC9dtiaOPL97sm4w7+4Bo\n\twQvgPhXk=","X-Gm-Gg":"AfdE7clNrP1tI6tYfz34GImUtBF+xbqMpFT0dw0tTx76CY6thPiOAKSm/rMF+QxOwdf\n\taTVX4DU9KkO9s6eoU3K+A4WTRLsf5SOFb1d5FfisbIuulteivR8lKvO/w1bsaZuD1QrJWJoBOSY\n\tlGiEosfycLO0h5wRqftvUkklI3/044XsWcsdI24oti1DsEBGBcc1NmLi2r0x/Sro4GxQg19bBOY\n\tJxeUCo4BYVSd8v+7euPCNeDiJyPP5paXpS5b0mWw/t+pSkgYp818Bcqz12Odh2UcUcu4ZIhVm66\n\tt1GkBAVy+K/LxhWuYj3hUgnHgBDidDrxVLgkcNvu/n6LOSFGdAGj0VWL6B5LKm0h3oc0Hcq0+8T\n\tbM+v8p82UU91J1lLmW8MotDpTrDNv7g4TRs+l2z+jtKktbR2jj/Hn7YTdX6SWtyOWh2JGgFqmoJ\n\tHXhMtChBANdhzryrVhNHThTj7dysnm","X-Received":"by 2002:a05:600c:4ec6:b0:490:3cf0:8d81 with SMTP id\n\t5b1f17b1804b1-492381864b5mr51320325e9.13.1781785383996; \n\tThu, 18 Jun 2026 05:23:03 -0700 (PDT)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"bryan.odonoghue@linaro.org,\n\tpavel@ucw.cz","Subject":"[PATCH 09/30] libcamera: software_isp: gpu: Make Rectangle window_ a\n\tlocal variable in configure()","Date":"Thu, 18 Jun 2026 13:22:22 +0100","Message-ID":"<20260618122245.946138-10-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","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":"Class member window_ is only used in one method now so make it a local to\nthat method instead.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n .../software_isp/software_isp_pipeline_gpu.cpp   | 16 +++++++++-------\n .../software_isp/software_isp_pipeline_gpu.h     |  1 -\n 2 files changed, 9 insertions(+), 8 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\nindex 6f329cf40..7de77319d 100644\n--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\n+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\n@@ -122,6 +122,8 @@ int SoftwareIspPipelineGpu::configure(const StreamConfiguration &inputCfg,\n \t\t\t\t      const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs,\n \t\t\t\t      [[maybe_unused]] bool ccmEnabled)\n {\n+\tRectangle window;\n+\n \tif (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0)\n \t\treturn -EINVAL;\n \n@@ -165,21 +167,21 @@ int SoftwareIspPipelineGpu::configure(const StreamConfiguration &inputCfg,\n \toutputPixelFormat_ = outputCfg.pixelFormat;\n \toutputSize_ = outputCfg.size;\n \n-\twindow_.x = ((inputCfg.size.width - outputCfg.size.width) / 2) &\n+\twindow.x = ((inputCfg.size.width - outputCfg.size.width) / 2) &\n \t\t    ~(inputConfig_.patternSize.width - 1);\n-\twindow_.y = ((inputCfg.size.height - outputCfg.size.height) / 2) &\n+\twindow.y = ((inputCfg.size.height - outputCfg.size.height) / 2) &\n \t\t    ~(inputConfig_.patternSize.height - 1);\n-\twindow_.width = outputCfg.size.width;\n-\twindow_.height = outputCfg.size.height;\n+\twindow.width = outputCfg.size.width;\n+\twindow.height = outputCfg.size.height;\n \n \t/*\n-\t * Don't pass x,y from window_ since process() already adjusts for it.\n+\t * Don't pass x,y from window since process() already adjusts for it.\n \t * But crop the window to 2/3 of its width and height for speedup.\n \t */\n-\tstats_->setWindow(Rectangle(window_.size()));\n+\tstats_->setWindow(Rectangle(window.size()));\n \n \t/* Configure for one pass */\n-\tPassConfig rawSensorIn = { inputCfg.size, inputConfig_.stride, inputPixelFormat_, window_ };\n+\tPassConfig rawSensorIn = { inputCfg.size, inputConfig_.stride, inputPixelFormat_, window };\n \tPassConfig rgbaOut = { outputCfg.size, outputConfig_.stride, outputPixelFormat_, Rectangle(outputSize_) };\n \n \tgpuIspShaderPassDemosiac_.configure(rawSensorIn, rgbaOut);\ndiff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h\nindex 6bd8adc8f..1b77bc71d 100644\n--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h\n+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h\n@@ -67,7 +67,6 @@ private:\n \tstd::unique_ptr<eGLImage> eglImageBayerIn_;\n \tstd::unique_ptr<eGLImage> eglImageRGBAOut_;\n \n-\tRectangle window_;\n \tstd::unique_ptr<SwStatsCpu> stats_;\n \teGL egl_;\n \tuint32_t width_;\n","prefixes":["09/30"]}