[{"id":39874,"web_url":"https://patchwork.libcamera.org/comment/39874/","msgid":"<amdjVqnXi9x_v6Ax@zed>","date":"2026-07-27T13:56:38","subject":"Re: [RFC PATCH v2 23/43] ipa: libipa: agc: Adjust debug messages\n\tslightly","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Thu, Jul 23, 2026 at 05:43:06PM +0200, Barnabás Pőcze wrote:\n> The log message showing the result of AGC seems too verbose to me,\n> and the labels and values are far from each other. And also log the\n> line duration when showing exposure and gain limits.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/ipa/libipa/agc.cpp | 15 ++++++++++-----\n>  1 file changed, 10 insertions(+), 5 deletions(-)\n>\n> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp\n> index 8a2525ec98..49b3034746 100644\n> --- a/src/ipa/libipa/agc.cpp\n> +++ b/src/ipa/libipa/agc.cpp\n> @@ -294,8 +294,11 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state, cons\n>  \t};\n>\n>  \tLOG(Agc, Debug)\n> -\t\t<< \"Exposure: [\" << minExposure << \", \" << maxExposure\n> -\t\t<< \"], gain: [\" << minGain << \", \" << maxGain << \"]\";\n> +\t\t<< \"exposure:[\" << minExposure << ',' << maxExposure << ']'\n> +\t\t<< \" gain: [\" << minGain << ',' << maxGain << ']'\n> +\t\t<< \" line-duration:\" << session.lineDuration\n> +\t\t<< \" sensor-output:\" << session.sensor.outputSize\n> +\t;\n\nwhy ; on a separate line ?\n>\n>  \t/*\n>  \t * Compute the frame duration limits.\n> @@ -615,9 +618,11 @@ void AgcAlgorithm::process(const agc::Session &session, agc::ActiveState &state,\n>  \t\t});\n>\n>  \t\tLOG(Agc, Debug)\n> -\t\t\t<< \"Divided up exposure time, analogue gain, quantization gain\"\n> -\t\t\t<< \" and digital gain are \" << newEv.exposureTime << \", \" << newEv.analogueGain\n> -\t\t\t<< \", \" << newEv.quantizationGain << \" and \" << newEv.digitalGain;\n> +\t\t\t<< \"exposure-time:\" << newEv.exposureTime\n> +\t\t\t<< \" analogue-gain\" << newEv.analogueGain\n> +\t\t\t<< \" quantization-gain\" << newEv.quantizationGain\n> +\t\t\t<< \" digital-gain: \" << newEv.digitalGain\n> +\t\t;\n\nsame question\n\nThe message is certainly easier to read in this format\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n>\n>  \t\t/* Update the estimated exposure and gain. */\n>  \t\tstate.automatic.exposure = clampExposure(newEv.exposureTime, session);\n> --\n> 2.55.0\n>","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 3C8A0BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2026 13:56:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 523ED67F7B;\n\tMon, 27 Jul 2026 15:56:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E617267EB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 15:56:41 +0200 (CEST)","from ideasonboard.com (mob-5-90-50-102.net.vodafone.it\n\t[5.90.50.102])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E7DD2492;\n\tMon, 27 Jul 2026 15:55:37 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"oOkriB8l\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785160538;\n\tbh=RVWiDcHONX3F6L4/rVxHis7J4v2Hw2DbD0esze6C/3k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oOkriB8lclZjf9aS3Lo4LAw0anGiH1Kmva0m15DKHurAUcHebR5AVhchT274fZsER\n\t9aXiiiGN5Sv1wp1sy6Sg439/IGRNxQx/l9W9FvTJjaumuEb7CTxoospxI6ptHE1AyS\n\tmqzqzWSuKbrgSgM+g8XS2dfsBK/i2NoFnMQB4v5w=","Date":"Mon, 27 Jul 2026 15:56:38 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 23/43] ipa: libipa: agc: Adjust debug messages\n\tslightly","Message-ID":"<amdjVqnXi9x_v6Ax@zed>","References":"<20260723154327.1357866-1-barnabas.pocze@ideasonboard.com>\n\t<20260723154327.1357866-24-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260723154327.1357866-24-barnabas.pocze@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39886,"web_url":"https://patchwork.libcamera.org/comment/39886/","msgid":"<23ec7731-44f2-49c1-92e6-d7b28a73babc@ideasonboard.com>","date":"2026-07-27T15:01:34","subject":"Re: [RFC PATCH v2 23/43] ipa: libipa: agc: Adjust debug messages\n\tslightly","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 07. 27. 15:56 keltezéssel, Jacopo Mondi írta:\n> Hi Barnabás\n> \n> On Thu, Jul 23, 2026 at 05:43:06PM +0200, Barnabás Pőcze wrote:\n>> The log message showing the result of AGC seems too verbose to me,\n>> and the labels and values are far from each other. And also log the\n>> line duration when showing exposure and gain limits.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   src/ipa/libipa/agc.cpp | 15 ++++++++++-----\n>>   1 file changed, 10 insertions(+), 5 deletions(-)\n>>\n>> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp\n>> index 8a2525ec98..49b3034746 100644\n>> --- a/src/ipa/libipa/agc.cpp\n>> +++ b/src/ipa/libipa/agc.cpp\n>> @@ -294,8 +294,11 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state, cons\n>>   \t};\n>>\n>>   \tLOG(Agc, Debug)\n>> -\t\t<< \"Exposure: [\" << minExposure << \", \" << maxExposure\n>> -\t\t<< \"], gain: [\" << minGain << \", \" << maxGain << \"]\";\n>> +\t\t<< \"exposure:[\" << minExposure << ',' << maxExposure << ']'\n>> +\t\t<< \" gain: [\" << minGain << ',' << maxGain << ']'\n>> +\t\t<< \" line-duration:\" << session.lineDuration\n>> +\t\t<< \" sensor-output:\" << session.sensor.outputSize\n>> +\t;\n> \n> why ; on a separate line ?\n\nAhh, it's something I like to do in order not to have to shuffle the `;` all\nthe time, but clang-format does not seem to like it too much, so I'll adjust it.\n\n\n>>\n>>   \t/*\n>>   \t * Compute the frame duration limits.\n>> @@ -615,9 +618,11 @@ void AgcAlgorithm::process(const agc::Session &session, agc::ActiveState &state,\n>>   \t\t});\n>>\n>>   \t\tLOG(Agc, Debug)\n>> -\t\t\t<< \"Divided up exposure time, analogue gain, quantization gain\"\n>> -\t\t\t<< \" and digital gain are \" << newEv.exposureTime << \", \" << newEv.analogueGain\n>> -\t\t\t<< \", \" << newEv.quantizationGain << \" and \" << newEv.digitalGain;\n>> +\t\t\t<< \"exposure-time:\" << newEv.exposureTime\n>> +\t\t\t<< \" analogue-gain\" << newEv.analogueGain\n>> +\t\t\t<< \" quantization-gain\" << newEv.quantizationGain\n>> +\t\t\t<< \" digital-gain: \" << newEv.digitalGain\n>> +\t\t;\n> \n> same question\n> \n> The message is certainly easier to read in this format\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> \n>>\n>>   \t\t/* Update the estimated exposure and gain. */\n>>   \t\tstate.automatic.exposure = clampExposure(newEv.exposureTime, session);\n>> --\n>> 2.55.0\n>>","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 5CD45BDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2026 15:01:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0350167F85;\n\tMon, 27 Jul 2026 17:01:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4FAB67EB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 17:01:37 +0200 (CEST)","from [192.168.33.46] (185.182.215.156.nat.pool.zt.hu\n\t[185.182.215.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C1CA33A4;\n\tMon, 27 Jul 2026 17:00:33 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"par1toVC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785164433;\n\tbh=vq1Y3IcDhoBSn4pUmYjdeT6gr/RyhOoq9jQmMlD5Ij8=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=par1toVCrfKRFXHmfq8ytezU3DWqMWlTXjCUISU0LH304xEMteVjaqCdXyB5fQZDs\n\tH8FCgnZXOIJ5sMj95JT5a7MhM40R9Od8D4JEpEOIXhZN3/HJ6QJoEfbW+1OuzUQJkw\n\tKhSWe9usRO//9JttHINhw/cjg87juvdylKwT6AGw=","Message-ID":"<23ec7731-44f2-49c1-92e6-d7b28a73babc@ideasonboard.com>","Date":"Mon, 27 Jul 2026 17:01:34 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 23/43] ipa: libipa: agc: Adjust debug messages\n\tslightly","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260723154327.1357866-1-barnabas.pocze@ideasonboard.com>\n\t<20260723154327.1357866-24-barnabas.pocze@ideasonboard.com>\n\t<amdjVqnXi9x_v6Ax@zed>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<amdjVqnXi9x_v6Ax@zed>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]