diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2021-05-26 18:40:25 +0530 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-05-26 19:15:28 +0300 |
commit | c43c12a24bc8b89a13ec17e501dbf9dbe0e40977 (patch) | |
tree | 19392c50c463d244ffedd6d7054b41ae52d39ec3 /src/libcamera/pipeline | |
parent | abbc4bd11bda70a4d23b5a047aeda5f59d114b3f (diff) |
ipa: ipu3: Provide frame timestamps through IPU3Event
Pass in frame timestamps from IPU3 pipeline handler to IPU3 IPA via
IPU3Event. Frame timestamps are helpful to IPA algorithms to
convergence, by setting them via IPA stats.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |