{"id":17681,"url":"https://patchwork.libcamera.org/api/patches/17681/?format=json","web_url":"https://patchwork.libcamera.org/patch/17681/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221024055543.116040-7-nicholas@rothemail.net>","date":"2022-10-24T05:55:38","name":"[libcamera-devel,06/11] Replaces abs() with std::abs(), which supports double-precision in clang.","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f0522321abad622dafc19e4f4c345c32312cbeb1","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/?format=json","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17681/mbox/","series":[{"id":3575,"url":"https://patchwork.libcamera.org/api/series/3575/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3575","date":"2022-10-24T05:55:33","name":"[libcamera-devel,01/11] Fixes Bug 156, which breaks libcamera on Android < 12.","version":1,"mbox":"https://patchwork.libcamera.org/series/3575/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17681/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17681/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 D1A53BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Oct 2022 05:56:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4ACDD62F07;\n\tMon, 24 Oct 2022 07:56:01 +0200 (CEST)","from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com\n\t[IPv6:2607:f8b0:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6406862EFD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Oct 2022 07:55:58 +0200 (CEST)","by mail-ot1-x32e.google.com with SMTP id\n\tr8-20020a056830120800b00661a0a236efso5375895otp.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 Oct 2022 22:55:58 -0700 (PDT)","from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:7bc3:aed3:676f:10a0])\n\tby smtp.gmail.com with ESMTPSA id\n\tx15-20020a9d628f000000b0066193df8edasm3980278otk.34.2022.10.23.22.55.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 23 Oct 2022 22:55:56 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666590961;\n\tbh=breCCh63FsMp5+MEBP3jhEKp5No/51/koZTax1ibB2Y=;\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=hUVw9SomDfsqoP1xIJH3tEvdiogSEnFQ5qHbyulTDfjD5ZfEXYl2wGMj4aGTWFpEP\n\t8aax29EC5korTwUZ3LFKIIoYDuuNWZz9S6yI6i6q7QKOxWTxJ6LU/HMi5oRXV3yz1p\n\tLyih8CgnSwY543dHvRjqUTwKaHoUI0YpwQy67Bd2cmKlZOLk9cpDvvk5uOgASMQ1Ks\n\tNE8HJUqv7Xh6H5v1S1gjoOdcJLJ8gXW3o7riF+Mg4IGr1EYRKSSvNRCDdDWeNaFvJg\n\t46rPbNQWkQGWQT8NonDjCLHqfZ9jJ1ANX6vj9waSsu6WTLc1ggUB3NM3sAAil/AMsS\n\tRSPGsLRO2BScw==","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=pZ84C5K1watUpfIy+91HbdonC6HclrfVdxoyKumcppg=;\n\tb=hW1L/Pmd33kK+sG5rgXEY3NkqxeYlH+8gWSOBjQZz7XZjswhJ1at1JE7PBhYxUNOqE\n\tXKATQVtYR1EbPPIHKpa4W4yZnw7EDbpRvKUSSx0oFetY8CMc4AVRCrVSDtbWPfDL9ZqQ\n\tlReoeVPCXE6K6u50MFLHmmCUjE1XWQXvTat3ubIo/M8+IQDuUgVVfqHsZerMNVg4G0BP\n\tl3dLbSp2W5UyQz83Y8wDYLl7bqxlybWOeiEpapveKS6QcCE7tmXCipFsLoeuSwLBurT4\n\tgp1U3geN6OWhquqjnJ7U4hSojMCIT/epjVx3uuzuCzE1D/xbc3a1GDB1/DdXql77ZWb9\n\twe5Q=="],"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=\"hW1L/Pmd\"; \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=pZ84C5K1watUpfIy+91HbdonC6HclrfVdxoyKumcppg=;\n\tb=d6IaY0r1bcMm+bkiVoSmEsBYs/nssN3K0IxEPtniEU+xhvrUFP634GL8HUTWLIfdiV\n\tFRYYhQRl6RXjJKTpNNxoX7uaUeJM+vNmkNBRIgXjU+OlKa3PqA1ibZ4wv3qv0QJCdQfl\n\tqWhPPGrLV6ZUdlaWz7WKWdTXqZob4L/rlM5CTGN0zha4BKI+Ua8BSkW5evfYJoivLus4\n\toZ8TwVijrFMm8jkpd+HwcAvqTxC5w6ayuuHXhMuUXz8WcufSWmlPr1AQg7Y5MHdtWE79\n\toHoOHc8BONBTVDtR6ou8SkwBXRJk40EYypRqgo8sNlO9hiuuCrQhsKqczFvIKnOV/Qu9\n\t9aWA==","X-Gm-Message-State":"ACrzQf0PrEoN2pGrdUGKNQ1dTEUYMnMVnoNSE089a+7maIS798wn1/uW\n\tS2uwR/Vf0dawN4lbVPrTZIn8T9wNoMhizftb","X-Google-Smtp-Source":"AMsMyM6oJEtfCCb+fxuWHMKRuD73NqV5QxZBNbE6bHL9E+4kfFqEuJ7t8+Fjyzy59NpH3rDpzTn9+A==","X-Received":"by 2002:a9d:bd7:0:b0:661:a864:3d9a with SMTP id\n\t81-20020a9d0bd7000000b00661a8643d9amr15830208oth.20.1666590956839; \n\tSun, 23 Oct 2022 22:55:56 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 24 Oct 2022 00:55:38 -0500","Message-Id":"<20221024055543.116040-7-nicholas@rothemail.net>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20221024055543.116040-1-nicholas@rothemail.net>","References":"<20221024055543.116040-1-nicholas@rothemail.net>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 06/11] Replaces abs() with std::abs(),\n\twhich supports double-precision in clang.","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\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/11"]}