ipa: rkisp1: agc: Store per-frame information in frame context

Rework the algorithm's usage of the active state to store the value of
controls for the last queued request in the queueRequest() function, and
store a copy of the values in the corresponding frame context.

The frame context is used in the prepare() function to populate the ISP
parameters with values corresponding to the right frame.

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:
Laurent Pinchart 2022-09-08 00:39:53 +03:00
parent b3724d3766
commit 310b7a6a30
5 changed files with 66 additions and 31 deletions

View file

@ -34,7 +34,8 @@ public:
const rkisp1_stat_buffer *stats) override;
private:
void computeExposure(IPAContext &Context, double yGain, double iqMeanGain);
void computeExposure(IPAContext &Context, IPAFrameContext &frameContext,
double yGain, double iqMeanGain);
utils::Duration filterExposure(utils::Duration exposureValue);
double estimateLuminance(const rkisp1_cif_isp_ae_stat *ae, double gain);
double measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const;