From patchwork Tue Oct 5 07:31:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 14045 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 617F3BDC71 for ; Tue, 5 Oct 2021 07:31:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2FFE1691BC; Tue, 5 Oct 2021 09:31:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oIG/GuAf"; dkim-atps=neutral Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F000691AD for ; Tue, 5 Oct 2021 09:31:26 +0200 (CEST) Received: by mail-pg1-x536.google.com with SMTP id e7so18994187pgk.2 for ; Tue, 05 Oct 2021 00:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sD+G4dXPqVKcTTthftsISBS4v0B+kI9t9hVidH3zJz0=; b=oIG/GuAf/BMP+JyGdokQxJjEovg6XKIb49XIZLAzaWCqKbwxNUtYJo3sgCjthPFPQF 5zhcW9gM+ExBRGsn+0c+13KuYYwcxmbGq8PEPz0kkkFmDMkZGZ6pZ4Gp0C+060DmZaZH AyxZMzGqyh63qs7MCem/pKrPyu8SkUrBqYbzc= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=sD+G4dXPqVKcTTthftsISBS4v0B+kI9t9hVidH3zJz0=; b=w4XTF5DnxdNYUNOmSKaLvP0HMiEjCwcWaM0uriooD4NxdPy1n4Xbnfs3VlVTu5kQh9 IPu/tT0B+DQRJDtdnWOnABMvfmStnwOyRDjIPtdjF+ct3IoXtw/AXSLBP5xDYPDmc30O bTdUCFPKHQclcUCOef88Y3a/UUlSI5mfYUKlZ8gn53NAMWpMJTCmYAbLfX6wGkWaAEe2 GMH0DsbsK0RZo49rjvEDwBDaCd4oMFzhFrFbYqug2AQ+yrbp3PJ1+t6ByYrKhkF8zOEG n2O+3DfnwKeQtiC3USb0Agtr6+b4NTivxw0QTkV9wf2vXo9TIFjuAbMQx3qJ2QCilqgp gIXQ== X-Gm-Message-State: AOAM530PeXmRsf0xS4To7gZej6IU4qBgmldihHviTXvJETotEl54Y+W9 PEXB1Yb4l1CF5tQ5ijpbMGJp8r1mGb235Q== X-Google-Smtp-Source: ABdhPJyQvOTfpLdmNA4QypooDfIPSv+Q7q7/bPE8Ari6xvZ6y42Yd3SwiBSl4+hZvYvVgWU0CUsJrg== X-Received: by 2002:a05:6a00:16cb:b0:44b:bd38:e068 with SMTP id l11-20020a056a0016cb00b0044bbd38e068mr30476151pfc.34.1633419084782; Tue, 05 Oct 2021 00:31:24 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:debc:d0db:3bd8:f961]) by smtp.gmail.com with ESMTPSA id o14sm16761812pfh.145.2021.10.05.00.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 00:31:24 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 5 Oct 2021 16:31:09 +0900 Message-Id: <20211005073114.3997303-2-hiroh@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20211005073114.3997303-1-hiroh@chromium.org> References: <20211005073114.3997303-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 1/6] ipa: raspberrypi: agc: Remove using namespace in agc.hpp 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" "using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in agc.hpp. Signed-off-by: Hirokazu Honda --- src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 +++++++ src/ipa/raspberrypi/controller/rpi/agc.hpp | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index 289c1fce..f6a9cb0a 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -22,6 +22,7 @@ using namespace RPiController; using namespace libcamera; using libcamera::utils::Duration; +using namespace std::literals::chrono_literals; LOG_DEFINE_CATEGORY(RPiAgc) @@ -159,6 +160,12 @@ void AgcConfig::Read(boost::property_tree::ptree const ¶ms) default_analogue_gain = params.get("default_analogue_gain", 1.0); } +Agc::ExposureValues::ExposureValues() + : shutter(0s), analogue_gain(0), + total_exposure(0s), total_exposure_no_dg(0s) +{ +} + Agc::Agc(Controller *controller) : AgcAlgorithm(controller), metering_mode_(nullptr), exposure_mode_(nullptr), constraint_mode_(nullptr), diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp index 82063636..c100d312 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.hpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp @@ -24,8 +24,6 @@ namespace RPiController { -using namespace std::literals::chrono_literals; - struct AgcMeteringMode { double weights[AGC_STATS_SIZE]; void Read(boost::property_tree::ptree const ¶ms); @@ -112,8 +110,8 @@ private: uint64_t frame_count_; AwbStatus awb_; struct ExposureValues { - ExposureValues() : shutter(0s), analogue_gain(0), - total_exposure(0s), total_exposure_no_dg(0s) {} + ExposureValues(); + libcamera::utils::Duration shutter; double analogue_gain; libcamera::utils::Duration total_exposure;