ipa: rkisp1: agc: Introduce prepare call
When a new parameter buffer needs to be queued, we need to specify which algorithm is activated or not in the ISP. Add a simple prepare function in AGC for that, which may later evolve to take the exposure locking into account. For that function to be called, we also need to add the loop on the algorithms in IPARkISP1::queueRequest. We no longer disable the AE algorithm based on the controls::AeEnable, which will be handled in a different manner later. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
fea85f84c2
commit
f47c9c36ed
3 changed files with 11 additions and 9 deletions
|
@ -280,6 +280,13 @@ void Agc::process(IPAContext &context, const rkisp1_stat_buffer *stats)
|
||||||
frameCount_++;
|
frameCount_++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Agc::prepare([[maybe_unused]] IPAContext &context,
|
||||||
|
rkisp1_params_cfg *params)
|
||||||
|
{
|
||||||
|
params->module_ens |= RKISP1_CIF_ISP_MODULE_AEC;
|
||||||
|
params->module_en_update |= RKISP1_CIF_ISP_MODULE_AEC;
|
||||||
|
}
|
||||||
|
|
||||||
} /* namespace ipa::rkisp1::algorithms */
|
} /* namespace ipa::rkisp1::algorithms */
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -28,6 +28,7 @@ public:
|
||||||
~Agc() = default;
|
~Agc() = default;
|
||||||
|
|
||||||
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
|
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
|
||||||
|
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
|
||||||
void process(IPAContext &context, const rkisp1_stat_buffer *stats) override;
|
void process(IPAContext &context, const rkisp1_stat_buffer *stats) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -272,19 +272,13 @@ void IPARkISP1::processEvent(const RkISP1Event &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params,
|
void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params,
|
||||||
const ControlList &controls)
|
[[maybe_unused]] const ControlList &controls)
|
||||||
{
|
{
|
||||||
/* Prepare parameters buffer. */
|
/* Prepare parameters buffer. */
|
||||||
memset(params, 0, sizeof(*params));
|
memset(params, 0, sizeof(*params));
|
||||||
|
|
||||||
/* Auto Exposure on/off. */
|
for (auto const &algo : algorithms_)
|
||||||
if (controls.contains(controls::AeEnable)) {
|
algo->prepare(context_, params);
|
||||||
autoExposure_ = controls.get(controls::AeEnable);
|
|
||||||
if (autoExposure_)
|
|
||||||
params->module_ens = RKISP1_CIF_ISP_MODULE_AEC;
|
|
||||||
|
|
||||||
params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC;
|
|
||||||
}
|
|
||||||
|
|
||||||
RkISP1Action op;
|
RkISP1Action op;
|
||||||
op.op = ActionParamFilled;
|
op.op = ActionParamFilled;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue