From patchwork Fri May 8 19:19:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Tia X-Patchwork-Id: 26701 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 DC211BE173 for ; Fri, 8 May 2026 19:19:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A588162FE1; Fri, 8 May 2026 21:19:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=jetm.me header.i=@jetm.me header.b="P9FTGhWN"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="mkF2PDUN"; dkim-atps=neutral Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54FCE62FD3 for ; Fri, 8 May 2026 21:19:41 +0200 (CEST) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7263514000DB; Fri, 8 May 2026 15:19:40 -0400 (EDT) Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-02.internal (MEProxy); Fri, 08 May 2026 15:19:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetm.me; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1778267980; x=1778354380; bh=h8gxIRjzR6 XT93hWEJ4E9hmbWPNfBwDS09W1RGQrFrM=; b=P9FTGhWNqOyLcu4dPrL1ukeePh yU9a1dwVFqoZbG189e8ohL0TpWPQ7t4Cz1+fXX8kXWB6KbndQwgKY1thxjKPy9ZX 8Dej9EUoO5YcBz3C8/iGmiRVBApzPuIsYAaprcPlDHhDEXvG1AVNlJib+m2SMs2U oADY2mShcv3id3oGVcBUE0cFmrQivtf+V+AsqrJ5Es+IjiZvUvLn59eiCNu+49px qdfCfjd5HnEyiDNG9aGy0A5+ZE5+4VWd/O0Ib5ChOXMVWr7cthWXjQ9nRZKDmWHU GzNVssefjDmfXJW1RrNal13sSrvmz51s1Wc2Mn7ZzFk8UnztJD7VXzpb+zQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1778267980; x=1778354380; bh=h8gxIRjzR6XT93hWEJ4E9hmbWPNf BwDS09W1RGQrFrM=; b=mkF2PDUN1W4OLoQ2R0FK31ZtBykaDN30CRu62LDpyVvi JC1nMJoi32R00iWM+tH7snEKsMPyMjQmNOp+DoelhXvrLy6/5dqpBi8qm/JZNRD0 9KfBmby9ueTh02PuDxaC9rtV4avHNi47v4XLrS5jUcBK3tXAUghT2xsqfUXp+Vnn nPmYDnKM0qFdc5RpD/uTXeueyjA5m9x527R0kel7F5tcqLmm40AZmGw1povqixvC PgYHUh1YTruwREvQ6fxKazgRmAMz7cjxXC1Y16nz+Jvn7ZSOl/qNDzOhx0pcoUCU FYaF5oPhtkHy4saLm0hWhCxzc20A/0cDvqUIAn2bng== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduudduudekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefotggggffhvfffufevkfesthekredtre dtjeenucfhrhhomheplfgrvhhivghrucfvihgruceofhhlohhsshesjhgvthhmrdhmvgeq necuggftrfgrthhtvghrnhepkefghefgheffffejveehtdejiedtgeejjeekudfhfeekhe dvvdelgeegieethffgnecuffhomhgrihhnpehlihgstggrmhgvrhgrrdhorhhgnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhlohhsshesjh gvthhmrdhmvgdpnhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheprhhosggvrhhtrdhmrgguvghrsegtohhllhgrsghorhgrrdgtohhmpdhrtghpth htohepsggrrhhnrggsrghsrdhpohgtiigvsehiuggvrghsohhnsghorghrugdrtghomhdp rhgtphhtthhopehkihgvrhgrnhdrsghinhhghhgrmhesihguvggrshhonhgsohgrrhgurd gtohhmpdhrtghpthhtoheplhgruhhrvghnthdrphhinhgthhgrrhhtsehiuggvrghsohhn sghorghrugdrtghomhdprhgtphhtthhopehflhhoshhssehjvghtmhdrmhgvpdhrtghpth htoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdrlhhisggtrghmvghrrgdr ohhrghdprhgtphhtthhopehmiigrmhgriigrlhesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: i9dde48b3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id E76C81EA006C; Fri, 8 May 2026 15:19:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 From: Javier Tia 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 use site Cc: mzamazal@redhat.com, kieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com, barnabas.pocze@ideasonboard.com, robert.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Small follow-up suggested by Barnabás and Laurent during review of the sumShift_ cleanup in the OV2740 v2 series: https://patchwork.libcamera.org/project/libcamera/list/?series=5926 Patch 1/2 adds operator>> and operator>>= to the Vector class. Patch 2/2 uses the new operator in SwStatsCpu::finishFrame() to collapse the three per-component right-shifts on RGB::sum_ into a single sum_ >>= sumShift_ statement. Depends on the v2 OV2740 series above (specifically v2 1/3, which removes the if (sumShift_) guard around the three right-shifts that 2/2 here further simplifies). It does not apply on top of master without v2. Javier Tia (2): libcamera: libipa: Add right-shift operators to Vector libcamera: software_isp: Use Vector operator>>= in finishFrame include/libcamera/internal/vector.h | 15 +++++++++++++++ src/libcamera/software_isp/swstats_cpu.cpp | 4 +--- 2 files changed, 16 insertions(+), 3 deletions(-)