From patchwork Sun Oct 22 22:41:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19171 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 94AC7C327D for ; Sun, 22 Oct 2023 22:42:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB8CF6298B; Mon, 23 Oct 2023 00:42:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1698014520; bh=68riQlISkZJCXaML5fDwxRa+HhSre6E/lhJjRdCvqrY=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ut0REliPP/1mXBqj7GbZz2CpUcA2smVy6eid0ao7L5MrMqa1SjJk5Uxj1D+rOZ7/y q3N1M8f32DZ6DVXUUWThpi7knN5yHw2b4bnBl1s/JTaCpbCKRDBCK2JNPM5OHuvuCy 7+s3/sM8CK1wmmIULDd/e/aSwm5PBKm9wUsYvbTdRx4ImGIXdsAcUwMe0Rsw1dZNBe k8MbiZuCucGPpGR8SrDnQTxUxsDT+odejV115FQeNm9uqzDkMxFfbcQ6GIBs/j8Cyv uqkwUxAVOGDepHPDJ3oSPGCQDQMOY6odUgFVRKmBvvJevjeq/rRywTroiRWXMgMAyP KtKVwBW7pjHjw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DBB046297F for ; Mon, 23 Oct 2023 00:41:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QB2El6V9"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 80AC2749; Mon, 23 Oct 2023 00:41:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698014505; bh=68riQlISkZJCXaML5fDwxRa+HhSre6E/lhJjRdCvqrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QB2El6V9rNirFrmqLM4zT64Bqg0eoJBQ+pS7FZ8v+5MtVw0Yn5Tdlvu2XNRtuAPlB qEBKZU3LEpN5zNkvRvPtWiAT7BsxM2dWy4ESnlxQqzhqmVIZDIei7Q8X7EmMW7PcgO MIg4hQPl/0ldscf9nYxjetjCNIcWlsxrOOGvXBYs= To: libcamera-devel@lists.libcamera.org Date: Mon, 23 Oct 2023 01:41:54 +0300 Message-ID: <20231022224159.30298-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019140133.32090-1-jacopo.mondi@ideasonboard.com> References: <20231019140133.32090-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 16/12] fixup! libcamera: transform: Invert operator*() operands 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" - Simplify documentation Signed-off-by: Laurent Pinchart --- src/libcamera/transform.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/libcamera/transform.cpp b/src/libcamera/transform.cpp index 85bc2d28b0cd..0ccdb42fa406 100644 --- a/src/libcamera/transform.cpp +++ b/src/libcamera/transform.cpp @@ -193,21 +193,18 @@ Input image | | goes to output image | | * \param[in] t0 The first transform to apply * \param[in] t1 The second transform to apply * - * Compose two transforms by applying \a t1 after \a t0. The operation - * is conceptually equivalent to the canonical notion of function composition, - * with inverse order of operands. If in the canonical function composition - * notation "f * g" equals to "f(g())", the notation for Transforms composition - * "t0 * t1" equals to "t1(t0()))" where \a t0 is applied first, then \a t1. - * - * For example, `HFlip * Transpose` performs `HFlip` first and then the - * `Transpose` yielding `Rot270`, as shown below. + * Compose two transforms into a transform that is equivalent to first applying + * \a t0 and then applying \a t1. For example, `HFlip * Transpose` performs + * `HFlip` first and then the `Transpose` yielding `Rot270`, as shown below. ~~~ A-B B-A B-D Input image | | -> HFLip -> | | -> Transpose -> | | = Rot270 C-D D-C A-C ~~~ - * Note that composition is generally non-commutative for Transforms, - * and not the same as XOR-ing the underlying bit representations. + * Note that composition is generally non-commutative for Transforms, and not + * the same as XOR-ing the underlying bit representations. + * + * \return A Transform equivalent to applying \a t0 and then \a t1 */ Transform operator*(Transform t0, Transform t1) {