[libcamera-devel] [PATCH 2/3] ipa: ipu3: Mark the beginning and end of a frame
Umang Jain
umang.jain at ideasonboard.com
Thu Mar 10 21:51:29 CET 2022
From: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
Introduce the skeleton for two functions which will be used to
instantiate a frame context, and do everything needed when a frame is
received. Do the same for the other end, once the algorithms have run
and updated the frame context to later deallocate the corresponding
frame context.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
src/ipa/ipu3/ipu3.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 81788b9a..3d5c5706 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -163,6 +163,14 @@ private:
void setControls(unsigned int frame);
void calculateBdsGrid(const Size &bdsOutputSize);
+ /*
+ * Internal events that mark the beginning of processing a new frame
+ * to the point that it has successfully completed processing its
+ * statistics.
+ */
+ void frameStarted(const uint32_t frame);
+ void frameCompleted(const uint32_t frame);
+
std::map<unsigned int, MappedFrameBuffer> buffers_;
ControlInfoMap ctrls_;
@@ -491,6 +499,14 @@ void IPAIPU3::unmapBuffers(const std::vector<unsigned int> &ids)
}
}
+void IPAIPU3::frameStarted([[maybe_unused]] const uint32_t frame)
+{
+}
+
+void IPAIPU3::frameCompleted([[maybe_unused]] const uint32_t frame)
+{
+}
+
/**
* \brief Prepare the ISP to process the Request
* \param[in] frame The frame number
@@ -549,6 +565,8 @@ void IPAIPU3::processControls(const uint32_t frame,
[[maybe_unused]] const ControlList &controls)
{
/* \todo Start processing for 'frame' based on 'controls'. */
+
+ frameStarted(frame);
}
/**
@@ -620,6 +638,8 @@ void IPAIPU3::parseStatistics(unsigned int frame,
*/
statsBufferReady.emit(frame, ctrls);
+
+ frameCompleted(frame);
}
/**
--
2.31.0
More information about the libcamera-devel
mailing list