From patchwork Sun Jan 18 20:29:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25825 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 D9B0DBDCBE for ; Sun, 18 Jan 2026 20:30:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E9D6B61FC3; Sun, 18 Jan 2026 21:30:09 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SDBiOfJp"; 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 5393B61FB7 for ; Sun, 18 Jan 2026 21:30:08 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CC78E1BA; Sun, 18 Jan 2026 21:29:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768768178; bh=q1p5sbP02DZN4NDa2g3kh+nHMGhbdvpwqtr0Aa6yNGQ=; h=From:To:Cc:Subject:Date:From; b=SDBiOfJpvmv1eeF5v2f6LwO92156VHMgaCR8h3w+nK4e7JA1eG/Q6yeo3Ds4UB7sT zYTF9g10RnqWLdXiyOhJuhGP9CwrFdvkC+dWwntfvfzIuFbohwwOoR74ZfczyjbA2u p8Jf1Jqhs1h8Qryqfm5xBfvXtJrsYascc+poJNDs= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang Subject: [PATCH v1 0/4] Filter algorithm refactoring and mode switching Date: Sun, 18 Jan 2026 15:29:49 -0500 Message-ID: <20260118202953.1554892-1-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 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" This patch series refactors the RkISP1 Filter algorithm to support noise reduction mode switching via tuning data, similar to the DPF algorithm implementation. The current Filter implementation uses hardcoded lookup tables for denoise and sharpness parameters. This series replaces that approach with a flexible mode-based configuration system that allows filter parameters to be fully specified in YAML tuning files. Key improvements: - Introduce noise reduction mode switching infrastructure with support for multiple configurable modes (Minimal, Fast, HighQuality, ZSL). - Replace hardcoded denoise/sharpness lookup tables with tuning data loaded from YAML configuration files. - Maintain sharpness control as an override mechanism that modulates sharpening factors on top of the base noise reduction mode. - Refactor prepare() into helper functions for better code organization. - Change filter.denoise from uint8_t to bool to reflect its actual usage. - Add initial tuning configurations for IMX219 and OV5640 sensors. The implementation follows the same design pattern as the DPF algorithm, ensuring consistency across the rkisp1 IPA module and enabling sensor-specific filter tuning. Rui Wang (4): ipa: rkisp1: algorithms: filter: Implement noise reduction mode switching pa: rkisp1: algorithms: filter: Add helper fun and sharpness presets ipa: rkisp1: algorithms: filter: Integrate mode switching with prepare() ipa: rkisp1: data: Add Filter tuning configuration for sensors src/ipa/rkisp1/algorithms/filter.cpp | 346 +++++++++++++++++++-------- src/ipa/rkisp1/algorithms/filter.h | 23 +- src/ipa/rkisp1/data/imx219.yaml | 48 ++++ src/ipa/rkisp1/data/ov5640.yaml | 47 ++++ src/ipa/rkisp1/ipa_context.h | 2 +- 5 files changed, 361 insertions(+), 105 deletions(-)