summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3
diff options
context:
space:
mode:
authorMilan Zamazal <mzamazal@redhat.com>2024-11-28 13:52:23 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-12-06 12:34:48 +0000
commitc11e536ed2c379c0c3d24400fc9607c7135c02d2 (patch)
treedd22c9f31a2d6d40911fb34fe0d50dc07a597bee /src/ipa/ipu3
parentd2234560f844ba37440e565bd3b4b0c8d8266d02 (diff)
ipa: ipu3: Add constructor to the IPA context
Let's have a constructor that takes just the non-default argument, without the need to specify the defaults. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3')
-rw-r--r--src/ipa/ipu3/ipa_context.cpp4
-rw-r--r--src/ipa/ipu3/ipa_context.h5
-rw-r--r--src/ipa/ipu3/ipu3.cpp2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp
index fe455e07..3b22f791 100644
--- a/src/ipa/ipu3/ipa_context.cpp
+++ b/src/ipa/ipu3/ipa_context.cpp
@@ -39,6 +39,10 @@ namespace libcamera::ipa::ipu3 {
* \struct IPAContext
* \brief Global IPA context data shared between all algorithms
*
+ * \fn IPAContext::IPAContext
+ * \brief Initialize the instance with the given number of frame contexts
+ * \param[in] frameContextSize Size of the frame context ring buffer
+ *
* \var IPAContext::configuration
* \brief The IPA session configuration, immutable during the session
*
diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h
index 29f38b36..97fcf06c 100644
--- a/src/ipa/ipu3/ipa_context.h
+++ b/src/ipa/ipu3/ipa_context.h
@@ -84,6 +84,11 @@ struct IPAFrameContext : public FrameContext {
};
struct IPAContext {
+ IPAContext(unsigned int frameContextSize)
+ : frameContexts(frameContextSize)
+ {
+ }
+
IPASessionConfiguration configuration;
IPAActiveState activeState;
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 44c98cbf..1cae08bf 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -187,7 +187,7 @@ private:
};
IPAIPU3::IPAIPU3()
- : context_({ {}, {}, { kMaxFrameContexts }, {} })
+ : context_(kMaxFrameContexts)
{
}