Patch Detail
Show a patch.
GET /api/patches/9138/?format=api
{ "id": 9138, "url": "https://patchwork.libcamera.org/api/patches/9138/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9138/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200803141837.398158-1-jacopo@jmondi.org>", "date": "2020-08-03T14:18:37", "name": "[libcamera-devel] libcamera: ipu3: Fix compilation issues with gcc5", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4c9a713150db6d28812de9580d572260d8fc36a8", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9138/mbox/", "series": [ { "id": 1181, "url": "https://patchwork.libcamera.org/api/series/1181/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1181", "date": "2020-08-03T14:18:37", "name": "[libcamera-devel] libcamera: ipu3: Fix compilation issues with gcc5", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1181/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9138/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9138/checks/", "tags": {}, "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 1D0FEBD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Aug 2020 14:15:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0AAE605A9;\n\tMon, 3 Aug 2020 16:15:07 +0200 (CEST)", "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FC3760536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Aug 2020 16:15:06 +0200 (CEST)", "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 6BF0040011;\n\tMon, 3 Aug 2020 14:15:03 +0000 (UTC)" ], "X-Originating-IP": "93.34.118.233", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 3 Aug 2020 16:18:37 +0200", "Message-Id": "<20200803141837.398158-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] libcamera: ipu3: Fix compilation issues\n\twith gcc5", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "GCC5 does not provide prototypes for the math library functions in\nthe std:: namespace.\n\nRemove the namespace specifier to fix build errors reported by\nthat compiler version.\n\nFixes: 968ab9bad0ed (\"libcamera: ipu3: imgu: Calculate ImgU pipe configuration\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n\nLaurent, can you test with gcc and confirm this fixes the issue ?\n\n---\n src/libcamera/pipeline/ipu3/imgu.cpp | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\n--\n2.27.0", "diff": "diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\nindex b7593ceb3672..671a798e69d0 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.cpp\n+++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n@@ -94,7 +94,7 @@ float findScaleFactor(float sf, const std::vector<float> &range,\n \tfloat bestDiff = std::numeric_limits<float>::max();\n \tunsigned int index = 0;\n \tfor (unsigned int i = 0; i < range.size(); ++i) {\n-\t\tfloat diff = std::abs(sf - range[i]);\n+\t\tfloat diff = abs(sf - range[i]);\n \t\tif (diff < bestDiff) {\n \t\t\tbestDiff = diff;\n \t\t\tindex = i;\n@@ -112,7 +112,7 @@ bool isSameRatio(const Size &in, const Size &out)\n \tfloat inRatio = static_cast<float>(in.width) / in.height;\n \tfloat outRatio = static_cast<float>(out.width) / out.height;\n\n-\tif (std::abs(inRatio - outRatio) > 0.1)\n+\tif (abs(inRatio - outRatio) > 0.1)\n \t\treturn false;\n\n \treturn true;\n@@ -136,7 +136,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\twhile (ifHeight >= minIFHeight && ifHeight / bdsSF >= minBDSHeight) {\n\n \t\t\tbdsHeight = ifHeight / bdsSF;\n-\t\t\tif (std::fmod(bdsHeight, 1.0) == 0) {\n+\t\t\tif (fmod(bdsHeight, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n\n \t\t\t\tif (!(bdsIntHeight % BDS_ALIGN_H)) {\n@@ -152,7 +152,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\twhile (ifHeight <= iif.height && ifHeight / bdsSF >= minBDSHeight) {\n\n \t\t\tbdsHeight = ifHeight / bdsSF;\n-\t\t\tif (std::fmod(bdsHeight, 1.0) == 0) {\n+\t\t\tif (fmod(bdsHeight, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n\n \t\t\t\tif (!(bdsIntHeight % BDS_ALIGN_H)) {\n@@ -176,7 +176,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\twhile (ifHeight > minIFHeight && ifHeight / bdsSF >= minBDSHeight) {\n\n \t\t\tbdsHeight = ifHeight / bdsSF;\n-\t\t\tif (std::fmod(ifHeight, 1.0) == 0 && std::fmod(bdsHeight, 1.0) == 0) {\n+\t\t\tif (fmod(ifHeight, 1.0) == 0 && fmod(bdsHeight, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n\n \t\t\t\tif (!(ifHeight % IF_ALIGN_H) &&\n@@ -199,7 +199,7 @@ void calculateBDS(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc, floa\n \twhile (sf <= BDS_SF_MAX && sf >= BDS_SF_MIN) {\n \t\tfloat bdsWidth = static_cast<float>(iif.width) / sf;\n\n-\t\tif (std::fmod(bdsWidth, 1.0) == 0) {\n+\t\tif (fmod(bdsWidth, 1.0) == 0) {\n \t\t\tunsigned int bdsIntWidth = static_cast<unsigned int>(bdsWidth);\n \t\t\tif (!(bdsIntWidth % BDS_ALIGN_W) && bdsWidth >= minBDSWidth)\n \t\t\t\tcalculateBDSHeight(pipe, iif, gdc, bdsIntWidth, sf);\n@@ -212,7 +212,7 @@ void calculateBDS(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc, floa\n \twhile (sf <= BDS_SF_MAX && sf >= BDS_SF_MIN) {\n \t\tfloat bdsWidth = static_cast<float>(iif.width) / sf;\n\n-\t\tif (std::fmod(bdsWidth, 1.0) == 0) {\n+\t\tif (fmod(bdsWidth, 1.0) == 0) {\n \t\t\tunsigned int bdsIntWidth = static_cast<unsigned int>(bdsWidth);\n \t\t\tif (!(bdsIntWidth % BDS_ALIGN_W) && bdsWidth >= minBDSWidth)\n \t\t\t\tcalculateBDSHeight(pipe, iif, gdc, bdsIntWidth, sf);\n", "prefixes": [ "libcamera-devel" ] }