From 4acc8e35cff7548eba9fb1e4be4052d5340a9254 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 31 May 2024 12:20:34 +0200 Subject: ipa: rkisp1: Use the extensible parameters format Signed-off-by: Jacopo Mondi --- src/ipa/rkisp1/algorithms/blc.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/ipa/rkisp1/algorithms/blc.cpp') diff --git a/src/ipa/rkisp1/algorithms/blc.cpp b/src/ipa/rkisp1/algorithms/blc.cpp index d2e74354..def3bb80 100644 --- a/src/ipa/rkisp1/algorithms/blc.cpp +++ b/src/ipa/rkisp1/algorithms/blc.cpp @@ -68,7 +68,7 @@ int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context, void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context, const uint32_t frame, [[maybe_unused]] IPAFrameContext &frameContext, - rkisp1_params_cfg *params) + rkisp1_ext_params_block_header *hdr) { if (frame > 0) return; @@ -76,15 +76,18 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context, if (!tuningParameters_) return; - params->others.bls_config.enable_auto = 0; - params->others.bls_config.fixed_val.r = blackLevelRed_; - params->others.bls_config.fixed_val.gr = blackLevelGreenR_; - params->others.bls_config.fixed_val.gb = blackLevelGreenB_; - params->others.bls_config.fixed_val.b = blackLevelBlue_; + struct rkisp1_ext_params_bls_config *bls = + reinterpret_cast(hdr); - params->module_en_update |= RKISP1_CIF_ISP_MODULE_BLS; - params->module_ens |= RKISP1_CIF_ISP_MODULE_BLS; - params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_BLS; + bls->header.type = RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS; + bls->header.enable = RKISP1_EXT_PARAMS_BLOCK_ENABLE; + bls->header.size = sizeof(rkisp1_ext_params_bls_config); + + bls->bls_config.enable_auto = 0; + bls->bls_config.fixed_val.r = blackLevelRed_; + bls->bls_config.fixed_val.gr = blackLevelGreenR_; + bls->bls_config.fixed_val.gb = blackLevelGreenB_; + bls->bls_config.fixed_val.b = blackLevelBlue_; } REGISTER_IPA_ALGORITHM(BlackLevelCorrection, "BlackLevelCorrection") -- cgit v1.2.1