ipa: ipu3: Put IPAFrameContext(s) in a ring buffer
Instead of having one frame context constantly being updated, this patch aims to introduce per-frame IPAFrameContext which are stored in a ring buffer. Whenever a request is queued, a new IPAFrameContext is created and inserted into the ring buffer. The IPAFrameContext structure itself has been slightly extended to store a frame id and a ControlList for incoming frame controls (sent in by the application). The next step would be to read and set these controls whenever the request is actually queued to the hardware. Since now we are working in multiples of IPAFrameContext, the Algorithm::process() will actually take in a IPAFrameContext pointer (as opposed to a nullptr while preparing for this change). Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
8b291bce82
commit
f4783e6899
@@ -58,13 +58,11 @@ namespace libcamera::ipa::ipu3 {
|
||||
* \var IPAContext::configuration
|
||||
* \brief The IPA session configuration, immutable during the session
|
||||
*
|
||||
* \var IPAContext::frameContext
|
||||
* \brief The frame context for the frame being processed
|
||||
* \var IPAContext::frameContexts
|
||||
* \brief Ring buffer of the IPAFrameContext(s)
|
||||
*
|
||||
* \var IPAContext::activeState
|
||||
* \brief The current state of IPA algorithms
|
||||
*
|
||||
* \todo The frame context needs to be turned into real per-frame data storage.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -183,6 +181,26 @@ namespace libcamera::ipa::ipu3 {
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Default constructor for IPAFrameContext
|
||||
*/
|
||||
IPAFrameContext::IPAFrameContext() = default;
|
||||
|
||||
/**
|
||||
* \brief Construct a IPAFrameContext instance
|
||||
*/
|
||||
IPAFrameContext::IPAFrameContext(uint32_t id, const ControlList &reqControls)
|
||||
: frame(id), frameControls(reqControls)
|
||||
{
|
||||
sensor = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* \var IPAFrameContext::frame
|
||||
* \brief The frame number
|
||||
*
|
||||
* \var IPAFrameContext::frameControls
|
||||
* \brief Controls sent in by the application while queuing the request
|
||||
*
|
||||
* \var IPAFrameContext::sensor
|
||||
* \brief Effective sensor values that were applied for the frame
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user