@@ -424,6 +424,56 @@ void Dpf::collectManualOverrides(const ControlList &controls)
}
}
+bool Dpf::checkOverridesChanged()
+{
+ /* Check strength always (not dev-mode specific) */
+ if (overrides_.strength) {
+ if (overrides_.strength->r != strengthConfig_.r ||
+ overrides_.strength->g != strengthConfig_.g ||
+ overrides_.strength->b != strengthConfig_.b) {
+ return true;
+ }
+ }
+
+ if (!isDevMode())
+ return false;
+
+ if (overrides_.spatialGreen &&
+ !std::equal(overrides_.spatialGreen->coeffs.begin(), overrides_.spatialGreen->coeffs.end(),
+ config_.g_flt.spatial_coeff)) {
+ return true;
+ }
+ if (overrides_.spatialRb &&
+ !std::equal(overrides_.spatialRb->coeffs.begin(), overrides_.spatialRb->coeffs.end(),
+ config_.rb_flt.spatial_coeff)) {
+ return true;
+ }
+ if (overrides_.rbSize) {
+ bool currentRbSize =
+ (config_.rb_flt.fltsize == RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9)
+ ? 1
+ : 0;
+ if (*overrides_.rbSize != currentRbSize) {
+ return true;
+ }
+ }
+ if (overrides_.nll) {
+ bool coeffsChanged =
+ !std::equal(overrides_.nll->coeffs.begin(),
+ overrides_.nll->coeffs.end(),
+ config_.nll.coeff);
+ bool scaleChanged =
+ overrides_.nll->scaleMode !=
+ (config_.nll.scale_mode == RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC
+ ? 1
+ : 0);
+ if (coeffsChanged || scaleChanged) {
+ return true;
+ }
+ }
+ return false;
+}
+
/**
* \copydoc libcamera::ipa::Algorithm::queueRequest
*/
@@ -79,6 +79,7 @@ private:
uint32_t frame) override;
void loadReductionModeConfig(IPAFrameContext &frameContext);
void collectManualOverrides(const ControlList &controls) override;
+ bool checkOverridesChanged();
bool parseConfig(const YamlObject &tuningData) override;
bool parseSingleConfig(const YamlObject &tuningData,
rkisp1_cif_isp_dpf_config &config,
Introduce checkDevModeOverridesChanged() to detect when developer-mode controls have been modified. This function compares override values against the current hardware configuration for: - Spatial coefficients (green and RB) - RB filter size - NLL coefficients and scale mode Updates queueRequest() to trigger hardware updates whenever dev-mode overrides differ from active settings. This ensures spatial kernels, NLL tables, and filter size changes are applied immediately in manual mode. Signed-off-by: Rui Wang <rui.wang@ideasonboard.com> --- src/ipa/rkisp1/algorithms/dpf.cpp | 50 +++++++++++++++++++++++++++++++ src/ipa/rkisp1/algorithms/dpf.h | 1 + 2 files changed, 51 insertions(+)