[{"id":29892,"web_url":"https://patchwork.libcamera.org/comment/29892/","msgid":"<ZmqprHBXtfzuaecp@pyrite.rasen.tech>","date":"2024-06-13T08:11:24","subject":"Re: [PATCH 11/11] ipa: libipa: pwl: Drop readYaml() function","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Thu, Jun 13, 2024 at 04:39:44AM +0300, Laurent Pinchart wrote:\n> All users of the Pwl::readYaml() function have been removed. The\n> function is not used, and is deprecated in favour of YamlObject::get().\n> Drop it.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/pwl.cpp | 38 --------------------------------------\n>  src/ipa/libipa/pwl.h   |  2 --\n>  2 files changed, 40 deletions(-)\n> \n> diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\n> index 3c639645fa3d..9b213754ec7d 100644\n> --- a/src/ipa/libipa/pwl.cpp\n> +++ b/src/ipa/libipa/pwl.cpp\n> @@ -125,44 +125,6 @@ Pwl::Pwl(std::vector<Point> &&points)\n>  {\n>  }\n>  \n> -/**\n> - * \\brief Populate the piecewise linear function from yaml data\n> - * \\param[in] params Yaml data to populate the piecewise linear function with\n> - *\n> - * Any existing points in the piecewise linear function *will* be overwritten.\n> - *\n> - * The yaml data is expected to be a list with an even number of numerical\n> - * elements. These will be parsed in pairs into x and y points in the piecewise\n> - * linear function, and added in order. x must be monotonically increasing.\n> - *\n> - * \\return 0 on success, negative error code otherwise\n> - */\n> -int Pwl::readYaml(const libcamera::YamlObject &params)\n> -{\n> -\tif (!params.size() || params.size() % 2)\n> -\t\treturn -EINVAL;\n> -\n> -\tconst auto &list = params.asList();\n> -\n> -\tpoints_.clear();\n> -\n> -\tfor (auto it = list.begin(); it != list.end(); it++) {\n> -\t\tauto x = it->get<double>();\n> -\t\tif (!x)\n> -\t\t\treturn -EINVAL;\n> -\t\tif (it != list.begin() && *x <= points_.back().x())\n> -\t\t\treturn -EINVAL;\n> -\n> -\t\tauto y = (++it)->get<double>();\n> -\t\tif (!y)\n> -\t\t\treturn -EINVAL;\n> -\n> -\t\tpoints_.push_back(Point({ *x, *y }));\n> -\t}\n> -\n> -\treturn 0;\n> -}\n> -\n>  /**\n>   * \\brief Append a point to the end of the piecewise linear function\n>   * \\param[in] x x-coordinate of the point to add to the piecewise linear function\n> diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\n> index 8edb4d33dc71..b6f93494d807 100644\n> --- a/src/ipa/libipa/pwl.h\n> +++ b/src/ipa/libipa/pwl.h\n> @@ -49,8 +49,6 @@ public:\n>  \tPwl(const std::vector<Point> &points);\n>  \tPwl(std::vector<Point> &&points);\n>  \n> -\tint readYaml(const libcamera::YamlObject &params);\n> -\n>  \tvoid append(double x, double y, double eps = 1e-6);\n>  \n>  \tbool empty() const { return points_.empty(); }","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 DD023C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 08:11:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A39DC6548E;\n\tThu, 13 Jun 2024 10:11:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 62DA06548C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 10:11:31 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp\n\t[175.177.49.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C23DBEB;\n\tThu, 13 Jun 2024 10:11:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kPgr0pKP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718266277;\n\tbh=S74MWMYKjgYPJ01pvtgtlLDVzym0okdmETSUNDJ4IQs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=kPgr0pKP+GikaPwDx9Gt5snVCgRXAtrW68f0t0SrOYbpYNA10b9GNG0SXrs8oKwbW\n\t6EaRPPfw8wn6dyvXtLbuBj8sUCCE4hZFig8nzNG6O4b2GHbjYE4FpLENNVztlYiC71\n\tDdNCXvmbAU+qYWHMLTk6/sr6ygf7HAWGsl+ltvOA=","Date":"Thu, 13 Jun 2024 17:11:24 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Subject":"Re: [PATCH 11/11] ipa: libipa: pwl: Drop readYaml() function","Message-ID":"<ZmqprHBXtfzuaecp@pyrite.rasen.tech>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-12-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240613013944.23344-12-laurent.pinchart@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29919,"web_url":"https://patchwork.libcamera.org/comment/29919/","msgid":"<171827869511.1550852.10836877510209709587@ping.linuxembedded.co.uk>","date":"2024-06-13T11:38:15","subject":"Re: [PATCH 11/11] ipa: libipa: pwl: Drop readYaml() function","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-13 02:39:44)\n> All users of the Pwl::readYaml() function have been removed. The\n> function is not used, and is deprecated in favour of YamlObject::get().\n> Drop it.\n\n\nThis one will be dependant upon an Ack from RPi for the preceeding patch\n... but given that:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/libipa/pwl.cpp | 38 --------------------------------------\n>  src/ipa/libipa/pwl.h   |  2 --\n>  2 files changed, 40 deletions(-)\n> \n> diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\n> index 3c639645fa3d..9b213754ec7d 100644\n> --- a/src/ipa/libipa/pwl.cpp\n> +++ b/src/ipa/libipa/pwl.cpp\n> @@ -125,44 +125,6 @@ Pwl::Pwl(std::vector<Point> &&points)\n>  {\n>  }\n>  \n> -/**\n> - * \\brief Populate the piecewise linear function from yaml data\n> - * \\param[in] params Yaml data to populate the piecewise linear function with\n> - *\n> - * Any existing points in the piecewise linear function *will* be overwritten.\n> - *\n> - * The yaml data is expected to be a list with an even number of numerical\n> - * elements. These will be parsed in pairs into x and y points in the piecewise\n> - * linear function, and added in order. x must be monotonically increasing.\n> - *\n> - * \\return 0 on success, negative error code otherwise\n> - */\n> -int Pwl::readYaml(const libcamera::YamlObject &params)\n> -{\n> -       if (!params.size() || params.size() % 2)\n> -               return -EINVAL;\n> -\n> -       const auto &list = params.asList();\n> -\n> -       points_.clear();\n> -\n> -       for (auto it = list.begin(); it != list.end(); it++) {\n> -               auto x = it->get<double>();\n> -               if (!x)\n> -                       return -EINVAL;\n> -               if (it != list.begin() && *x <= points_.back().x())\n> -                       return -EINVAL;\n> -\n> -               auto y = (++it)->get<double>();\n> -               if (!y)\n> -                       return -EINVAL;\n> -\n> -               points_.push_back(Point({ *x, *y }));\n> -       }\n> -\n> -       return 0;\n> -}\n> -\n>  /**\n>   * \\brief Append a point to the end of the piecewise linear function\n>   * \\param[in] x x-coordinate of the point to add to the piecewise linear function\n> diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\n> index 8edb4d33dc71..b6f93494d807 100644\n> --- a/src/ipa/libipa/pwl.h\n> +++ b/src/ipa/libipa/pwl.h\n> @@ -49,8 +49,6 @@ public:\n>         Pwl(const std::vector<Point> &points);\n>         Pwl(std::vector<Point> &&points);\n>  \n> -       int readYaml(const libcamera::YamlObject &params);\n> -\n>         void append(double x, double y, double eps = 1e-6);\n>  \n>         bool empty() const { return points_.empty(); }\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 320F3C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 11:38:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E4CA965497;\n\tThu, 13 Jun 2024 13:38:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C72CC6548E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 13:38:17 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D06194CF;\n\tThu, 13 Jun 2024 13:38:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pEWQ9616\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718278683;\n\tbh=u1n6CverPkUvlpP1ng7E9g5R2p0VCGGZyKeohOFZdxI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=pEWQ9616ERM/Pm4kwKqzDiE7ZftbgPTm11a8A4d7Unyx2Fqo/yCXC+bfqTGfgRYav\n\tapanCp9ONYhr8IPt8z+qKNWhEYn/pEJFsgf9cIDaaMk3vZjalDwFhZAdoiMc/a3wPt\n\t0uFnf7IngXnQi9DEN+5fM1QN8iFzigxJxbdXmYMw=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240613013944.23344-12-laurent.pinchart@ideasonboard.com>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-12-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 11/11] ipa: libipa: pwl: Drop readYaml() function","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Paul Elder <paul.elder@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 13 Jun 2024 12:38:15 +0100","Message-ID":"<171827869511.1550852.10836877510209709587@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]