{"id":23753,"url":"https://patchwork.libcamera.org/api/1.1/patches/23753/?format=json","web_url":"https://patchwork.libcamera.org/patch/23753/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250707085520.39777-5-stefan.klug@ideasonboard.com>","date":"2025-07-07T08:55:07","name":"[v3,4/9] libipa: agc_mean_luminance: Add debug logging","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c5d3f472733f6d862afda580b639f39ef7fe95f2","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/1.1/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23753/mbox/","series":[{"id":5273,"url":"https://patchwork.libcamera.org/api/1.1/series/5273/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5273","date":"2025-07-07T08:55:03","name":"Wdr preparations","version":3,"mbox":"https://patchwork.libcamera.org/series/5273/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23753/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23753/checks/","tags":{},"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 25F6CC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jul 2025 08:55:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4ADD168E83;\n\tMon,  7 Jul 2025 10:55:49 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B6BCE68E83\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Jul 2025 10:55:45 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:c79f:85df:e7f5:4c31])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 224BD1942; \n\tMon,  7 Jul 2025 10:55:19 +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=\"kCkVd2n8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751878519;\n\tbh=x3qexoZIskvY3vGUevhjP6zySz/iJV/J1oSl0YrWWCk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kCkVd2n8X/UNo3oVihAlLHANvSLWLsowoTnAKnZOIJICTSUqpJ1YcBFaz7k3ZY+M4\n\tXSxHMQdM65yKT4eXMVV1NnMySUZmpVKxMrNaDkwTTyzrzYoB5stIgndsl6T6BzcBb/\n\tVYYPUgg60uQDlrd5PUQVM9qPzYiwLv3Uu+Lop5C4=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tDaniel Scally <dan.scally@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v3 4/9] libipa: agc_mean_luminance: Add debug logging","Date":"Mon,  7 Jul 2025 10:55:07 +0200","Message-ID":"<20250707085520.39777-5-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.48.1","In-Reply-To":"<20250707085520.39777-1-stefan.klug@ideasonboard.com>","References":"<20250707085520.39777-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","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>"},"content":"When debugging the AEGC it is important to know when the constraints\napply. As this is important information for anyone doing tuning file\noptimization, add it upstream.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nChanges in v3:\n- Fixed line wrapping\n- Collected tags\n\nChanges in v2:\n- Collected tags\n---\n src/ipa/libipa/agc_mean_luminance.cpp | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)","diff":"diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\nindex d37a9b66103f..ebdb4d755741 100644\n--- a/src/ipa/libipa/agc_mean_luminance.cpp\n+++ b/src/ipa/libipa/agc_mean_luminance.cpp\n@@ -467,12 +467,20 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,\n \t\t\t\t hist.interQuantileMean(constraint.qLo, constraint.qHi);\n \n \t\tif (constraint.bound == AgcConstraint::Bound::Lower &&\n-\t\t    newGain > gain)\n+\t\t    newGain > gain) {\n \t\t\tgain = newGain;\n+\t\t\tLOG(AgcMeanLuminance, Debug)\n+\t\t\t\t<< \"Apply lower bound: \" << gain << \" to \"\n+\t\t\t\t<< newGain;\n+\t\t}\n \n \t\tif (constraint.bound == AgcConstraint::Bound::Upper &&\n-\t\t    newGain < gain)\n+\t\t    newGain < gain) {\n \t\t\tgain = newGain;\n+\t\t\tLOG(AgcMeanLuminance, Debug)\n+\t\t\t\t<< \"Apply upper bound: \" << gain << \" to \"\n+\t\t\t\t<< newGain;\n+\t\t}\n \t}\n \n \treturn gain;\n","prefixes":["v3","4/9"]}