From patchwork Wed Nov 20 14:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22034 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 CCC7EC32F9 for ; Wed, 20 Nov 2024 14:28:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 19E9065F67; Wed, 20 Nov 2024 15:28:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="De7tNf+C"; 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 522E965F4A for ; Wed, 20 Nov 2024 15:28:21 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bbd:82cc:f3f3:e12e]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 361E0AB5; Wed, 20 Nov 2024 15:28:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732112883; bh=cakHjk8du9scU/ZuPpjnr6MJbvnOXeg6PSF9RJyeZW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=De7tNf+CE7wkPnVG2q/VgIh9w4QpthUlS30EevXl2IySdoWijcIMDGX3N2I7ubpAD CksZBQ3bOeT5KVSnv+Ao9dQZUvWV0cg3DoHc1z0j+5pS93UX6CN2/rXy9SCQiSCvcR w00yZZTJismUg63GFJejvN80uVwEpvdqEFVsLZGI= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Laurent Pinchart Subject: [PATCH v3 3/9] libcamera: internal: Move Matrix class into libcamera namespace Date: Wed, 20 Nov 2024 15:27:50 +0100 Message-ID: <20241120142807.2093301-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241120142807.2093301-1-stefan.klug@ideasonboard.com> References: <20241120142807.2093301-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 */