From patchwork Sun Jan 18 20:31:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25831 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E6F0DBDCBE for ; Sun, 18 Jan 2026 20:31:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A046361FC4; Sun, 18 Jan 2026 21:31:38 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SELn/xG3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CC60E61FB7 for ; Sun, 18 Jan 2026 21:31:36 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6908B308; Sun, 18 Jan 2026 21:31:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768267; bh=thh0AlTx71H+mocsY8DN6956B5cG5XiW1tYyjeRYSSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SELn/xG3Vag75fAaaFRN2P4Qm/ZIbMXoMY+NsSDYybH0VYBYe6qB6b2QIXWZbs8/2 JfO8E+uAENgEqh+cuaiJY7GNqKoqCV1V8xmTXIwVs9sV4fTLQiIRZQmmSYxd6B+6G0 3sUgprdEUbecvWMHVkKIEPM1QYPUrBlR9VpFd40M= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang , Jacopo Mondi Subject: [PATCH v9 1/6] ipa: rkisp1: algorithms: dpf: refactor DPF parsing and initialization Date: Sun, 18 Jan 2026 15:31:13 -0500 Message-ID: <20260118203119.1554962-2-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Split DPF configuration parsing and initialization into clearer, self-contained helpers and modernized initialization patterns. Introduce parseSingleConfig() as DPF tuning file parser helper make future extensions and maintenance easier. Change strengthconfig.r/g/b parser from uint16 to uint8 to match rkisp1_cif_isp_dpf_strength_config definition. Signed-off-by: Rui Wang Reviewed-by: Jacopo Mondi --- Changes since v5: - Update typo in commit message No change since v6: Reviewed-by tags from v5 are carried over (no code changes). --- src/ipa/rkisp1/algorithms/dpf.cpp | 52 ++++++++++++++++++++++--------- src/ipa/rkisp1/algorithms/dpf.h | 5 +++ 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index 39f3e461..dd3effa1 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -46,6 +46,28 @@ Dpf::Dpf() */ int Dpf::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData) +{ + /* Parse tuning block. */ + int ret = parseConfig(tuningData); + if (ret) + return ret; + + return 0; +} + +int Dpf::parseConfig(const YamlObject &tuningData) +{ + /* Parse base config. */ + int ret = parseSingleConfig(tuningData, config_, strengthConfig_); + if (ret) + return ret; + + return 0; +} + +int Dpf::parseSingleConfig(const YamlObject &tuningData, + rkisp1_cif_isp_dpf_config &config, + rkisp1_cif_isp_dpf_strength_config &strengthConfig) { std::vector values; @@ -82,10 +104,10 @@ int Dpf::init([[maybe_unused]] IPAContext &context, } std::copy_n(values.begin(), values.size(), - std::begin(config_.g_flt.spatial_coeff)); + std::begin(config.g_flt.spatial_coeff)); - config_.g_flt.gr_enable = true; - config_.g_flt.gb_enable = true; + config.g_flt.gr_enable = true; + config.g_flt.gb_enable = true; /* * For the red and blue components, we have the 13x9 kernel specified @@ -119,15 +141,15 @@ int Dpf::init([[maybe_unused]] IPAContext &context, return -EINVAL; } - config_.rb_flt.fltsize = values.size() == RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - ? RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9 - : RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9; + config.rb_flt.fltsize = values.size() == RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS + ? RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9 + : RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9; std::copy_n(values.begin(), values.size(), - std::begin(config_.rb_flt.spatial_coeff)); + std::begin(config.rb_flt.spatial_coeff)); - config_.rb_flt.r_enable = true; - config_.rb_flt.b_enable = true; + config.rb_flt.r_enable = true; + config.rb_flt.b_enable = true; /* * The range kernel is configured with a noise level lookup table (NLL) @@ -147,13 +169,13 @@ int Dpf::init([[maybe_unused]] IPAContext &context, } std::copy_n(nllValues.begin(), nllValues.size(), - std::begin(config_.nll.coeff)); + std::begin(config.nll.coeff)); std::string scaleMode = rFObject["scale-mode"].get(""); if (scaleMode == "linear") { - config_.nll.scale_mode = RKISP1_CIF_ISP_NLL_SCALE_LINEAR; + config.nll.scale_mode = RKISP1_CIF_ISP_NLL_SCALE_LINEAR; } else if (scaleMode == "logarithmic") { - config_.nll.scale_mode = RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC; + config.nll.scale_mode = RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC; } else { LOG(RkISP1Dpf, Error) << "Invalid 'RangeFilter:scale-mode': expected " @@ -164,9 +186,9 @@ int Dpf::init([[maybe_unused]] IPAContext &context, const YamlObject &fSObject = tuningData["FilterStrength"]; - strengthConfig_.r = fSObject["r"].get(64); - strengthConfig_.g = fSObject["g"].get(64); - strengthConfig_.b = fSObject["b"].get(64); + strengthConfig.r = fSObject["r"].get().value_or(64); + strengthConfig.g = fSObject["g"].get().value_or(64); + strengthConfig.b = fSObject["b"].get().value_or(64); return 0; } diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h index 2dd8cd36..39186c55 100644 --- a/src/ipa/rkisp1/algorithms/dpf.h +++ b/src/ipa/rkisp1/algorithms/dpf.h @@ -30,6 +30,11 @@ public: RkISP1Params *params) override; private: + int parseConfig(const YamlObject &tuningData); + int parseSingleConfig(const YamlObject &tuningData, + rkisp1_cif_isp_dpf_config &config, + rkisp1_cif_isp_dpf_strength_config &strengthConfig); + struct rkisp1_cif_isp_dpf_config config_; struct rkisp1_cif_isp_dpf_strength_config strengthConfig_; }; From patchwork Sun Jan 18 20:31:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25832 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9456FBDCBE for ; Sun, 18 Jan 2026 20:31:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 595B061FCF; Sun, 18 Jan 2026 21:31:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Dccc8gll"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 01C4A61FCF for ; Sun, 18 Jan 2026 21:31:39 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CACD61BA; Sun, 18 Jan 2026 21:31:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768269; bh=8XKCsaL/+vHXI33ytQwEAQa6r0YRtWe2b3wihBta65k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dccc8gllVrmt0tORalCivbXzLxvUSjAaGWxqNznM3dS2XerIjgx/kVnpgrvJp0pvG dxGxmPnL6gmbo/vUsqLsaHfUjhPcVsZ7j7aI4UTVMOTo1kvKlot8GrG64yUKDtq3cL ZiCg2a8DzZ5uedilPqQTYmNEg9ScmFy9nxs8MIrU= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang Subject: [PATCH v9 2/6] ipa: rkisp1: algorithms: dpf: Implement mode switching Date: Sun, 18 Jan 2026 15:31:14 -0500 Message-ID: <20260118203119.1554962-3-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Implement support for switching between different noise reduction modes. This allows the DPF algorithm to be configured with different parameters based on the requested noise reduction level (e.g., minimal, fast, high quality). Mode configurations are stored in the tuning data as a list of modes, with each mode specifying its 'type' and corresponding DPF parameters. An optional 'ActiveMode' setting allows defining the default mode at startup, defaulting to "ReductionOff" if not specified. The Dpf class is refactored to store configurations in a vector and track the current mode using an iterator, which avoids data copying during runtime. Signed-off-by: Rui Wang --- changelog since v5: - Update log verbos from Info to Debug in loadReductionConfig - Update log mode value to string to in loadReductionConfig - improving the return value changed like : if (ret != 0) -> if (ret) Reviewed-by tags from v5 are carried over (no function changes). changelog since v6: - add { controls::draft::NoiseReductionModeOff, "off" }, to fix out_of_range issue changelog since v7: - Delete base config parse from parseConfig changelog since v8: - remove config_ strengthConfig_ by replacing activeMode_ iterator to avoiding data copy during config loading - Update kModesMap from std::map std::map for quick search improvement - add ActiveMode as Stefan and Jacopo's review comments - update type : auto -> int for ret value - name change loadRecuctionConfig -> loadConfig - delete parseMode --- src/ipa/rkisp1/algorithms/dpf.cpp | 118 +++++++++++++++++++++++++++--- src/ipa/rkisp1/algorithms/dpf.h | 12 ++- 2 files changed, 117 insertions(+), 13 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index dd3effa1..d79cc5ff 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -8,6 +8,7 @@ #include "dpf.h" #include +#include #include #include @@ -36,8 +37,32 @@ namespace ipa::rkisp1::algorithms { LOG_DEFINE_CATEGORY(RkISP1Dpf) +namespace { + +const std::map kModesMap = { + { "ReductionMinimal", controls::draft::NoiseReductionModeMinimal }, + { "ReductionFast", controls::draft::NoiseReductionModeFast }, + { "ReductionHighQuality", controls::draft::NoiseReductionModeHighQuality }, + { "ReductionZSL", controls::draft::NoiseReductionModeZSL }, + { "ReductionOff", controls::draft::NoiseReductionModeOff }, +}; + +std::string modeName(int32_t mode) +{ + auto it = std::find_if(kModesMap.begin(), kModesMap.end(), + [mode](const auto &pair) { + return pair.second == mode; + }); + + if (it != kModesMap.end()) + return it->first; + + return "ReductionUnknown"; +} +} /* namespace */ + Dpf::Dpf() - : config_({}), strengthConfig_({}) + : noiseReductionModes_({}), activeMode_(noiseReductionModes_.end()) { } @@ -57,10 +82,57 @@ int Dpf::init([[maybe_unused]] IPAContext &context, int Dpf::parseConfig(const YamlObject &tuningData) { - /* Parse base config. */ - int ret = parseSingleConfig(tuningData, config_, strengthConfig_); - if (ret) - return ret; + /* Parse noise reduction modes. */ + if (!tuningData.contains("NoiseReductionModes")) { + LOG(RkISP1Dpf, Error) << "Missing modes in DPF tuning data"; + return -EINVAL; + } + + noiseReductionModes_.clear(); + for (const auto &entry : tuningData["NoiseReductionModes"].asList()) { + std::optional typeOpt = + entry["type"].get(); + if (!typeOpt) { + LOG(RkISP1Dpf, Error) << "Modes entry missing type"; + return -EINVAL; + } + + ModeConfig mode; + auto it = kModesMap.find(*typeOpt); + if (it == kModesMap.end()) { + LOG(RkISP1Dpf, Error) << "Unknown mode type: " << *typeOpt; + return -EINVAL; + } + + mode.modeValue = it->second; + int ret = parseSingleConfig(entry, mode.dpf, mode.strength); + if (ret) { + LOG(RkISP1Dpf, Error) << "Failed to parse mode: " << *typeOpt; + return ret; + } + + noiseReductionModes_.push_back(mode); + } + + /* + * Parse the optional ActiveMode. + * If not present, default to "ReductionOff". + */ + std::string activeMode = tuningData["ActiveMode"].get().value_or("ReductionOff"); + auto it = kModesMap.find(activeMode); + if (it == kModesMap.end()) { + LOG(RkISP1Dpf, Warning) << "Invalid ActiveMode: " << activeMode; + activeMode_ = noiseReductionModes_.end(); + return 0; + } + + if (!loadConfig(it->second)) { + /* If the default "ReductionOff" mode is requested but not configured, disable DPF. */ + if (it->second == controls::draft::NoiseReductionModeOff) + activeMode_ = noiseReductionModes_.end(); + else + return -EINVAL; + } return 0; } @@ -193,6 +265,27 @@ int Dpf::parseSingleConfig(const YamlObject &tuningData, return 0; } +bool Dpf::loadConfig(int32_t mode) +{ + auto it = std::find_if(noiseReductionModes_.begin(), noiseReductionModes_.end(), + [mode](const ModeConfig &m) { + return m.modeValue == mode; + }); + if (it == noiseReductionModes_.end()) { + LOG(RkISP1Dpf, Warning) + << "No DPF config for reduction mode: " << modeName(mode); + return false; + } + + activeMode_ = it; + + LOG(RkISP1Dpf, Debug) + << "DPF mode=Reduction (config loaded)" + << " mode= " << modeName(mode); + + return true; +} + /** * \copydoc libcamera::ipa::Algorithm::queueRequest */ @@ -206,8 +299,6 @@ void Dpf::queueRequest(IPAContext &context, const auto &denoise = controls.get(controls::draft::NoiseReductionMode); if (denoise) { - LOG(RkISP1Dpf, Debug) << "Set denoise to " << *denoise; - switch (*denoise) { case controls::draft::NoiseReductionModeOff: if (dpf.denoise) { @@ -218,9 +309,10 @@ void Dpf::queueRequest(IPAContext &context, case controls::draft::NoiseReductionModeMinimal: case controls::draft::NoiseReductionModeHighQuality: case controls::draft::NoiseReductionModeFast: - if (!dpf.denoise) { - dpf.denoise = true; + case controls::draft::NoiseReductionModeZSL: + if (loadConfig(*denoise)) { update = true; + dpf.denoise = true; } break; default: @@ -229,6 +321,8 @@ void Dpf::queueRequest(IPAContext &context, << *denoise; break; } + if (update) + LOG(RkISP1Dpf, Debug) << "Set denoise to " << modeName(*denoise); } frameContext.dpf.denoise = dpf.denoise; @@ -251,8 +345,10 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame, strengthConfig.setEnabled(frameContext.dpf.denoise); if (frameContext.dpf.denoise) { - *config = config_; - *strengthConfig = strengthConfig_; + const ModeConfig &modeConfig = *activeMode_; + + *config = modeConfig.dpf; + *strengthConfig = modeConfig.strength; const auto &awb = context.configuration.awb; const auto &lsc = context.configuration.lsc; diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h index 39186c55..11fc88e4 100644 --- a/src/ipa/rkisp1/algorithms/dpf.h +++ b/src/ipa/rkisp1/algorithms/dpf.h @@ -30,13 +30,21 @@ public: RkISP1Params *params) override; private: + struct ModeConfig { + int32_t modeValue; + rkisp1_cif_isp_dpf_config dpf; + rkisp1_cif_isp_dpf_strength_config strength; + }; + int parseConfig(const YamlObject &tuningData); int parseSingleConfig(const YamlObject &tuningData, rkisp1_cif_isp_dpf_config &config, rkisp1_cif_isp_dpf_strength_config &strengthConfig); - struct rkisp1_cif_isp_dpf_config config_; - struct rkisp1_cif_isp_dpf_strength_config strengthConfig_; + bool loadConfig(int32_t mode); + + std::vector noiseReductionModes_; + std::vector::const_iterator activeMode_; }; } /* namespace ipa::rkisp1::algorithms */ From patchwork Sun Jan 18 20:31:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25833 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 38F60BDCBE for ; Sun, 18 Jan 2026 20:31:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0A7CF61FBC; Sun, 18 Jan 2026 21:31:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="bIX2BsuA"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EEB3861FBC for ; Sun, 18 Jan 2026 21:31:42 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9AE4046F; Sun, 18 Jan 2026 21:31:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768273; bh=5RYKdhPLFjdkHs9hT2pFQTs3z26LqZZU70bAqj4cX3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bIX2BsuA2wILTW3aPWfitjSMxNf0VJtgm0vl68PWUkp89/cwC2vq7SSENA2LUVPRl wABZ4BYOvzw9WkdSXwd+f29Rt24z8CZkKdZPlMt+cN0k2Vxx8IaGD5ZKbgwYeG5INy fKSz86ZOXb36gc+xpchpF3RWSTkZ7gMfxWkQS8qo= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang , Jacopo Mondi Subject: [PATCH v9 3/6] ipa: rkisp1: algorithms: dpf: Refactor prepare() into helpers Date: Sun, 18 Jan 2026 15:31:15 -0500 Message-ID: <20260118203119.1554962-4-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Split the prepare() function into prepareDisabledMode() and prepareEnabledMode() to improve readability and maintainability. This separates the logic for disabling and enabling the DPF, making the main prepare() function cleaner and easier to follow. Signed-off-by: Rui Wang Reviewed-by: Jacopo Mondi --- changelog since v5/v6: Nothing changed changelog since v8 : - remove [[maybe_unused] for prepareEnable and prepareDisable Reviewed-by tags from v5 are carried over (no code changes). --- src/ipa/rkisp1/algorithms/dpf.cpp | 80 +++++++++++++++++++------------ src/ipa/rkisp1/algorithms/dpf.h | 3 ++ 2 files changed, 52 insertions(+), 31 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index d79cc5ff..f300d0a5 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -338,40 +338,58 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame, if (!frameContext.dpf.update && frame > 0) return; + if (!frameContext.dpf.denoise) { + prepareDisabledMode(params); + return; + } + + prepareEnabledMode(context, params); +} + +void Dpf::prepareDisabledMode(RkISP1Params *params) +{ + auto dpfConfig = params->block(); + dpfConfig.setEnabled(false); + auto dpfStrength = params->block(); + dpfStrength.setEnabled(false); +} + +void Dpf::prepareEnabledMode(IPAContext &context, RkISP1Params *params) +{ + if (activeMode_ == noiseReductionModes_.end()) + return; + + const ModeConfig &modeConfig = *activeMode_; + auto config = params->block(); - config.setEnabled(frameContext.dpf.denoise); + config.setEnabled(true); + *config = modeConfig.dpf; + + const auto &awb = context.configuration.awb; + const auto &lsc = context.configuration.lsc; + + auto &mode = config->gain.mode; + + /* + * The DPF needs to take into account the total amount of + * digital gain, which comes from the AWB and LSC modules. The + * DPF hardware can be programmed with a digital gain value + * manually, but can also use the gains supplied by the AWB and + * LSC modules automatically when they are enabled. Use that + * mode of operation as it simplifies control of the DPF. + */ + if (awb.enabled && lsc.enabled) + mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_LSC_GAINS; + else if (awb.enabled) + mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_GAINS; + else if (lsc.enabled) + mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINS; + else + mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED; auto strengthConfig = params->block(); - strengthConfig.setEnabled(frameContext.dpf.denoise); - - if (frameContext.dpf.denoise) { - const ModeConfig &modeConfig = *activeMode_; - - *config = modeConfig.dpf; - *strengthConfig = modeConfig.strength; - - const auto &awb = context.configuration.awb; - const auto &lsc = context.configuration.lsc; - - auto &mode = config->gain.mode; - - /* - * The DPF needs to take into account the total amount of - * digital gain, which comes from the AWB and LSC modules. The - * DPF hardware can be programmed with a digital gain value - * manually, but can also use the gains supplied by the AWB and - * LSC modules automatically when they are enabled. Use that - * mode of operation as it simplifies control of the DPF. - */ - if (awb.enabled && lsc.enabled) - mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_LSC_GAINS; - else if (awb.enabled) - mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_GAINS; - else if (lsc.enabled) - mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINS; - else - mode = RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED; - } + strengthConfig.setEnabled(true); + *strengthConfig = modeConfig.strength; } REGISTER_IPA_ALGORITHM(Dpf, "Dpf") diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h index 11fc88e4..df9d5746 100644 --- a/src/ipa/rkisp1/algorithms/dpf.h +++ b/src/ipa/rkisp1/algorithms/dpf.h @@ -43,6 +43,9 @@ private: bool loadConfig(int32_t mode); + void prepareDisabledMode(RkISP1Params *params); + void prepareEnabledMode(IPAContext &context, RkISP1Params *params); + std::vector noiseReductionModes_; std::vector::const_iterator activeMode_; }; From patchwork Sun Jan 18 20:31:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25834 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C2090BDCBE for ; Sun, 18 Jan 2026 20:31:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7F7C761FCF; Sun, 18 Jan 2026 21:31:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pcj0GVJF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C64AB61FCF for ; Sun, 18 Jan 2026 21:31:44 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F6021BA; Sun, 18 Jan 2026 21:31:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768275; bh=E2J89dM7JMJHY3CjjKwFO7Ylt2jxrL1n5jaghF1NMXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pcj0GVJF6Px12I3DhPgGy7sY3h1JkGYQYyDK4LBCO1DY4Qm27u2lE6PBUtcurEFXs uT3QdLV8ynvHwsmp3yitnppNhFWdfuIgoVzz/hzr3TMEmZebyWsdRZuuZlD9HC4pOb tMuX6uDT01XNPcl8HrFmDiWb7mCZddAPiRYmphrg= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang , Jacopo Mondi Subject: [PATCH v9 4/6] ipa: rkisp1: algorithms: dpf: Add detailed config logging Date: Sun, 18 Jan 2026 15:31:16 -0500 Message-ID: <20260118203119.1554962-5-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add logConfig() helper function to log DPF configuration updates when they occur. This provides visibility into the active DPF parameters including: - Control mode and denoise enable state - Filter sizes (9x9 vs 13x9 for rb) - NLL scale mode (linear vs logarithmic) - Gain mode - Strength values (r, g, b) - Spatial filter coefficients (g and rb arrays) - Noise level lookup table coefficients The logging is triggered in prepareEnabledMode() whenever the configuration is updated, helping with debugging and tuning. Signed-off-by: Rui Wang Reviewed-by: Jacopo Mondi --- changelog since v5: - remove curly bracket in single state if-else Reviewed-by tags from v5 are carried over (no function changes). changelog since v6: No change changelog since v8: - add logConfi argument : rkisp1_cif_isp_dpf_config rkisp1_cif_isp_dpf_strength_config --- src/ipa/rkisp1/algorithms/dpf.cpp | 51 +++++++++++++++++++++++++++++-- src/ipa/rkisp1/algorithms/dpf.h | 6 +++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index f300d0a5..7a162f27 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -286,6 +286,49 @@ bool Dpf::loadConfig(int32_t mode) return true; } +void Dpf::logConfig(const IPAFrameContext &frameContext, + const struct rkisp1_cif_isp_dpf_config &config, + const struct rkisp1_cif_isp_dpf_strength_config &strengthConfig) const +{ + std::ostringstream ss; + + ss << "DPF config update: "; + ss << " control mode=" << modeName(activeMode_->modeValue); + ss << ", denoise=" << (frameContext.dpf.denoise ? "enabled" : "disabled"); + + ss << ", rb_fltsize=" + << (config.rb_flt.fltsize == RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9 ? "13x9" : "9x9"); + ss << ", nll_scale=" + << (config.nll.scale_mode == RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC ? "log" : "linear"); + ss << ", gain_mode=" << config.gain.mode; + ss << ", strength=" << int(strengthConfig.r) << ',' << int(strengthConfig.g) << ',' << int(strengthConfig.b); + + ss << ", g=["; + for (size_t i = 0; i < RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS; ++i) { + if (i) + ss << ','; + ss << int(config.g_flt.spatial_coeff[i]); + } + ss << "]"; + + ss << ", rb=["; + for (size_t i = 0; i < RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS; ++i) { + if (i) + ss << ','; + ss << int(config.rb_flt.spatial_coeff[i]); + } + ss << "]"; + + ss << ", nll=["; + for (size_t i = 0; i < RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS; ++i) { + if (i) + ss << ','; + ss << int(config.nll.coeff[i]); + } + ss << "]"; + LOG(RkISP1Dpf, Debug) << ss.str(); +} + /** * \copydoc libcamera::ipa::Algorithm::queueRequest */ @@ -343,7 +386,7 @@ void Dpf::prepare(IPAContext &context, const uint32_t frame, return; } - prepareEnabledMode(context, params); + prepareEnabledMode(context, frameContext, params); } void Dpf::prepareDisabledMode(RkISP1Params *params) @@ -354,7 +397,8 @@ void Dpf::prepareDisabledMode(RkISP1Params *params) dpfStrength.setEnabled(false); } -void Dpf::prepareEnabledMode(IPAContext &context, RkISP1Params *params) +void Dpf::prepareEnabledMode(IPAContext &context, IPAFrameContext &frameContext, + RkISP1Params *params) { if (activeMode_ == noiseReductionModes_.end()) return; @@ -390,6 +434,9 @@ void Dpf::prepareEnabledMode(IPAContext &context, RkISP1Params *params) auto strengthConfig = params->block(); strengthConfig.setEnabled(true); *strengthConfig = modeConfig.strength; + + if (frameContext.dpf.update) + logConfig(frameContext, *config, *strengthConfig); } REGISTER_IPA_ALGORITHM(Dpf, "Dpf") diff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h index df9d5746..dcd14dc6 100644 --- a/src/ipa/rkisp1/algorithms/dpf.h +++ b/src/ipa/rkisp1/algorithms/dpf.h @@ -42,9 +42,13 @@ private: rkisp1_cif_isp_dpf_strength_config &strengthConfig); bool loadConfig(int32_t mode); + void logConfig(const IPAFrameContext &frameContext, + const struct rkisp1_cif_isp_dpf_config &config, + const struct rkisp1_cif_isp_dpf_strength_config &strengthConfig) const; void prepareDisabledMode(RkISP1Params *params); - void prepareEnabledMode(IPAContext &context, RkISP1Params *params); + void prepareEnabledMode(IPAContext &context, IPAFrameContext &frameContext, + RkISP1Params *params); std::vector noiseReductionModes_; std::vector::const_iterator activeMode_; From patchwork Sun Jan 18 20:31:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25835 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 44018BDCBE for ; Sun, 18 Jan 2026 20:31:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0147B61FCC; Sun, 18 Jan 2026 21:31:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VqmonSFX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 566C661FC9 for ; Sun, 18 Jan 2026 21:31:46 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1950A308; Sun, 18 Jan 2026 21:31:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768276; bh=ZazcxrXOISt+bsRvkS6mMODU5iamJYe8ROTql4R+TMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VqmonSFX8mkRRBBLPXtYum4RgdX+Rl++B+1FnPumSAJKNLCMnuIToZybjiGQEszB7 fTdfwcl0ZyZT3OVF6UB6fOQ57uGsIOVWLRjx66LTr+CBmnkyj+cf53hY3cVF/Slc+6 fZG/oNId4C2fLikVIrdBVPGTlJy0EpVW8V+nQNl8= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang Subject: [PATCH v9 5/6] ipa: rkisp1: algorithms: data: enable DPF tuning for sensors Date: Sun, 18 Jan 2026 15:31:17 -0500 Message-ID: <20260118203119.1554962-6-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Update the RkISP1 denoise pre-filter (DPF) for the ov5640 sensor tuning config by adding the required DPF tuning block. Signed-off-by: Rui Wang --- changelog since v5: No change changelog since v6: add ov5647 as strong noise sensor for verification changelog since v7: - move ov5647 yaml out this commit and will add brand new commit - Update dpf tuning paras format , delete base config following parseConfig code change change log since v8: - move imx219 out to another commit - update DPF tuning paramter for sample --- src/ipa/rkisp1/data/ov5640.yaml | 64 +++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/src/ipa/rkisp1/data/ov5640.yaml b/src/ipa/rkisp1/data/ov5640.yaml index 4b21d412..56741f6b 100644 --- a/src/ipa/rkisp1/data/ov5640.yaml +++ b/src/ipa/rkisp1/data/ov5640.yaml @@ -232,19 +232,55 @@ algorithms: green: 2 red-blue: 2 - Dpf: - DomainFilter: - g: [ 16, 16, 16, 16, 16, 16 ] - rb: [ 16, 16, 16, 16, 16, 16 ] - NoiseLevelFunction: - coeff: [ - 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, - 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, - 1023 - ] - scale-mode: "linear" - FilterStrength: - r: 64 - g: 64 - b: 64 + NoiseReductionModes: + - type: "ReductionMinimal" + DomainFilter: + g: [ 14, 10, 7, 4, 2, 1 ] + rb: [ 14, 11, 8, 4, 2, 1 ] + NoiseLevelFunction: + coeff: [ 0, 26, 52, 78, 106, 138, 172, 208, 248, 292, 340, 392, + 448, 508, 572, 640, 712 ] + scale-mode: "linear" + FilterStrength: + r: 60 + g: 60 + b: 60 + - type: "ReductionHighQuality" + DomainFilter: + g: [ 22, 18, 13, 8, 5, 2 ] + rb: [ 20, 18, 16, 11, 7, 3 ] + NoiseLevelFunction: + coeff: [ 0, 26, 52, 78, 106, 138, 172, 208, 248, 292, 340, 392, + 448, 508, 572, 640, 712 ] + scale-mode: "linear" + FilterStrength: + r: 130 + g: 130 + b: 130 + - type: "ReductionFast" + DomainFilter: + g: [ 16, 12, 9, 5, 3, 1 ] + rb: [ 16, 13, 10, 6, 4, 2 ] + NoiseLevelFunction: + coeff: [ 0, 16, 32, 48, 66, 86, 108, 132, 160, 192, 228, 268, + 312, 360, 412, 468, 528 ] + scale-mode: "linear" + FilterStrength: + r: 90 + g: 90 + b: 90 + - type: "ReductionZsl" + DomainFilter: + g: [ 18, 14, 10, 6, 3, 1 ] + rb: [ 18, 16, 13, 9, 5, 3 ] + NoiseLevelFunction: + coeff: [ 0, 20, 40, 60, 82, 106, 132, 160, 192, 228, 268, 312, + 360, 412, 468, 528, 592 ] + scale-mode: "linear" + FilterStrength: + r: 110 + g: 110 + b: 110 + ActiveMode: "ReductionHighQuality" - Filter: ... From patchwork Sun Jan 18 20:31:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25836 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BD3A7BDCBE for ; Sun, 18 Jan 2026 20:31:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7779461FC9; Sun, 18 Jan 2026 21:31:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ObREnIyE"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CCDD861FC9 for ; Sun, 18 Jan 2026 21:31:47 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9D5D946F; Sun, 18 Jan 2026 21:31:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768278; bh=aW/affGvZwq8lOgY1IAPf5VtOtDWiQhSBCedBJXjBXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObREnIyEIB1BtfxL6C+Sw1vRW6p+QfOKi4qkvSQykNmV1N0xr8UdO8XuyN+csxohT kC8E4k9tVOWSk3EDqGSIINy7mHDfn6pbu4IYDojYEyLzmHwFbmYOwJxa7AGbB9wwWf 7bj5BXFxRKuoUvRgIFxXbrZPAbmOp2yHeJhkxaz8= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang Subject: [PATCH v9 6/6] ipa: rkisp1: algorithms: data: Add OV5647/IMX219 tuning file Date: Sun, 18 Jan 2026 15:31:18 -0500 Message-ID: <20260118203119.1554962-7-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118203119.1554962-1-rui.wang@ideasonboard.com> References: <20260118203119.1554962-1-rui.wang@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a new tuning configuration file for the OmniVision OV5647 sensor. This includes initial settings for DPF algorithms. Register the new tuning file in the build system. Add Dpf tuning config into Imx219 Signed-off-by: Rui Wang --- changelog since v7 : - move imx219 dpf tuning config - update tuning parameters since "key" update --- src/ipa/rkisp1/data/imx219.yaml | 25 ++++++++++++++++++++++++ src/ipa/rkisp1/data/meson.build | 1 + src/ipa/rkisp1/data/ov5647.yaml | 34 +++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 src/ipa/rkisp1/data/ov5647.yaml diff --git a/src/ipa/rkisp1/data/imx219.yaml b/src/ipa/rkisp1/data/imx219.yaml index 0d99cb52..a4cb2bb3 100644 --- a/src/ipa/rkisp1/data/imx219.yaml +++ b/src/ipa/rkisp1/data/imx219.yaml @@ -111,4 +111,29 @@ algorithms: 1438, 1226, 1059, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1025, 1054, 1185, 1326, 1334, 1334, ] + - Dpf: + NoiseReductionModes: + - type: "ReductionMinimal" + DomainFilter: + g: [ 14, 10, 7, 4, 2, 1 ] + rb: [ 14, 11, 8, 4, 2, 1 ] + NoiseLevelFunction: + coeff: [ 0, 26, 52, 78, 106, 138, 172, 208, 248, 292, 340, 392, 448, 508, 572, 640, 712 ] + scale-mode: "linear" + FilterStrength: + r: 60 + g: 60 + b: 60 + - type: "ReductionHighQuality" + DomainFilter: + g: [ 22, 18, 13, 8, 5, 2 ] + rb: [ 20, 18, 16, 11, 7, 3 ] + NoiseLevelFunction: + coeff: [ 0, 26, 52, 78, 106, 138, 172, 208, 248, 292, 340, 392, 448, 508, 572, 640, 712 ] + scale-mode: "linear" + FilterStrength: + r: 130 + g: 130 + b: 130 + ActiveMode: "ReductionHighQuality" ... diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build index 1e3522b2..6388a8be 100644 --- a/src/ipa/rkisp1/data/meson.build +++ b/src/ipa/rkisp1/data/meson.build @@ -6,6 +6,7 @@ conf_files = files([ 'ov2685.yaml', 'ov4689.yaml', 'ov5640.yaml', + 'ov5647.yaml', 'ov5695.yaml', 'ov8858.yaml', 'uncalibrated.yaml', diff --git a/src/ipa/rkisp1/data/ov5647.yaml b/src/ipa/rkisp1/data/ov5647.yaml new file mode 100644 index 00000000..3bb95a2d --- /dev/null +++ b/src/ipa/rkisp1/data/ov5647.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - Agc: + - Awb: + - Dpf: + modes: + - type: "ReductionFast" + DomainFilter: + g: [ 16, 12, 9, 5, 3, 1 ] + rb: [ 16, 13, 10, 6, 4, 2 ] + NoiseLevelFunction: + coeff: [ 0, 16, 32, 48, 66, 86, 108, 132, 160, 192, 228, 268, 312, 360, 412, 468, 528 ] + scale-mode: "linear" + FilterStrength: + r: 90 + g: 90 + b: 90 + - type: "ReductionZsl" + DomainFilter: + g: [ 18, 14, 10, 6, 3, 1 ] + rb: [ 18, 16, 13, 9, 5, 3 ] + NoiseLevelFunction: + coeff: [ 0, 20, 40, 60, 82, 106, 132, 160, 192, 228, 268, 312, 360, 412, 468, 528, 592 ] + scale-mode: "linear" + FilterStrength: + r: 110 + g: 110 + b: 110 + ActiveMode: "ReductionHighQuality" + - Filter: +...