[v13,0/7] refactor DPF parsing and initialization
mbox series

Message ID 20260206151205.143671-1-rui.wang@ideasonboard.com
Headers show
Series
  • refactor DPF parsing and initialization
Related show

Message

Rui Wang Feb. 6, 2026, 3:11 p.m. UTC
This patch series refactors the DPF (Denoise Pre-Filter) parsing and 
nitialization
in the rkisp1 IPA module, and enables DPF tuning for the IMX219/OV5647/OV5640 
sensor.
The changes include restructuring the DPF configuration handling, improving
readability, and adding support for sensor-specific DPF parameters.
Support mode selection base on tuning parameters



Key changes:
- Inlined parseModes into parseConfig for cleaner initialization.
- Refactored mode lookup to use a dictionary, facilitating
  name-based lookup in tuning files.
- Introduced ActiveMode as an optional tuning parameter to set the
  default DPF state.
- Improved code structure in prepare() by using helper functions for
  enabled and disabled states.
- Enhanced debug logging for ISP parameter verification.
- Provided initial tuning data for IMX219, OV5640.

changes since v12:
 - patch 3: Code format and style improvements: 
  Remove curly braces for single-line if statements.
 - patch 7: Delete ov5647 tuning file from this series.


Rui Wang (7):
  ipa: rkisp1: algorithms: dpf: refactor DPF parsing and initialization
  ipa: rkisp1: algorithms: dpf: Implement mode switching
  ipa: rkisp1: algorithms: register noise reduction controls
  ipa: rkisp1: algorithms: dpf: Refactor prepare() into helpers
  ipa: rkisp1: algorithms: dpf: Add detailed config logging
  ipa: rkisp1: algorithms: data: enable DPF tuning for sensors
  ipa: rkisp1: algorithms: data: Add IMX219 Dpf into tuning file

 src/ipa/rkisp1/algorithms/dpf.cpp | 279 ++++++++++++++++++++++++------
 src/ipa/rkisp1/algorithms/dpf.h   |  25 ++-
 src/ipa/rkisp1/data/imx219.yaml   |  25 +++
 src/ipa/rkisp1/data/ov5640.yaml   |  64 +++++--
 src/ipa/rkisp1/rkisp1.cpp         |   1 -
 5 files changed, 328 insertions(+), 66 deletions(-)

Comments

Jacopo Mondi Feb. 8, 2026, 1:49 p.m. UTC | #1
Hi Rui,

The commit title should be:

ipa: rkisp1: ov5640: Update Denoise tuning data

On Fri, Feb 06, 2026 at 10:12:04AM -0500, Rui Wang wrote:
> Update the RkISP1 denoise pre-filter (DPF) for the ov5640
> sensor tuning config by adding the required DPF tuning block.

Update the RkISP1 version of ov5640 tuning file to comply with the
newly introduced changes to the Dpf algorithm.

Update not only the tuning data layout but also their values, according
to newly performed tuning, to support four configurations modes of the Dpf
engine.

>
> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>

Acked-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

>
> ---
> 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
> change log since v9:
>  - Update imx219/ov5647 dpf tuning structure as new parser required
> change log since v11:
>  - Change "ActiveMode" to "activemode"
> ---
>  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..9b754afb 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:
> +        NoiseReductionModeMinimal:
> +          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
> +        NoiseReductionModeHighQuality:
> +          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
> +        NoiseReductionModeFast:
> +          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
> +        NoiseReductionModeZsl:
> +          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: "NoiseReductionModeHighQuality"
>    - Filter:
>  ...
> --
> 2.43.0
>