@@ -260,6 +260,13 @@ void Agc::process(IPAContext &context, const rkisp1_stat_buffer *stats)
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 libcamera */
@@ -28,6 +28,7 @@ public:
~Agc() = default;
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;
private:
@@ -270,19 +270,13 @@ void IPARkISP1::processEvent(const RkISP1Event &event)
}
void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params,
- const ControlList &controls)
+ [[maybe_unused]] const ControlList &controls)
{
/* Prepare parameters buffer. */
memset(params, 0, sizeof(*params));
- /* Auto Exposure on/off. */
- if (controls.contains(controls::AeEnable)) {
- autoExposure_ = controls.get(controls::AeEnable);
- if (autoExposure_)
- params->module_ens = RKISP1_CIF_ISP_MODULE_AEC;
-
- params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC;
- }
+ for (auto const &algo : algorithms_)
+ algo->prepare(context_, params);
RkISP1Action op;
op.op = ActionParamFilled;