From 09c291192c58fcf37a997aab273e3b0409a79277 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 26 Sep 2024 12:29:28 +0300 Subject: ipa: rpi: Replace last users of math.h As described in the coding style document, libcamera favours over . Replace the last few occurrences of the latter with the former in the Raspberry Pi IPA and adapt the code accordingly. In some cases, the include is simply dropped as it isn't needed. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck --- src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ipa/rpi/cam_helper/cam_helper_imx290.cpp') diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp index 24275e12..e57ab538 100644 --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp @@ -5,7 +5,7 @@ * camera helper for imx290 sensor */ -#include +#include #include "cam_helper.h" @@ -37,13 +37,13 @@ CamHelperImx290::CamHelperImx290() uint32_t CamHelperImx290::gainCode(double gain) const { - int code = 66.6667 * log10(gain); + int code = 66.6667 * std::log10(gain); return std::max(0, std::min(code, 0xf0)); } double CamHelperImx290::gain(uint32_t gainCode) const { - return pow(10, 0.015 * gainCode); + return std::pow(10, 0.015 * gainCode); } void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay, -- cgit v1.2.1