summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/blc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/algorithms/blc.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/blc.cpp21
1 files changed, 12 insertions, 9 deletions
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<rkisp1_ext_params_bls_config *>(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")