From patchwork Tue Jul 26 12:45:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 16790 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 996D9C3275 for ; Tue, 26 Jul 2022 12:46:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 544356331E; Tue, 26 Jul 2022 14:46:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658839580; bh=DxE8dBo/rv4Rlcp2pPCH5zov6CAseOL8fxWnuweXAKw=; 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=ld+dT/iiw5UqZJKwDk3tC8MCg2ByEiM3jwtFURvE2DkZqnlMtCQyTfk52Nmki1kOX /LenHkmXUnRgtsRZ3aoiPXf68mMT6r5l5Ra3xpWnhEAO6PyC+M4Xhrqj/CP31x9kKM 76hhFi+f7wQ4zfv3MSPgfLvaMMasqBvTjqXoDA++UEFn7D7MtQTBusJJZoyCAPi+L+ pVd5ruH4/xoAoTxKs2z0vbhNKyGk5QNpvHKhFEh49E4Xkj8Hp9LCM/uWz2tU535cLQ 19/w70vL9vJEYdxqwG3c7KFz8CsBqVU4Bk3Q6dvbgRioi289sOF3oaCcBmfAN/C4x/ g1wd4NlLRsxuQ== Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 87E2363328 for ; Tue, 26 Jul 2022 14:46:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="fV4gTfRa"; dkim-atps=neutral Received: by mail-wm1-x32f.google.com with SMTP id id17so8680588wmb.1 for ; Tue, 26 Jul 2022 05:46:14 -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=bfohaqFOTzxAW86k8d/5H7qneDIMIk4WF0LigIcU0rE=; b=fV4gTfRanl/gF8KC2SO48GI/nb0tjLV75iutkmZdwUKdluoHHr8imfWu8LGexfK2lT +VxZtRjqhQ31Rvyv1NZ8hQcnUhlDeLmDv5r9mtY9OwMsh/VcxPN4kswhO1wSoAQBMBjn z9hNb8XK5q8X8C8XxTI9wRP4ufwfxepa9AxVWxS5wevwhLFBkD1iFIH2RmukfgLqAvj3 9im1eKBvA/qGeR2EiirMtulFK7b5CvBeyuzW9eKNuToxPp56vJDEP4UiZ2/TA55Rd9/R nsNdnwDvZJc0sIZcZW+9yB6NLOl63eyQBLGSAEqnaEsQMrs0tRNBqNuH4xI+oGkXPHAN 3vww== 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=bfohaqFOTzxAW86k8d/5H7qneDIMIk4WF0LigIcU0rE=; b=kkHn4k5Unq75M2SMAXvjKTWBpgqvu9MGVN/XFnGMKLQ6ApTbt40xBZ4Sw2blN1Eu1+ fQkPV1pwXtjsx0eMSlEkBGCP8Q6Q4QzPG3aSJfPwLymnJOaUudaRa+oSWKpr71z9i4wE 7wWtr1KtSLfto4H9xAg2svkT0NvF0qXodkLDRGIrTZwLRybrH7gSaFZ/iujA+bCWxdC0 kLrB4oo5PMwmXVdXBNt9N5gExV80lV9hdFY4NGcOWOjj7CDBuKBzMQnGQ0eC5X0Ce4Dl s7SkdykTKgzGnT0UrLwiLpJnnUH59ddbZEIOYrfgF7Dtb4PmTYJauz1pQjVmHmauN/VE EJUg== X-Gm-Message-State: AJIora/0EXxtl5jj5BKgCRweiYbdxB2+LVWNc4nmQO+NgEsXwcP7yBv6 Kb5Kv3uOj+so71DOFgnz4ABHE3v9SUPMoA== X-Google-Smtp-Source: AGRyM1sSZi+gM9TeyZGfZBpYh160JZZU/REmuKoa0tsoN0P3WxZ5iyAgB59epX01VXwYkRLkm6qZKw== X-Received: by 2002:a05:600c:3549:b0:3a3:16af:d280 with SMTP id i9-20020a05600c354900b003a316afd280mr23985072wmq.142.1658839574000; Tue, 26 Jul 2022 05:46:14 -0700 (PDT) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id y17-20020adfd091000000b0021e87ec980bsm5948460wrh.84.2022.07.26.05.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:46:13 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Jul 2022 13:45:49 +0100 Message-Id: <20220726124549.1646-18-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220726124549.1646-1-naush@raspberrypi.com> References: <20220726124549.1646-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 17/17] 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; /*