ipa: rkisp1: Use the new ISP parameters abstraction
Use the new ISP parameters abstraction class RkISP1Params to access the ISP parameters in the IPA algorithms. The class replaces the pointer to the rkisp1_params_cfg structure passed to the algorithms' prepare() function, and is used to access individual parameters blocks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
parent
9cacf4e420
commit
9861678f23
24 changed files with 163 additions and 193 deletions
|
@ -215,15 +215,21 @@ void Dpf::queueRequest(IPAContext &context,
|
|||
* \copydoc libcamera::ipa::Algorithm::prepare
|
||||
*/
|
||||
void Dpf::prepare(IPAContext &context, const uint32_t frame,
|
||||
IPAFrameContext &frameContext, rkisp1_params_cfg *params)
|
||||
IPAFrameContext &frameContext, RkISP1Params *params)
|
||||
{
|
||||
if (frame == 0) {
|
||||
params->others.dpf_config = config_;
|
||||
params->others.dpf_strength_config = strengthConfig_;
|
||||
if (!frameContext.dpf.update && frame > 0)
|
||||
return;
|
||||
|
||||
auto config = params->block<BlockType::Dpf>();
|
||||
config.setEnabled(frameContext.dpf.denoise);
|
||||
|
||||
if (frameContext.dpf.denoise) {
|
||||
*config = config_;
|
||||
|
||||
const auto &awb = context.configuration.awb;
|
||||
const auto &lsc = context.configuration.lsc;
|
||||
auto &mode = params->others.dpf_config.gain.mode;
|
||||
|
||||
auto &mode = config->gain.mode;
|
||||
|
||||
/*
|
||||
* The DPF needs to take into account the total amount of
|
||||
|
@ -241,15 +247,12 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame,
|
|||
mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINS;
|
||||
else
|
||||
mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED;
|
||||
|
||||
params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_DPF |
|
||||
RKISP1_CIF_ISP_MODULE_DPF_STRENGTH;
|
||||
}
|
||||
|
||||
if (frameContext.dpf.update) {
|
||||
params->module_en_update |= RKISP1_CIF_ISP_MODULE_DPF;
|
||||
if (frameContext.dpf.denoise)
|
||||
params->module_ens |= RKISP1_CIF_ISP_MODULE_DPF;
|
||||
if (frame == 0) {
|
||||
auto strengthConfig = params->block<BlockType::DpfStrength>();
|
||||
strengthConfig.setEnabled(true);
|
||||
*strengthConfig = strengthConfig_;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue