Show a patch.

GET /api/patches/17697/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17697,
    "url": "https://patchwork.libcamera.org/api/patches/17697/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17697/",
    "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": "<20221027055515.321791-7-nicholas@rothemail.net>",
    "date": "2022-10-27T05:55:11",
    "name": "[libcamera-devel,06/10] ipa: replaces abs() with std::abs()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f0522321abad622dafc19e4f4c345c32312cbeb1",
    "submitter": {
        "id": 97,
        "url": "https://patchwork.libcamera.org/api/people/97/?format=api",
        "name": "Nicolas Dufresne via libcamera-devel",
        "email": "libcamera-devel@lists.libcamera.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17697/mbox/",
    "series": [
        {
            "id": 3579,
            "url": "https://patchwork.libcamera.org/api/series/3579/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3579",
            "date": "2022-10-27T05:55:08",
            "name": "[libcamera-devel,01/10] ipa: workaround libcxx duration limitation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3579/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17697/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17697/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 BD70FC3285\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 05:55:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 66ADC62F89;\n\tThu, 27 Oct 2022 07:55:33 +0200 (CEST)",
            "from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com\n\t[IPv6:2001:4860:4864:20::2a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE3B862F76\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 07:55:26 +0200 (CEST)",
            "by mail-oa1-x2a.google.com with SMTP id\n\t586e51a60fabf-13b103a3e5dso702137fac.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Oct 2022 22:55:26 -0700 (PDT)",
            "from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:6406:fc7a:e46d:1666])\n\tby smtp.gmail.com with ESMTPSA id\n\t9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Oct 2022 22:55:25 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666850133;\n\tbh=3SsAYU1JMVdyMQ/zKyB1Y/Gfebk17k1NLKqdg6/vOfI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3Y/6G/zIwfLIJUP++Z9M1XnJnsz6XZMhehB1SnWMeP5yZfZ4kduEkobi7dhB/m0Ec\n\teT+d9eBpsjFHYFdLuhjmQsOXaHdFOFWWuGD1bjaB0aSdoMqcXlhZXbS95inm3yQrBE\n\t9kJ9EVpSVhI4+fM7Az9fWpQhA13wAii//WLa3UNLM11MBeO6MvYMQPD4QPLo2nHDgU\n\tPgat5YhjxDDudpa46EOr6G+EJa/urJKzEVGbnTw+K297xupalj2qvpiw+0P2UZiR11\n\t3YjT0S9qutFGRCVo1nJMp1Vc3RH9W4H/kD16bbSnx+u+Vg49O46SWK1JiYDXwlSwJ7\n\tUNMqZUCZ7Vh5g==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=RPptAfrtD7k2o7VEK6frv0lekwlYg6ZLNrxS93bfFPA=;\n\tb=pJy5FlJoD1blm4OaOMfnlZWYNN6eXTUzFa4+GmZqKnMZ+hm+mVCSDl+48YN2XzjSnP\n\tkJqQUvifes1NouZJTbUD2ot0G82GxcGsHHFG4RyBPyE2TAn38xh/g6eXiTyPR6EXxR/1\n\tXf3WDe/HTuTfg80ZzdR7h3i0gjyx1+h88JqOS5P8n/ran6q2b6MI12y7sg5AHKGU5cv6\n\tBF0JWAr9+tSj4IO41ibrE8I91WQBJRzTuGh5CbD68mgmUj7KUsVGaRw8/uQbExwEplQR\n\tvmcy0M7i3TOW4o5eAzx/lKi2trpIAqP17GiPurBhVFPBKbcoCWotXaLK3KaAUzwwarMy\n\tVoTg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"pJy5FlJo\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=RPptAfrtD7k2o7VEK6frv0lekwlYg6ZLNrxS93bfFPA=;\n\tb=uWA3bvcBYVhwyKnV3iv4AnRClmKbPAI2s9Uk3fTOCwBb8OBOPFmhhegk36WMh25NND\n\tiQ8/ScT5mkYWwzzfzLHnKw3qte+l+ATV3uB7x1mytKUVX2lIQtS89MspInzU936PifSQ\n\t1QbUDjaH5jDiWg0MM5wv7OmMzYtYtLONjcLhBNpKs5xozQx8E1q4+6VFHA6BG8CipMN9\n\tFpl3bXvX6yBQiG3lbe5iqQLwdxT4gzGRst1ZeZFrLYf7fOmagDu9tCYFYRZFxYqYXgXe\n\tfpJoTJyeI8SHxcOi8fEmLJSNkgxYV5qbbL7+oeXvQyg2qvmB4AOubnFSypgVNU6pgQaW\n\tjHnw==",
        "X-Gm-Message-State": "ACrzQf16AkZJBEa4ft9sPrVk4gdvKliLQ2L/GlDiYfzjjuupt75mP25f\n\tWwPyomU7pSVYOw5luCUwV8pGgcAewEj7yTgs",
        "X-Google-Smtp-Source": "AMsMyM6de7wW9IZUXlh3Q72VpYqii8C+S+ajK54vfH1U00uLXs9b6nYn22vGnjapsV/pwL7Xi3NGYA==",
        "X-Received": "by 2002:a05:6871:794:b0:12c:4bff:341d with SMTP id\n\to20-20020a056871079400b0012c4bff341dmr4425623oap.127.1666850125230; \n\tWed, 26 Oct 2022 22:55:25 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 27 Oct 2022 00:55:11 -0500",
        "Message-Id": "<20221027055515.321791-7-nicholas@rothemail.net>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221027055515.321791-1-nicholas@rothemail.net>",
        "References": "<libcamera Android Enhancements>\n\t<20221027055515.321791-1-nicholas@rothemail.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 06/10] ipa: replaces abs() with std::abs()",
        "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": "Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "libcamera-devel@lists.libcamera.org",
        "Cc": "nicholas@rothemail.net",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Nicholas Roth <nicholas@rothemail.net>\n\npwl.cpp uses abs() instead of std::abs(), which causes unexpected\nbehavior in the Clang compiler used for Android. Replace with\nC++-standard absolute value function std::abs(), which supports\ndouble-precision absolute values in a standard way.\n\nSigned-off-by: Nicholas Roth <nicholas@rothemail.net>\n---\n src/ipa/raspberrypi/controller/pwl.cpp | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/pwl.cpp b/src/ipa/raspberrypi/controller/pwl.cpp\nindex c59f5fa1..70c2e24b 100644\n--- a/src/ipa/raspberrypi/controller/pwl.cpp\n+++ b/src/ipa/raspberrypi/controller/pwl.cpp\n@@ -6,6 +6,7 @@\n  */\n \n #include <cassert>\n+#include <cmath>\n #include <stdexcept>\n \n #include \"pwl.h\"\n@@ -168,7 +169,7 @@ Pwl Pwl::compose(Pwl const &other, const double eps) const\n \twhile (thisSpan != (int)points_.size() - 1) {\n \t\tdouble dx = points_[thisSpan + 1].x - points_[thisSpan].x,\n \t\t       dy = points_[thisSpan + 1].y - points_[thisSpan].y;\n-\t\tif (abs(dy) > eps &&\n+\t\tif (std::abs(dy) > eps &&\n \t\t    otherSpan + 1 < (int)other.points_.size() &&\n \t\t    points_[thisSpan + 1].y >=\n \t\t\t    other.points_[otherSpan + 1].x + eps) {\n@@ -181,7 +182,7 @@ Pwl Pwl::compose(Pwl const &other, const double eps) const\n \t\t\t\t points_[thisSpan].y) *\n \t\t\t\t\tdx / dy;\n \t\t\tthisY = other.points_[++otherSpan].x;\n-\t\t} else if (abs(dy) > eps && otherSpan > 0 &&\n+\t\t} else if (std::abs(dy) > eps && otherSpan > 0 &&\n \t\t\t   points_[thisSpan + 1].y <=\n \t\t\t\t   other.points_[otherSpan - 1].x - eps) {\n \t\t\t/*\n",
    "prefixes": [
        "libcamera-devel",
        "06/10"
    ]
}