{"id":26701,"url":"https://patchwork.libcamera.org/api/covers/26701/?format=json","web_url":"https://patchwork.libcamera.org/cover/26701/","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":"<177826797798.345005.11618565886801750854@jetm.me>","date":"2026-05-08T19:19:13","name":"[0/2] libcamera: Vector right-shift operators and SwStatsCpu use site","submitter":{"id":261,"url":"https://patchwork.libcamera.org/api/people/261/?format=json","name":"Javier Tia","email":"floss@jetm.me"},"mbox":"https://patchwork.libcamera.org/cover/26701/mbox/","series":[{"id":5927,"url":"https://patchwork.libcamera.org/api/series/5927/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5927","date":"2026-05-08T19:19:13","name":"libcamera: Vector right-shift operators and SwStatsCpu use site","version":1,"mbox":"https://patchwork.libcamera.org/series/5927/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/26701/comments/","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 DC211BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 May 2026 19:19:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A588162FE1;\n\tFri,  8 May 2026 21:19:43 +0200 (CEST)","from fhigh-a2-smtp.messagingengine.com\n\t(fhigh-a2-smtp.messagingengine.com [103.168.172.153])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54FCE62FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 May 2026 21:19:41 +0200 (CEST)","from phl-compute-02.internal (phl-compute-02.internal\n\t[10.202.2.42])\n\tby mailfhigh.phl.internal (Postfix) with ESMTP id 7263514000DB;\n\tFri,  8 May 2026 15:19:40 -0400 (EDT)","from phl-imap-07 ([10.202.2.97])\n\tby phl-compute-02.internal (MEProxy); Fri, 08 May 2026 15:19:40 -0400","by mailuser.phl.internal (Postfix, from userid 501)\n\tid E76C81EA006C; Fri,  8 May 2026 15:19:39 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=jetm.me header.i=@jetm.me header.b=\"P9FTGhWN\";\n\tdkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"mkF2PDUN\"; \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:message-id:mime-version:reply-to:subject\n\t:subject:to:to; s=fm2; t=1778267980; x=1778354380; bh=h8gxIRjzR6\n\tXT93hWEJ4E9hmbWPNfBwDS09W1RGQrFrM=; b=P9FTGhWNqOyLcu4dPrL1ukeePh\n\tyU9a1dwVFqoZbG189e8ohL0TpWPQ7t4Cz1+fXX8kXWB6KbndQwgKY1thxjKPy9ZX\n\t8Dej9EUoO5YcBz3C8/iGmiRVBApzPuIsYAaprcPlDHhDEXvG1AVNlJib+m2SMs2U\n\toADY2mShcv3id3oGVcBUE0cFmrQivtf+V+AsqrJ5Es+IjiZvUvLn59eiCNu+49px\n\tqdfCfjd5HnEyiDNG9aGy0A5+ZE5+4VWd/O0Ib5ChOXMVWr7cthWXjQ9nRZKDmWHU\n\tGzNVssefjDmfXJW1RrNal13sSrvmz51s1Wc2Mn7ZzFk8UnztJD7VXzpb+zQg==","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:message-id:mime-version:reply-to:subject\n\t:subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm3; t=1778267980; x=1778354380; bh=h8gxIRjzR6XT93hWEJ4E9hmbWPNf\n\tBwDS09W1RGQrFrM=; b=mkF2PDUN1W4OLoQ2R0FK31ZtBykaDN30CRu62LDpyVvi\n\tJC1nMJoi32R00iWM+tH7snEKsMPyMjQmNOp+DoelhXvrLy6/5dqpBi8qm/JZNRD0\n\t9KfBmby9ueTh02PuDxaC9rtV4avHNi47v4XLrS5jUcBK3tXAUghT2xsqfUXp+Vnn\n\tnPmYDnKM0qFdc5RpD/uTXeueyjA5m9x527R0kel7F5tcqLmm40AZmGw1povqixvC\n\tPgYHUh1YTruwREvQ6fxKazgRmAMz7cjxXC1Y16nz+Jvn7ZSOl/qNDzOhx0pcoUCU\n\tFYaF5oPhtkHy4saLm0hWhCxzc20A/0cDvqUIAn2bng=="],"X-ME-Sender":"<xms:TDf-aatw-O_HQ8I6RCNm2t807k7trHI_3_aBBh230mivfhp4ZAkbTA>\n\t<xme:TDf-aaRuNGXlUsdtatnN7_3q05D4vGM3cWQ1k0u3SbbNytOCgDxHu5OaPIAMS4YlP\n\tdNUKpfM6IRPSL5vUhq3gwJtQ7U_UgOwP6y3OV2gE1fRQ7L1Z3hQZQ>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduudduudekucetufdoteggodetrf\n\tdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu\n\trghilhhouhhtmecufedttdenucenucfjughrpefotggggffhvfffufevkfesthekredtre\n\tdtjeenucfhrhhomheplfgrvhhivghrucfvihgruceofhhlohhsshesjhgvthhmrdhmvgeq\n\tnecuggftrfgrthhtvghrnhepkefghefgheffffejveehtdejiedtgeejjeekudfhfeekhe\n\tdvvdelgeegieethffgnecuffhomhgrihhnpehlihgstggrmhgvrhgrrdhorhhgnecuvehl\n\tuhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhlohhsshesjh\n\tgvthhmrdhmvgdpnhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghp\n\tthhtoheprhhosggvrhhtrdhmrgguvghrsegtohhllhgrsghorhgrrdgtohhmpdhrtghpth\n\thtohepsggrrhhnrggsrghsrdhpohgtiigvsehiuggvrghsohhnsghorghrugdrtghomhdp\n\trhgtphhtthhopehkihgvrhgrnhdrsghinhhghhgrmhesihguvggrshhonhgsohgrrhgurd\n\tgtohhmpdhrtghpthhtoheplhgruhhrvghnthdrphhinhgthhgrrhhtsehiuggvrghsohhn\n\tsghorghrugdrtghomhdprhgtphhtthhopehflhhoshhssehjvghtmhdrmhgvpdhrtghpth\n\thtoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdrlhhisggtrghmvghrrgdr\n\tohhrghdprhgtphhtthhopehmiigrmhgriigrlhesrhgvughhrghtrdgtohhm","X-ME-Proxy":"<xmx:TDf-acFKizPn0NEKCy1l7BsUJTNPVZne_iYZIBkm2Rp8dupaV8dLfA>\n\t<xmx:TDf-aWCoE-6afNEb8ucbELsqb1o91SgHhw00eSW3fQ13knzeDYW60w>\n\t<xmx:TDf-aUXF2cdAAPKsdn0XYyvYBjUYP2XkVGniQkxf2H6C-nWSmx085A>\n\t<xmx:TDf-aSpc3sL1kEhNIFFDc9q5JXcLVudT6lRMiq0FwkM0JjwPQcChPQ>\n\t<xmx:TDf-aXkIcc2apSI_oLJeVvS_0uFBAzvFBg4jjdgpwslsnZpmUQeUwqaf>","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 13:19:13 -0600","Subject":"[PATCH 0/2] libcamera: Vector right-shift operators and SwStatsCpu\n\tuse site","Cc":"mzamazal@redhat.com, kieran.bingham@ideasonboard.com,\n\tlaurent.pinchart@ideasonboard.com, barnabas.pocze@ideasonboard.com,\n\trobert.mader@collabora.com","Message-ID":"<177826797798.345005.11618565886801750854@jetm.me>","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":"Small follow-up suggested by Barnabás and Laurent during review of the\nsumShift_ cleanup in the OV2740 v2 series:\n\n  https://patchwork.libcamera.org/project/libcamera/list/?series=5926\n\nPatch 1/2 adds operator>> and operator>>= to the Vector class.\nPatch 2/2 uses the new operator in SwStatsCpu::finishFrame() to\ncollapse the three per-component right-shifts on RGB<uint64_t>::sum_\ninto a single sum_ >>= sumShift_ statement.\n\nDepends on the v2 OV2740 series above (specifically v2 1/3, which\nremoves the if (sumShift_) guard around the three right-shifts that\n2/2 here further simplifies). It does not apply on top of master\nwithout v2.\n\nJavier Tia (2):\n  libcamera: libipa: Add right-shift operators to Vector\n  libcamera: software_isp: Use Vector operator>>= in finishFrame\n\n include/libcamera/internal/vector.h        | 15 +++++++++++++++\n src/libcamera/software_isp/swstats_cpu.cpp |  4 +---\n 2 files changed, 16 insertions(+), 3 deletions(-)"}