{"id":25049,"url":"https://patchwork.libcamera.org/api/patches/25049/?format=json","web_url":"https://patchwork.libcamera.org/patch/25049/","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-20-kieran.bingham@ideasonboard.com>","date":"2025-11-14T00:54:23","name":"[v4,19/21] test: libipa: Remove legacy fixed point conversion test","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"155d0e630857b59441cd5e4f1569bce313cfbc14","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/25049/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/25049/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25049/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 29534C3331\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Nov 2025 00:55:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C802260AB4;\n\tFri, 14 Nov 2025 01:55:11 +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 9971A60AB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Nov 2025 01:54:54 +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 181382147;\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=\"Bi/TBMv1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763081574;\n\tbh=vDMGWjYjPnIFctv9HNPlYxUJ7HArB6476qXCi/sFhPM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Bi/TBMv1Q6ZOyTtxV2TX84VtGIe7GbH3FD9/aaXbbOY9HAVCCDmvE1hySxHutaICr\n\t5mwPQsT+ZR7CFZDl/0QTzVjHIBqpnX5Vhkikr+LB9p4GCawRhRfPDd6xsBIfiAwNsY\n\tKdmLgSO/DiRswL2kx2VeioR0KDdsf6iW0oZgs+Xk=","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 19/21] test: libipa: Remove legacy fixed point conversion\n\ttest","Date":"Fri, 14 Nov 2025 00:54:23 +0000","Message-ID":"<20251114005428.90024-20-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 the fixed point conversions are equally covered by the new Q types,\nthe legacy tests for fixedToFloatingPoint and floatingToFixedPoint are\nredundant.\n\nRemove them.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/ipa/libipa/fixedpoint.cpp | 78 ----------------------------------\n 1 file changed, 78 deletions(-)","diff":"diff --git a/test/ipa/libipa/fixedpoint.cpp b/test/ipa/libipa/fixedpoint.cpp\nindex e3428272fae5..357af6afa75e 100644\n--- a/test/ipa/libipa/fixedpoint.cpp\n+++ b/test/ipa/libipa/fixedpoint.cpp\n@@ -26,80 +26,6 @@ using Q4_7 = Quantized<FixedPointQTraits<4, 7, int16_t>>;\n class FixedPointUtilsTest : public Test\n {\n protected:\n-\t/* R for real, I for integer */\n-\ttemplate<unsigned int IntPrec, unsigned int FracPrec, typename I, typename R>\n-\tint testFixedToFloat(I input, R expected)\n-\t{\n-\t\tR out = fixedToFloatingPoint<IntPrec, FracPrec, R>(input);\n-\t\tR prec = 1.0 / (1 << FracPrec);\n-\t\tif (std::abs(out - expected) > prec) {\n-\t\t\tcerr << \"Reverse conversion expected \" << input\n-\t\t\t     << \" to convert to \" << expected\n-\t\t\t     << \", got \" << out << std::endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\treturn TestPass;\n-\t}\n-\n-\ttemplate<unsigned int IntPrec, unsigned int FracPrec, typename T>\n-\tint testSingleFixedPoint(double input, T expected)\n-\t{\n-\t\tT ret = floatingToFixedPoint<IntPrec, FracPrec, T>(input);\n-\t\tif (ret != expected) {\n-\t\t\tcerr << \"Expected \" << input << \" to convert to \"\n-\t\t\t     << expected << \", got \" << ret << std::endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\t/*\n-\t\t * The precision check is fairly arbitrary but is based on what\n-\t\t * the rkisp1 is capable of in the crosstalk module.\n-\t\t */\n-\t\tdouble f = fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);\n-\t\tif (std::abs(f - input) > 0.005) {\n-\t\t\tcerr << \"Reverse conversion expected \" << ret\n-\t\t\t     << \" to convert to \" << input\n-\t\t\t     << \", got \" << f << std::endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\treturn TestPass;\n-\t}\n-\n-\tint testFixedPoint()\n-\t{\n-\t\t/*\n-\t\t * The second 7.992 test is to test that unused bits don't\n-\t\t * affect the result.\n-\t\t */\n-\t\tstd::map<double, int16_t> testCases = {\n-\t\t\t{ 7.992, 0x3ff },\n-\t\t\t{   0.2, 0x01a },\n-\t\t\t{  -0.2, 0x7e6 },\n-\t\t\t{  -0.8, 0x79a },\n-\t\t\t{  -0.4, 0x7cd },\n-\t\t\t{  -1.4, 0x74d },\n-\t\t\t{    -8, 0x400 },\n-\t\t\t{     0, 0 },\n-\t\t};\n-\n-\t\tint ret;\n-\t\tfor (const auto &testCase : testCases) {\n-\t\t\tret = testSingleFixedPoint<4, 7, int16_t>(testCase.first,\n-\t\t\t\t\t\t\t\t   testCase.second);\n-\t\t\tif (ret != TestPass)\n-\t\t\t\treturn ret;\n-\t\t}\n-\n-\t\t/* Special case with a superfluous one in the unused bits */\n-\t\tret = testFixedToFloat<4, 7, int16_t, double>(0xbff, 7.992);\n-\t\tif (ret != TestPass)\n-\t\t\treturn ret;\n-\n-\t\treturn TestPass;\n-\t}\n-\n \ttemplate<typename Q>\n \tint quantizedCheck(float input, typename Q::QuantizedType expected, float value)\n \t{\n@@ -266,10 +192,6 @@ protected:\n \t{\n \t\tunsigned int fails = 0;\n \n-\t\t/* fixed point conversion test */\n-\t\tif (testFixedPoint() != TestPass)\n-\t\t\tfails++;\n-\n \t\tif (testFixedPointQuantizers() != TestPass)\n \t\t\tfails++;\n \n","prefixes":["v4","19/21"]}