ipa: Pass metadata to Algorithm::process() function
Extend the Algorithm::process() function with a metadata control list, to be filled by individual algorithms with frame metadata. Update the rkisp1 and ipu3 IPA modules accordingly, and drop the dead code in the IPARkISP1::prepareMetadata() function while at it. This only creates the infrastructure, filling metadata in individual algorithms will be handled separately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
dac1a0549a
commit
c20ca6587d
16 changed files with 44 additions and 37 deletions
|
@ -283,12 +283,14 @@ double Agc::measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const
|
|||
* \param[in] frame The frame context sequence number
|
||||
* \param[in] frameContext The current frame context
|
||||
* \param[in] stats The RKISP1 statistics and ISP results
|
||||
* \param[out] metadata Metadata for the frame, to be filled by the algorithm
|
||||
*
|
||||
* Identify the current image brightness, and use that to estimate the optimal
|
||||
* new exposure and gain for the scene.
|
||||
*/
|
||||
void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
|
||||
IPAFrameContext &frameContext, const rkisp1_stat_buffer *stats)
|
||||
IPAFrameContext &frameContext, const rkisp1_stat_buffer *stats,
|
||||
[[maybe_unused]] ControlList &metadata)
|
||||
{
|
||||
/*
|
||||
* \todo Verify that the exposure and gain applied by the sensor for
|
||||
|
|
|
@ -31,7 +31,8 @@ public:
|
|||
rkisp1_params_cfg *params) override;
|
||||
void process(IPAContext &context, const uint32_t frame,
|
||||
IPAFrameContext &frameContext,
|
||||
const rkisp1_stat_buffer *stats) override;
|
||||
const rkisp1_stat_buffer *stats,
|
||||
ControlList &metadata) override;
|
||||
|
||||
private:
|
||||
void computeExposure(IPAContext &Context, IPAFrameContext &frameContext,
|
||||
|
|
|
@ -208,7 +208,8 @@ void Awb::queueRequest(IPAContext &context,
|
|||
void Awb::process(IPAContext &context,
|
||||
[[maybe_unused]] const uint32_t frame,
|
||||
IPAFrameContext &frameContext,
|
||||
const rkisp1_stat_buffer *stats)
|
||||
const rkisp1_stat_buffer *stats,
|
||||
[[maybe_unused]] ControlList &metadata)
|
||||
{
|
||||
const rkisp1_cif_isp_stat *params = &stats->params;
|
||||
const rkisp1_cif_isp_awb_stat *awb = ¶ms->awb;
|
||||
|
|
|
@ -27,8 +27,9 @@ public:
|
|||
IPAFrameContext &frameContext,
|
||||
const ControlList &controls) override;
|
||||
void process(IPAContext &context, const uint32_t frame,
|
||||
IPAFrameContext &frameCtx,
|
||||
const rkisp1_stat_buffer *stats) override;
|
||||
IPAFrameContext &frameContext,
|
||||
const rkisp1_stat_buffer *stats,
|
||||
ControlList &metadata) override;
|
||||
|
||||
private:
|
||||
uint32_t estimateCCT(double red, double green, double blue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue