[{"id":28025,"web_url":"https://patchwork.libcamera.org/comment/28025/","msgid":"<s25wtx3xgr3so2adx3yexobxoqsl4dkt6lzxfek6ebqhifsdqj@2dkw7q4ka7m4>","date":"2023-10-23T08:57:08","subject":"Re: [libcamera-devel] [PATCH v6 21/12] libcamera: transform: Make\n\tthe transformFromOrientation() function static","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Laurent\n\nOn Mon, Oct 23, 2023 at 01:41:59AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Now that the transformFromOrientation() function isn't used outside of\n> transform.cpp, make it static to remove it from the public API.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/transform.h | 1 -\n>  src/libcamera/transform.cpp   | 4 ++++\n>  2 files changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h\n> index 4998a6c04cb7..44cb4c6fc974 100644\n> --- a/include/libcamera/transform.h\n> +++ b/include/libcamera/transform.h\n> @@ -71,7 +71,6 @@ constexpr Transform operator~(Transform t)\n>  }\n>\n>  Transform transformFromRotation(int angle, bool *success = nullptr);\n\nam I wrong or you can now remove this one as well ?\n\n> -Transform transformFromOrientation(const Orientation &orientation);\n>\n>  Transform operator/(const Orientation &o1, const Orientation &o2);\n>  Orientation operator*(const Orientation &o, const Transform &t);\n> diff --git a/src/libcamera/transform.cpp b/src/libcamera/transform.cpp\n> index cd2717c28c3a..fb2d55ac1931 100644\n> --- a/src/libcamera/transform.cpp\n> +++ b/src/libcamera/transform.cpp\n> @@ -301,6 +301,8 @@ Transform transformFromRotation(int angle, bool *success)\n>  \treturn Transform::Identity;\n>  }\n>\n> +namespace {\n> +\n>  /**\n>   * \\brief Return the transform representing \\a orientation\n>   * \\param[in] orientation The orientation to convert\n> @@ -330,6 +332,8 @@ Transform transformFromOrientation(const Orientation &orientation)\n>  \treturn Transform::Identity;\n>  }\n>\n> +} /* namespace */\n> +\n>  /**\n>   * \\brief Return the Transform that applied to \\a o2 gives \\a o1\n>   * \\param o1 The Orientation to obtain\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B5AE5C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Oct 2023 08:57:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2324D62980;\n\tMon, 23 Oct 2023 10:57:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 58C6E60556\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Oct 2023 10:57:12 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 93764D20;\n\tMon, 23 Oct 2023 10:57:01 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1698051433;\n\tbh=/oCwpXuhi171Ayz5D6YL2okMMeClXTbiQkYIBvTb7wc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=t8S3bziL9HEGtjehb5L7WPkrROhAr1BytYie2Qx9ULd3fcyGi6OE9lzbSPsRQJVTw\n\tENeNs+JyStxz7ns+9XWHXQFQ3sFmzC24PuXHIpDjKHGlC7TOIYL8YvukrsPpmx6NpG\n\t5k90IY1q1Cfop1LF7lGOvegJY5S0MlmnDfhcVjRMPzTwNPQGFR90JD9cTGqWT/VTSu\n\twPwPeCWAo8UC4/P4N16CsLt7aJAjfL2H9CDzhyOr7uG+m/2HwAH8doL6Nw/lc1MK/9\n\tbCs+pnQOK59kKiPWlB6u7aWsORA23CvpVyoT5qZftT/Z8S+EbxNW3L4tZrxpjLxd8V\n\tmW39PJ8fmxalA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1698051421;\n\tbh=/oCwpXuhi171Ayz5D6YL2okMMeClXTbiQkYIBvTb7wc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IhB0eXrf9+W1vtoIl+OeOpoAZy9st8/Q8NCmBf9p4JY+SNPFdpw/yBb87PXi5fWYv\n\tv8PcmrfezPI0q7+3jvQj93Z9xErwwA9ly3rC0Lt4onNmADS/YV/5LsaLvZWoQoWL6l\n\tfW5PJgpz1YDr2twP1pRrxz0maNk3jySk2N/82OT4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IhB0eXrf\"; dkim-atps=neutral","Date":"Mon, 23 Oct 2023 10:57:08 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<s25wtx3xgr3so2adx3yexobxoqsl4dkt6lzxfek6ebqhifsdqj@2dkw7q4ka7m4>","References":"<20231019140133.32090-1-jacopo.mondi@ideasonboard.com>\n\t<20231022224159.30298-9-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20231022224159.30298-9-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 21/12] libcamera: transform: Make\n\tthe transformFromOrientation() function static","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28028,"web_url":"https://patchwork.libcamera.org/comment/28028/","msgid":"<20231023102111.GF3336@pendragon.ideasonboard.com>","date":"2023-10-23T10:21:11","subject":"Re: [libcamera-devel] [PATCH v6 21/12] libcamera: transform: Make\n\tthe transformFromOrientation() function static","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Oct 23, 2023 at 10:57:08AM +0200, Jacopo Mondi wrote:\n> On Mon, Oct 23, 2023 at 01:41:59AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > Now that the transformFromOrientation() function isn't used outside of\n> > transform.cpp, make it static to remove it from the public API.\n> >\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  include/libcamera/transform.h | 1 -\n> >  src/libcamera/transform.cpp   | 4 ++++\n> >  2 files changed, 4 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h\n> > index 4998a6c04cb7..44cb4c6fc974 100644\n> > --- a/include/libcamera/transform.h\n> > +++ b/include/libcamera/transform.h\n> > @@ -71,7 +71,6 @@ constexpr Transform operator~(Transform t)\n> >  }\n> >\n> >  Transform transformFromRotation(int angle, bool *success = nullptr);\n> \n> am I wrong or you can now remove this one as well ?\n\nAs noted in the cover letter, it's used by the Python bindings. I would\nlike to drop it, and rewrite the Python Transform class in pure Python.\n\n> > -Transform transformFromOrientation(const Orientation &orientation);\n> >\n> >  Transform operator/(const Orientation &o1, const Orientation &o2);\n> >  Orientation operator*(const Orientation &o, const Transform &t);\n> > diff --git a/src/libcamera/transform.cpp b/src/libcamera/transform.cpp\n> > index cd2717c28c3a..fb2d55ac1931 100644\n> > --- a/src/libcamera/transform.cpp\n> > +++ b/src/libcamera/transform.cpp\n> > @@ -301,6 +301,8 @@ Transform transformFromRotation(int angle, bool *success)\n> >  \treturn Transform::Identity;\n> >  }\n> >\n> > +namespace {\n> > +\n> >  /**\n> >   * \\brief Return the transform representing \\a orientation\n> >   * \\param[in] orientation The orientation to convert\n> > @@ -330,6 +332,8 @@ Transform transformFromOrientation(const Orientation &orientation)\n> >  \treturn Transform::Identity;\n> >  }\n> >\n> > +} /* namespace */\n> > +\n> >  /**\n> >   * \\brief Return the Transform that applied to \\a o2 gives \\a o1\n> >   * \\param o1 The Orientation to obtain","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 61B84BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Oct 2023 10:21:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1DC646297F;\n\tMon, 23 Oct 2023 12:21:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F86A61DCE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Oct 2023 12:21:03 +0200 (CEST)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A2156D20;\n\tMon, 23 Oct 2023 12:20:52 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1698056464;\n\tbh=kAlSVwkZxXubHHCfOvg19yd4lKF2aM2EngAzjYTdqro=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=femb3tLc6s2mQpY+yEKLrcJ2G66tyeQdaEFLTDvGMVgqUhVm2KZVgovwqLo30lLk9\n\t3n//u0xH2lo3L0hr4m8KpEfkTtmw5Ev+LwFu99PTkgwrG0YBGtP/LFY8E5Qf1vhvmI\n\tOPN89RG425LbpCfqexHPD6ZGqAXeUMa1B8k0peDqVVFhPNV2M1r2QUR+b8PBIcgZY8\n\tlHejPNCR3BWRvn0kQV2KafnWa3vVCvq4utYuqPwBNuRcbQtqD9uaGB9bsXiQsLiUeq\n\t8n5uQW+T8wyP8iKsA4ti9G0ujA5utpy6uWaqx6PYeWv0WO4NttPIW0liw0SPvo2y87\n\tjvYx69dW7+eNg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1698056452;\n\tbh=kAlSVwkZxXubHHCfOvg19yd4lKF2aM2EngAzjYTdqro=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=N652cNXi1yVaPIRl6rrilooydpJN5jNyRij1lsgKOVLVufx6x2rADjghTyEHm2Laj\n\tYTZRl1HchCnVRavXikbQgYdYZT75lnkNxymz1TeA5Bef+sWtxi1EG/i50oTGRd4X3J\n\t19IRnZf092XwkjXQ3MvHNCO72Osjlcrxowzu4MfY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"N652cNXi\"; dkim-atps=neutral","Date":"Mon, 23 Oct 2023 13:21:11 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20231023102111.GF3336@pendragon.ideasonboard.com>","References":"<20231019140133.32090-1-jacopo.mondi@ideasonboard.com>\n\t<20231022224159.30298-9-laurent.pinchart@ideasonboard.com>\n\t<s25wtx3xgr3so2adx3yexobxoqsl4dkt6lzxfek6ebqhifsdqj@2dkw7q4ka7m4>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<s25wtx3xgr3so2adx3yexobxoqsl4dkt6lzxfek6ebqhifsdqj@2dkw7q4ka7m4>","Subject":"Re: [libcamera-devel] [PATCH v6 21/12] libcamera: transform: Make\n\tthe transformFromOrientation() function static","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]