ipa: rkisp1: Use frame number passed to Algorithm::prepare()

Now that the Algorithm::prepare() function takes a frame number, we can
use it to replace the IPAActiveState::frameCount member.

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:31:23 +03:00
parent 05e6a19373
commit b3724d3766
10 changed files with 17 additions and 34 deletions

View file

@ -74,8 +74,7 @@ uint32_t Awb::estimateCCT(double red, double green, double blue)
/**
* \copydoc libcamera::ipa::Algorithm::prepare
*/
void Awb::prepare(IPAContext &context,
[[maybe_unused]] const uint32_t frame,
void Awb::prepare(IPAContext &context, const uint32_t frame,
[[maybe_unused]] IPAFrameContext &frameContext,
rkisp1_params_cfg *params)
{
@ -88,7 +87,7 @@ void Awb::prepare(IPAContext &context,
params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;
/* If we already have configured the gains and window, return. */
if (context.activeState.frameCount > 0)
if (frame > 0)
return;
/* Configure the gains to apply. */