From patchwork Sun Nov 17 22:17:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 21930 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 54FE3C32DD for ; Sun, 17 Nov 2024 22:17:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 09E5A658A6; Sun, 17 Nov 2024 23:17:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KEPM4Dal"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BA5560580 for ; Sun, 17 Nov 2024 23:17:22 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C2844F02 for ; Sun, 17 Nov 2024 23:17:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1731881825; bh=dxIjBUzNNTgp1JFpc4Y42TO6E5NlpU/Ihprd7Dtq64g=; h=From:To:Subject:Date:From; b=KEPM4DalgG4t221hOSWb/+Z+2YSIqr2TcjM/MjQmRx+JTeyEYgWX8QjVlw8FpRNV4 t+lFJzgX4acaqX4J8M+nkcACSs3ntle5YWhj7U2r2gH7s3HvPgkBTwz6E6ApNVtjIS R5WH3STFfbvRlwJ21CIcSBcBTxxMHmfjR+ugZc3s= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH 00/11] Improve linear algebra helpers in libipa Date: Mon, 18 Nov 2024 00:17:01 +0200 Message-ID: <20241117221712.29616-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.2 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" Hello, This patch series tries to simplify IPA linear algebra calculations by improving the Vector class API. The first 9 patches improves the Vector class, and the last two patches showcase the improvements this can bring in the rkisp1 AWB algorithm. I'm relatively happy with the result. The only part I'm not sure about is the introduction of the RGB type alias. Laurent Pinchart (11): ipa: libipa: vector: Add mutable x(), y() and z() accessors ipa: libipa: vector: Add r(), g() and b() accessors ipa: libipa: vector: Add copy constructor and assignment operator ipa: libipa: vector: Rename the dot product operator*() to dot() ipa: libipa: vector: Generalize arithmetic operators ipa: libipa: vector: Add missing binary arithemtic operators ipa: libipa: vector: Add compound assignment operators ipa: libipa: vector: Add element-wise min() and max() functions ipa: libipa: vector: Add sum() and normalize() functions ipa: rkisp1: awb: Use RGB class to store colour gains ipa: rkisp1: awb: Replace manual calculations with Vector and Matrix src/ipa/libipa/vector.cpp | 261 ++++++++++++++++++++++++++---- src/ipa/libipa/vector.h | 257 +++++++++++++++++++++++------ src/ipa/rkisp1/algorithms/awb.cpp | 134 +++++++-------- src/ipa/rkisp1/algorithms/awb.h | 2 +- src/ipa/rkisp1/ipa_context.cpp | 31 +--- src/ipa/rkisp1/ipa_context.h | 20 +-- 6 files changed, 505 insertions(+), 200 deletions(-) base-commit: 5c71df927ddaaa01204bff1e647c9d2bf653d95f