From patchwork Mon Feb 17 10:01:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22786 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 611FEC327D for ; Mon, 17 Feb 2025 10:02:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB86968663; Mon, 17 Feb 2025 11:02:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RuQoPPMx"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DAEA61861 for ; Mon, 17 Feb 2025 11:02:08 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:b47f:e20a:c4c7:ece1]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A1CC842; Mon, 17 Feb 2025 11:00:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1739786447; bh=AEwgTQ1phUWZvwoaEQmmGQ+aDygngV9x4kJv+WIvUVg=; h=From:To:Cc:Subject:Date:From; b=RuQoPPMxApick2eNAIj/8ejtcv00CwmbfwigugGXv0cBZGGY8XXAwDCJcVlxbtN6G Rdifs5VzRunLLyj37mlWTVF95XsFulaILvoll1T16dqJ8FzrEgdpNtFMLNqhiRH+96 ie36T/HaD4G7wnPnvsfMGoCXJ7P/LOq8vc/DhR5A= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 00/10] Some rkisp1 awb improvements Date: Mon, 17 Feb 2025 11:01:41 +0100 Message-ID: <20250217100203.297894-1-stefan.klug@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" Hi all, This series contains a few fixes that greatly improve and stabilize the AWB handling on rkisp1. Patches 1-3 add utility functions to Vector and Matrix. The rest fixes some bugs and generally improves the AWB on rkisp1. Please see the individual patches for details. Best regards, Stefan Stefan Klug (10): libcamera: matrix: Add cast function libcamera: vector: Add cast function libcamera: matrix: Add inverse() function ipa: rkisp1: Refactor automatic/manual structure in IPAActiveState ipa: rkisp: ccm/lsc: Fix CCM/LSC based on manual color temperature ipa: rkisp1: awb: Use gains from color temperature curve ipa: rkisp1: Damp color temperature regulation ipa: rkisp: awb: Set rgb mean limits to 180 ipa: rkisp1: awb: Take the CCM into account for the AWB gains calculation ipa: rkisp1: awb: Avoid division by zero include/libcamera/internal/matrix.h | 35 ++++++++++++++++ include/libcamera/internal/vector.h | 9 +++++ src/ipa/rkisp1/algorithms/awb.cpp | 62 ++++++++++++++++++----------- src/ipa/rkisp1/algorithms/ccm.cpp | 2 +- src/ipa/rkisp1/algorithms/lsc.cpp | 6 +-- src/ipa/rkisp1/ipa_context.h | 12 ++++-- src/libcamera/matrix.cpp | 20 ++++++++++ src/libcamera/vector.cpp | 10 +++++ 8 files changed, 124 insertions(+), 32 deletions(-)