{"id":25051,"url":"https://patchwork.libcamera.org/api/patches/25051/?format=json","web_url":"https://patchwork.libcamera.org/patch/25051/","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":"<20251114005428.90024-22-kieran.bingham@ideasonboard.com>","date":"2025-11-14T00:54:25","name":"[v4,21/21] ipa: libipa: fixedpoint: Remove unsigned workaround","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9329e04c6ff8cf70f6546118113dd980bbe805ee","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/25051/mbox/","series":[{"id":5589,"url":"https://patchwork.libcamera.org/api/series/5589/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5589","date":"2025-11-14T00:54:04","name":"libipa: Introduce a Quantized type","version":4,"mbox":"https://patchwork.libcamera.org/series/5589/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25051/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25051/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 92507C3337\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Nov 2025 00:55:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 397F260AAB;\n\tFri, 14 Nov 2025 01:55:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C74760AB6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Nov 2025 01:54:55 +0100 (CET)","from charm.hippo-penny.ts.net\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 B0C9C21D0;\n\tFri, 14 Nov 2025 01:52:54 +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=\"kizGMTfY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763081574;\n\tbh=uth9B+Igoo2je6o6stn0vFxruvyE8aKvrJFiExHl6BI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kizGMTfYWU4Rj5YZ6njEzoaAZCIVuVek4naIOuhryvhWCUAAqTLR3n4EYRlRka9oq\n\t4CrEEIKlopwM/I36aETOkv4IsFHvG/Wm74mgW/FQzNk80ier326nGGjXFbCDAXi9CG\n\tnWUk361wTSuzXC3SYw7z/8qO0sjd5JJ4GBmDyfaU=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v4 21/21] ipa: libipa: fixedpoint: Remove unsigned workaround","Date":"Fri, 14 Nov 2025 00:54:25 +0000","Message-ID":"<20251114005428.90024-22-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.51.1","In-Reply-To":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","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\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 fe75af16bb54..fd57826d0ac0 100644\n--- a/src/ipa/libipa/fixedpoint.h\n+++ b/src/ipa/libipa/fixedpoint.h\n@@ -63,12 +63,7 @@ struct FixedPointQTraits {\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 properly\n-\t\t * 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":["v4","21/21"]}