summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/algorithms/filter.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/filter.cpp15
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")