summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/lsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/algorithms/lsc.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/lsc.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp
index 0c9f6cbd..8de49e42 100644
--- a/src/ipa/rkisp1/algorithms/lsc.cpp
+++ b/src/ipa/rkisp1/algorithms/lsc.cpp
@@ -149,8 +149,6 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
return -EINVAL;
}
- context.configuration.lsc.enabled = false;
-
return 0;
}
@@ -290,12 +288,10 @@ void LensShadingCorrection::prepare(IPAContext &context,
if (!lsc->enable) {
disableLSC(params);
lsc->active = false;
- context.configuration.lsc.enabled = false;
return;
}
lsc->active = true;
- context.configuration.lsc.enabled = true;
}
/* Nothing more to do here if LSC is not active. */
@@ -387,6 +383,15 @@ void LensShadingCorrection::prepare(IPAContext &context,
lastCt_ = { ct, ct };
}
+void LensShadingCorrection::process(IPAContext &context,
+ [[maybe_unused]] const uint32_t frame,
+ [[maybe_unused]] IPAFrameContext &frameContext,
+ [[maybe_unused]] const rkisp1_stat_buffer *stats,
+ ControlList &metadata)
+{
+ metadata.set(controls::LensShadingEnable, context.activeState.lsc.active);
+}
+
REGISTER_IPA_ALGORITHM(LensShadingCorrection, "LensShadingCorrection")
} /* namespace ipa::rkisp1::algorithms */