[{"id":24170,"web_url":"https://patchwork.libcamera.org/comment/24170/","msgid":"<YuCcwpDrQTY0Beco@pendragon.ideasonboard.com>","date":"2022-07-27T02:02:42","subject":"Re: [libcamera-devel] [PATCH 17/17] ipa: raspberrypi: agc: Fix log\n\tmessage prefixes","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Tue, Jul 26, 2022 at 01:45:49PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Remove \"Agc:\" as that gets prefixed by the logging system.\n> s/AgcConfig/AgcMeteringMode/ and s/AgcConfig/AgcMeteringMode where appropriate.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/agc.cpp | 20 ++++++++++----------\n>  1 file changed, 10 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> index e0c174b6580d..adec8592626d 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> @@ -35,11 +35,11 @@ void AgcMeteringMode::read(boost::property_tree::ptree const &params)\n>  \tint num = 0;\n>  \tfor (auto &p : params.get_child(\"weights\")) {\n>  \t\tif (num == AgcStatsSize)\n> -\t\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: too many weights\";\n> +\t\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: too many weights\";\n>  \t\tweights[num++] = p.second.get_value<double>();\n>  \t}\n>  \tif (num != AgcStatsSize)\n> -\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: insufficient weights\";\n> +\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: insufficient weights\";\n>  }\n>  \n>  static std::string\n> @@ -79,10 +79,10 @@ void AgcExposureMode::read(boost::property_tree::ptree const &params)\n>  \tint numAgs = readList(gain, params.get_child(\"gain\"));\n>  \tif (numShutters < 2 || numAgs < 2)\n>  \t\tLOG(RPiAgc, Fatal)\n> -\t\t\t<< \"AgcConfig: must have at least two entries in exposure profile\";\n> +\t\t\t<< \"AgcExposureMode: must have at least two entries in exposure profile\";\n>  \tif (numShutters != numAgs)\n>  \t\tLOG(RPiAgc, Fatal)\n> -\t\t\t<< \"AgcConfig: expect same number of exposure and gain entries in exposure profile\";\n> +\t\t\t<< \"AgcExposureMode: expect same number of exposure and gain entries in exposure profile\";\n>  }\n>  \n>  static std::string\n> @@ -464,7 +464,7 @@ void Agc::housekeepConfig()\n>  \tif (strcmp(meteringModeName_.c_str(), status_.meteringMode)) {\n>  \t\tauto it = config_.meteringModes.find(meteringModeName_);\n>  \t\tif (it == config_.meteringModes.end())\n> -\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no metering mode \" << meteringModeName_;\n> +\t\t\tLOG(RPiAgc, Fatal) << \"No metering mode \" << meteringModeName_;\n>  \t\tmeteringMode_ = &it->second;\n>  \t\tcopyString(meteringModeName_, status_.meteringMode,\n>  \t\t\t   sizeof(status_.meteringMode));\n> @@ -472,7 +472,7 @@ void Agc::housekeepConfig()\n>  \tif (strcmp(exposureModeName_.c_str(), status_.exposureMode)) {\n>  \t\tauto it = config_.exposureModes.find(exposureModeName_);\n>  \t\tif (it == config_.exposureModes.end())\n> -\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no exposure profile \" << exposureModeName_;\n> +\t\t\tLOG(RPiAgc, Fatal) << \"No exposure profile \" << exposureModeName_;\n>  \t\texposureMode_ = &it->second;\n>  \t\tcopyString(exposureModeName_, status_.exposureMode,\n>  \t\t\t   sizeof(status_.exposureMode));\n> @@ -481,7 +481,7 @@ void Agc::housekeepConfig()\n>  \t\tauto it =\n>  \t\t\tconfig_.constraintModes.find(constraintModeName_);\n>  \t\tif (it == config_.constraintModes.end())\n> -\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no constraint list \" << constraintModeName_;\n> +\t\t\tLOG(RPiAgc, Fatal) << \"No constraint list \" << constraintModeName_;\n>  \t\tconstraintMode_ = &it->second;\n>  \t\tcopyString(constraintModeName_, status_.constraintMode,\n>  \t\t\t   sizeof(status_.constraintMode));\n> @@ -498,7 +498,7 @@ void Agc::fetchCurrentExposure(Metadata *imageMetadata)\n>  \tDeviceStatus *deviceStatus =\n>  \t\timageMetadata->getLocked<DeviceStatus>(\"device.status\");\n>  \tif (!deviceStatus)\n> -\t\tLOG(RPiAgc, Fatal) << \"Agc: no device metadata\";\n> +\t\tLOG(RPiAgc, Fatal) << \"No device metadata\";\n>  \tcurrent_.shutter = deviceStatus->shutterSpeed;\n>  \tcurrent_.analogueGain = deviceStatus->analogueGain;\n>  \tAgcStatus *agcStatus =\n> @@ -513,7 +513,7 @@ void Agc::fetchAwbStatus(Metadata *imageMetadata)\n>  \tawb_.gainG = 1.0;\n>  \tawb_.gainB = 1.0;\n>  \tif (imageMetadata->get(\"awb.status\", awb_) != 0)\n> -\t\tLOG(RPiAgc, Debug) << \"Agc: no AWB status found\";\n> +\t\tLOG(RPiAgc, Debug) << \"No AWB status found\";\n>  }\n>  \n>  static double computeInitialY(bcm2835_isp_stats *stats, AwbStatus const &awb,\n> @@ -570,7 +570,7 @@ void Agc::computeGain(bcm2835_isp_stats *statistics, Metadata *imageMetadata,\n>  \tstruct LuxStatus lux = {};\n>  \tlux.lux = 400; /* default lux level to 400 in case no metadata found */\n>  \tif (imageMetadata->get(\"lux.status\", lux) != 0)\n> -\t\tLOG(RPiAgc, Warning) << \"Agc: no lux level found\";\n> +\t\tLOG(RPiAgc, Warning) << \"No lux level found\";\n>  \tHistogram h(statistics->hist[0].g_hist, NUM_HISTOGRAM_BINS);\n>  \tdouble evGain = status_.ev * config_.baseEv;\n>  \t/*","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D7266C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 02:02:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 92F4263312;\n\tWed, 27 Jul 2022 04:02:45 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FE27603E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jul 2022 04:02:44 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D030E56D;\n\tWed, 27 Jul 2022 04:02:43 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658887365;\n\tbh=oUYS0fXi35hPHjPWc0zbUWk7A9uRtRHoxuYSslFGoWM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=0Y9C66Yfc1PAgsQuK0wr+qdU2XW3yZArwiiUWgIMU39vwtp34TOshvvdWqkyVSgV4\n\tHEokXLTSjJcpgNyTmTcit50Hi+lOT+XtEt1qOTD17JN4lMyeGdP7wC2HBRNpSEIjS8\n\tn2GN/Ii8TRGkAr8TQpznC9DnZeMjWYMOZw7aW6EQyWXd8WmvCy0yN0Sc28YGbrT79b\n\tXIlmfvDCc/JJ363VfYFwh/l1TJpMG2VOGVxkikhyDGqEFSEYD4uA4AQkCDCf6EhWqD\n\t7u1nt6coL2qUtpqGAOkROTNISU7lRvnC5Bf64rfb4ms+EJp8/q0Ub1IgrltaR9v5tm\n\tnWrOEMVMrZ9uA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658887364;\n\tbh=oUYS0fXi35hPHjPWc0zbUWk7A9uRtRHoxuYSslFGoWM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PKQI8Bg2OqmUkmDEvxMOl5EYZlepkmWfiFaFpxVIXavw6Qg5Ru9z27paEa2I+VCFC\n\ttZMc+aYlwO6daYbbdNBuxmAHnDYGliqGCwHR7XKP+NhDFdsf1KJhcutDvlDDozeSVu\n\t/tPRSVNckmIgCmiYMlOwOWQrAt9Ed9izhHhET+yo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"PKQI8Bg2\"; dkim-atps=neutral","Date":"Wed, 27 Jul 2022 05:02:42 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YuCcwpDrQTY0Beco@pendragon.ideasonboard.com>","References":"<20220726124549.1646-1-naush@raspberrypi.com>\n\t<20220726124549.1646-18-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220726124549.1646-18-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 17/17] ipa: raspberrypi: agc: Fix log\n\tmessage prefixes","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]