diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2024-05-31 12:20:34 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2024-06-20 18:22:17 +0200 |
commit | 4acc8e35cff7548eba9fb1e4be4052d5340a9254 (patch) | |
tree | 91a9ca3ee7c882b710c4bbc2bbb0d1db22709ddb /src/ipa/rkisp1/algorithms/filter.cpp | |
parent | e689b2f0c9fef525364ba518054297558086a051 (diff) |
ipa: rkisp1: Use the extensible parameters formatimx8mp/extensible-format
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/filter.cpp')
-rw-r--r-- | src/ipa/rkisp1/algorithms/filter.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
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<rkisp1_ext_params_flt_config *>(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") |