From patchwork Fri Oct 15 17:02:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 14159 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id ADD9BC323E for ; Fri, 15 Oct 2021 17:03:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EE2F168F4C; Fri, 15 Oct 2021 19:03:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dz7LMoou"; dkim-atps=neutral Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6CC0768546 for ; Fri, 15 Oct 2021 19:03:47 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id y3so27727928wrl.1 for ; Fri, 15 Oct 2021 10:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=se3vj5OP9K26Z5z9tfTTWup2/I/ja7b2Clsz+l5kkoQ=; b=dz7LMoou8EHb+luHeD+FgsFBsSwaEyN16d8fh48A5Pznxdy51jk2gIfrNVYGWADwdZ 7mBseJzeHCwScTk9hraRMnaFkwnqRtSWcLM+WWsWLVHdaf9jPImGcrsUY3maimEQq06K aFLNzf+F5MFj6ONG1P+DZFZ2TNICi6XezI1uBd8YPGuG22F3BhajZ5lPUkoO3d34EQot bULLOvqPPjow+oZE6l0WHc3wEU8iCkiOTMEAt2T1QlKoVzJvXPEl8DLRBYvXGGm4dJdm NCkSkMejHlw5QSC2KgWcEAvDCQc0miuZ7MX8nqtvNTGtSsqNGzjkjrIjrr63kYVrI/AV xkOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=se3vj5OP9K26Z5z9tfTTWup2/I/ja7b2Clsz+l5kkoQ=; b=YKmEkcEfpnXUKs1vmVcpVSWCoagIkxjREEkmRG6H4IKJySBZyOyRzjYBjsiABbHg0v cL0KOLuk9XF66b7GsJ0bFUBa91st+OVlm4GJlhCdATeoMcF4vqKZuPy2U7g11BqfN8Tc YUtgyoDLiREeIza8DqPEH4nrjWnxIDAqHS67NkDKl262ZHGIwvie/OwFAbjXZeRp4nmR VF07HrsnYD/XsmoAxr5PJfJYalh6CxXVOe1qR/Vsx8r2d5fgJyxv7Jr8SWG16J2uCVzV 2p9fHJoBgXNVqkG4R4g9Xk+4InbKhUm44gU63MV09JPZRsA9aYrA48rCU9u42hN12dvj vDhA== X-Gm-Message-State: AOAM5304ALWZDfoWr+yuKf21Tis8lrYIIO3asKso0xsfswwFZ89EvkUQ fSMmgxAnMQR25+2VnO7FcypSPdpiQmg= X-Google-Smtp-Source: ABdhPJwwCcq01mB2vrlJJ6is23vv90kD1yk9bVZ8UQAQRg+Sy7lbk8z23pPsBjgtyimw9bEaHx+g1A== X-Received: by 2002:adf:ba0d:: with SMTP id o13mr15479414wrg.339.1634317426807; Fri, 15 Oct 2021 10:03:46 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1732-95.w86-253.abo.wanadoo.fr. [86.253.44.95]) by smtp.gmail.com with ESMTPSA id 25sm11103859wmo.18.2021.10.15.10.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 10:03:46 -0700 (PDT) From: Fabrice Fontaine To: libcamera-devel@lists.libcamera.org Date: Fri, 15 Oct 2021 19:02:32 +0200 Message-Id: <20211015170232.1146000-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp: drop constexpr for division X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" For an unknown reason, build fails with some embedded toolchains since commit 92b8ccc42a0f3ad323c79bde3c132d6956011239 on: In file included from ../include/libcamera/base/log.h:10, from ../src/ipa/raspberrypi/raspberrypi.cpp:18: ../src/ipa/raspberrypi/raspberrypi.cpp:64:53: in 'constexpr' expansion of 'std::chrono::operator/, double>(std::literals::chrono_literals::operator""s(1.0e+0l), 3.0e+1)' /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 3.0e+1)' is not a constant expression 502 | return __cd(__cd(__d).count() / __s); ../src/ipa/raspberrypi/raspberrypi.cpp:73:56: in 'constexpr' expansion of 'std::chrono::operator/, double>(std::literals::chrono_literals::operator""s(1.0e+0l), 6.0e+1)' /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 6.0e+1)' is not a constant expression So drop constexpr for both divisions to fix this build failure. Fixes: - http://autobuild.buildroot.org/results/49caebe7ef7e3d63de49e78d5d6839dd0aedf10c Signed-off-by: Fabrice Fontaine --- src/ipa/raspberrypi/raspberrypi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index fed82e22..8ffb7092 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -61,7 +61,7 @@ using utils::Duration; /* Configure the sensor with these values initially. */ constexpr double defaultAnalogueGain = 1.0; constexpr Duration defaultExposureTime = 20.0ms; -constexpr Duration defaultMinFrameDuration = 1.0s / 30.0; +Duration defaultMinFrameDuration = 1.0s / 30.0; constexpr Duration defaultMaxFrameDuration = 250.0s; /* @@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDuration = 250.0s; * we rate-limit the controller Prepare() and Process() calls to lower than or * equal to this rate. */ -constexpr Duration controllerMinFrameDuration = 1.0s / 60.0; +Duration controllerMinFrameDuration = 1.0s / 60.0; LOG_DEFINE_CATEGORY(IPARPI)