ipu3: ipa: Report effective sensor controls with statistics to IPA
The Intel close sourced IPA requires the effective controls applied to the sensor when the statistics are generated. Report effective sensor controls with the statistics to IPA. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> [Jean-Michel: Reword s/stastistics/statistics and move reset after IPA start] Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
f12efa6730
commit
726d6087c0
2 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include <libcamera/base/signal.h>
|
#include <libcamera/base/signal.h>
|
||||||
|
|
||||||
|
#include <libcamera/controls.h>
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
class FrameBuffer;
|
class FrameBuffer;
|
||||||
|
@ -34,6 +36,8 @@ public:
|
||||||
FrameBuffer *paramBuffer;
|
FrameBuffer *paramBuffer;
|
||||||
FrameBuffer *statBuffer;
|
FrameBuffer *statBuffer;
|
||||||
|
|
||||||
|
ControlList effectiveSensorControls;
|
||||||
|
|
||||||
bool paramDequeued;
|
bool paramDequeued;
|
||||||
bool metadataProcessed;
|
bool metadataProcessed;
|
||||||
};
|
};
|
||||||
|
|
|
@ -767,6 +767,8 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlLis
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
data->delayedCtrls_->reset();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start the ImgU video devices, buffers will be queued to the
|
* Start the ImgU video devices, buffers will be queued to the
|
||||||
* ImgU output and viewfinder when requests will be queued.
|
* ImgU output and viewfinder when requests will be queued.
|
||||||
|
@ -1363,6 +1365,8 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)
|
||||||
request->metadata().set(controls::SensorTimestamp,
|
request->metadata().set(controls::SensorTimestamp,
|
||||||
buffer->metadata().timestamp);
|
buffer->metadata().timestamp);
|
||||||
|
|
||||||
|
info->effectiveSensorControls = delayedCtrls_->get(buffer->metadata().sequence);
|
||||||
|
|
||||||
if (request->findBuffer(&rawStream_))
|
if (request->findBuffer(&rawStream_))
|
||||||
pipe()->completeBuffer(request, buffer);
|
pipe()->completeBuffer(request, buffer);
|
||||||
|
|
||||||
|
@ -1419,6 +1423,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
|
||||||
ev.frame = info->id;
|
ev.frame = info->id;
|
||||||
ev.bufferId = info->statBuffer->cookie();
|
ev.bufferId = info->statBuffer->cookie();
|
||||||
ev.frameTimestamp = request->metadata().get(controls::SensorTimestamp);
|
ev.frameTimestamp = request->metadata().get(controls::SensorTimestamp);
|
||||||
|
ev.sensorControls = info->effectiveSensorControls;
|
||||||
ipa_->processEvent(ev);
|
ipa_->processEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue