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/filter.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/ipa/rkisp1/algorithms/filter.cpp') diff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp index 9752248a..6e278a9a 100644 --- a/src/ipa/rkisp1/algorithms/filter.cpp +++ b/src/ipa/rkisp1/algorithms/filter.cpp @@ -104,7 +104,7 @@ void Filter::queueRequest(IPAContext &context, */ void Filter::prepare([[maybe_unused]] IPAContext &context, [[maybe_unused]] const uint32_t frame, - IPAFrameContext &frameContext, rkisp1_params_cfg *params) + IPAFrameContext &frameContext, rkisp1_ext_params_block_header *hdr) { /* Check if the algorithm configuration has been updated. */ if (!frameContext.filter.update) @@ -160,7 +160,14 @@ void Filter::prepare([[maybe_unused]] IPAContext &context, uint8_t denoise = frameContext.filter.denoise; uint8_t sharpness = frameContext.filter.sharpness; - auto &flt_config = params->others.flt_config; + + struct rkisp1_ext_params_flt_config *flt = + reinterpret_cast(hdr); + auto &flt_config = flt->flt_config; + + flt->header.type = RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT; + flt->header.enable = RKISP1_EXT_PARAMS_BLOCK_ENABLE; + flt->header.size = sizeof(rkisp1_ext_params_flt_config); flt_config.fac_sh0 = filt_fac_sh0[sharpness]; flt_config.fac_sh1 = filt_fac_sh1[sharpness]; @@ -203,10 +210,6 @@ void Filter::prepare([[maybe_unused]] IPAContext &context, flt_config.fac_bl1 /= 2; } } - - params->module_en_update |= RKISP1_CIF_ISP_MODULE_FLT; - params->module_ens |= RKISP1_CIF_ISP_MODULE_FLT; - params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_FLT; } REGISTER_IPA_ALGORITHM(Filter, "Filter") -- cgit v1.2.1