[{"id":34277,"web_url":"https://patchwork.libcamera.org/comment/34277/","msgid":"<CAHW6GYLo7x9cdwmGAxin+qYwkS9-v4BVWJvUMEDNY7baaymyTw@mail.gmail.com>","date":"2025-05-19T10:35:03","subject":"Re: [PATCH v1 6/6] ipa: rpi: Rename dropFrameCount_ to startupCount_","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nThanks for the patch.\n\nOn Mon, 19 May 2025 at 10:23, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Rename dropFrameCount_ to startupCount_ to better reflect its use as\n> frames are no longer dropped by the pipeline handler.\n\nAh, I see. Yes, this is why I think I was confused by that earlier\npatch where \"dropFrameCount\" was left in whilst no longer meaning\nthat. I suppose one might wonder whether these two patches might be\neasier to understand if rolled up together, but honestly, I'm not\nbothered.\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/ipa/rpi/common/ipa_base.cpp | 10 +++++-----\n>  src/ipa/rpi/common/ipa_base.h   |  4 ++--\n>  2 files changed, 7 insertions(+), 7 deletions(-)\n>\n> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> index c15f8a7bf71e..8d591faeceaa 100644\n> --- a/src/ipa/rpi/common/ipa_base.cpp\n> +++ b/src/ipa/rpi/common/ipa_base.cpp\n> @@ -327,7 +327,7 @@ void IpaBase::start(const ControlList &controls, StartResult *result)\n>         unsigned int agcConvergenceFrames = 0, awbConvergenceFrames = 0;\n>         frameCount_ = 0;\n>         if (firstStart_) {\n> -               dropFrameCount_ = helper_->hideFramesStartup();\n> +               startupCount_ = helper_->hideFramesStartup();\n>                 mistrustCount_ = helper_->mistrustFramesStartup();\n>\n>                 /*\n> @@ -353,14 +353,14 @@ void IpaBase::start(const ControlList &controls, StartResult *result)\n>                                 awbConvergenceFrames += mistrustCount_;\n>                 }\n>         } else {\n> -               dropFrameCount_ = helper_->hideFramesModeSwitch();\n> +               startupCount_ = helper_->hideFramesModeSwitch();\n>                 mistrustCount_ = helper_->mistrustFramesModeSwitch();\n>         }\n>\n>         result->startupFrameCount = std::max({ agcConvergenceFrames, awbConvergenceFrames });\n> -       result->invalidFrameCount = dropFrameCount_;\n> +       result->invalidFrameCount = startupCount_;\n>\n> -       dropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });\n> +       startupCount_ = std::max({ startupCount_, agcConvergenceFrames, awbConvergenceFrames });\n>\n>         LOG(IPARPI, Debug) << \"Startup frames: \" << result->startupFrameCount\n>                            << \" Invalid frames: \" << result->invalidFrameCount;\n> @@ -443,7 +443,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n>\n>         /* Allow a 10% margin on the comparison below. */\n>         Duration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;\n> -       if (lastRunTimestamp_ && frameCount_ > dropFrameCount_ &&\n> +       if (lastRunTimestamp_ && frameCount_ > startupCount_ &&\n>             delta < controllerMinFrameDuration * 0.9 && !hdrChange) {\n>                 /*\n>                  * Ensure we merge the previous frame's metadata with the current\n> diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h\n> index 1a811beb31f2..a51afc156a8f 100644\n> --- a/src/ipa/rpi/common/ipa_base.h\n> +++ b/src/ipa/rpi/common/ipa_base.h\n> @@ -115,8 +115,8 @@ private:\n>         /* How many frames we should avoid running control algos on. */\n>         unsigned int mistrustCount_;\n>\n> -       /* Number of frames that need to be dropped on startup. */\n> -       unsigned int dropFrameCount_;\n> +       /* Number of frames that need to be marked as dropped on startup. */\n> +       unsigned int startupCount_;\n>\n>         /* Frame timestamp for the last run of the controller. */\n>         uint64_t lastRunTimestamp_;\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 8DE1FC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 May 2025 10:35:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1E8F368D7A;\n\tMon, 19 May 2025 12:35:18 +0200 (CEST)","from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com\n\t[IPv6:2607:f8b0:4864:20::82b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5731D68B67\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 12:35:15 +0200 (CEST)","by mail-qt1-x82b.google.com with SMTP id\n\td75a77b69052e-4767e969b94so80559001cf.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 03:35:15 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Yk6sOiWr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1747650914; x=1748255714;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=//M2QCAtAWG0tHkFbSWS9y7xShFSdnia7BkaNR/5zYw=;\n\tb=Yk6sOiWrfNVp3zzq6qEwRkyZC0qKpvI+26c98H4+bPPfEY4LYRL9DRvXoFpP3B7OBX\n\tI+WKDKQGIcgzj0EomSsz2xpg7y9aAsvwVABlYNpMo2YtUUIOXMOmHOIUN1arFxih5EVr\n\t2CS/Tdd/Nfi095V0v4LbTobzYXsmFs4rtwvsSXHqHr9h58IuVrE5jk+TuoMtN3c6z0fb\n\tP4IzTb3KKZ64fhDSnNjPLji/hMvnDWVwbltCMpXhRxaqAcR1exF9BWybU1e5aBhxYVJ6\n\txYcw0V+aN1CDdLFZsO46jLNcNQY7vtuykkwpCDZGjfxnA1FzVlZw99rK1rI4t2RQY9zp\n\tnW2Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1747650914; x=1748255714;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=//M2QCAtAWG0tHkFbSWS9y7xShFSdnia7BkaNR/5zYw=;\n\tb=pa3wBDuIBukQILuEPf0b6FfssVndlGinldx5VXiToMFR3BRZFL8GCrd/kK4b6MgTm0\n\tR64p303MrIzhrw7axIROlQOh23qmj3EaeM7K62iT+oJLbKdYXUNr452LRJeX3M4dYXlY\n\tZVAHvETN4xmo7y5H02Qwfwn+CK4EVNrn4LhF+ORRfNY1EqS6WUIkrTHolETEo3+AYvsm\n\tIPvWoJ6FLPznWvT+B9KO17XH3tHremP0/VIc6ZZb8HbFD9i6NzOKG2WNHJ5SXfjiwCJ9\n\tsUZWv+lNVD4bXoRsv2AOYCEBGegwD1S8vi7Pb1RkJ7dfINcFp3TJQFXgBS0lV7grnnZ3\n\tw4RQ==","X-Gm-Message-State":"AOJu0Yz4zrtwgO/esUBw98b3LLI2KEhgxD6ySk3SrsFby3bPxGeb0e71\n\tXXGqnh6NOU78tRbgaKQDQxyCtrGmdQtQ+nOOBFUN9vWicD2fOZhU6Kehx963xA4JyEy3H1utXW8\n\tsMIcccGB6ql0pLfpnMG7WwmDTzgJNs4mgYJ/iAQLY9Za8f7r6AIyKfY4=","X-Gm-Gg":"ASbGncvKN25JHSV7SbaL73YXGjMtZEtE2NmMD4URgXNXOF7JmFp4N5dv3feL4utSprQ\n\t1E4ZwsaCjgj3sAuHJ06gX5e+6VzPvJJwPgk9gRrPOODYHXBHeMd9QNxYmB3MdpbLiKFt3gKXFvH\n\trstmAoVSNVR+Pyo4YND/MoEpVkehv+Is64TMNWwH6/zI2JBSMwfcbnlwd2pgrsAFI=","X-Google-Smtp-Source":"AGHT+IH0sYQC2e2sQ87vzpZakC3bz8/kxA42mROBlBosyUMJPsdSTI56r/jcj6Q8i4KbU8+7BjluOkRvYU8L9Ai7YM0=","X-Received":"by 2002:ac8:1289:0:b0:497:b511:95af with SMTP id\n\td75a77b69052e-497b5119e6fmr73049051cf.45.1747650914215;\n\tMon, 19 May 2025 03:35:14 -0700 (PDT)","MIME-Version":"1.0","References":"<20250519092245.269048-1-naush@raspberrypi.com>\n\t<20250519092245.269048-7-naush@raspberrypi.com>","In-Reply-To":"<20250519092245.269048-7-naush@raspberrypi.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Mon, 19 May 2025 11:35:03 +0100","X-Gm-Features":"AX0GCFsIZH_9FNdaiXfwNKQB48gUsXJWpZKS-l1vdvP8ha25wDYNqBR46tVRZiA","Message-ID":"<CAHW6GYLo7x9cdwmGAxin+qYwkS9-v4BVWJvUMEDNY7baaymyTw@mail.gmail.com>","Subject":"Re: [PATCH v1 6/6] ipa: rpi: Rename dropFrameCount_ to startupCount_","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","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>"}}]