[{"id":33499,"web_url":"https://patchwork.libcamera.org/comment/33499/","msgid":"<174066190167.3679956.13453213361126849005@ping.linuxembedded.co.uk>","date":"2025-02-27T13:11:41","subject":"Re: [PATCH] ipa: rkisp1: Allow exposure time to be shorter than\n\tminimum frame duration limit","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-02-26 15:59:26)\n> The minimum FrameDurationLimit also limits the min exposure time and\n> results in overly bright AE regulation. Remove the limit on the minimum\n> exposure time as the vertical blanking ensures the minimum frame\n> duration limit.\n> \n> Fixes: f72c76eb6e06 (\"rkisp1: Honor the FrameDurationLimits control\")\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nThanks, this is this is /very/ noticible here and the fix is very clear\n(espcially thanks to the live graphs in camshark!)\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nTested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/algorithms/agc.cpp | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 4e0e3734117e..5a3ba0131cf1 100644\n> --- a/src/ipa/rkisp1/algorithms/agc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/agc.cpp\n> @@ -526,9 +526,7 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n>         double maxAnalogueGain;\n>  \n>         if (frameContext.agc.autoExposureEnabled) {\n> -               minExposureTime = std::clamp(frameContext.agc.minFrameDuration,\n> -                                            context.configuration.sensor.minExposureTime,\n> -                                            context.configuration.sensor.maxExposureTime);\n> +               minExposureTime = context.configuration.sensor.minExposureTime;\n>                 maxExposureTime = std::clamp(frameContext.agc.maxFrameDuration,\n>                                              context.configuration.sensor.minExposureTime,\n>                                              context.configuration.sensor.maxExposureTime);\n> -- \n> 2.43.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 09BCFC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Feb 2025 13:11:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CAB056874F;\n\tThu, 27 Feb 2025 14:11:45 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D5F7F60322\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Feb 2025 14:11:44 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1B68F6A6;\n\tThu, 27 Feb 2025 14:10:16 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qxsgP0Is\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740661816;\n\tbh=Ro/EdFxfCxOukJ03EZ8zBw0vBQnAwC1zluoiSLB7kp4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=qxsgP0Is1mgwcHM7SEsg1gDYR2hgFSoDS3KDg+dDUiZ/5QFWpZk6A4xPuJWSwV+x4\n\tCnLDnSCiCTskkHUSNsqt5S+YAHxOfGThb4qsF/Y73iaOV9/lT8CTDt1Tg/sidhUxAU\n\tg5rJIwpN6onEm1EQHcgK+yRUsrGew/v6nwirehZs=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250226155933.2755475-1-stefan.klug@ideasonboard.com>","References":"<20250226155933.2755475-1-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH] ipa: rkisp1: Allow exposure time to be shorter than\n\tminimum frame duration limit","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 27 Feb 2025 13:11:41 +0000","Message-ID":"<174066190167.3679956.13453213361126849005@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":33500,"web_url":"https://patchwork.libcamera.org/comment/33500/","msgid":"<ivpm5somrdr7xqqqyqmqivjyrzofak2htjevldenqsxcyviqnq@b5vz36ijrsj2>","date":"2025-02-27T18:48:30","subject":"Re: [PATCH] ipa: rkisp1: Allow exposure time to be shorter than\n\tminimum frame duration limit","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Stefan\n\nOn Wed, Feb 26, 2025 at 04:59:26PM +0100, Stefan Klug wrote:\n> The minimum FrameDurationLimit also limits the min exposure time and\n> results in overly bright AE regulation. Remove the limit on the minimum\n> exposure time as the vertical blanking ensures the minimum frame\n> duration limit.\n>\n> Fixes: f72c76eb6e06 (\"rkisp1: Honor the FrameDurationLimits control\")\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> ---\n>  src/ipa/rkisp1/algorithms/agc.cpp | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 4e0e3734117e..5a3ba0131cf1 100644\n> --- a/src/ipa/rkisp1/algorithms/agc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/agc.cpp\n> @@ -526,9 +526,7 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n>  \tdouble maxAnalogueGain;\n>\n>  \tif (frameContext.agc.autoExposureEnabled) {\n> -\t\tminExposureTime = std::clamp(frameContext.agc.minFrameDuration,\n> -\t\t\t\t\t     context.configuration.sensor.minExposureTime,\n> -\t\t\t\t\t     context.configuration.sensor.maxExposureTime);\n> +\t\tminExposureTime = context.configuration.sensor.minExposureTime;\n>  \t\tmaxExposureTime = std::clamp(frameContext.agc.maxFrameDuration,\n>  \t\t\t\t\t     context.configuration.sensor.minExposureTime,\n>  \t\t\t\t\t     context.configuration.sensor.maxExposureTime);\n> --\n> 2.43.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 19ACBC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Feb 2025 18:48:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3169C68757;\n\tThu, 27 Feb 2025 19:48:36 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 67B3460322\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Feb 2025 19:48:34 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 79442166A;\n\tThu, 27 Feb 2025 19:47:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gbmQJo2n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740682025;\n\tbh=X1tK2XqFA3LC+iScHdvqf4nYdZMKQvTZ3smef5Gsp9k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=gbmQJo2nunwqgH+ZDPIdbo63wpSU5K6FfMyoKViGf9BXERYbW8tXt/bPzQt2N35sx\n\t9f7n/PmWGrcJ2FJP4TgmLJE2Pv8wO44J/Bjba73xANRkwQt8PybGjTN2+v3OE7VY/e\n\ty5aYvTMWJpm44dhV3VI5RXmWggTMHIk69UC0a7GI=","Date":"Thu, 27 Feb 2025 19:48:30 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] ipa: rkisp1: Allow exposure time to be shorter than\n\tminimum frame duration limit","Message-ID":"<ivpm5somrdr7xqqqyqmqivjyrzofak2htjevldenqsxcyviqnq@b5vz36ijrsj2>","References":"<20250226155933.2755475-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250226155933.2755475-1-stefan.klug@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>"}}]