From patchwork Tue Nov 19 10:37:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 21988 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 DAEE3C326B for ; Tue, 19 Nov 2024 10:37:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 865A765EF1; Tue, 19 Nov 2024 11:37:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EA/GID2/"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 519B365EEB for ; Tue, 19 Nov 2024 11:37:45 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bf40:cdab:103d:2270]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E9DB922E; Tue, 19 Nov 2024 11:37:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732012648; bh=kwBdIlhh5y8hqwKpABGcYHpqfIGb+wX9xi+p2KasLi0=; h=From:To:Cc:Subject:Date:From; b=EA/GID2/rbKfhl12ITXbmDjC4NuqtM4Pg1rX6OCtZ+Ug3GXSofAiFLtkVrp4HAS3i S8NMcMbHuH99w8MAMqis2hwRpApxlQYuG3lPSKBbGue/hTLTvwonPQJajTENTrC2pB HM0fd6kW18+++4dPL9sWXhTED/+dOQavBHrBCaFc= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 0/9] ove Matrix class from libipa to libcamera Date: Tue, 19 Nov 2024 11:37:27 +0100 Message-ID: <20241119103740.1919807-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, but only compile tested for the RaspberryPi. Regards, Stefan 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 | 4 +- src/ipa/rkisp1/algorithms/ccm.h | 3 +- src/ipa/rkisp1/ipa_context.h | 2 +- src/ipa/rpi/controller/rpi/ccm.cpp | 58 +++++-------------- src/ipa/rpi/controller/rpi/ccm.h | 35 +---------- src/{ipa/libipa => libcamera}/matrix.cpp | 8 +-- src/libcamera/meson.build | 1 + 10 files changed, 33 insertions(+), 97 deletions(-) rename {src/ipa/libipa => include/libcamera/internal}/matrix.h (91%) rename src/{ipa/libipa => libcamera}/matrix.cpp (97%)