[{"id":36854,"web_url":"https://patchwork.libcamera.org/comment/36854/","msgid":"<21d3614c-2187-45d9-a0b2-64aa0a288307@ideasonboard.com>","date":"2025-11-17T11:45:40","subject":"Re: [PATCH v4 21/21] ipa: libipa: fixedpoint: Remove unsigned\n\tworkaround","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 11. 14. 1:54 keltezéssel, Kieran Bingham írta:\n> Now that we no longer attempt or allow storing signed negative floats\n> as an unsigned integer representation, remove the workaround which\n> required an intermediate cast when converting floats to fixed point values.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/ipa/libipa/fixedpoint.h | 7 +------\n>   1 file changed, 1 insertion(+), 6 deletions(-)\n> \n> diff --git a/src/ipa/libipa/fixedpoint.h b/src/ipa/libipa/fixedpoint.h\n> index 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>","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 1AFD3BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Nov 2025 11:45:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E8C6660A8B;\n\tMon, 17 Nov 2025 12:45:46 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 564B960856\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Nov 2025 12:45:45 +0100 (CET)","from [192.168.33.31] (185.221.143.100.nat.pool.zt.hu\n\t[185.221.143.100])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CB964B5;\n\tMon, 17 Nov 2025 12:43:41 +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=\"nXraxKI0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763379822;\n\tbh=w3Oj0JHpADsQqc/m4AhVdcHl4KBwyf8OrFhQPElpibY=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=nXraxKI0VAyvd3M+N5wo5GNDJwAu+QXQ9vwzOjhBJfL7HRRKqISdZOhtITXRjfQmr\n\tCrzrd3WOsgAYjMkAjqL5inKOTC3hBqUI8ixdcXfp3QW36eosc0A8nq7fUAsXDQITF8\n\tmw4kyZ9vp9upzHim9U+OuCaVwW8lrGsNhXTZnYKY=","Message-ID":"<21d3614c-2187-45d9-a0b2-64aa0a288307@ideasonboard.com>","Date":"Mon, 17 Nov 2025 12:45:40 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 21/21] ipa: libipa: fixedpoint: Remove unsigned\n\tworkaround","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-22-kieran.bingham@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251114005428.90024-22-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]