summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/ipu3/ipu3.cpp4
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 769c24d3..581297be 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -53,6 +53,7 @@ private:
void processControls(unsigned int frame, const ControlList &controls);
void fillParams(unsigned int frame, ipu3_uapi_params *params);
void parseStatistics(unsigned int frame,
+ int64_t frameTimestamp,
const ipu3_uapi_stats_3a *stats);
void setControls(unsigned int frame);
@@ -214,7 +215,7 @@ void IPAIPU3::processEvent(const IPU3Event &event)
const ipu3_uapi_stats_3a *stats =
reinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());
- parseStatistics(event.frame, stats);
+ parseStatistics(event.frame, event.frameTimestamp, stats);
break;
}
case EventFillParams: {
@@ -257,6 +258,7 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)
}
void IPAIPU3::parseStatistics(unsigned int frame,
+ [[maybe_unused]] int64_t frameTimestamp,
[[maybe_unused]] const ipu3_uapi_stats_3a *stats)
{
ControlList ctrls(controls::controls);
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 750880ed..58923bc7 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1357,6 +1357,8 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
if (!info)
return;
+ Request *request = info->request;
+
if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
info->metadataProcessed = true;
@@ -1364,8 +1366,6 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
* tryComplete() will delete info if it completes the IPU3Frame.
* In that event, we must have obtained the Request before hand.
*/
- Request *request = info->request;
-
if (frameInfos_.tryComplete(info))
pipe_->completeRequest(request);
@@ -1376,6 +1376,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
ev.op = ipa::ipu3::EventStatReady;
ev.frame = info->id;
ev.bufferId = info->statBuffer->cookie();
+ ev.frameTimestamp = request->metadata().get(controls::SensorTimestamp);
ipa_->processEvent(ev);
}