[{"id":32186,"web_url":"https://patchwork.libcamera.org/comment/32186/","msgid":"<173167482811.4187655.16145433149934573255@ping.linuxembedded.co.uk>","date":"2024-11-15T12:47:08","subject":"Re: [PATCH v4 01/11] libipa: Centralise Fixed / Floating point\n\tconvertors","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Daniel Scally (2024-11-15 12:25:30)\n> The rkisp1 IPA has some utility functions to convert between fixed\n> and floating point numbers. Move those to libipa so they're available\n> for use in other IPA modules too.\n> \n> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n> Changes in v4:\n> \n>         - New patch\n> \n>  .../{rkisp1/utils.cpp => libipa/fixedpoint.cpp}  | 10 +++++-----\n>  src/ipa/{rkisp1/utils.h => libipa/fixedpoint.h}  |  6 +++---\n>  src/ipa/libipa/meson.build                       |  2 ++\n>  src/ipa/rkisp1/algorithms/ccm.cpp                |  4 ++--\n>  src/ipa/rkisp1/meson.build                       |  1 -\n>  .../rkisp1-utils.cpp => libipa/fixedpoint.cpp}   | 16 ++++++++--------\n>  test/ipa/libipa/meson.build                      |  1 +\n>  test/ipa/meson.build                             |  1 -\n>  test/ipa/rkisp1/meson.build                      | 15 ---------------\n>  9 files changed, 21 insertions(+), 35 deletions(-)\n>  rename src/ipa/{rkisp1/utils.cpp => libipa/fixedpoint.cpp} (87%)\n>  rename src/ipa/{rkisp1/utils.h => libipa/fixedpoint.h} (93%)\n>  rename test/ipa/{rkisp1/rkisp1-utils.cpp => libipa/fixedpoint.cpp} (85%)\n>  delete mode 100644 test/ipa/rkisp1/meson.build\n> \n> diff --git a/src/ipa/rkisp1/utils.cpp b/src/ipa/libipa/fixedpoint.cpp\n> similarity index 87%\n> rename from src/ipa/rkisp1/utils.cpp\n> rename to src/ipa/libipa/fixedpoint.cpp\n> index 960ec64e..6b698fc5 100644\n> --- a/src/ipa/rkisp1/utils.cpp\n> +++ b/src/ipa/libipa/fixedpoint.cpp\n> @@ -2,18 +2,18 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility functions specific to rkisp1\n> + * Fixed / floating point conversions\n>   */\n>  \n> -#include \"utils.h\"\n> +#include \"fixedpoint.h\"\n>  \n>  /**\n> - * \\file utils.h\n> + * \\file fixedpoint.h\n>   */\n>  \n>  namespace libcamera {\n>  \n> -namespace ipa::rkisp1::utils {\n> +namespace ipa {\n>  \n>  /**\n>   * \\fn R floatingToFixedPoint(T number)\n> @@ -37,6 +37,6 @@ namespace ipa::rkisp1::utils {\n>   * \\return The converted value\n>   */\n>  \n> -} /* namespace ipa::rkisp1::utils */\n> +} /* namespace ipa */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/rkisp1/utils.h b/src/ipa/libipa/fixedpoint.h\n> similarity index 93%\n> rename from src/ipa/rkisp1/utils.h\n> rename to src/ipa/libipa/fixedpoint.h\n> index 5f38b50b..709cf50f 100644\n> --- a/src/ipa/rkisp1/utils.h\n> +++ b/src/ipa/libipa/fixedpoint.h\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility functions specific to rkisp1\n> + * Fixed / floating point conversions\n>   */\n>  \n>  #pragma once\n> @@ -12,7 +12,7 @@\n>  \n>  namespace libcamera {\n>  \n> -namespace ipa::rkisp1::utils {\n> +namespace ipa {\n>  \n>  #ifndef __DOXYGEN__\n>  template<unsigned int I, unsigned int F, typename R, typename T,\n> @@ -60,6 +60,6 @@ constexpr R fixedToFloatingPoint(T number)\n>         return static_cast<R>(t) / static_cast<R>(1 << F);\n>  }\n>  \n> -} /* namespace ipa::rkisp1::utils */\n> +} /* namespace ipa */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\n> index 788d037a..a1d662c9 100644\n> --- a/src/ipa/libipa/meson.build\n> +++ b/src/ipa/libipa/meson.build\n> @@ -7,6 +7,7 @@ libipa_headers = files([\n>      'colours.h',\n>      'exposure_mode_helper.h',\n>      'fc_queue.h',\n> +    'fixedpoint.h',\n>      'histogram.h',\n>      'interpolator.h',\n>      'lsc_polynomial.h',\n> @@ -23,6 +24,7 @@ libipa_sources = files([\n>      'colours.cpp',\n>      'exposure_mode_helper.cpp',\n>      'fc_queue.cpp',\n> +    'fixedpoint.cpp',\n>      'histogram.cpp',\n>      'interpolator.cpp',\n>      'lsc_polynomial.cpp',\n> diff --git a/src/ipa/rkisp1/algorithms/ccm.cpp b/src/ipa/rkisp1/algorithms/ccm.cpp\n> index 6b7d2e2c..e2b5cf4d 100644\n> --- a/src/ipa/rkisp1/algorithms/ccm.cpp\n> +++ b/src/ipa/rkisp1/algorithms/ccm.cpp\n> @@ -18,7 +18,7 @@\n>  \n>  #include \"libcamera/internal/yaml_parser.h\"\n>  \n> -#include \"../utils.h\"\n> +#include \"libipa/fixedpoint.h\"\n>  #include \"libipa/interpolator.h\"\n>  \n>  /**\n> @@ -72,7 +72,7 @@ void Ccm::setParameters(struct rkisp1_cif_isp_ctk_config &config,\n>         for (unsigned int i = 0; i < 3; i++) {\n>                 for (unsigned int j = 0; j < 3; j++)\n>                         config.coeff[i][j] =\n> -                               utils::floatingToFixedPoint<4, 7, uint16_t, double>(matrix[i][j]);\n> +                               floatingToFixedPoint<4, 7, uint16_t, double>(matrix[i][j]);\n>         }\n>  \n>         for (unsigned int i = 0; i < 3; i++)\n> diff --git a/src/ipa/rkisp1/meson.build b/src/ipa/rkisp1/meson.build\n> index 34844f14..26a9fa40 100644\n> --- a/src/ipa/rkisp1/meson.build\n> +++ b/src/ipa/rkisp1/meson.build\n> @@ -9,7 +9,6 @@ rkisp1_ipa_sources = files([\n>      'ipa_context.cpp',\n>      'params.cpp',\n>      'rkisp1.cpp',\n> -    'utils.cpp',\n>  ])\n>  \n>  rkisp1_ipa_sources += rkisp1_ipa_algorithms\n> diff --git a/test/ipa/rkisp1/rkisp1-utils.cpp b/test/ipa/libipa/fixedpoint.cpp\n> similarity index 85%\n> rename from test/ipa/rkisp1/rkisp1-utils.cpp\n> rename to test/ipa/libipa/fixedpoint.cpp\n> index b1863894..99eb662d 100644\n> --- a/test/ipa/rkisp1/rkisp1-utils.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility tests\n> + * Fixed / Floating point utility tests\n>   */\n>  \n>  #include <cmath>\n> @@ -10,22 +10,22 @@\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/rkisp1/utils.h\"\n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n>  \n>  #include \"test.h\"\n>  \n>  using namespace std;\n>  using namespace libcamera;\n> -using namespace ipa::rkisp1;\n> +using namespace ipa;\n>  \n> -class RkISP1UtilsTest : public Test\n> +class FixedPointUtilsTest : public Test\n>  {\n>  protected:\n>         /* R for real, I for integer */\n>         template<unsigned int IntPrec, unsigned int FracPrec, typename I, typename R>\n>         int testFixedToFloat(I input, R expected)\n>         {\n> -               R out = utils::fixedToFloatingPoint<IntPrec, FracPrec, R>(input);\n> +               R out = fixedToFloatingPoint<IntPrec, FracPrec, R>(input);\n>                 R prec = 1.0 / (1 << FracPrec);\n>                 if (std::abs(out - expected) > prec) {\n>                         cerr << \"Reverse conversion expected \" << input\n> @@ -40,7 +40,7 @@ protected:\n>         template<unsigned int IntPrec, unsigned int FracPrec, typename T>\n>         int testSingleFixedPoint(double input, T expected)\n>         {\n> -               T ret = utils::floatingToFixedPoint<IntPrec, FracPrec, T>(input);\n> +               T ret = floatingToFixedPoint<IntPrec, FracPrec, T>(input);\n>                 if (ret != expected) {\n>                         cerr << \"Expected \" << input << \" to convert to \"\n>                              << expected << \", got \" << ret << std::endl;\n> @@ -51,7 +51,7 @@ protected:\n>                  * The precision check is fairly arbitrary but is based on what\n>                  * the rkisp1 is capable of in the crosstalk module.\n>                  */\n> -               double f = utils::fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);\n> +               double f = fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);\n>                 if (std::abs(f - input) > 0.005) {\n>                         cerr << \"Reverse conversion expected \" << ret\n>                              << \" to convert to \" << input\n> @@ -105,4 +105,4 @@ protected:\n>         }\n>  };\n>  \n> -TEST_REGISTER(RkISP1UtilsTest)\n> +TEST_REGISTER(FixedPointUtilsTest)\n> diff --git a/test/ipa/libipa/meson.build b/test/ipa/libipa/meson.build\n> index 4d2427db..281e6b1f 100644\n> --- a/test/ipa/libipa/meson.build\n> +++ b/test/ipa/libipa/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libipa_test = [\n> +    {'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},\n>      {'name': 'interpolator', 'sources': ['interpolator.cpp']},\n>  ]\n>  \n> diff --git a/test/ipa/meson.build b/test/ipa/meson.build\n> index 63820de5..ceed15ba 100644\n> --- a/test/ipa/meson.build\n> +++ b/test/ipa/meson.build\n> @@ -1,7 +1,6 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  subdir('libipa')\n> -subdir('rkisp1')\n>  \n>  ipa_test = [\n>      {'name': 'ipa_module_test', 'sources': ['ipa_module_test.cpp']},\n> diff --git a/test/ipa/rkisp1/meson.build b/test/ipa/rkisp1/meson.build\n> deleted file mode 100644\n> index 894523da..00000000\n> --- a/test/ipa/rkisp1/meson.build\n> +++ /dev/null\n> @@ -1,15 +0,0 @@\n> -# SPDX-License-Identifier: CC0-1.0\n> -\n> -rkisp1_ipa_test = [\n> -    {'name': 'rkisp1-utils', 'sources': ['rkisp1-utils.cpp']},\n> -]\n> -\n> -foreach test : rkisp1_ipa_test\n> -    exe = executable(test['name'], test['sources'],\n> -                     dependencies : [libcamera_private, libipa_dep],\n> -                     link_with : [test_libraries],\n> -                     include_directories : [test_includes_internal,\n> -                                            '../../../src/ipa/rkisp1/'])\n> -\n> -    test(test['name'], exe, suite : 'ipa')\n> -endforeach\n> -- \n> 2.30.2\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 8E625C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Nov 2024 12:47:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9499465882;\n\tFri, 15 Nov 2024 13:47: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 86E5B6580A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Nov 2024 13:47:11 +0100 (CET)","from pendragon.ideasonboard.com\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 BCEB7291;\n\tFri, 15 Nov 2024 13:46:56 +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=\"fX2p7Orm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731674816;\n\tbh=n41+9UJjiTkJwlcQBlfKuctIBjGH3QM11eM1MCvUsyQ=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=fX2p7Ormr87Cfyf+lW+wU/n4MnJl8jKkvwoEep14nw4cmskcmOqF1t91o5P4kmda1\n\tdrmsrzErLSfGaQzq35whI7Jo8qmcBkyuUIZvTzw+7P/zRNCsSttL8AYv5q8POsXW6T\n\tthm//A0xTiLg/KUqk6+zEF4P5IGkAKhye+e1D7iQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241115122540.478103-2-dan.scally@ideasonboard.com>","References":"<20241115122540.478103-1-dan.scally@ideasonboard.com>\n\t<20241115122540.478103-2-dan.scally@ideasonboard.com>","Subject":"Re: [PATCH v4 01/11] libipa: Centralise Fixed / Floating point\n\tconvertors","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Anthony.McGivern@arm.com, Daniel Scally <dan.scally@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 15 Nov 2024 12:47:08 +0000","Message-ID":"<173167482811.4187655.16145433149934573255@ping.linuxembedded.co.uk>","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":32604,"web_url":"https://patchwork.libcamera.org/comment/32604/","msgid":"<20241206181116.GB17570@pendragon.ideasonboard.com>","date":"2024-12-06T18:11:16","subject":"Re: [PATCH v4 01/11] libipa: Centralise Fixed / Floating point\n\tconvertors","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dan,\n\nThank you for the patch.\n\nOn Fri, Nov 15, 2024 at 12:25:30PM +0000, Daniel Scally wrote:\n> The rkisp1 IPA has some utility functions to convert between fixed\n> and floating point numbers. Move those to libipa so they're available\n> for use in other IPA modules too.\n> \n> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n> Changes in v4:\n> \n> \t- New patch\n> \n>  .../{rkisp1/utils.cpp => libipa/fixedpoint.cpp}  | 10 +++++-----\n>  src/ipa/{rkisp1/utils.h => libipa/fixedpoint.h}  |  6 +++---\n>  src/ipa/libipa/meson.build                       |  2 ++\n>  src/ipa/rkisp1/algorithms/ccm.cpp                |  4 ++--\n>  src/ipa/rkisp1/meson.build                       |  1 -\n>  .../rkisp1-utils.cpp => libipa/fixedpoint.cpp}   | 16 ++++++++--------\n>  test/ipa/libipa/meson.build                      |  1 +\n>  test/ipa/meson.build                             |  1 -\n>  test/ipa/rkisp1/meson.build                      | 15 ---------------\n>  9 files changed, 21 insertions(+), 35 deletions(-)\n>  rename src/ipa/{rkisp1/utils.cpp => libipa/fixedpoint.cpp} (87%)\n>  rename src/ipa/{rkisp1/utils.h => libipa/fixedpoint.h} (93%)\n>  rename test/ipa/{rkisp1/rkisp1-utils.cpp => libipa/fixedpoint.cpp} (85%)\n>  delete mode 100644 test/ipa/rkisp1/meson.build\n> \n> diff --git a/src/ipa/rkisp1/utils.cpp b/src/ipa/libipa/fixedpoint.cpp\n> similarity index 87%\n> rename from src/ipa/rkisp1/utils.cpp\n> rename to src/ipa/libipa/fixedpoint.cpp\n> index 960ec64e..6b698fc5 100644\n> --- a/src/ipa/rkisp1/utils.cpp\n> +++ b/src/ipa/libipa/fixedpoint.cpp\n> @@ -2,18 +2,18 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility functions specific to rkisp1\n> + * Fixed / floating point conversions\n>   */\n>  \n> -#include \"utils.h\"\n> +#include \"fixedpoint.h\"\n>  \n>  /**\n> - * \\file utils.h\n> + * \\file fixedpoint.h\n>   */\n>  \n>  namespace libcamera {\n>  \n> -namespace ipa::rkisp1::utils {\n> +namespace ipa {\n>  \n>  /**\n>   * \\fn R floatingToFixedPoint(T number)\n> @@ -37,6 +37,6 @@ namespace ipa::rkisp1::utils {\n>   * \\return The converted value\n>   */\n>  \n> -} /* namespace ipa::rkisp1::utils */\n> +} /* namespace ipa */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/rkisp1/utils.h b/src/ipa/libipa/fixedpoint.h\n> similarity index 93%\n> rename from src/ipa/rkisp1/utils.h\n> rename to src/ipa/libipa/fixedpoint.h\n> index 5f38b50b..709cf50f 100644\n> --- a/src/ipa/rkisp1/utils.h\n> +++ b/src/ipa/libipa/fixedpoint.h\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility functions specific to rkisp1\n> + * Fixed / floating point conversions\n>   */\n>  \n>  #pragma once\n> @@ -12,7 +12,7 @@\n>  \n>  namespace libcamera {\n>  \n> -namespace ipa::rkisp1::utils {\n> +namespace ipa {\n>  \n>  #ifndef __DOXYGEN__\n>  template<unsigned int I, unsigned int F, typename R, typename T,\n> @@ -60,6 +60,6 @@ constexpr R fixedToFloatingPoint(T number)\n>  \treturn static_cast<R>(t) / static_cast<R>(1 << F);\n>  }\n>  \n> -} /* namespace ipa::rkisp1::utils */\n> +} /* namespace ipa */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\n> index 788d037a..a1d662c9 100644\n> --- a/src/ipa/libipa/meson.build\n> +++ b/src/ipa/libipa/meson.build\n> @@ -7,6 +7,7 @@ libipa_headers = files([\n>      'colours.h',\n>      'exposure_mode_helper.h',\n>      'fc_queue.h',\n> +    'fixedpoint.h',\n>      'histogram.h',\n>      'interpolator.h',\n>      'lsc_polynomial.h',\n> @@ -23,6 +24,7 @@ libipa_sources = files([\n>      'colours.cpp',\n>      'exposure_mode_helper.cpp',\n>      'fc_queue.cpp',\n> +    'fixedpoint.cpp',\n>      'histogram.cpp',\n>      'interpolator.cpp',\n>      'lsc_polynomial.cpp',\n> diff --git a/src/ipa/rkisp1/algorithms/ccm.cpp b/src/ipa/rkisp1/algorithms/ccm.cpp\n> index 6b7d2e2c..e2b5cf4d 100644\n> --- a/src/ipa/rkisp1/algorithms/ccm.cpp\n> +++ b/src/ipa/rkisp1/algorithms/ccm.cpp\n> @@ -18,7 +18,7 @@\n>  \n>  #include \"libcamera/internal/yaml_parser.h\"\n>  \n> -#include \"../utils.h\"\n> +#include \"libipa/fixedpoint.h\"\n>  #include \"libipa/interpolator.h\"\n>  \n>  /**\n> @@ -72,7 +72,7 @@ void Ccm::setParameters(struct rkisp1_cif_isp_ctk_config &config,\n>  \tfor (unsigned int i = 0; i < 3; i++) {\n>  \t\tfor (unsigned int j = 0; j < 3; j++)\n>  \t\t\tconfig.coeff[i][j] =\n> -\t\t\t\tutils::floatingToFixedPoint<4, 7, uint16_t, double>(matrix[i][j]);\n> +\t\t\t\tfloatingToFixedPoint<4, 7, uint16_t, double>(matrix[i][j]);\n>  \t}\n>  \n>  \tfor (unsigned int i = 0; i < 3; i++)\n> diff --git a/src/ipa/rkisp1/meson.build b/src/ipa/rkisp1/meson.build\n> index 34844f14..26a9fa40 100644\n> --- a/src/ipa/rkisp1/meson.build\n> +++ b/src/ipa/rkisp1/meson.build\n> @@ -9,7 +9,6 @@ rkisp1_ipa_sources = files([\n>      'ipa_context.cpp',\n>      'params.cpp',\n>      'rkisp1.cpp',\n> -    'utils.cpp',\n>  ])\n>  \n>  rkisp1_ipa_sources += rkisp1_ipa_algorithms\n> diff --git a/test/ipa/rkisp1/rkisp1-utils.cpp b/test/ipa/libipa/fixedpoint.cpp\n> similarity index 85%\n> rename from test/ipa/rkisp1/rkisp1-utils.cpp\n> rename to test/ipa/libipa/fixedpoint.cpp\n> index b1863894..99eb662d 100644\n> --- a/test/ipa/rkisp1/rkisp1-utils.cpp\n> +++ b/test/ipa/libipa/fixedpoint.cpp\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>\n>   *\n> - * Miscellaneous utility tests\n> + * Fixed / Floating point utility tests\n>   */\n>  \n>  #include <cmath>\n> @@ -10,22 +10,22 @@\n>  #include <map>\n>  #include <stdint.h>\n>  \n> -#include \"../src/ipa/rkisp1/utils.h\"\n> +#include \"../src/ipa/libipa/fixedpoint.h\"\n>  \n>  #include \"test.h\"\n>  \n>  using namespace std;\n>  using namespace libcamera;\n> -using namespace ipa::rkisp1;\n> +using namespace ipa;\n>  \n> -class RkISP1UtilsTest : public Test\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 = utils::fixedToFloatingPoint<IntPrec, FracPrec, R>(input);\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> @@ -40,7 +40,7 @@ protected:\n>  \ttemplate<unsigned int IntPrec, unsigned int FracPrec, typename T>\n>  \tint testSingleFixedPoint(double input, T expected)\n>  \t{\n> -\t\tT ret = utils::floatingToFixedPoint<IntPrec, FracPrec, T>(input);\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> @@ -51,7 +51,7 @@ protected:\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 = utils::fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);\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> @@ -105,4 +105,4 @@ protected:\n>  \t}\n>  };\n>  \n> -TEST_REGISTER(RkISP1UtilsTest)\n> +TEST_REGISTER(FixedPointUtilsTest)\n> diff --git a/test/ipa/libipa/meson.build b/test/ipa/libipa/meson.build\n> index 4d2427db..281e6b1f 100644\n> --- a/test/ipa/libipa/meson.build\n> +++ b/test/ipa/libipa/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libipa_test = [\n> +    {'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},\n>      {'name': 'interpolator', 'sources': ['interpolator.cpp']},\n>  ]\n>  \n> diff --git a/test/ipa/meson.build b/test/ipa/meson.build\n> index 63820de5..ceed15ba 100644\n> --- a/test/ipa/meson.build\n> +++ b/test/ipa/meson.build\n> @@ -1,7 +1,6 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  subdir('libipa')\n> -subdir('rkisp1')\n>  \n>  ipa_test = [\n>      {'name': 'ipa_module_test', 'sources': ['ipa_module_test.cpp']},\n> diff --git a/test/ipa/rkisp1/meson.build b/test/ipa/rkisp1/meson.build\n> deleted file mode 100644\n> index 894523da..00000000\n> --- a/test/ipa/rkisp1/meson.build\n> +++ /dev/null\n> @@ -1,15 +0,0 @@\n> -# SPDX-License-Identifier: CC0-1.0\n> -\n> -rkisp1_ipa_test = [\n> -    {'name': 'rkisp1-utils', 'sources': ['rkisp1-utils.cpp']},\n> -]\n> -\n> -foreach test : rkisp1_ipa_test\n> -    exe = executable(test['name'], test['sources'],\n> -                     dependencies : [libcamera_private, libipa_dep],\n> -                     link_with : [test_libraries],\n> -                     include_directories : [test_includes_internal,\n> -                                            '../../../src/ipa/rkisp1/'])\n> -\n> -    test(test['name'], exe, suite : 'ipa')\n> -endforeach","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 CD122BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Dec 2024 18:11:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D6EB67E30;\n\tFri,  6 Dec 2024 19:11:32 +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 ABD02618B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Dec 2024 19:11:29 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D094F641;\n\tFri,  6 Dec 2024 19:10:59 +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=\"dAK3vuu3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733508660;\n\tbh=EgSj22FabF/cYhXcD3CJvg8hGv1/mlYhqKsARI3WKVU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dAK3vuu3z2+b3xpCS1B+4+tH6KgNqkMw46A/pC51RORXnNjMogGe/VFHLkEwRsfRq\n\t9w1a8utHZmoVFF333Dn67ImFHn9CkVaX+8crBv1Qfq1dM/z+vKw6PRHhqHKxUQDdQk\n\tv8RZgnOW2sFUmvkXc8b86gg20A5OU0XPulD5Z+mA=","Date":"Fri, 6 Dec 2024 20:11:16 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Anthony.McGivern@arm.com","Subject":"Re: [PATCH v4 01/11] libipa: Centralise Fixed / Floating point\n\tconvertors","Message-ID":"<20241206181116.GB17570@pendragon.ideasonboard.com>","References":"<20241115122540.478103-1-dan.scally@ideasonboard.com>\n\t<20241115122540.478103-2-dan.scally@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20241115122540.478103-2-dan.scally@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>"}}]