@@ -162,6 +162,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_;
@@ -508,6 +516,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
@@ -566,6 +582,15 @@ void IPAIPU3::processControls(const uint32_t frame,
[[maybe_unused]] const ControlList &controls)
{
/* \todo Start processing for 'frame' based on 'controls'. */
+
+ /*
+ * To save incurring extra IPC calls, we do not send explicit events
+ * when a new request is started or completed.
+ * ProcessControls is the first event handled upon receipt of a new
+ * request, so we can handle all actions required to start processing
+ * a new frame.
+ */
+ frameStarted(frame);
}
/**
@@ -635,6 +660,14 @@ void IPAIPU3::parseStatistics(unsigned int frame,
*/
metadataReady.emit(frame, ctrls);
+
+ /*
+ * To save incurring extra IPC calls, we do not send explicit events
+ * when we have completed all handling of a request.
+ * Once the statistics are fully processed, we will no longer handle this
+ * frame.
+ */
+ frameCompleted(frame);
}
/**