[{"id":16632,"web_url":"https://patchwork.libcamera.org/comment/16632/","msgid":"<YIe5fpEc5OCoCVx0@pendragon.ideasonboard.com>","date":"2021-04-27T07:13:02","subject":"Re: [libcamera-devel] [PATCH v5 1/5] ipa: raspberrypi: Store\n\tdropped frame count in a member variable","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 Mon, Apr 19, 2021 at 02:34:47PM +0100, Naushir Patuck wrote:\n> Store the number of dropped frames on startup in a member variable. This\n> will be used in a subsequent change for rate limiting the controller\n> algorithms.\n\nSo far so good. Assuming it will be used in a subsequent patch in the\nseries,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/ipa/raspberrypi/raspberrypi.cpp | 14 ++++++++------\n>  1 file changed, 8 insertions(+), 6 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index b0f61d351e3a..f6d1ab16a290 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -143,6 +143,9 @@ private:\n>  \t/* How many frames we should avoid running control algos on. */\n>  \tunsigned int mistrustCount_;\n>  \n> +\t/* Number of frames that need to be dropped on startup. */\n> +\tunsigned int dropFrameCount_;\n> +\n>  \t/* LS table allocation passed in from the pipeline handler. */\n>  \tFileDescriptor lsTableHandle_;\n>  \tvoid *lsTable_;\n> @@ -220,9 +223,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n>  \t */\n>  \tframeCount_ = 0;\n>  \tcheckCount_ = 0;\n> -\tunsigned int dropFrame = 0;\n>  \tif (firstStart_) {\n> -\t\tdropFrame = helper_->HideFramesStartup();\n> +\t\tdropFrameCount_ = helper_->HideFramesStartup();\n>  \t\tmistrustCount_ = helper_->MistrustFramesStartup();\n>  \n>  \t\t/*\n> @@ -250,14 +252,14 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n>  \t\t\t\tawbConvergenceFrames += mistrustCount_;\n>  \t\t}\n>  \n> -\t\tdropFrame = std::max({ dropFrame, agcConvergenceFrames, awbConvergenceFrames });\n> -\t\tLOG(IPARPI, Debug) << \"Drop \" << dropFrame << \" frames on startup\";\n> +\t\tdropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });\n> +\t\tLOG(IPARPI, Debug) << \"Drop \" << dropFrameCount_ << \" frames on startup\";\n>  \t} else {\n> -\t\tdropFrame = helper_->HideFramesModeSwitch();\n> +\t\tdropFrameCount_ = helper_->HideFramesModeSwitch();\n>  \t\tmistrustCount_ = helper_->MistrustFramesModeSwitch();\n>  \t}\n>  \n> -\tstartConfig->dropFrameCount = dropFrame;\n> +\tstartConfig->dropFrameCount = dropFrameCount_;\n>  \n>  \tfirstStart_ = false;\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 1B20BBDCC3\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Apr 2021 07:13:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 373BE688A8;\n\tTue, 27 Apr 2021 09:13:09 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F5D76885A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Apr 2021 09:13:08 +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 C2812E9;\n\tTue, 27 Apr 2021 09:13:07 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"R2ONNaPn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619507588;\n\tbh=63HN3PxK0kro5HGNy6sRfcYCk3/Nro3doMFN1Apy7KI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=R2ONNaPnFuqsG9CsVq5skebcX8x/jzchL5boGJUI3dwPsuDatsxb0xVGoDnsoRIoU\n\tmS5QxLi3fk+apB4cHeC7VD1Xz7q4zFraNn4xCaFdWdeXKwK3IAgs1hoVg81vtSUuly\n\tojYEnYF2P8UjmmheCfztVltaXp0/tPxQIGDd5CrE=","Date":"Tue, 27 Apr 2021 10:13:02 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YIe5fpEc5OCoCVx0@pendragon.ideasonboard.com>","References":"<20210419133451.263733-1-naush@raspberrypi.com>\n\t<20210419133451.263733-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210419133451.263733-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v5 1/5] ipa: raspberrypi: Store\n\tdropped frame count in a member variable","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]