{"id":26698,"url":"https://patchwork.libcamera.org/api/patches/26698/?format=json","web_url":"https://patchwork.libcamera.org/patch/26698/","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":"<20260508171720.9B9D61EA006C@mailuser.phl.internal>","date":"2026-05-08T16:51:31","name":"[v2,1/3] libcamera: software_isp: Drop redundant sumShift_ guard in finishFrame","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"6b276a9366d8b115dc08fd0e72f7650ccc5f337a","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/26698/mbox/","series":[{"id":5926,"url":"https://patchwork.libcamera.org/api/series/5926/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5926","date":"2026-05-08T16:51:31","name":"ipa: simple: OV2740 tuning file and swstats sumShift cleanup","version":2,"mbox":"https://patchwork.libcamera.org/series/5926/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26698/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26698/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 5D6D1BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 May 2026 17:17:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D83386301A;\n\tFri,  8 May 2026 19:17:22 +0200 (CEST)","from fout-a6-smtp.messagingengine.com\n\t(fout-a6-smtp.messagingengine.com [103.168.172.149])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9982862FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 May 2026 19:17:21 +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 BE71EEC031B;\n\tFri,  8 May 2026 13:17:20 -0400 (EDT)","from phl-imap-07 ([10.202.2.97])\n\tby phl-compute-02.internal (MEProxy); Fri, 08 May 2026 13:17:20 -0400","by mailuser.phl.internal (Postfix, from userid 501)\n\tid 9B9D61EA006C; Fri,  8 May 2026 13:17:20 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=jetm.me header.i=@jetm.me header.b=\"S6hOQHRD\";\n\tdkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"W4KMnp58\"; \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=1778260640;\n\tx=1778347040; bh=WGp5pPWv3ZJWioyHVGrRotRTUE9E6dv0omfYBxarq/I=; b=\n\tS6hOQHRDq9mI9pjmNqspJbBR47p6ZYc/k3NZGud9ZKxdd+XuYKtB5NFaPsfZ4a4C\n\tTZcWR0Q0Ieyshcm5l4+XpDOCza+2KB/BHbcA4DJ0v20fOKUNw/r6pl6bIncEqkCQ\n\tt4kIywLkOidpRIodupxLkOMdT3aNbA7r+uvPn9P7FYl4VqkDU5NG0uo4MAYsp2NM\n\tsnqCi1guX3zkgUofckbZ1JmDAuHLf5jOgKOFguQWKeK+pvw1JB7+ty9fq8o9G9Qa\n\tWLHljtibIj4xaUFHEwMh0/G24AVhpapoWmmy8/fTjqqd0NcfGiv2GQqsEAMraceT\n\ts97F97/Ujk8U9651klCWAw==","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=1778260640; x=\n\t1778347040; bh=WGp5pPWv3ZJWioyHVGrRotRTUE9E6dv0omfYBxarq/I=; b=W\n\t4KMnp58XNw7Z50aqKAJQ1f3RxPGfmMjxLyAUNQduEk7aJgptq1tug/GU+VhB5Z5A\n\tR+4bufewh2TdfwV8KYMBBLmW1KLGhWfGo5KUbyUQFfZ01qtJO40xHUEVxci0ChVM\n\tNYCU4GK74Cmvu1kTRLYzJT3dLOIk8k7APcuAGXBuKKbA59gTUv8LGisMxyQKT9Qo\n\tcDl8o92Z2dO7r6rQZiDJHqkBmDfRUlgjiMqnxGeSBPIK4Fmh+AiutZof/JGu+MfS\n\tyjDAwzaFRZlzocZHcBEy/Jxv9sm7E1GYVjLMkzQfyjVAxiQGFEQTg/lzspmSacOL\n\t6XIs3/BUdiyuVILK5Q/5A=="],"X-ME-Sender":"<xms:oBr-adoyUQ8d5mOxa35_Xm3NQBPCLMl4jOJ_YSmvmfj3kj4ivuFZVQ>\n\t<xme:oBr-aadWyUHz_YYoN2gTXqUocEZSxZ3L2BsAOalvWfqjlBoPEkoewvKaYArRogIl6\n\tzo7FbMj9p73lPYR4xNlCtPKLuyzDLN2RC5Lr4E2IizOanEaWrKgklM>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduuddtledvucetufdoteggodetrf\n\tdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu\n\trghilhhouhhtmecufedttdenucgopfhokfffucdluddtmdenucfjughrpefotggggffhvf\n\tffufevjghfsehtkedttdertdejnecuhfhrohhmpeflrghvihgvrhcuvfhirgcuoehflhho\n\tshhssehjvghtmhdrmhgvqeenucggtffrrghtthgvrhhnpedtudejffejkeekteelueefvd\n\tejvdeuhfefteehkeevtddvleduteekleetvdelhfenucevlhhushhtvghrufhiiigvpedt\n\tnecurfgrrhgrmhepmhgrihhlfhhrohhmpehflhhoshhssehjvghtmhdrmhgvpdhnsggprh\n\tgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehrohgsvghrthdr\n\tmhgruggvrhestgholhhlrggsohhrrgdrtghomhdprhgtphhtthhopegsrghrnhgrsggrsh\n\tdrphhotgiivgesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpthhtohepkhhivghr\n\trghnrdgsihhnghhhrghmsehiuggvrghsohhnsghorghrugdrtghomhdprhgtphhtthhope\n\thlrghurhgvnhhtrdhpihhntghhrghrthesihguvggrshhonhgsohgrrhgurdgtohhmpdhr\n\ttghpthhtoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdrlhhisggtrghmvg\n\thrrgdrohhrghdprhgtphhtthhopehjohhhrghnnhgvshdrghhovgguvgesohhsshdrqhhu\n\trghltghomhhmrdgtohhmpdhrtghpthhtohepmhiirghmrgiirghlsehrvgguhhgrthdrtg\n\thomh","X-ME-Proxy":"<xmx:oBr-abQUu_wN9t0TGb6vERiEz3jSOAdRlG_7NNMMAuNWbNsWfMmg9g>\n\t<xmx:oBr-aW3ofjCHsI6pJLxNFG5VLV2Ur5HZWhnmrLCHfCL-j-iPdyKq-A>\n\t<xmx:oBr-aQtAMel_0VdN4_n_jKHynyibEjb-H9yslCtI3YT3eVeO_t492g>\n\t<xmx:oBr-acghD6xYRnfj7U2HbOpBQ0bR7YorP9Nr4Ig1fQifZDDQfwh8QQ>\n\t<xmx:oBr-aWTqTZPFlSFASJYfx60HYoJd-G8dD4ENSzjeRCXmTiHQDZXAW18r>","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":"Fri, 08 May 2026 10:51:31 -0600","Subject":"[PATCH v2 1/3] 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,\n\tjohannes.goede@oss.qualcomm.com, robert.mader@collabora.com","In-Reply-To":"<177826063718.39714.13674874482653763631@jetm.me>","References":"<177826063718.39714.13674874482653763631@jetm.me>","Message-Id":"<20260508171720.9B9D61EA006C@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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/software_isp/swstats_cpu.cpp | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp\nindex b40d3334..2e020e62 100644\n--- a/src/libcamera/software_isp/swstats_cpu.cpp\n+++ b/src/libcamera/software_isp/swstats_cpu.cpp\n@@ -362,11 +362,10 @@ 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+\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":["v2","1/3"]}