summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/ipa_context.cpp
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-11-18 14:43:24 +0100
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-11-29 20:41:37 +0100
commitb6fa52fc5bdc928daee0fd2fc33208bfdf0477d1 (patch)
tree15334fee65f4b87e2cc676f6cc63d79111b34dcc /src/ipa/rkisp1/ipa_context.cpp
parentc2da6aab2154731c539eb645e02df4505843010d (diff)
ipa: rkisp1: Introduce IPAContext
Before using any algorithm, we want the IPAContext to be ready for those. Introduce the IPAContext following the existing design from IPA::IPU3. Each algorithm will then introduce the needed fields. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/ipa_context.cpp')
-rw-r--r--src/ipa/rkisp1/ipa_context.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
new file mode 100644
index 00000000..819b2c73
--- /dev/null
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2021, Ideas On Board
+ *
+ * ipa_context.cpp - RkISP1 IPA Context
+ */
+
+#include "ipa_context.h"
+
+/**
+ * \file ipa_context.h
+ * \brief Context and state information shared between the algorithms
+ */
+
+namespace libcamera::ipa::rkisp1 {
+
+/**
+ * \struct IPASessionConfiguration
+ * \brief Session configuration for the IPA module
+ *
+ * The session configuration contains all IPA configuration parameters that
+ * remain constant during the capture session, from IPA module start to stop.
+ * It is typically set during the configure() operation of the IPA module, but
+ * may also be updated in the start() operation.
+ */
+
+/**
+ * \struct IPAFrameContext
+ * \brief Per-frame context for algorithms
+ *
+ * The frame context stores data specific to a single frame processed by the
+ * IPA. Each frame processed by the IPA has a context associated with it,
+ * accessible through the IPAContext structure.
+ *
+ * \todo Detail how to access contexts for a particular frame
+ *
+ * Each of the fields in the frame context belongs to either a specific
+ * algorithm, or to the top-level IPA module. A field may be read by any
+ * algorithm, but should only be written by its owner.
+ */
+
+/**
+ * \struct IPAContext
+ * \brief Global IPA context data shared between all algorithms
+ *
+ * \var IPAContext::configuration
+ * \brief The IPA session configuration, immutable during the session
+ *
+ * \var IPAContext::frameContext
+ * \brief The frame context for the frame being processed
+ *
+ * \todo While the frame context is supposed to be per-frame, this
+ * single frame context stores data related to both the current frame
+ * and the previous frames, with fields being updated as the algorithms
+ * are run. This needs to be turned into real per-frame data storage.
+ */
+
+} /* namespace libcamera::ipa::rkisp1 */