[{"id":26735,"web_url":"https://patchwork.libcamera.org/comment/26735/","msgid":"<20230324150355.rwshut6oj3nkpstg@uno.localdomain>","date":"2023-03-24T15:03:55","subject":"Re: [libcamera-devel] [PATCH v5 03/10] ipa: Add base class defining\n\tAF algorithm interface","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Daniel\n\nOn Fri, Mar 24, 2023 at 03:29:01PM +0100, Daniel Semkowicz via libcamera-devel wrote:\n> Define common interface with pure virtual methods that should be\n> implemented by the Auto Focus algorithm implementations.\n> Interface methods match the AF controls that can be set in the frame\n> request. Common implementation of controls parsing is provided,\n> so the AF algorithms deriving from this interface should be able\n> to reuse it.\n\nThanks\n Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n>\n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> ---\n>  src/ipa/libipa/algorithms/af.cpp      | 159 ++++++++++++++++++++++++++\n>  src/ipa/libipa/algorithms/af.h        |  45 ++++++++\n>  src/ipa/libipa/algorithms/meson.build |   9 ++\n>  src/ipa/libipa/meson.build            |   6 +\n>  4 files changed, 219 insertions(+)\n>  create mode 100644 src/ipa/libipa/algorithms/af.cpp\n>  create mode 100644 src/ipa/libipa/algorithms/af.h\n>  create mode 100644 src/ipa/libipa/algorithms/meson.build\n>\n> diff --git a/src/ipa/libipa/algorithms/af.cpp b/src/ipa/libipa/algorithms/af.cpp\n> new file mode 100644\n> index 00000000..0808aa3f\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/af.cpp\n> @@ -0,0 +1,159 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Theobroma Systems\n> + *\n> + * af.cpp - Autofocus control algorithm interface\n> + */\n> +\n> +#include \"af.h\"\n> +\n> +/**\n> + * \\file af.h\n> + * \\brief AF algorithm common interface\n> + */\n> +\n> +namespace libcamera {\n> +\n> +namespace ipa::algorithms {\n> +\n> +/**\n> + * \\class Af\n> + * \\brief Common interface for auto-focus algorithms\n> + *\n> + * The Af class defines a standard interface for IPA auto focus algorithms.\n> + */\n> +\n> +/**\n> + * \\brief Provide control values to the algorithm\n> + * \\param[in] controls The list of user controls\n> + *\n> + * This method should be called in the libcamera::ipa::Algorithm::queueRequest()\n> + * method of the platform layer.\n> + */\n> +void Af::queueRequest(const ControlList &controls)\n> +{\n> +\tusing namespace controls;\n> +\n> +\tfor (auto const &[id, value] : controls) {\n> +\t\tswitch (id) {\n> +\t\tcase AF_MODE: {\n> +\t\t\tsetMode(static_cast<AfModeEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_RANGE: {\n> +\t\t\tsetRange(static_cast<AfRangeEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_SPEED: {\n> +\t\t\tsetSpeed(static_cast<AfSpeedEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_METERING: {\n> +\t\t\tsetMeteringMode(static_cast<AfMeteringEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_WINDOWS: {\n> +\t\t\tsetWindows(value.get<Span<const Rectangle>>());\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_TRIGGER: {\n> +\t\t\tsetTrigger(static_cast<AfTriggerEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_PAUSE: {\n> +\t\t\tsetPause(static_cast<AfPauseEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase LENS_POSITION: {\n> +\t\t\tsetLensPosition(value.get<float>());\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tdefault:\n> +\t\t\tbreak;\n> +\t\t}\n> +\t}\n> +}\n> +\n> +/**\n> + * \\fn Af::setMode()\n> + * \\brief Set auto focus mode\n> + * \\param[in] mode AF mode\n> + *\n> + * \\sa libcamera::controls::AfMode\n> + */\n> +\n> +/**\n> + * \\fn Af::setRange()\n> + * \\brief Set the range of focus distances that is scanned\n> + * \\param[in] range AF range\n> + *\n> + * \\sa libcamera::controls::AfRange\n> + */\n> +\n> +/**\n> + * \\fn Af::setSpeed()\n> + * \\brief Set how fast algorithm should move the lens\n> + * \\param[in] speed Lens move speed\n> + *\n> +* \\sa libcamera::controls::AfSpeed\n> + */\n> +\n> +/**\n> + * \\fn Af::setMeteringMode()\n> + * \\brief Set AF metering mode\n> + * \\param[in] metering AF metering mode\n> + *\n> + * \\sa libcamera::controls::AfMetering\n> + */\n> +\n> +/**\n> + * \\fn Af::setWindows()\n> + * \\brief Set AF windows\n> + * \\param[in] windows AF windows\n> + *\n> + * \\sa libcamera::controls::AfWindows\n> + */\n> +\n> +/**\n> + * \\fn Af::setTrigger()\n> + * \\brief Starts or cancels the autofocus scan\n> + * \\param[in] trigger Trigger mode\n> + *\n> + * \\sa libcamera::controls::AfTrigger\n> + */\n> +\n> +/**\n> + * \\fn Af::setPause()\n> + * \\brief Pause the autofocus while in AfModeContinuous mode\n> + * \\param[in] pause Pause mode\n> + *\n> + * \\sa libcamera::controls::AfPause\n> + */\n> +\n> +/**\n> + * \\fn Af::setLensPosition()\n> + * \\brief Set the lens position while in AfModeManual\n> + * \\param[in] lensPosition Lens position\n> + *\n> + * \\sa libcamera::controls::LensPosition\n> + */\n> +\n> +/**\n> + * \\fn Af::state()\n> + * \\brief Get the current state of the AF algorithm\n> + * \\return AF state\n> + *\n> + * \\sa libcamera::controls::AfState\n> + */\n> +\n> +/**\n> + * \\fn Af::pauseState()\n> + * \\brief Get the current pause state of the AF algorithm\n> + * \\return AF pause state\n> + *\n> + * \\sa libcamera::controls::AfPauseState\n> + */\n> +\n> +} /* namespace ipa::algorithms */\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/ipa/libipa/algorithms/af.h b/src/ipa/libipa/algorithms/af.h\n> new file mode 100644\n> index 00000000..4fd16ac2\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/af.h\n> @@ -0,0 +1,45 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Theobroma Systems\n> + *\n> + * af.h - Autofocus control algorithm interface\n> + */\n> +#pragma once\n> +\n> +#include <libcamera/control_ids.h>\n> +\n> +namespace libcamera {\n> +\n> +namespace ipa::algorithms {\n> +\n> +class Af\n> +{\n> +public:\n> +\tvirtual ~Af() = default;\n> +\n> +\tvoid queueRequest(const ControlList &controls);\n> +\n> +\tvirtual void setMode(controls::AfModeEnum mode) = 0;\n> +\n> +\tvirtual void setRange(controls::AfRangeEnum range) = 0;\n> +\n> +\tvirtual void setSpeed(controls::AfSpeedEnum speed) = 0;\n> +\n> +\tvirtual void setMeteringMode(controls::AfMeteringEnum metering) = 0;\n> +\n> +\tvirtual void setWindows(Span<const Rectangle> windows) = 0;\n> +\n> +\tvirtual void setTrigger(controls::AfTriggerEnum trigger) = 0;\n> +\n> +\tvirtual void setPause(controls::AfPauseEnum pause) = 0;\n> +\n> +\tvirtual void setLensPosition(float lensPosition) = 0;\n> +\n> +\tvirtual controls::AfStateEnum state() = 0;\n> +\n> +\tvirtual controls::AfPauseStateEnum pauseState() = 0;\n> +};\n> +\n> +} /* namespace ipa::algorithms */\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/ipa/libipa/algorithms/meson.build b/src/ipa/libipa/algorithms/meson.build\n> new file mode 100644\n> index 00000000..3df4798f\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/meson.build\n> @@ -0,0 +1,9 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libipa_algorithms_headers = files([\n> +    'af.h',\n> +])\n> +\n> +libipa_algorithms_sources = files([\n> +    'af.cpp',\n> +])\n> diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\n> index 016b8e0e..134c2dba 100644\n> --- a/src/ipa/libipa/meson.build\n> +++ b/src/ipa/libipa/meson.build\n> @@ -1,5 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n> +subdir('algorithms')\n> +\n>  libipa_headers = files([\n>      'algorithm.h',\n>      'camera_sensor_helper.h',\n> @@ -8,6 +10,8 @@ libipa_headers = files([\n>      'module.h',\n>  ])\n>\n> +libipa_headers += libipa_algorithms_headers\n> +\n>  libipa_sources = files([\n>      'algorithm.cpp',\n>      'camera_sensor_helper.cpp',\n> @@ -16,6 +20,8 @@ libipa_sources = files([\n>      'module.cpp',\n>  ])\n>\n> +libipa_sources += libipa_algorithms_sources\n> +\n>  libipa_includes = include_directories('..')\n>\n>  libipa = static_library('ipa', [libipa_sources, libipa_headers],\n> --\n> 2.39.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 70D79C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Mar 2023 15:04:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C534861ECF;\n\tFri, 24 Mar 2023 16:04:00 +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 0F91461ECF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 16:03:58 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A314CA58;\n\tFri, 24 Mar 2023 16:03:57 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679670240;\n\tbh=X/dqSFz9VaBub8DeHzndnjQx9ZKg3/1SlIEnRifuWmw=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=snutqAZlB1ZnZQre9jCv17OC+DjBZsEfagaP1L815EgQhoqPAv7ttqUIj/AqoaCwf\n\tjSHPT+HqankQvcdEBr4dJ+OOsGs+6Uf+Hw2AMvRfJmwckWpqQwA8s3gCPo2/Tn4xaR\n\t1X0SMSLYj0Ccg/yTU2Ue853T6unvbpAl2RaWm8eta2oXjjD5VVd0O5tEkHR2ADzHWB\n\tYCdBkeR+h9UK5RbToFywq9ctbJog2Re+YBc+VBsommuUyC7VabW//WiaH44YC77dOr\n\t2utZ0hORp4cBmjaKuaN2ufhPBp8TWX4X28e1YeSlW1Tbf8Pa4Uatx29OFWDa+PAMbq\n\tgcSr5403ZmgHQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1679670237;\n\tbh=X/dqSFz9VaBub8DeHzndnjQx9ZKg3/1SlIEnRifuWmw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=X5gxQfxXzhdjamg+dWQcLJwjyXeht7k1d/jMhjyM3JsH3iuCu14grlNCf2vKDPYQe\n\t9osRYPglqC3air8OXM/FbP+a1aJQ9r1mWfi5lhnklNFkB/Edw/yaG5NosGlpBEvHeK\n\tS5cITnFLH0ABD21+hAjDHD0HJjNFnR40zn3fqUaA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"X5gxQfxX\"; dkim-atps=neutral","Date":"Fri, 24 Mar 2023 16:03:55 +0100","To":"Daniel Semkowicz <dse@thaumatec.com>","Message-ID":"<20230324150355.rwshut6oj3nkpstg@uno.localdomain>","References":"<20230324142908.64224-1-dse@thaumatec.com>\n\t<20230324142908.64224-4-dse@thaumatec.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230324142908.64224-4-dse@thaumatec.com>","Subject":"Re: [libcamera-devel] [PATCH v5 03/10] ipa: Add base class defining\n\tAF algorithm interface","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"jacopo.mondi@ideasonboard.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26740,"web_url":"https://patchwork.libcamera.org/comment/26740/","msgid":"<20230324154323.aj5gfdf467f5y7nr@uno.localdomain>","date":"2023-03-24T15:43:23","subject":"Re: [libcamera-devel] [PATCH v5 03/10] ipa: Add base class defining\n\tAF algorithm interface","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Daniel\n sorry\n\nOn Fri, Mar 24, 2023 at 03:29:01PM +0100, Daniel Semkowicz wrote:\n> Define common interface with pure virtual methods that should be\n> implemented by the Auto Focus algorithm implementations.\n> Interface methods match the AF controls that can be set in the frame\n> request. Common implementation of controls parsing is provided,\n> so the AF algorithms deriving from this interface should be able\n> to reuse it.\n>\n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> ---\n>  src/ipa/libipa/algorithms/af.cpp      | 159 ++++++++++++++++++++++++++\n>  src/ipa/libipa/algorithms/af.h        |  45 ++++++++\n>  src/ipa/libipa/algorithms/meson.build |   9 ++\n>  src/ipa/libipa/meson.build            |   6 +\n>  4 files changed, 219 insertions(+)\n>  create mode 100644 src/ipa/libipa/algorithms/af.cpp\n>  create mode 100644 src/ipa/libipa/algorithms/af.h\n>  create mode 100644 src/ipa/libipa/algorithms/meson.build\n>\n> diff --git a/src/ipa/libipa/algorithms/af.cpp b/src/ipa/libipa/algorithms/af.cpp\n> new file mode 100644\n> index 00000000..0808aa3f\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/af.cpp\n> @@ -0,0 +1,159 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Theobroma Systems\n> + *\n> + * af.cpp - Autofocus control algorithm interface\n> + */\n> +\n> +#include \"af.h\"\n> +\n> +/**\n> + * \\file af.h\n> + * \\brief AF algorithm common interface\n> + */\n> +\n> +namespace libcamera {\n> +\n> +namespace ipa::algorithms {\n> +\n> +/**\n> + * \\class Af\n> + * \\brief Common interface for auto-focus algorithms\n> + *\n> + * The Af class defines a standard interface for IPA auto focus algorithms.\n> + */\n> +\n> +/**\n> + * \\brief Provide control values to the algorithm\n> + * \\param[in] controls The list of user controls\n> + *\n> + * This method should be called in the libcamera::ipa::Algorithm::queueRequest()\n> + * method of the platform layer.\n> + */\n> +void Af::queueRequest(const ControlList &controls)\n> +{\n> +\tusing namespace controls;\n> +\n> +\tfor (auto const &[id, value] : controls) {\n> +\t\tswitch (id) {\n> +\t\tcase AF_MODE: {\n> +\t\t\tsetMode(static_cast<AfModeEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_RANGE: {\n> +\t\t\tsetRange(static_cast<AfRangeEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_SPEED: {\n> +\t\t\tsetSpeed(static_cast<AfSpeedEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_METERING: {\n> +\t\t\tsetMeteringMode(static_cast<AfMeteringEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_WINDOWS: {\n> +\t\t\tsetWindows(value.get<Span<const Rectangle>>());\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_TRIGGER: {\n> +\t\t\tsetTrigger(static_cast<AfTriggerEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase AF_PAUSE: {\n> +\t\t\tsetPause(static_cast<AfPauseEnum>(value.get<int32_t>()));\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tcase LENS_POSITION: {\n> +\t\t\tsetLensPosition(value.get<float>());\n> +\t\t\tbreak;\n> +\t\t}\n> +\t\tdefault:\n> +\t\t\tbreak;\n> +\t\t}\n> +\t}\n> +}\n> +\n> +/**\n> + * \\fn Af::setMode()\n> + * \\brief Set auto focus mode\n> + * \\param[in] mode AF mode\n> + *\n> + * \\sa libcamera::controls::AfMode\n> + */\n> +\n> +/**\n> + * \\fn Af::setRange()\n> + * \\brief Set the range of focus distances that is scanned\n> + * \\param[in] range AF range\n> + *\n> + * \\sa libcamera::controls::AfRange\n> + */\n> +\n> +/**\n> + * \\fn Af::setSpeed()\n> + * \\brief Set how fast algorithm should move the lens\n> + * \\param[in] speed Lens move speed\n> + *\n> +* \\sa libcamera::controls::AfSpeed\n> + */\n> +\n> +/**\n> + * \\fn Af::setMeteringMode()\n> + * \\brief Set AF metering mode\n> + * \\param[in] metering AF metering mode\n> + *\n> + * \\sa libcamera::controls::AfMetering\n> + */\n> +\n> +/**\n> + * \\fn Af::setWindows()\n> + * \\brief Set AF windows\n> + * \\param[in] windows AF windows\n> + *\n> + * \\sa libcamera::controls::AfWindows\n> + */\n> +\n> +/**\n> + * \\fn Af::setTrigger()\n> + * \\brief Starts or cancels the autofocus scan\n> + * \\param[in] trigger Trigger mode\n> + *\n> + * \\sa libcamera::controls::AfTrigger\n> + */\n> +\n> +/**\n> + * \\fn Af::setPause()\n> + * \\brief Pause the autofocus while in AfModeContinuous mode\n> + * \\param[in] pause Pause mode\n> + *\n> + * \\sa libcamera::controls::AfPause\n> + */\n> +\n> +/**\n> + * \\fn Af::setLensPosition()\n> + * \\brief Set the lens position while in AfModeManual\n> + * \\param[in] lensPosition Lens position\n> + *\n> + * \\sa libcamera::controls::LensPosition\n> + */\n> +\n> +/**\n> + * \\fn Af::state()\n> + * \\brief Get the current state of the AF algorithm\n> + * \\return AF state\n> + *\n> + * \\sa libcamera::controls::AfState\n> + */\n> +\n> +/**\n> + * \\fn Af::pauseState()\n> + * \\brief Get the current pause state of the AF algorithm\n> + * \\return AF pause state\n> + *\n> + * \\sa libcamera::controls::AfPauseState\n> + */\n> +\n> +} /* namespace ipa::algorithms */\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/ipa/libipa/algorithms/af.h b/src/ipa/libipa/algorithms/af.h\n> new file mode 100644\n> index 00000000..4fd16ac2\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/af.h\n> @@ -0,0 +1,45 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Theobroma Systems\n> + *\n> + * af.h - Autofocus control algorithm interface\n> + */\n\nEmpty line before pragma :)\n\n> +#pragma once\n> +\n> +#include <libcamera/control_ids.h>\n> +\n> +namespace libcamera {\n> +\n> +namespace ipa::algorithms {\n> +\n> +class Af\n> +{\n> +public:\n> +\tvirtual ~Af() = default;\n> +\n> +\tvoid queueRequest(const ControlList &controls);\n> +\n> +\tvirtual void setMode(controls::AfModeEnum mode) = 0;\n> +\n> +\tvirtual void setRange(controls::AfRangeEnum range) = 0;\n> +\n> +\tvirtual void setSpeed(controls::AfSpeedEnum speed) = 0;\n> +\n> +\tvirtual void setMeteringMode(controls::AfMeteringEnum metering) = 0;\n> +\n> +\tvirtual void setWindows(Span<const Rectangle> windows) = 0;\n> +\n> +\tvirtual void setTrigger(controls::AfTriggerEnum trigger) = 0;\n> +\n> +\tvirtual void setPause(controls::AfPauseEnum pause) = 0;\n> +\n> +\tvirtual void setLensPosition(float lensPosition) = 0;\n> +\n> +\tvirtual controls::AfStateEnum state() = 0;\n> +\n> +\tvirtual controls::AfPauseStateEnum pauseState() = 0;\n> +};\n> +\n> +} /* namespace ipa::algorithms */\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/ipa/libipa/algorithms/meson.build b/src/ipa/libipa/algorithms/meson.build\n> new file mode 100644\n> index 00000000..3df4798f\n> --- /dev/null\n> +++ b/src/ipa/libipa/algorithms/meson.build\n> @@ -0,0 +1,9 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libipa_algorithms_headers = files([\n> +    'af.h',\n> +])\n> +\n> +libipa_algorithms_sources = files([\n> +    'af.cpp',\n> +])\n> diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\n> index 016b8e0e..134c2dba 100644\n> --- a/src/ipa/libipa/meson.build\n> +++ b/src/ipa/libipa/meson.build\n> @@ -1,5 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n> +subdir('algorithms')\n> +\n>  libipa_headers = files([\n>      'algorithm.h',\n>      'camera_sensor_helper.h',\n> @@ -8,6 +10,8 @@ libipa_headers = files([\n>      'module.h',\n>  ])\n>\n> +libipa_headers += libipa_algorithms_headers\n> +\n>  libipa_sources = files([\n>      'algorithm.cpp',\n>      'camera_sensor_helper.cpp',\n> @@ -16,6 +20,8 @@ libipa_sources = files([\n>      'module.cpp',\n>  ])\n>\n> +libipa_sources += libipa_algorithms_sources\n> +\n>  libipa_includes = include_directories('..')\n>\n>  libipa = static_library('ipa', [libipa_sources, libipa_headers],\n> --\n> 2.39.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 B2D02C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Mar 2023 15:43:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6342662719;\n\tFri, 24 Mar 2023 16:43:27 +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 BCC8861ECF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 16:43:26 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54EB7A58;\n\tFri, 24 Mar 2023 16:43:26 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679672607;\n\tbh=bZ7SnfMsvXCiND3RXvuXmF++bMhgc/mL0SucCS4wry4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=S4umyyLyXlbkF9axIElXrN26TfIqElm32lxqkOMJ4Gwho/8TtaIj1q+/G3fk3zk+w\n\tS1Cv4KTQL2tnHgS5AbBtkx5jkfiMWoTffZjtUaNFsrRfZisqm31FibBh7Kpmdfh5xD\n\tKiBgojYuUyXf/3xJ7aWfE9wxljqVfpCF0r4HrY4znPeg7v71fPUlpsvX8WD9S7x80e\n\tvkDBFEkd39bgqb93hmASYf+WLIUEuK4ComhD9ukf0TmfbewttP1Gss4DhBmP9VY9W+\n\tpTXI2cPcvf+9qoLBSTJkaZvUhcrWlOl/vdQ8CqZMReRLoU1uO7jizUhBkxcSUQun6e\n\tGgjnNuVxCN6vg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1679672606;\n\tbh=bZ7SnfMsvXCiND3RXvuXmF++bMhgc/mL0SucCS4wry4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lcxaO1ev+T6rKlSLfC7Hlv1rAh83TonpRlBiiSuZjhY+QyAcgQ2b8HdJRwyDRXynn\n\treQrEv68Mmk0D435uPkx1891UgSCKXLMIHo+Y9W9cH+TjIQd7Snp4pLDVU1XZpcsG0\n\t/VkrmvjwJtp2R9Cxyu/RaBSvATADC6Ekmfx7vtJA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lcxaO1ev\"; dkim-atps=neutral","Date":"Fri, 24 Mar 2023 16:43:23 +0100","To":"Daniel Semkowicz <dse@thaumatec.com>","Message-ID":"<20230324154323.aj5gfdf467f5y7nr@uno.localdomain>","References":"<20230324142908.64224-1-dse@thaumatec.com>\n\t<20230324142908.64224-4-dse@thaumatec.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230324142908.64224-4-dse@thaumatec.com>","Subject":"Re: [libcamera-devel] [PATCH v5 03/10] ipa: Add base class defining\n\tAF algorithm interface","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"jacopo.mondi@ideasonboard.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]