From patchwork Wed Jul 27 08:55:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 16844 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 2A173C3275 for ; Wed, 27 Jul 2022 08:55:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CE92663329; Wed, 27 Jul 2022 10:55:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658912146; bh=uV+b4/p+XoTU3kGaC2bVyANWaENg0m5o4x3QwaV8kss=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=V335Va9mGA6IPSJawCW4WTxYqKMtOcl/Br6xH4g3gv05CzoiLNEDQDG7mLXqO5Nit CEATIwQGcEdnDOOoZNJxjh8PZhqCzTXTaBlh41Belay3BPiDYIkmqtxGWIVGASlH0c BBrwMqxwVqEAKxbIsjV8D3KV6jrTwHJ3VHAJBwiXlGcuN1ElzyhyXx6c+Nku3L23wM huviT+IEyweT84dznfXT8kDcGJWell5tj3KcL+E7iNffv7C0pzyXxP1ZzE57s62deM 8+7gdZCCVaSU+vfxGcqdD1x7W++9uuHe/p3JbC+qLTpbSBgwrN2A145JsEe6cuCUTC zHLr/fnvK8Tew== Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2264663317 for ; Wed, 27 Jul 2022 10:55:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="i0uLKP/L"; dkim-atps=neutral Received: by mail-wr1-x430.google.com with SMTP id v17so4302552wrr.10 for ; Wed, 27 Jul 2022 01:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4GOE19+aLl33czo+TaTv1ukOtk3l3EiGN5X495ux0nM=; b=i0uLKP/LEJTBbJbpcxnNi7sirKEjOvz59tWOZT4/Us8XwnljEig2cPg46e3jbbBBQX hctiARdRnjZpWJrD6t3/3XM3VKl6Odoc69MNe8s/WAea+A/+TWpVmPE3edfC0UKSsi7J 7S47Z8/Zl6xtPEk/8WySZQUFLitFj1RosXk749ltpp01zvQ7VRWzgkIoMgoY+YrrO8Z3 L1uKARNXIycDCWZL+MdAamFeKwbOE70jR/GxHfL8o+/1IqufxYmlaVOUwZzzz9eePZck rJ0yrtTJ/RZmZCZaq2ZpRNe0zbb4J1wqAF0Dw786gqGKQs/LxTF7fK+Txl41a/q9Xy5i 6jrA== 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=4GOE19+aLl33czo+TaTv1ukOtk3l3EiGN5X495ux0nM=; b=bLaGmbZg7LCG4uOvV/dFnb26DYbWZp9I1nNvTGKBkqAIgZRGgpiR7pu4+/BLNZrWmL U1GzV8WYzDIGgiBXQML0Yo/GJuB1lA6ldR+4mu6e0k8h4ClvmtfKO7HX927h9f5+Yle+ N1oXeGlD7KZUjQEFHF3bnzfPE3/36LyxcGt2qI7xLBgH+PK5Evp4EXUlkkfd4bmsCkhF 99Qjaz7nF4jp1++r57EbJD+Y19vHPQEluijkgZ042NDxqcqOivCcCqSwX6erKRF4kjBo xinImT7zlyZVNYfRREP6v8CW7wnxfoOvqrsCfRAPS/h2n8/IA7nnhaTijTp0Gc+nse2F fd5A== X-Gm-Message-State: AJIora9wa+OmIQJVenyaGQVp8SyIbgrU+wXXOJNvPA/TL9bbcxAvEFBU BsQhwUfj4X6/q7vtGzSsJ7+3eOPQky2mDQ== X-Google-Smtp-Source: AGRyM1uz9aQ489E4vTw82yLPHZMt35Fdxz7JsohjB5TsaDShHBFj8U+gzarfKioIU0StE1nDdSskBg== X-Received: by 2002:a5d:5960:0:b0:21e:84ff:caac with SMTP id e32-20020a5d5960000000b0021e84ffcaacmr9727981wri.255.1658912138491; Wed, 27 Jul 2022 01:55:38 -0700 (PDT) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id v3-20020a1cac03000000b003a0375c4f73sm1559408wme.44.2022.07.27.01.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 01:55:37 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Jul 2022 09:55:24 +0100 Message-Id: <20220727085524.13290-9-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220727085524.13290-1-naush@raspberrypi.com> References: <20220727085524.13290-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 8/8] ipa: raspberrypi: agc: Fix log message prefixes 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Remove "Agc:" as that gets prefixed by the logging system. s/AgcConfig/AgcMeteringMode/ and s/AgcConfig/AgcMeteringMode where appropriate. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/agc.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index e0c174b6580d..adec8592626d 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -35,11 +35,11 @@ void AgcMeteringMode::read(boost::property_tree::ptree const ¶ms) int num = 0; for (auto &p : params.get_child("weights")) { if (num == AgcStatsSize) - LOG(RPiAgc, Fatal) << "AgcConfig: too many weights"; + LOG(RPiAgc, Fatal) << "AgcMeteringMode: too many weights"; weights[num++] = p.second.get_value(); } if (num != AgcStatsSize) - LOG(RPiAgc, Fatal) << "AgcConfig: insufficient weights"; + LOG(RPiAgc, Fatal) << "AgcMeteringMode: insufficient weights"; } static std::string @@ -79,10 +79,10 @@ void AgcExposureMode::read(boost::property_tree::ptree const ¶ms) int numAgs = readList(gain, params.get_child("gain")); if (numShutters < 2 || numAgs < 2) LOG(RPiAgc, Fatal) - << "AgcConfig: must have at least two entries in exposure profile"; + << "AgcExposureMode: must have at least two entries in exposure profile"; if (numShutters != numAgs) LOG(RPiAgc, Fatal) - << "AgcConfig: expect same number of exposure and gain entries in exposure profile"; + << "AgcExposureMode: expect same number of exposure and gain entries in exposure profile"; } static std::string @@ -464,7 +464,7 @@ void Agc::housekeepConfig() if (strcmp(meteringModeName_.c_str(), status_.meteringMode)) { auto it = config_.meteringModes.find(meteringModeName_); if (it == config_.meteringModes.end()) - LOG(RPiAgc, Fatal) << "Agc: no metering mode " << meteringModeName_; + LOG(RPiAgc, Fatal) << "No metering mode " << meteringModeName_; meteringMode_ = &it->second; copyString(meteringModeName_, status_.meteringMode, sizeof(status_.meteringMode)); @@ -472,7 +472,7 @@ void Agc::housekeepConfig() if (strcmp(exposureModeName_.c_str(), status_.exposureMode)) { auto it = config_.exposureModes.find(exposureModeName_); if (it == config_.exposureModes.end()) - LOG(RPiAgc, Fatal) << "Agc: no exposure profile " << exposureModeName_; + LOG(RPiAgc, Fatal) << "No exposure profile " << exposureModeName_; exposureMode_ = &it->second; copyString(exposureModeName_, status_.exposureMode, sizeof(status_.exposureMode)); @@ -481,7 +481,7 @@ void Agc::housekeepConfig() auto it = config_.constraintModes.find(constraintModeName_); if (it == config_.constraintModes.end()) - LOG(RPiAgc, Fatal) << "Agc: no constraint list " << constraintModeName_; + LOG(RPiAgc, Fatal) << "No constraint list " << constraintModeName_; constraintMode_ = &it->second; copyString(constraintModeName_, status_.constraintMode, sizeof(status_.constraintMode)); @@ -498,7 +498,7 @@ void Agc::fetchCurrentExposure(Metadata *imageMetadata) DeviceStatus *deviceStatus = imageMetadata->getLocked("device.status"); if (!deviceStatus) - LOG(RPiAgc, Fatal) << "Agc: no device metadata"; + LOG(RPiAgc, Fatal) << "No device metadata"; current_.shutter = deviceStatus->shutterSpeed; current_.analogueGain = deviceStatus->analogueGain; AgcStatus *agcStatus = @@ -513,7 +513,7 @@ void Agc::fetchAwbStatus(Metadata *imageMetadata) awb_.gainG = 1.0; awb_.gainB = 1.0; if (imageMetadata->get("awb.status", awb_) != 0) - LOG(RPiAgc, Debug) << "Agc: no AWB status found"; + LOG(RPiAgc, Debug) << "No AWB status found"; } static double computeInitialY(bcm2835_isp_stats *stats, AwbStatus const &awb, @@ -570,7 +570,7 @@ void Agc::computeGain(bcm2835_isp_stats *statistics, Metadata *imageMetadata, struct LuxStatus lux = {}; lux.lux = 400; /* default lux level to 400 in case no metadata found */ if (imageMetadata->get("lux.status", lux) != 0) - LOG(RPiAgc, Warning) << "Agc: no lux level found"; + LOG(RPiAgc, Warning) << "No lux level found"; Histogram h(statistics->hist[0].g_hist, NUM_HISTOGRAM_BINS); double evGain = status_.ev * config_.baseEv; /*