[libcamera-devel] [PATCH v3 2/9] ipa: ipu3: Introduce a Context structure

Jean-Michel Hautbois jeanmichel.hautbois at ideasonboard.com
Wed Aug 18 17:53:56 CEST 2021


An increasing amount of data and information needs to be shared between
the components that build up to implement image processing algorithms.

Create a context structure which will allow us to work towards calling
algorithms in a modular way, and sharing information between the modules.

The IPA context is a global context set at configure time (IPAConfiguration)
and a per-frame context (IPAFrameContext) used while streaming.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
 src/ipa/ipu3/ipa_context.h | 53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 src/ipa/ipu3/ipa_context.h

diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h
new file mode 100644
index 00000000..76534f7f
--- /dev/null
+++ b/src/ipa/ipu3/ipa_context.h
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2021, Google Inc.
+ *
+ * ipu3_ipa_context.h - IPU3 IPA Context
+ *
+ */
+#ifndef __LIBCAMERA_IPU3_IPA_CONTEXT_H__
+#define __LIBCAMERA_IPU3_IPA_CONTEXT_H__
+
+#include <linux/intel-ipu3.h>
+
+namespace libcamera {
+
+namespace ipa::ipu3 {
+
+/**
+ * Fixed configuration of the IPA
+ *
+ * This structure contains data set at the configure state of the IPA.
+ * It can't be modified while streaming.
+ */
+struct IPAConfiguration {
+};
+
+/**
+ * Context of a frame for each algorithms
+ *
+ * This may be stored in a way that is associated with a given request
+ * lifetime, though for now a single instance is used.
+ * It contains informations updated while streaming by the algorithms.
+ */
+struct IPAFrameContext {
+};
+
+/**
+ * Context information shared between the algorithms
+ *
+ * The global context structure contains:
+ * - a configuration structure set while the IPA is configured, and not
+ * modified when streaming
+ * - a frameContext structure updated by the algorithms while streaming
+ */
+struct IPAContext {
+	IPAConfiguration configuration;
+	IPAFrameContext frameContext;
+};
+
+} /* namespace ipa::ipu3 */
+
+} /* namespace libcamera*/
+
+#endif /* __LIBCAMERA_IPU3_IPA_CONTEXT_H__ */
-- 
2.30.2



More information about the libcamera-devel mailing list