summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 76c3bb3d..f677653b 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1325,6 +1325,16 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)
request->metadata().set(controls::SensorTimestamp,
buffer->metadata().timestamp);
+ static uint64_t lastFrameTimestamp = 0;
+
+ double fps = buffer->metadata().timestamp - lastFrameTimestamp;
+ fps = lastFrameTimestamp != 0 && fps ? 1000000000.0 / fps : 0.0;
+ lastFrameTimestamp = buffer->metadata().timestamp;
+
+ LOG(IPU3, Info)
+ << "CIO2 Complete: Frame " << buffer->metadata().sequence
+ << ": fps " << fps;
+
/* If the buffer is cancelled force a complete of the whole request. */
if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
for (auto it : request->buffers()) {