summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/algorithms/af_algorithm.cpp
diff options
context:
space:
mode:
authorDaniel Semkowicz via libcamera-devel <libcamera-devel@lists.libcamera.org>2022-07-13 10:43:07 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-14 17:06:46 +0200
commitc5a2672010da69156e7267789f5e0ee436de3d18 (patch)
treee5c5e8ff2fbf2ed25c1532b353907783c76ba841 /src/ipa/libipa/algorithms/af_algorithm.cpp
parentc0ec98a6b90bb55e838f2cff272503ee55db456a (diff)
ipa: Add base class defining AF algorithm interface
Define common interface with basic functions that should be supported by Auto Focus algorithms. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Diffstat (limited to 'src/ipa/libipa/algorithms/af_algorithm.cpp')
-rw-r--r--src/ipa/libipa/algorithms/af_algorithm.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/ipa/libipa/algorithms/af_algorithm.cpp b/src/ipa/libipa/algorithms/af_algorithm.cpp
new file mode 100644
index 00000000..47e54d5a
--- /dev/null
+++ b/src/ipa/libipa/algorithms/af_algorithm.cpp
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+/*
+ * Copyright (C) 2022, Raspberry Pi (Trading) Limited
+ * Copyright (C) 2022, Theobroma Systems
+ *
+ * af_algorithm.cpp - Autofocus control algorithm interface
+ */
+
+#include "af_algorithm.h"
+
+/**
+ * \file af_algorithm.h
+ * \brief AF algorithm common interface
+ */
+
+namespace libcamera::ipa::common::algorithms {
+
+/**
+ * \class AfAlgorithm
+ * \brief Common interface for auto-focus algorithms
+ * \tparam Module The IPA module type for this class of algorithms
+ *
+ * The AfAlgorithm class defines a standard interface for IPA auto focus
+ * algorithms.
+ */
+
+/**
+ * \fn AfAlgorithm::setMode()
+ * \brief Set auto focus mode
+ * \param[in] mode AF mode
+ */
+
+/**
+ * \fn AfAlgorithm::setRange()
+ * \brief set the range of focus distances that is scanned
+ * \param[in] range AF range
+ */
+
+/**
+ * \fn AfAlgorithm::setSpeed()
+ * \brief Set how fast algorithm should move the lens
+ * \param[in] speed Lens move speed
+ */
+
+/**
+ * \fn AfAlgorithm::setMetering()
+ * \brief Set AF metering mode
+ * \param[in] metering AF metering mode
+ */
+
+/**
+ * \fn AfAlgorithm::setWindows()
+ * \brief Set AF windows
+ * \param[in] windows AF windows
+ *
+ * Sets the focus windows used by the AF algorithm when AfMetering is set
+ * to AfMeteringWindows.
+ */
+
+/**
+ * \fn AfAlgorithm::setTrigger()
+ * \brief Starts or cancels the autofocus scan
+ * \param[in] trigger Trigger mode
+ */
+
+/**
+ * \fn AfAlgorithm::setPause()
+ * \brief Pause the autofocus while in AfModeContinuous mode.
+ * \param[in] pause Pause mode
+ */
+
+/**
+ * \fn AfAlgorithm::setLensPosition()
+ * \brief Set the lens position while in AfModeManual
+ * \param[in] lensPosition Lens position
+ */
+
+} /* namespace libcamera::ipa::common::algorithms */