From patchwork Wed Nov 20 14:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22031 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 2D6E4C0F2A for ; Wed, 20 Nov 2024 14:28:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5531465F54; Wed, 20 Nov 2024 15:28:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XW0nPN4B"; 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 0586465898 for ; Wed, 20 Nov 2024 15:28:14 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bbd:82cc:f3f3:e12e]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A1B8B55A; Wed, 20 Nov 2024 15:27:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732112875; bh=zvJdYOpt3fBO507EDZl5ex50+LyqHca3THSJFRLcv6k=; h=From:To:Cc:Subject:Date:From; b=XW0nPN4BDySKneTgx/+A/GZbT2BNes7DYtn2uc7sN5F9Lp8ccwATer+lxhF7E/CDx 446EOexRRvuPuejVteXOfvk93/vBRmQcmOgYt4AUMfg67z97r1cFp6NbUVBdKHiHF8 H6z11tvrYdiSX7NTUkz+S1ObMFUSU+t4y0bMAqKU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v3 0/9] Move Matrix class from libipa to libcamera Date: Wed, 20 Nov 2024 15:27:47 +0100 Message-ID: <20241120142807.2093301-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, My upcoming dewarper series implements parametric lens dewarping inside the rkisp1 pipeline. That code makes use of the Matrix class but lives outside of the IPA. I suspect there will be more cases, where a matrix is of good use inside libcamera. This series movies the Matrix into libacmera/internal. As that gets linked to the IPAs anyways, there are no negative effects for the IPAs. This was tested on an imx8mp and the RaspberryPi. Regards, Stefan Changes since v2: - Collected tags - Fixed comments from review - Tested on RaspberryPi Changes since v1: - Split into smaller patches - Replaced the initializer_list based constructor with a std::vector based one to align with Vector - Dropped the Span based constructor as it is not used anywhere Stefan Klug (9): ipa: rpi: Rename Matrix to Matrix3x3 libcamera: Copy Matrix class from libipa to libcamera libcamera: internal: Move Matrix class into libcamera namespace libcamera: internal: matrix: Replace vector with array in constructor libcamera: internal: Add Matrix class to build ipa: rpi: ccm: Replace local matrix implementation with the one from libcamera libipa: Use Matrix class from libcamera rkisp1: Use Matrix class from libcamera libipa: Drop Matrix class .../libcamera/internal}/matrix.h | 16 ++--- include/libcamera/internal/meson.build | 1 + src/ipa/libipa/meson.build | 2 - src/ipa/libipa/vector.h | 3 +- src/ipa/rkisp1/algorithms/ccm.h | 3 +- src/ipa/rkisp1/ipa_context.h | 2 +- src/ipa/rpi/controller/rpi/ccm.cpp | 65 +++++++------------ src/ipa/rpi/controller/rpi/ccm.h | 35 +--------- src/{ipa/libipa => libcamera}/matrix.cpp | 8 +-- src/libcamera/meson.build | 1 + 10 files changed, 39 insertions(+), 97 deletions(-) rename {src/ipa/libipa => include/libcamera/internal}/matrix.h (91%) rename src/{ipa/libipa => libcamera}/matrix.cpp (97%)