{"id":26681,"url":"https://patchwork.libcamera.org/api/patches/26681/?format=json","web_url":"https://patchwork.libcamera.org/patch/26681/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20260507161101.7D2CD1EA006B@mailuser.phl.internal>","date":"2026-05-07T16:03:15","name":"[v1,1/2] libcamera: software_isp: Drop redundant sumShift_ guard in finishFrame","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3a03244de3e138f485ef644add8804a4e1933404","submitter":{"id":261,"url":"https://patchwork.libcamera.org/api/people/261/?format=json","name":"Javier Tia","email":"floss@jetm.me"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26681/mbox/","series":[{"id":5920,"url":"https://patchwork.libcamera.org/api/series/5920/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5920","date":"2026-05-07T16:03:06","name":"ipa: simple: OV2740 tuning file and swstats sumShift cleanup","version":1,"mbox":"https://patchwork.libcamera.org/series/5920/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26681/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26681/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 11A16C32F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 May 2026 16:11:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2341563021;\n\tThu,  7 May 2026 18:11:04 +0200 (CEST)","from fout-a4-smtp.messagingengine.com\n\t(fout-a4-smtp.messagingengine.com [103.168.172.147])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F7B062010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 May 2026 18:11:02 +0200 (CEST)","from phl-compute-02.internal (phl-compute-02.internal\n\t[10.202.2.42])\n\tby mailfout.phl.internal (Postfix) with ESMTP id 9BC1EEC0308;\n\tThu,  7 May 2026 12:11:01 -0400 (EDT)","from phl-imap-07 ([10.202.2.97])\n\tby phl-compute-02.internal (MEProxy); Thu, 07 May 2026 12:11:01 -0400","by mailuser.phl.internal (Postfix, from userid 501)\n\tid 7D2CD1EA006B; Thu,  7 May 2026 12:11:01 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=jetm.me header.i=@jetm.me header.b=\"w9IJVhYi\";\n\tdkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"KBXWuEkn\"; \n\tdkim-atps=neutral","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetm.me; h=cc:cc\n\t:content-transfer-encoding:content-type:content-type:date:date\n\t:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to; s=fm2; t=1778170261;\n\tx=1778256661; bh=SeD4qlEY7jr+ru8ZGpWvNtjA9ersImqUmwLeC3Y7iAw=; b=\n\tw9IJVhYi8ZQGsyoBn4zcX3Ga7E2HlSguHoyLSfWlgABRLZwYHldmntXElvdTaHez\n\tZTbK6MOo6DXGl+gZ9R1TyKCBAOYBLdRgfDq8eJXOCyVAHB8xxQR+JDg7euQSDIEL\n\tTutxmR6Z+OVuRDFi/Lu1iv+YMOr1icEGNJDJ3mIczyHnlQlLCC4zCi0aqRpubMET\n\trD1ksw+1uiGDDMNW0xUr6XHBjy+ZkyLWzzZjp1vrVF8OQwGk9UNEaSNP2ojBsK/x\n\tDLFvyXO7Rj0eoIwVpDbvfDiWL1T7yLwG+MqSBOvhtirBxATGm6O8/WK8+8HpuUnt\n\tSZccUnHWzgjPGMxaFNqXKg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:cc:content-transfer-encoding\n\t:content-type:content-type:date:date:feedback-id:feedback-id\n\t:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to:x-me-proxy\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1778170261; x=\n\t1778256661; bh=SeD4qlEY7jr+ru8ZGpWvNtjA9ersImqUmwLeC3Y7iAw=; b=K\n\tBXWuEkniPfz9Q8d9RIpdogx0BAYxie6AVPOHLc0CtPjTGBIL9THURSp24C36Icv0\n\t/r1i0uxc9T4N40HNRwGBTZTQbMKu4MLuWUBJz1Z2C3/s3tNalbwprVpjzdBZNwwC\n\tUSTaL+bYrP7mOrA6kIPcISBy3fbg8TTnuosRZ+QjhrswGvy5eThF9nBb/4Lq5C17\n\tdY1mhhJ7/lrWh0LsRxaHV16fB3+A9N2BvFgHX3RCqwVpacu8gDx6FNdPVOBkRyMY\n\tqXDXuCd4D2bphsN/HjoWuVmhEadxoQiJqhPBbXLJHhYGjgUZahM533V9LdkVc5e5\n\tuIarcCEiFfjYvTUvPx6pQ=="],"X-ME-Sender":"<xms:lbn8aVcpcOxi5RsAuqYwheHFSDYBLj18G0xEK8jayW5GAfEFxseqqA>\n\t<xme:lbn8aeCXqNqtPcsLYMa_gMrTqHVSD_lH4ti2sKeolWn2nOErh3IzFVywqctJFBy05\n\tYipwBC7fElvDJqhMFh_1p3BfEokxMzdMLtXTLIO-1Gfn1YkBQ12lPw>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutdejledvucetufdoteggodetrf\n\tdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu\n\trghilhhouhhtmecufedttdenucgopfhokfffucdluddtmdenucfjughrpefotggggffhvf\n\tffufevjghfsehtkedttdertdejnecuhfhrohhmpeflrghvihgvrhcuvfhirgcuoehflhho\n\tshhssehjvghtmhdrmhgvqeenucggtffrrghtthgvrhhnpedtudejffejkeekteelueefvd\n\tejvdeuhfefteehkeevtddvleduteekleetvdelhfenucevlhhushhtvghrufhiiigvpedt\n\tnecurfgrrhgrmhepmhgrihhlfhhrohhmpehflhhoshhssehjvghtmhdrmhgvpdhnsggprh\n\tgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsrghrnhgrsggr\n\tshdrphhotgiivgesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpthhtohepkhhivg\n\thrrghnrdgsihhnghhhrghmsehiuggvrghsohhnsghorghrugdrtghomhdprhgtphhtthho\n\tpehlrghurhgvnhhtrdhpihhntghhrghrthesihguvggrshhonhgsohgrrhgurdgtohhmpd\n\thrtghpthhtoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdrlhhisggtrghm\n\tvghrrgdrohhrghdprhgtphhtthhopehmiigrmhgriigrlhesrhgvughhrghtrdgtohhm","X-ME-Proxy":"<xmx:lbn8aYDa5L59gY6JQERL6Q6unMcCPntatFvfq05EP-yoNF85c8FR7Q>\n\t<xmx:lbn8acAyYdfai45-pPmrlg7k5i2UnpO39cRS9EK1hsMBmhKTG26Ynw>\n\t<xmx:lbn8abrYEIbZfFgVMPNYowZ7DW7tBnULweKO-9ac5j2-af5pIcUPUw>\n\t<xmx:lbn8aem8V1Mh5Git7K203pQIVhj-RVbKV6Rc4GKw9Q9KUE-UwAGahQ>\n\t<xmx:lbn8afK7Jq6Y-Ihqw7KeJJy7HD5tCat0XDNGkk4IHoGcBDTtpY5Xzc36>","Feedback-ID":"i9dde48b3:Fastmail","X-Mailer":"MessagingEngine.com Webmail Interface","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","From":"Javier Tia <floss@jetm.me>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 07 May 2026 10:03:15 -0600","Subject":"[PATCH v1 1/2] libcamera: software_isp: Drop redundant sumShift_\n\tguard in finishFrame","Cc":"mzamazal@redhat.com, kieran.bingham@ideasonboard.com,\n\tlaurent.pinchart@ideasonboard.com, barnabas.pocze@ideasonboard.com","In-Reply-To":"<177817025814.1112523.8335692307235726369@jetm.me>","References":"<177817025814.1112523.8335692307235726369@jetm.me>","Message-Id":"<20260507161101.7D2CD1EA006B@mailuser.phl.internal>","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":"Right-shifting by zero is a no-op, so the if (sumShift_) check before\nthe three >>= sumShift_ assignments is unnecessary. Remove it.\n\nSuggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSuggested-by: Barnabas Pocze <barnabas.pocze@ideasonboard.com>\nSigned-off-by: Javier Tia <floss@jetm.me>\n---\n src/libcamera/software_isp/swstats_cpu.cpp | 8 +++-----\n 1 file changed, 3 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp\nindex b40d3334..d9011f41 100644\n--- a/src/libcamera/software_isp/swstats_cpu.cpp\n+++ b/src/libcamera/software_isp/swstats_cpu.cpp\n@@ -362,11 +362,9 @@ void SwStatsCpu::finishFrame(uint32_t frame, uint32_t bufferId)\n \t\t\tfor (unsigned int j = 0; j < SwIspStats::kYHistogramSize; j++)\n \t\t\t\tsharedStats_->yHistogram[j] += s.yHistogram[j];\n \t\t}\n-\t\tif (sumShift_) {\n-\t\t\tsharedStats_->sum_.r() >>= sumShift_;\n-\t\t\tsharedStats_->sum_.g() >>= sumShift_;\n-\t\t\tsharedStats_->sum_.b() >>= sumShift_;\n-\t\t}\n+\t\tsharedStats_->sum_.r() >>= sumShift_;\n+\t\tsharedStats_->sum_.g() >>= sumShift_;\n+\t\tsharedStats_->sum_.b() >>= sumShift_;\n \t}\n \n \tsharedStats_->valid = valid;\n","prefixes":["v1","1/2"]}