From patchwork Tue Nov 19 10:37:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 21991 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 4DB6DC32F3 for ; Tue, 19 Nov 2024 10:37:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C237965EFE; Tue, 19 Nov 2024 11:37:56 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BNW5RqAT"; 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 0313865EEB for ; Tue, 19 Nov 2024 11:37:54 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bf40:cdab:103d:2270]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B4F4A22E; Tue, 19 Nov 2024 11:37:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732012656; bh=+9NCLHCV4TXAoJSrKjWZezx5weZo1lkOVwm504PS+rc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BNW5RqATt28bIqOwW6GC8AAhUG2a8q5K2uArNpkTi+vxh8dVMOnuAeb1Slabqt1zm Pi/c5pkohgR9SDn2UeFEMwSFGQ6Krvq2xswHsvP9yhZNfMQahI8ME0LMYmpR6zMjSK c56fOuOKgHuglwTRrnvHFUQb+6gYOIT3EDORchHU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 3/9] libcamera: internal: Move Matrix class into libcamera namespace Date: Tue, 19 Nov 2024 11:37:30 +0100 Message-ID: <20241119103740.1919807-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241119103740.1919807-1-stefan.klug@ideasonboard.com> References: <20241119103740.1919807-1-stefan.klug@ideasonboard.com> 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" The Matrix class no longer lives inside lipipa. Move it into the libcamera namespace to account for that. Signed-off-by: Stefan Klug Reviewed-by: Laurent Pinchart --- include/libcamera/internal/matrix.h | 14 +++++--------- src/libcamera/matrix.cpp | 6 +----- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h index 5471e6975b74..3701d0ee980b 100644 --- a/include/libcamera/internal/matrix.h +++ b/include/libcamera/internal/matrix.h @@ -19,8 +19,6 @@ namespace libcamera { LOG_DECLARE_CATEGORY(Matrix) -namespace ipa { - #ifndef __DOXYGEN__ template> * = nullptr> @@ -166,24 +164,22 @@ Matrix operator+(const Matrix &m1, const Matrix -std::ostream &operator<<(std::ostream &out, const ipa::Matrix &m) +std::ostream &operator<<(std::ostream &out, const Matrix &m) { out << m.toString(); return out; } template -struct YamlObject::Getter> { - std::optional> get(const YamlObject &obj) const +struct YamlObject::Getter> { + std::optional> get(const YamlObject &obj) const { - if (!ipa::matrixValidateYaml(obj, Rows * Cols)) + if (!matrixValidateYaml(obj, Rows * Cols)) return std::nullopt; - ipa::Matrix matrix; + Matrix matrix; T *data = &matrix[0][0]; unsigned int i = 0; diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index 8346f0d34160..55359aa206ee 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -5,7 +5,7 @@ * Matrix and related operations */ -#include "matrix.h" +#include "libcamera/internal/matrix.h" #include @@ -18,8 +18,6 @@ namespace libcamera { LOG_DEFINE_CATEGORY(Matrix) -namespace ipa { - /** * \class Matrix * \brief Matrix class @@ -144,6 +142,4 @@ bool matrixValidateYaml(const YamlObject &obj, unsigned int size) } #endif /* __DOXYGEN__ */ -} /* namespace ipa */ - } /* namespace libcamera */