[{"id":38224,"web_url":"https://patchwork.libcamera.org/comment/38224/","msgid":"<177149105981.607498.13804693122609538309@neptunite.rasen.tech>","date":"2026-02-19T08:50:59","subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Kieran Bingham (2026-02-14 01:57:44)\n> Provide tests to validate the conditions of FixedPoint types used\n> within libcamera explicitly.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> \n> ---\n> v3:\n> - Rename quantized_type to QuantizedType\n> \n> v5:\n> \n> - Use string_view for introduction of type\n> - move min/max check to static assert\n> - Squash down all tests into a single implementation and remove extra\n>   type proliferation.\n> - Use Q/UQ types directly.\n> - use std::cout consistently\n> \n> v6:\n> - Add notes on test introduction\n> - Expand Q12.4 to include clamp tests to validate int16_t range usage\n> - Add storage selection assertion checks\n> - Move clamp checks to their types to expand\n> - Add {U,}Q<4,20> to check up to 24 bit precision\n> \n> v7:\n> - Provide signed register extension tests\n> ---\n>  test/ipa/libipa/fixedpoint.cpp | 209 ++++++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 205 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/ipa/libipa/fixedpoint.cpp b/test/ipa/libipa/fixedpoint.cpp\n> index 4b017e86a74f..2907426b7a69 100644\n> --- a/test/ipa/libipa/fixedpoint.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -5,12 +5,14 @@\n>   * Fixed / Floating point utility tests\n>   */\n>  \n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n> +\n>  #include <cmath>\n>  #include <iostream>\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/libipa/fixedpoint.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> @@ -95,14 +97,213 @@ protected:\n>                 return TestPass;\n>         }\n>  \n> -       int run()\n> +       template<typename Q>\n> +       int quantizedCheck(float input, typename Q::QuantizedType expected, float value)\n>         {\n> -               /* fixed point conversion test */\n> -               if (testFixedPoint() != TestPass)\n> +               Q q(input);\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << \"  Checking \" << input << \" == \" << q << std::endl;\n> +\n> +               T quantized = q.quantized();\n> +               if (quantized != expected) {\n> +                       std::cout << \"    ** Q Expected \" << input\n> +                                 << \" to quantize to \" << utils::hex(expected)\n> +                                 << \", got \" << utils::hex(quantized)\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               if ((std::abs(q.value() - value)) > 0.0001f) {\n> +                       std::cout << \"    ** V Expected \" << input\n> +                                 << \" to quantize to \" << value\n> +                                 << \", got \" << q.value()\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q, typename RegisterType>\n> +       int signExtendCheck()\n> +       {\n> +               Q minValue(Q::TraitsType::min);\n> +               using T = typename Q::QuantizedType;\n> +               T minQuantized = minValue.quantized();\n> +\n> +               /* Take the value and expand it into a larger register */\n> +               RegisterType reg = static_cast<RegisterType>(minValue.quantized());\n> +\n> +               std::cout << \"  Checking \" << minValue << \" == \" << utils::hex(reg) << std::endl;\n> +\n> +               /*\n> +                * Ensure that the minimum negative value is not sign\n> +                * extended when casting up to a larger register storage\n> +                * type.\n> +                */\n> +               if (reg != minQuantized) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << utils::hex(minQuantized) << \", got \"\n> +                                 << utils::hex(reg) << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               /* And we should be consistent when we convert back to Q */\n> +               Q q2(static_cast<T>(reg));\n> +               if (!(q2 == minValue)) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << minValue << \", got \" << q2 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q>\n> +       void introduce(std::string_view type)\n> +       {\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << std::endl;\n> +\n> +               std::cout << type\n> +                         << \"(\" << Q::TraitsType::min << \" .. \" << Q::TraitsType::max << \") \"\n> +                         << \" Min: \" << Q(Q::TraitsType::min)\n> +                         << \" -- Max: \" << Q(Q::TraitsType::max)\n> +                         << \" Step:\" << Q(T(1)).value()\n> +                         << std::endl;\n> +       }\n> +\n> +       int testFixedPointQuantizers()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /*\n> +                * These aim to specifically test all the corner cases of the\n> +                * quantization and de-quantization process. Including clamping\n> +                * to min/max, zero points and making sure that steps are\n> +                * correct.\n> +                *\n> +                * In particular test signed and unsigned types and a mix of the\n> +                * highest bit width of a storage type and smaller widths that\n> +                * require bit masking and sign extension.\n> +                *\n> +                * Note we must hard code these. Any calculation of expected\n> +                * values risks replicating bugs in the implementation.\n> +                *\n> +                * As the underlying types are integer and float the limit of\n> +                * precision is around 24 bits so we do not test wider types.\n> +                */\n> +\n> +               /* clang-format off */\n> +\n> +               /* Q1.7(-1 .. 0.992188)  Min: [0x80:-1] -- Max: [0x7f:0.992188] Step:0.0078125*/\n> +               introduce<Q<1, 7>>(\"Q1.7\");\n> +               fails += quantizedCheck<Q<1, 7>>(-2.000f, 0b1'0000000, -1.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-1.000f, 0b1'0000000, -1.0f);          /* Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.992f, 0b1'0000001, -0.992188f);     /* Min + 1 step */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.006f, 0b1'1111111, -0.0078125f);    /* -1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.000f, 0b0'0000000,  0.0f);          /* Zero */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.008f, 0b0'0000001,  0.0078125f);    /* +1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.992f, 0b0'1111111,  0.992188f);     /* Max */\n> +               fails += quantizedCheck<Q<1, 7>>( 2.000f, 0b0'1111111,  0.992188f);     /* Clamped to Max */\n> +\n> +               /* UQ1.7(0 .. 1.99219)  Min: [0x00:0] -- Max: [0xff:1.99219] Step:0.0078125 */\n> +               introduce<UQ<1, 7>>(\"UQ1.7\");\n> +               fails += quantizedCheck<UQ<1, 7>>(-1.0f,   0b0'0000000, 0.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<UQ<1, 7>>( 0.0f,   0b0'0000000, 0.0f);          /* Min / Zero */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.0f,   0b1'0000000, 1.0f);          /* Mid */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.992f, 0b1'1111111, 1.99219f);      /* Max */\n> +               fails += quantizedCheck<UQ<1, 7>>( 2.000f, 0b1'1111111, 1.99219f);      /* Clamped to Max */\n> +\n> +               /* UQ4.8(0 .. 15.9961)  Min: [0x0000:0] -- Max: [0x0fff:15.9961] Step:0.00390625 */\n> +               introduce<UQ<4, 8>>(\"UQ4.8\");\n> +               fails += quantizedCheck<UQ<4, 8>>( 0.0f, 0b0000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<4, 8>>(16.0f, 0b1111'11111111, 15.9961f);\n> +\n> +               /* Q5.4(-16 .. 15.9375)  Min: [0x0100:-16] -- Max: [0x00ff:15.9375] Step:0.0625 */\n> +               introduce<Q<5, 4>>(\"Q5.4\");\n> +               fails += quantizedCheck<Q<5, 4>>(-16.00f, 0b10000'0000, -16.00f);\n> +               fails += quantizedCheck<Q<5, 4>>( 15.94f, 0b01111'1111,  15.9375f);\n> +\n> +               /* UQ5.8(0 .. 31.9961)  Min: [0x0000:0] -- Max: [0x1fff:31.9961] Step:0.00390625 */\n> +               introduce<UQ<5, 8>>(\"UQ5.8\");\n> +               fails += quantizedCheck<UQ<5, 8>>( 0.00f, 0b00000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<5, 8>>(32.00f, 0b11111'11111111, 31.9961f);\n> +\n> +               /* Q12.4(-2048 .. 2047.94)  Min: [0x8000:-2048] -- Max: [0x7fff:2047.94] Step:0.0625 */\n> +               introduce<Q<12, 4>>(\"Q12.4\");\n> +               fails += quantizedCheck<Q<12, 4>>(    0.0f, 0b000000000000'0000,     0.0f);\n> +               fails += quantizedCheck<Q<12, 4>>(    7.5f, 0b000000000111'1000,     7.5f);\n> +\n> +               /* UQ12.4(0 .. 4095.94)  Min: [0x0000:0] -- Max: [0xffff:4095.94] Step:0.0625 */\n> +               introduce<UQ<12, 4>>(\"UQ12.4\");\n> +               fails += quantizedCheck<UQ<12, 4>>(0.0f, 0b000000000000'0000, 0.0f);\n> +               fails += quantizedCheck<UQ<12, 4>>(7.5f, 0b000000000111'1000, 7.5f);\n> +\n> +               /* Q4.20 */\n> +               introduce<Q<4, 20>>(\"Q4.20\");\n> +               fails += quantizedCheck<Q<4, 20>>( -9.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>( -8.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  8.0f, 0b0111'11111111111111111111,  8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  9.0f, 0b0111'11111111111111111111,  8.0f);\n> +\n> +               /* UQ4.20 */\n> +               introduce<UQ<4, 20>>(\"UQ4.20\");\n> +               fails += quantizedCheck<UQ<4, 20>>(-1.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>( 0.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(16.0f, 0b1111'11111111111111111111, 16.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(20.0f, 0b1111'11111111111111111111, 16.0f);\n> +\n> +               /* Storage selection tests */\n> +               static_assert(std::is_same_v<typename Q<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename UQ<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename Q<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename UQ<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename Q<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +               static_assert(std::is_same_v<typename UQ<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +\n> +               /*\n> +                * Test and validate that sign extension can not modify a\n> +                * quantized value when stored or cast to a larger register.\n> +                */\n> +               std::cout << std::endl;\n> +               std::cout << \"Testing sign extension of quantized values when cast to larger registers\" << std::endl;\n> +               fails += signExtendCheck<Q<2, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint32_t>();\n> +\n> +               /* clang-format on */\n> +\n> +               std::cout << std::endl;\n> +\n> +               if (fails > 0) {\n> +                       cout << \"Fixed point quantizer tests failed: \"\n> +                            << std::dec << fails << \" failures.\" << std::endl;\n>                         return TestFail;\n> +               }\n>  \n>                 return TestPass;\n>         }\n> +\n> +       int run()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /* fixed point conversion test */\n> +               if (testFixedPoint() != TestPass)\n> +                       fails++;\n> +\n> +               if (testFixedPointQuantizers() != TestPass)\n> +                       fails++;\n> +\n> +               return fails ? TestFail : TestPass;\n> +       }\n>  };\n>  \n>  TEST_REGISTER(FixedPointUtilsTest)\n> \n> -- \n> 2.52.0\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 2ACB6C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Feb 2026 08:51:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1CDDB6222A;\n\tThu, 19 Feb 2026 09:51:10 +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 EC64B62010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Feb 2026 09:51:08 +0100 (CET)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:3150:3f17:6415:4c60])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 1E247379;\n\tThu, 19 Feb 2026 09:50:14 +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=\"pmS2pBRP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771491015;\n\tbh=gY4eyIN+yw2QYkP5RUMcs8LKwFX54c5mivpvbWWllio=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=pmS2pBRP+ffi8uBm+FL2EDTDm6qvrzyryRlbnCrvleN5X9yhoYEJq55RpXXHJNZ4u\n\trqeN4A1rmd6+xqjdrd0BTJ9Cc7T0puG/oktb79HElroSZfVtMddgTxokdiAzyW+OO9\n\tImOuXctAEOsI7Moc8dpD84ffgP6ot1wJCvCMS36U=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","References":"<20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com>\n\t<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","Subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 19 Feb 2026 17:50:59 +0900","Message-ID":"<177149105981.607498.13804693122609538309@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>"}},{"id":38239,"web_url":"https://patchwork.libcamera.org/comment/38239/","msgid":"<177149708951.3673516.7833827905778030637@localhost>","date":"2026-02-19T10:31:29","subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Quoting Kieran Bingham (2026-02-13 17:57:44)\n> Provide tests to validate the conditions of FixedPoint types used\n> within libcamera explicitly.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nLooks good to me.\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nRegards,\nStefan\n\n> \n> ---\n> v3:\n> - Rename quantized_type to QuantizedType\n> \n> v5:\n> \n> - Use string_view for introduction of type\n> - move min/max check to static assert\n> - Squash down all tests into a single implementation and remove extra\n>   type proliferation.\n> - Use Q/UQ types directly.\n> - use std::cout consistently\n> \n> v6:\n> - Add notes on test introduction\n> - Expand Q12.4 to include clamp tests to validate int16_t range usage\n> - Add storage selection assertion checks\n> - Move clamp checks to their types to expand\n> - Add {U,}Q<4,20> to check up to 24 bit precision\n> \n> v7:\n> - Provide signed register extension tests\n> ---\n>  test/ipa/libipa/fixedpoint.cpp | 209 ++++++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 205 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/ipa/libipa/fixedpoint.cpp b/test/ipa/libipa/fixedpoint.cpp\n> index 4b017e86a74f..2907426b7a69 100644\n> --- a/test/ipa/libipa/fixedpoint.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -5,12 +5,14 @@\n>   * Fixed / Floating point utility tests\n>   */\n>  \n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n> +\n>  #include <cmath>\n>  #include <iostream>\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/libipa/fixedpoint.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> @@ -95,14 +97,213 @@ protected:\n>                 return TestPass;\n>         }\n>  \n> -       int run()\n> +       template<typename Q>\n> +       int quantizedCheck(float input, typename Q::QuantizedType expected, float value)\n>         {\n> -               /* fixed point conversion test */\n> -               if (testFixedPoint() != TestPass)\n> +               Q q(input);\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << \"  Checking \" << input << \" == \" << q << std::endl;\n> +\n> +               T quantized = q.quantized();\n> +               if (quantized != expected) {\n> +                       std::cout << \"    ** Q Expected \" << input\n> +                                 << \" to quantize to \" << utils::hex(expected)\n> +                                 << \", got \" << utils::hex(quantized)\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               if ((std::abs(q.value() - value)) > 0.0001f) {\n> +                       std::cout << \"    ** V Expected \" << input\n> +                                 << \" to quantize to \" << value\n> +                                 << \", got \" << q.value()\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q, typename RegisterType>\n> +       int signExtendCheck()\n> +       {\n> +               Q minValue(Q::TraitsType::min);\n> +               using T = typename Q::QuantizedType;\n> +               T minQuantized = minValue.quantized();\n> +\n> +               /* Take the value and expand it into a larger register */\n> +               RegisterType reg = static_cast<RegisterType>(minValue.quantized());\n> +\n> +               std::cout << \"  Checking \" << minValue << \" == \" << utils::hex(reg) << std::endl;\n> +\n> +               /*\n> +                * Ensure that the minimum negative value is not sign\n> +                * extended when casting up to a larger register storage\n> +                * type.\n> +                */\n> +               if (reg != minQuantized) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << utils::hex(minQuantized) << \", got \"\n> +                                 << utils::hex(reg) << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               /* And we should be consistent when we convert back to Q */\n> +               Q q2(static_cast<T>(reg));\n> +               if (!(q2 == minValue)) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << minValue << \", got \" << q2 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q>\n> +       void introduce(std::string_view type)\n> +       {\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << std::endl;\n> +\n> +               std::cout << type\n> +                         << \"(\" << Q::TraitsType::min << \" .. \" << Q::TraitsType::max << \") \"\n> +                         << \" Min: \" << Q(Q::TraitsType::min)\n> +                         << \" -- Max: \" << Q(Q::TraitsType::max)\n> +                         << \" Step:\" << Q(T(1)).value()\n> +                         << std::endl;\n> +       }\n> +\n> +       int testFixedPointQuantizers()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /*\n> +                * These aim to specifically test all the corner cases of the\n> +                * quantization and de-quantization process. Including clamping\n> +                * to min/max, zero points and making sure that steps are\n> +                * correct.\n> +                *\n> +                * In particular test signed and unsigned types and a mix of the\n> +                * highest bit width of a storage type and smaller widths that\n> +                * require bit masking and sign extension.\n> +                *\n> +                * Note we must hard code these. Any calculation of expected\n> +                * values risks replicating bugs in the implementation.\n> +                *\n> +                * As the underlying types are integer and float the limit of\n> +                * precision is around 24 bits so we do not test wider types.\n> +                */\n> +\n> +               /* clang-format off */\n> +\n> +               /* Q1.7(-1 .. 0.992188)  Min: [0x80:-1] -- Max: [0x7f:0.992188] Step:0.0078125*/\n> +               introduce<Q<1, 7>>(\"Q1.7\");\n> +               fails += quantizedCheck<Q<1, 7>>(-2.000f, 0b1'0000000, -1.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-1.000f, 0b1'0000000, -1.0f);          /* Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.992f, 0b1'0000001, -0.992188f);     /* Min + 1 step */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.006f, 0b1'1111111, -0.0078125f);    /* -1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.000f, 0b0'0000000,  0.0f);          /* Zero */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.008f, 0b0'0000001,  0.0078125f);    /* +1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.992f, 0b0'1111111,  0.992188f);     /* Max */\n> +               fails += quantizedCheck<Q<1, 7>>( 2.000f, 0b0'1111111,  0.992188f);     /* Clamped to Max */\n> +\n> +               /* UQ1.7(0 .. 1.99219)  Min: [0x00:0] -- Max: [0xff:1.99219] Step:0.0078125 */\n> +               introduce<UQ<1, 7>>(\"UQ1.7\");\n> +               fails += quantizedCheck<UQ<1, 7>>(-1.0f,   0b0'0000000, 0.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<UQ<1, 7>>( 0.0f,   0b0'0000000, 0.0f);          /* Min / Zero */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.0f,   0b1'0000000, 1.0f);          /* Mid */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.992f, 0b1'1111111, 1.99219f);      /* Max */\n> +               fails += quantizedCheck<UQ<1, 7>>( 2.000f, 0b1'1111111, 1.99219f);      /* Clamped to Max */\n> +\n> +               /* UQ4.8(0 .. 15.9961)  Min: [0x0000:0] -- Max: [0x0fff:15.9961] Step:0.00390625 */\n> +               introduce<UQ<4, 8>>(\"UQ4.8\");\n> +               fails += quantizedCheck<UQ<4, 8>>( 0.0f, 0b0000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<4, 8>>(16.0f, 0b1111'11111111, 15.9961f);\n> +\n> +               /* Q5.4(-16 .. 15.9375)  Min: [0x0100:-16] -- Max: [0x00ff:15.9375] Step:0.0625 */\n> +               introduce<Q<5, 4>>(\"Q5.4\");\n> +               fails += quantizedCheck<Q<5, 4>>(-16.00f, 0b10000'0000, -16.00f);\n> +               fails += quantizedCheck<Q<5, 4>>( 15.94f, 0b01111'1111,  15.9375f);\n> +\n> +               /* UQ5.8(0 .. 31.9961)  Min: [0x0000:0] -- Max: [0x1fff:31.9961] Step:0.00390625 */\n> +               introduce<UQ<5, 8>>(\"UQ5.8\");\n> +               fails += quantizedCheck<UQ<5, 8>>( 0.00f, 0b00000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<5, 8>>(32.00f, 0b11111'11111111, 31.9961f);\n> +\n> +               /* Q12.4(-2048 .. 2047.94)  Min: [0x8000:-2048] -- Max: [0x7fff:2047.94] Step:0.0625 */\n> +               introduce<Q<12, 4>>(\"Q12.4\");\n> +               fails += quantizedCheck<Q<12, 4>>(    0.0f, 0b000000000000'0000,     0.0f);\n> +               fails += quantizedCheck<Q<12, 4>>(    7.5f, 0b000000000111'1000,     7.5f);\n> +\n> +               /* UQ12.4(0 .. 4095.94)  Min: [0x0000:0] -- Max: [0xffff:4095.94] Step:0.0625 */\n> +               introduce<UQ<12, 4>>(\"UQ12.4\");\n> +               fails += quantizedCheck<UQ<12, 4>>(0.0f, 0b000000000000'0000, 0.0f);\n> +               fails += quantizedCheck<UQ<12, 4>>(7.5f, 0b000000000111'1000, 7.5f);\n> +\n> +               /* Q4.20 */\n> +               introduce<Q<4, 20>>(\"Q4.20\");\n> +               fails += quantizedCheck<Q<4, 20>>( -9.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>( -8.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  8.0f, 0b0111'11111111111111111111,  8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  9.0f, 0b0111'11111111111111111111,  8.0f);\n> +\n> +               /* UQ4.20 */\n> +               introduce<UQ<4, 20>>(\"UQ4.20\");\n> +               fails += quantizedCheck<UQ<4, 20>>(-1.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>( 0.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(16.0f, 0b1111'11111111111111111111, 16.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(20.0f, 0b1111'11111111111111111111, 16.0f);\n> +\n> +               /* Storage selection tests */\n> +               static_assert(std::is_same_v<typename Q<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename UQ<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename Q<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename UQ<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename Q<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +               static_assert(std::is_same_v<typename UQ<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +\n> +               /*\n> +                * Test and validate that sign extension can not modify a\n> +                * quantized value when stored or cast to a larger register.\n> +                */\n> +               std::cout << std::endl;\n> +               std::cout << \"Testing sign extension of quantized values when cast to larger registers\" << std::endl;\n> +               fails += signExtendCheck<Q<2, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint32_t>();\n> +\n> +               /* clang-format on */\n> +\n> +               std::cout << std::endl;\n> +\n> +               if (fails > 0) {\n> +                       cout << \"Fixed point quantizer tests failed: \"\n> +                            << std::dec << fails << \" failures.\" << std::endl;\n>                         return TestFail;\n> +               }\n>  \n>                 return TestPass;\n>         }\n> +\n> +       int run()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /* fixed point conversion test */\n> +               if (testFixedPoint() != TestPass)\n> +                       fails++;\n> +\n> +               if (testFixedPointQuantizers() != TestPass)\n> +                       fails++;\n> +\n> +               return fails ? TestFail : TestPass;\n> +       }\n>  };\n>  \n>  TEST_REGISTER(FixedPointUtilsTest)\n> \n> -- \n> 2.52.0\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 35CF9C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Feb 2026 10:31:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 26D4962010;\n\tThu, 19 Feb 2026 11:31:34 +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 30D7662010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Feb 2026 11:31:32 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6ed3:b29f:c3e2:dd5f])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id F33194D3;\n\tThu, 19 Feb 2026 11:30:38 +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=\"uFTdCaXF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771497039;\n\tbh=IY0bufSWmkcfzZsnkC1xiFgGBWDRoXGwkY1ehp3CESE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=uFTdCaXFiG6046svRHdlhXzai0hhosxem7MFUO0Rrlw9G9FNelSzhI3vWJehrwyBM\n\tMSnIdfopPgAhV2qfrwNPBvKfeNWq7yW3kZEemADAgJavlKnHFf47avXFiQRs08sDhd\n\tnehQZo8KQLDwcjz4zWyEeI+qBUvMKoWtjjyMR/k0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","References":"<20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com>\n\t<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","Subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","From":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 19 Feb 2026 11:31:29 +0100","Message-ID":"<177149708951.3673516.7833827905778030637@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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>"}},{"id":38240,"web_url":"https://patchwork.libcamera.org/comment/38240/","msgid":"<177149778643.1227251.15404306702491104785@t16.ideasonboard.com>","date":"2026-02-19T10:43:06","subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch!\n\nQuoting Kieran Bingham (2026-02-13 16:57:44)\n> Provide tests to validate the conditions of FixedPoint types used\n> within libcamera explicitly.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> ---\n> v3:\n> - Rename quantized_type to QuantizedType\n> \n> v5:\n> \n> - Use string_view for introduction of type\n> - move min/max check to static assert\n> - Squash down all tests into a single implementation and remove extra\n>   type proliferation.\n> - Use Q/UQ types directly.\n> - use std::cout consistently\n> \n> v6:\n> - Add notes on test introduction\n> - Expand Q12.4 to include clamp tests to validate int16_t range usage\n> - Add storage selection assertion checks\n> - Move clamp checks to their types to expand\n> - Add {U,}Q<4,20> to check up to 24 bit precision\n> \n> v7:\n> - Provide signed register extension tests\n> ---\n>  test/ipa/libipa/fixedpoint.cpp | 209 ++++++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 205 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/ipa/libipa/fixedpoint.cpp b/test/ipa/libipa/fixedpoint.cpp\n> index 4b017e86a74f..2907426b7a69 100644\n> --- a/test/ipa/libipa/fixedpoint.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -5,12 +5,14 @@\n>   * Fixed / Floating point utility tests\n>   */\n>  \n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n> +\n>  #include <cmath>\n>  #include <iostream>\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/libipa/fixedpoint.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> @@ -95,14 +97,213 @@ protected:\n>                 return TestPass;\n>         }\n>  \n> -       int run()\n> +       template<typename Q>\n> +       int quantizedCheck(float input, typename Q::QuantizedType expected, float value)\n>         {\n> -               /* fixed point conversion test */\n> -               if (testFixedPoint() != TestPass)\n> +               Q q(input);\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << \"  Checking \" << input << \" == \" << q << std::endl;\n> +\n> +               T quantized = q.quantized();\n> +               if (quantized != expected) {\n> +                       std::cout << \"    ** Q Expected \" << input\n> +                                 << \" to quantize to \" << utils::hex(expected)\n> +                                 << \", got \" << utils::hex(quantized)\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               if ((std::abs(q.value() - value)) > 0.0001f) {\n> +                       std::cout << \"    ** V Expected \" << input\n> +                                 << \" to quantize to \" << value\n> +                                 << \", got \" << q.value()\n> +                                 << \" - (\" << q << \")\"\n> +                                 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q, typename RegisterType>\n> +       int signExtendCheck()\n> +       {\n> +               Q minValue(Q::TraitsType::min);\n> +               using T = typename Q::QuantizedType;\n> +               T minQuantized = minValue.quantized();\n> +\n> +               /* Take the value and expand it into a larger register */\n> +               RegisterType reg = static_cast<RegisterType>(minValue.quantized());\n> +\n> +               std::cout << \"  Checking \" << minValue << \" == \" << utils::hex(reg) << std::endl;\n> +\n> +               /*\n> +                * Ensure that the minimum negative value is not sign\n> +                * extended when casting up to a larger register storage\n> +                * type.\n> +                */\n> +               if (reg != minQuantized) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << utils::hex(minQuantized) << \", got \"\n> +                                 << utils::hex(reg) << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               /* And we should be consistent when we convert back to Q */\n> +               Q q2(static_cast<T>(reg));\n> +               if (!(q2 == minValue)) {\n> +                       std::cout << \"    ** Sign extension check failed for min value. Expected \"\n> +                                 << minValue << \", got \" << q2 << std::endl;\n> +                       return 1;\n> +               }\n> +\n> +               return 0;\n> +       }\n> +\n> +       template<typename Q>\n> +       void introduce(std::string_view type)\n> +       {\n> +               using T = typename Q::QuantizedType;\n> +\n> +               std::cout << std::endl;\n> +\n> +               std::cout << type\n> +                         << \"(\" << Q::TraitsType::min << \" .. \" << Q::TraitsType::max << \") \"\n> +                         << \" Min: \" << Q(Q::TraitsType::min)\n> +                         << \" -- Max: \" << Q(Q::TraitsType::max)\n> +                         << \" Step:\" << Q(T(1)).value()\n> +                         << std::endl;\n> +       }\n> +\n> +       int testFixedPointQuantizers()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /*\n> +                * These aim to specifically test all the corner cases of the\n> +                * quantization and de-quantization process. Including clamping\n> +                * to min/max, zero points and making sure that steps are\n> +                * correct.\n> +                *\n> +                * In particular test signed and unsigned types and a mix of the\n> +                * highest bit width of a storage type and smaller widths that\n> +                * require bit masking and sign extension.\n> +                *\n> +                * Note we must hard code these. Any calculation of expected\n> +                * values risks replicating bugs in the implementation.\n> +                *\n> +                * As the underlying types are integer and float the limit of\n> +                * precision is around 24 bits so we do not test wider types.\n> +                */\n> +\n> +               /* clang-format off */\n> +\n> +               /* Q1.7(-1 .. 0.992188)  Min: [0x80:-1] -- Max: [0x7f:0.992188] Step:0.0078125*/\n> +               introduce<Q<1, 7>>(\"Q1.7\");\n> +               fails += quantizedCheck<Q<1, 7>>(-2.000f, 0b1'0000000, -1.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-1.000f, 0b1'0000000, -1.0f);          /* Min */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.992f, 0b1'0000001, -0.992188f);     /* Min + 1 step */\n> +               fails += quantizedCheck<Q<1, 7>>(-0.006f, 0b1'1111111, -0.0078125f);    /* -1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.000f, 0b0'0000000,  0.0f);          /* Zero */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.008f, 0b0'0000001,  0.0078125f);    /* +1 step */\n> +               fails += quantizedCheck<Q<1, 7>>( 0.992f, 0b0'1111111,  0.992188f);     /* Max */\n> +               fails += quantizedCheck<Q<1, 7>>( 2.000f, 0b0'1111111,  0.992188f);     /* Clamped to Max */\n> +\n> +               /* UQ1.7(0 .. 1.99219)  Min: [0x00:0] -- Max: [0xff:1.99219] Step:0.0078125 */\n> +               introduce<UQ<1, 7>>(\"UQ1.7\");\n> +               fails += quantizedCheck<UQ<1, 7>>(-1.0f,   0b0'0000000, 0.0f);          /* Clamped to Min */\n> +               fails += quantizedCheck<UQ<1, 7>>( 0.0f,   0b0'0000000, 0.0f);          /* Min / Zero */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.0f,   0b1'0000000, 1.0f);          /* Mid */\n> +               fails += quantizedCheck<UQ<1, 7>>( 1.992f, 0b1'1111111, 1.99219f);      /* Max */\n> +               fails += quantizedCheck<UQ<1, 7>>( 2.000f, 0b1'1111111, 1.99219f);      /* Clamped to Max */\n> +\n> +               /* UQ4.8(0 .. 15.9961)  Min: [0x0000:0] -- Max: [0x0fff:15.9961] Step:0.00390625 */\n> +               introduce<UQ<4, 8>>(\"UQ4.8\");\n> +               fails += quantizedCheck<UQ<4, 8>>( 0.0f, 0b0000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<4, 8>>(16.0f, 0b1111'11111111, 15.9961f);\n> +\n> +               /* Q5.4(-16 .. 15.9375)  Min: [0x0100:-16] -- Max: [0x00ff:15.9375] Step:0.0625 */\n> +               introduce<Q<5, 4>>(\"Q5.4\");\n> +               fails += quantizedCheck<Q<5, 4>>(-16.00f, 0b10000'0000, -16.00f);\n> +               fails += quantizedCheck<Q<5, 4>>( 15.94f, 0b01111'1111,  15.9375f);\n> +\n> +               /* UQ5.8(0 .. 31.9961)  Min: [0x0000:0] -- Max: [0x1fff:31.9961] Step:0.00390625 */\n> +               introduce<UQ<5, 8>>(\"UQ5.8\");\n> +               fails += quantizedCheck<UQ<5, 8>>( 0.00f, 0b00000'00000000,  0.00f);\n> +               fails += quantizedCheck<UQ<5, 8>>(32.00f, 0b11111'11111111, 31.9961f);\n> +\n> +               /* Q12.4(-2048 .. 2047.94)  Min: [0x8000:-2048] -- Max: [0x7fff:2047.94] Step:0.0625 */\n> +               introduce<Q<12, 4>>(\"Q12.4\");\n> +               fails += quantizedCheck<Q<12, 4>>(    0.0f, 0b000000000000'0000,     0.0f);\n> +               fails += quantizedCheck<Q<12, 4>>(    7.5f, 0b000000000111'1000,     7.5f);\n> +\n> +               /* UQ12.4(0 .. 4095.94)  Min: [0x0000:0] -- Max: [0xffff:4095.94] Step:0.0625 */\n> +               introduce<UQ<12, 4>>(\"UQ12.4\");\n> +               fails += quantizedCheck<UQ<12, 4>>(0.0f, 0b000000000000'0000, 0.0f);\n> +               fails += quantizedCheck<UQ<12, 4>>(7.5f, 0b000000000111'1000, 7.5f);\n> +\n> +               /* Q4.20 */\n> +               introduce<Q<4, 20>>(\"Q4.20\");\n> +               fails += quantizedCheck<Q<4, 20>>( -9.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>( -8.0f, 0b1000'00000000000000000000, -8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  8.0f, 0b0111'11111111111111111111,  8.0f);\n> +               fails += quantizedCheck<Q<4, 20>>(  9.0f, 0b0111'11111111111111111111,  8.0f);\n> +\n> +               /* UQ4.20 */\n> +               introduce<UQ<4, 20>>(\"UQ4.20\");\n> +               fails += quantizedCheck<UQ<4, 20>>(-1.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>( 0.0f, 0b0000'00000000000000000000,  0.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(16.0f, 0b1111'11111111111111111111, 16.0f);\n> +               fails += quantizedCheck<UQ<4, 20>>(20.0f, 0b1111'11111111111111111111, 16.0f);\n> +\n> +               /* Storage selection tests */\n> +               static_assert(std::is_same_v<typename Q<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename UQ<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +               static_assert(std::is_same_v<typename Q<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename UQ<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +               static_assert(std::is_same_v<typename Q<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +               static_assert(std::is_same_v<typename UQ<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +\n> +               /*\n> +                * Test and validate that sign extension can not modify a\n> +                * quantized value when stored or cast to a larger register.\n> +                */\n> +               std::cout << std::endl;\n> +               std::cout << \"Testing sign extension of quantized values when cast to larger registers\" << std::endl;\n> +               fails += signExtendCheck<Q<2, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint8_t>();\n> +               fails += signExtendCheck<Q<4, 4>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint16_t>();\n> +               fails += signExtendCheck<Q<8, 8>, uint32_t>();\n> +\n> +               /* clang-format on */\n> +\n> +               std::cout << std::endl;\n> +\n> +               if (fails > 0) {\n> +                       cout << \"Fixed point quantizer tests failed: \"\n> +                            << std::dec << fails << \" failures.\" << std::endl;\n>                         return TestFail;\n> +               }\n>  \n>                 return TestPass;\n>         }\n> +\n> +       int run()\n> +       {\n> +               unsigned int fails = 0;\n> +\n> +               /* fixed point conversion test */\n> +               if (testFixedPoint() != TestPass)\n> +                       fails++;\n> +\n> +               if (testFixedPointQuantizers() != TestPass)\n> +                       fails++;\n> +\n> +               return fails ? TestFail : TestPass;\n> +       }\n>  };\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n>  \n>  TEST_REGISTER(FixedPointUtilsTest)\n> \n> -- \n> 2.52.0\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 E4C89C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Feb 2026 10:43:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6C676223E;\n\tThu, 19 Feb 2026 11:43: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 B317C62010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Feb 2026 11:43:09 +0100 (CET)","from thinkpad.ideasonboard.com\n\t(cpc90716-aztw32-2-0-cust408.18-1.cable.virginm.net [86.26.101.153])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A333F4D3;\n\tThu, 19 Feb 2026 11:42:16 +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=\"Zy/3dqVJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771497736;\n\tbh=bo4Mae6QLpitz1hR/8iTWhQPXliwuv3jte5u9lmBJDI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Zy/3dqVJA/T5X5YdqXF2Ga3p7Fxj1tyYs+qGHsGjPxF2onPe1jc9j8hKatg7VuPqM\n\tE3CNAdSLNDuEeuqlUWClHJeg6WN2addLhKAX5XV7uPYPyTNVISwPOoE60Bx8mEYff4\n\tBTV7UBzxvEgJuo9/pBs0MfpslGmZ6ONAgMibNUws=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","References":"<20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com>\n\t<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","Subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","From":"Isaac Scott <isaac.scott@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 19 Feb 2026 10:43:06 +0000","Message-ID":"<177149778643.1227251.15404306702491104785@t16.ideasonboard.com>","User-Agent":"alot/0.10","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>"}},{"id":38248,"web_url":"https://patchwork.libcamera.org/comment/38248/","msgid":"<20260219131848.GL520738@killaraus.ideasonboard.com>","date":"2026-02-19T13:18:48","subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Feb 13, 2026 at 04:57:44PM +0000, Kieran Bingham wrote:\n> Provide tests to validate the conditions of FixedPoint types used\n> within libcamera explicitly.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> ---\n> v3:\n> - Rename quantized_type to QuantizedType\n> \n> v5:\n> \n> - Use string_view for introduction of type\n> - move min/max check to static assert\n> - Squash down all tests into a single implementation and remove extra\n>   type proliferation.\n> - Use Q/UQ types directly.\n> - use std::cout consistently\n> \n> v6:\n> - Add notes on test introduction\n> - Expand Q12.4 to include clamp tests to validate int16_t range usage\n> - Add storage selection assertion checks\n> - Move clamp checks to their types to expand\n> - Add {U,}Q<4,20> to check up to 24 bit precision\n> \n> v7:\n> - Provide signed register extension tests\n> ---\n>  test/ipa/libipa/fixedpoint.cpp | 209 ++++++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 205 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/ipa/libipa/fixedpoint.cpp b/test/ipa/libipa/fixedpoint.cpp\n> index 4b017e86a74f..2907426b7a69 100644\n> --- a/test/ipa/libipa/fixedpoint.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -5,12 +5,14 @@\n>   * Fixed / Floating point utility tests\n>   */\n>  \n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n> +\n>  #include <cmath>\n>  #include <iostream>\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/libipa/fixedpoint.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> @@ -95,14 +97,213 @@ protected:\n>  \t\treturn TestPass;\n>  \t}\n>  \n> -\tint run()\n> +\ttemplate<typename Q>\n> +\tint quantizedCheck(float input, typename Q::QuantizedType expected, float value)\n>  \t{\n> -\t\t/* fixed point conversion test */\n> -\t\tif (testFixedPoint() != TestPass)\n> +\t\tQ q(input);\n> +\t\tusing T = typename Q::QuantizedType;\n> +\n> +\t\tstd::cout << \"  Checking \" << input << \" == \" << q << std::endl;\n> +\n> +\t\tT quantized = q.quantized();\n> +\t\tif (quantized != expected) {\n> +\t\t\tstd::cout << \"    ** Q Expected \" << input\n\nstd::cerr as this is an error message.\n\n> +\t\t\t\t  << \" to quantize to \" << utils::hex(expected)\n> +\t\t\t\t  << \", got \" << utils::hex(quantized)\n> +\t\t\t\t  << \" - (\" << q << \")\"\n> +\t\t\t\t  << std::endl;\n> +\t\t\treturn 1;\n> +\t\t}\n> +\n> +\t\tif ((std::abs(q.value() - value)) > 0.0001f) {\n> +\t\t\tstd::cout << \"    ** V Expected \" << input\n\nSame here.\n\n> +\t\t\t\t  << \" to quantize to \" << value\n> +\t\t\t\t  << \", got \" << q.value()\n> +\t\t\t\t  << \" - (\" << q << \")\"\n> +\t\t\t\t  << std::endl;\n> +\t\t\treturn 1;\n> +\t\t}\n> +\n> +\t\treturn 0;\n> +\t}\n> +\n> +\ttemplate<typename Q, typename RegisterType>\n> +\tint signExtendCheck()\n> +\t{\n> +\t\tQ minValue(Q::TraitsType::min);\n> +\t\tusing T = typename Q::QuantizedType;\n> +\t\tT minQuantized = minValue.quantized();\n> +\n> +\t\t/* Take the value and expand it into a larger register */\n> +\t\tRegisterType reg = static_cast<RegisterType>(minValue.quantized());\n> +\n> +\t\tstd::cout << \"  Checking \" << minValue << \" == \" << utils::hex(reg) << std::endl;\n> +\n> +\t\t/*\n> +\t\t * Ensure that the minimum negative value is not sign\n> +\t\t * extended when casting up to a larger register storage\n> +\t\t * type.\n> +\t\t */\n> +\t\tif (reg != minQuantized) {\n> +\t\t\tstd::cout << \"    ** Sign extension check failed for min value. Expected \"\n\nHere too.\n\n> +\t\t\t\t  << utils::hex(minQuantized) << \", got \"\n> +\t\t\t\t  << utils::hex(reg) << std::endl;\n> +\t\t\treturn 1;\n> +\t\t}\n> +\n> +\t\t/* And we should be consistent when we convert back to Q */\n> +\t\tQ q2(static_cast<T>(reg));\n> +\t\tif (!(q2 == minValue)) {\n> +\t\t\tstd::cout << \"    ** Sign extension check failed for min value. Expected \"\n\nAnd here.\n\n> +\t\t\t\t  << minValue << \", got \" << q2 << std::endl;\n> +\t\t\treturn 1;\n> +\t\t}\n> +\n> +\t\treturn 0;\n> +\t}\n> +\n> +\ttemplate<typename Q>\n> +\tvoid introduce(std::string_view type)\n> +\t{\n> +\t\tusing T = typename Q::QuantizedType;\n> +\n> +\t\tstd::cout << std::endl;\n> +\n> +\t\tstd::cout << type\n> +\t\t\t  << \"(\" << Q::TraitsType::min << \" .. \" << Q::TraitsType::max << \") \"\n> +\t\t\t  << \" Min: \" << Q(Q::TraitsType::min)\n> +\t\t\t  << \" -- Max: \" << Q(Q::TraitsType::max)\n> +\t\t\t  << \" Step:\" << Q(T(1)).value()\n> +\t\t\t  << std::endl;\n> +\t}\n> +\n> +\tint testFixedPointQuantizers()\n> +\t{\n> +\t\tunsigned int fails = 0;\n> +\n> +\t\t/*\n> +\t\t * These aim to specifically test all the corner cases of the\n> +\t\t * quantization and de-quantization process. Including clamping\n> +\t\t * to min/max, zero points and making sure that steps are\n> +\t\t * correct.\n> +\t\t *\n> +\t\t * In particular test signed and unsigned types and a mix of the\n> +\t\t * highest bit width of a storage type and smaller widths that\n> +\t\t * require bit masking and sign extension.\n> +\t\t *\n> +\t\t * Note we must hard code these. Any calculation of expected\n> +\t\t * values risks replicating bugs in the implementation.\n> +\t\t *\n> +\t\t * As the underlying types are integer and float the limit of\n> +\t\t * precision is around 24 bits so we do not test wider types.\n> +\t\t */\n> +\n> +\t\t/* clang-format off */\n> +\n> +\t\t/* Q1.7(-1 .. 0.992188)  Min: [0x80:-1] -- Max: [0x7f:0.992188] Step:0.0078125*/\n> +\t\tintroduce<Q<1, 7>>(\"Q1.7\");\n> +\t\tfails += quantizedCheck<Q<1, 7>>(-2.000f, 0b1'0000000, -1.0f);\t\t/* Clamped to Min */\n> +\t\tfails += quantizedCheck<Q<1, 7>>(-1.000f, 0b1'0000000, -1.0f);\t\t/* Min */\n> +\t\tfails += quantizedCheck<Q<1, 7>>(-0.992f, 0b1'0000001, -0.992188f);\t/* Min + 1 step */\n> +\t\tfails += quantizedCheck<Q<1, 7>>(-0.006f, 0b1'1111111, -0.0078125f);\t/* -1 step */\n> +\t\tfails += quantizedCheck<Q<1, 7>>( 0.000f, 0b0'0000000,  0.0f);\t\t/* Zero */\n> +\t\tfails += quantizedCheck<Q<1, 7>>( 0.008f, 0b0'0000001,  0.0078125f);\t/* +1 step */\n> +\t\tfails += quantizedCheck<Q<1, 7>>( 0.992f, 0b0'1111111,  0.992188f);\t/* Max */\n> +\t\tfails += quantizedCheck<Q<1, 7>>( 2.000f, 0b0'1111111,  0.992188f);\t/* Clamped to Max */\n> +\n> +\t\t/* UQ1.7(0 .. 1.99219)  Min: [0x00:0] -- Max: [0xff:1.99219] Step:0.0078125 */\n> +\t\tintroduce<UQ<1, 7>>(\"UQ1.7\");\n> +\t\tfails += quantizedCheck<UQ<1, 7>>(-1.0f,   0b0'0000000, 0.0f);\t\t/* Clamped to Min */\n> +\t\tfails += quantizedCheck<UQ<1, 7>>( 0.0f,   0b0'0000000, 0.0f);\t\t/* Min / Zero */\n> +\t\tfails += quantizedCheck<UQ<1, 7>>( 1.0f,   0b1'0000000, 1.0f);\t\t/* Mid */\n> +\t\tfails += quantizedCheck<UQ<1, 7>>( 1.992f, 0b1'1111111, 1.99219f);\t/* Max */\n> +\t\tfails += quantizedCheck<UQ<1, 7>>( 2.000f, 0b1'1111111, 1.99219f);\t/* Clamped to Max */\n> +\n> +\t\t/* UQ4.8(0 .. 15.9961)  Min: [0x0000:0] -- Max: [0x0fff:15.9961] Step:0.00390625 */\n> +\t\tintroduce<UQ<4, 8>>(\"UQ4.8\");\n> +\t\tfails += quantizedCheck<UQ<4, 8>>( 0.0f, 0b0000'00000000,  0.00f);\n> +\t\tfails += quantizedCheck<UQ<4, 8>>(16.0f, 0b1111'11111111, 15.9961f);\n> +\n> +\t\t/* Q5.4(-16 .. 15.9375)  Min: [0x0100:-16] -- Max: [0x00ff:15.9375] Step:0.0625 */\n> +\t\tintroduce<Q<5, 4>>(\"Q5.4\");\n> +\t\tfails += quantizedCheck<Q<5, 4>>(-16.00f, 0b10000'0000, -16.00f);\n> +\t\tfails += quantizedCheck<Q<5, 4>>( 15.94f, 0b01111'1111,  15.9375f);\n> +\n> +\t\t/* UQ5.8(0 .. 31.9961)  Min: [0x0000:0] -- Max: [0x1fff:31.9961] Step:0.00390625 */\n> +\t\tintroduce<UQ<5, 8>>(\"UQ5.8\");\n> +\t\tfails += quantizedCheck<UQ<5, 8>>( 0.00f, 0b00000'00000000,  0.00f);\n> +\t\tfails += quantizedCheck<UQ<5, 8>>(32.00f, 0b11111'11111111, 31.9961f);\n> +\n> +\t\t/* Q12.4(-2048 .. 2047.94)  Min: [0x8000:-2048] -- Max: [0x7fff:2047.94] Step:0.0625 */\n> +\t\tintroduce<Q<12, 4>>(\"Q12.4\");\n> +\t\tfails += quantizedCheck<Q<12, 4>>(    0.0f, 0b000000000000'0000,     0.0f);\n> +\t\tfails += quantizedCheck<Q<12, 4>>(    7.5f, 0b000000000111'1000,     7.5f);\n> +\n> +\t\t/* UQ12.4(0 .. 4095.94)  Min: [0x0000:0] -- Max: [0xffff:4095.94] Step:0.0625 */\n> +\t\tintroduce<UQ<12, 4>>(\"UQ12.4\");\n> +\t\tfails += quantizedCheck<UQ<12, 4>>(0.0f, 0b000000000000'0000, 0.0f);\n> +\t\tfails += quantizedCheck<UQ<12, 4>>(7.5f, 0b000000000111'1000, 7.5f);\n> +\n> +\t\t/* Q4.20 */\n> +\t\tintroduce<Q<4, 20>>(\"Q4.20\");\n> +\t\tfails += quantizedCheck<Q<4, 20>>( -9.0f, 0b1000'00000000000000000000, -8.0f);\n> +\t\tfails += quantizedCheck<Q<4, 20>>( -8.0f, 0b1000'00000000000000000000, -8.0f);\n> +\t\tfails += quantizedCheck<Q<4, 20>>(  8.0f, 0b0111'11111111111111111111,  8.0f);\n> +\t\tfails += quantizedCheck<Q<4, 20>>(  9.0f, 0b0111'11111111111111111111,  8.0f);\n> +\n> +\t\t/* UQ4.20 */\n> +\t\tintroduce<UQ<4, 20>>(\"UQ4.20\");\n> +\t\tfails += quantizedCheck<UQ<4, 20>>(-1.0f, 0b0000'00000000000000000000,  0.0f);\n> +\t\tfails += quantizedCheck<UQ<4, 20>>( 0.0f, 0b0000'00000000000000000000,  0.0f);\n> +\t\tfails += quantizedCheck<UQ<4, 20>>(16.0f, 0b1111'11111111111111111111, 16.0f);\n> +\t\tfails += quantizedCheck<UQ<4, 20>>(20.0f, 0b1111'11111111111111111111, 16.0f);\n> +\n> +\t\t/* Storage selection tests */\n> +\t\tstatic_assert(std::is_same_v<typename Q<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +\t\tstatic_assert(std::is_same_v<typename UQ<4, 4>::TraitsType::QuantizedType, uint8_t>);\n> +\t\tstatic_assert(std::is_same_v<typename Q<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +\t\tstatic_assert(std::is_same_v<typename UQ<8, 8>::TraitsType::QuantizedType, uint16_t>);\n> +\t\tstatic_assert(std::is_same_v<typename Q<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +\t\tstatic_assert(std::is_same_v<typename UQ<20, 4>::TraitsType::QuantizedType, uint32_t>);\n> +\n> +\t\t/*\n> +\t\t * Test and validate that sign extension can not modify a\n> +\t\t * quantized value when stored or cast to a larger register.\n> +\t\t */\n> +\t\tstd::cout << std::endl;\n> +\t\tstd::cout << \"Testing sign extension of quantized values when cast to larger registers\" << std::endl;\n> +\t\tfails += signExtendCheck<Q<2, 4>, uint8_t>();\n> +\t\tfails += signExtendCheck<Q<4, 4>, uint8_t>();\n> +\t\tfails += signExtendCheck<Q<4, 4>, uint16_t>();\n> +\t\tfails += signExtendCheck<Q<8, 8>, uint16_t>();\n> +\t\tfails += signExtendCheck<Q<8, 8>, uint32_t>();\n> +\n> +\t\t/* clang-format on */\n> +\n> +\t\tstd::cout << std::endl;\n> +\n> +\t\tif (fails > 0) {\n> +\t\t\tcout << \"Fixed point quantizer tests failed: \"\n\ns/cout/std::cerr/\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\t\t     << std::dec << fails << \" failures.\" << std::endl;\n>  \t\t\treturn TestFail;\n> +\t\t}\n>  \n>  \t\treturn TestPass;\n>  \t}\n> +\n> +\tint run()\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> +\t\treturn fails ? TestFail : TestPass;\n> +\t}\n>  };\n>  \n>  TEST_REGISTER(FixedPointUtilsTest)","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 71DA5C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Feb 2026 13:18:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB5AB62245;\n\tThu, 19 Feb 2026 14:18:53 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A6C6620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Feb 2026 14:18:52 +0100 (CET)","from killaraus.ideasonboard.com (unknown [83.245.237.175])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C0A00673;\n\tThu, 19 Feb 2026 14:17:58 +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=\"e7zQ0M4w\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771507079;\n\tbh=Cb6GvgYU0fUwHzK643/EWidUgHvit66oEy4Pha97L3g=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=e7zQ0M4wIkKfmVuJEaKBoL5owYSt71MUWM8GJNH4qkKUacrAEVWHgC0wuJuwAZDol\n\tG5GHYAtWA3RU3k4D2vRe9MvW3TNQxbP8/AYJo0ItLGFDZ3lQdo5J9LSjUW4xcatlZi\n\tIiplTkHwrKAvULmkdWmenACR9uz439x/dRjwicec=","Date":"Thu, 19 Feb 2026 14:18:48 +0100","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v7 05/15] test: libipa: Provide FixedPoint Quantized\n\ttests","Message-ID":"<20260219131848.GL520738@killaraus.ideasonboard.com>","References":"<20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com>\n\t<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260213-kbingham-quantizers-v7-5-1626b9aaabf1@ideasonboard.com>","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>"}}]