{"id":25812,"url":"https://patchwork.libcamera.org/api/patches/25812/?format=json","web_url":"https://patchwork.libcamera.org/patch/25812/","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":"<20260114173918.1744023-17-kieran.bingham@ideasonboard.com>","date":"2026-01-14T17:39:16","name":"[v5,16/16] ipa: libipa: fixedpoint: Remove unsigned workaround","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"382aaa9077871e463411ce7f41b2395c1f586340","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25812/mbox/","series":[{"id":5708,"url":"https://patchwork.libcamera.org/api/series/5708/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5708","date":"2026-01-14T17:39:00","name":"libipa: Introduce a Quantized type","version":5,"mbox":"https://patchwork.libcamera.org/series/5708/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25812/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25812/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 B1E51C3285\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Jan 2026 17:39:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A5F6161FEC;\n\tWed, 14 Jan 2026 18:39:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4AD8B61FDA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jan 2026 18:39:27 +0100 (CET)","from Monstersaurus.infra.iob\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 58D0828F5;\n\tWed, 14 Jan 2026 18:39:00 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"emw6MT0M\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768412340;\n\tbh=xNyBP2yal5rcjb+yjDnH7ikpoplhq9vsZMBSBVS+H5Q=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=emw6MT0MxQ/NZygx2STj3mhWBnQyXJwZtAQ/cFuAqWYS4fPRQcL4O9UUJPmUPa/2y\n\tG0pNftmGjHNqYtmL2szhnaiu1a2RPTXdvotAawNbdZSDMPi0Lae7s9cramqCLs7fWa\n\t7eO9fkFU3R+GMJVNHuLIWAjBB6uvh7+LAprdwSVg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>","Subject":"[PATCH v5 16/16] ipa: libipa: fixedpoint: Remove unsigned workaround","Date":"Wed, 14 Jan 2026 17:39:16 +0000","Message-ID":"<20260114173918.1744023-17-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260114173918.1744023-1-kieran.bingham@ideasonboard.com>","References":"<20260114173918.1744023-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","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":"Now that we no longer attempt or allow storing signed negative floats\nas an unsigned integer representation, remove the workaround which\nrequired an intermediate cast when converting floats to fixed point values.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/libipa/fixedpoint.h | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)","diff":"diff --git a/src/ipa/libipa/fixedpoint.h b/src/ipa/libipa/fixedpoint.h\nindex 1d53b0b9fdde..b4190988f1ee 100644\n--- a/src/ipa/libipa/fixedpoint.h\n+++ b/src/ipa/libipa/fixedpoint.h\n@@ -69,12 +69,7 @@ public:\n \t{\n \t\tv = std::clamp(v, min, max);\n \n-\t\t/*\n-\t\t * The intermediate cast to int is needed on arm platforms to\n-\t\t * properly cast negative values. See\n-\t\t * https://embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int/\n-\t\t */\n-\t\treturn static_cast<T>(static_cast<int>(std::round(v * (1 << F)))) & bitMask;\n+\t\treturn static_cast<T>(std::round(v * (1 << F))) & bitMask;\n \t}\n };\n \n","prefixes":["v5","16/16"]}