{"id":23347,"url":"https://patchwork.libcamera.org/api/1.1/patches/23347/?format=json","web_url":"https://patchwork.libcamera.org/patch/23347/","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":"<20250507082753.2306743-7-naush@raspberrypi.com>","date":"2025-05-07T07:52:13","name":"[RFC,6/6] ipa: rpi: Rename dropFrameCount_ to startupCount_","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"dda635295b3dd1d6ad5fbbd2235f6a2daafb45ed","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23347/mbox/","series":[{"id":5164,"url":"https://patchwork.libcamera.org/api/1.1/series/5164/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5164","date":"2025-05-07T07:52:07","name":"Eliminating startup frames","version":1,"mbox":"https://patchwork.libcamera.org/series/5164/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23347/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23347/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 701EBC327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 May 2025 08:28:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD80568B3B;\n\tWed,  7 May 2025 10:28:15 +0200 (CEST)","from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6337668B34\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 May 2025 10:28:02 +0200 (CEST)","by mail-wm1-x336.google.com with SMTP id\n\t5b1f17b1804b1-440668acbf3so8483225e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 May 2025 01:28:02 -0700 (PDT)","from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-441d440fff6sm22182575e9.25.2025.05.07.01.28.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 07 May 2025 01:28:01 -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=\"K4ryHFui\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1746606482; x=1747211282;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=iDJm16zb7hwM/O4mxusEMEmz8cHY3wVG5puaLJGJwFQ=;\n\tb=K4ryHFuisiiMZy6EuiUVlNmeSuDhJ1WLekK+Jbs+PQGXOwJhR+2xXYS8H/BL9OYgXa\n\tKsUt5TS4BLwGY9PJcV8nYvLrCYN1TVurRD1aUH4DL/rm8OmtkOtxalYBXQq7wpG6gn+A\n\tLR95fWeVsy4xB/XlsY/rqEJLYGiLaJrcNBFFM1V7uoHw0T3XwrhC2/BJfHSJUq4CgtOj\n\t3RHanH7cheF7+OBxuVd1ww90fouwv99/V+utsaN2009DpEUq98ayCRsfQcxNnqGnmxgU\n\teorhXf7h/DmOW1Qre421EQSt6QB58E5LfPOGMIv6n8JJ+mr9+Skvn06qNi2BXOjj+qqT\n\txsgw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1746606482; x=1747211282;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=iDJm16zb7hwM/O4mxusEMEmz8cHY3wVG5puaLJGJwFQ=;\n\tb=f8JK78kK3X8RKMfc9veTgsHjaf89JEZWEYNy82WM+OorjdlhoeApJ0eBeV1iMPtwgF\n\tkxnYiooGbpWkN/UvqlzvPKvWolRoAJxfQFwHe+XL+L7FikvFQMBrFxJwKtajXtMJN0h3\n\tQqwZvBoT4wxlb4KO37woS+4LABAvZZgmGPIqTsAPHG836ZzGasF9zRqleAaUrEzJHxBs\n\tfruyK1+SxnURHXXLwcFbyhPjB6nhSainih5JtKh+JXQltuATm8HzPNPqJK1VAP0YIdBk\n\tOnI4E03TU9CWWVnGy5bJZmJ1JgvPHFLRqVFZ/abWOMQcORyWqSgpAc+Wq4L/kGl9/cZX\n\tbNMw==","X-Gm-Message-State":"AOJu0YzGzy7YMi0Tfay7k/94/oWg8BE8wOjivSf64xLqp6lcmJs7rUPS\n\tOqpMEuWtHpoFcsCrxgsQG6ArBa862s7horcQ+iHjaSkkvHDu9ZzjiVMUDjaCZ7A0Lq2v4rCft6t\n\tf","X-Gm-Gg":"ASbGncuCMKAzjWisjKApaF6O234RJXTFm9kAfyJVhpiErP2RFZ6yVAya4th05vTi9AO\n\tiRkxnaP43s+HbmTS0F3UwWT2WqkgSl/O7ApGxKPR86YhWgkkrWpZjQPmymnggFb60wA04+frlBY\n\txMZM2UCWksdOQ22yFrsGJwPXnv3+yPzUXW+SWUsrcQONYpRbDAgCXZI8EdJgN3AnPCMm7Yi5r/q\n\t6J/j7jFaqirq5zsycLNXgXk8ikpk2RnqAsu8CxrqbwxvKmYmzMuZe0SYqPLZzl6E/TI8kqJf7Bz\n\tIvZfWHJ0A/NEIijkytRcOFzSpweR2O3OgL9/n6QoACjMRlxZeF4xEr1CBQxRhw6TDdL2SfQ=","X-Google-Smtp-Source":"AGHT+IGNP/Tfnn44LQ7KO3cu0qjf7TlS2Nhom2UURYYxtDwAQcfLi+9twHZa/ASzeGrz1Ajpbedhpg==","X-Received":"by 2002:a05:600c:3b9d:b0:43b:c228:1ee0 with SMTP id\n\t5b1f17b1804b1-441d44e0813mr5925655e9.7.1746606481679; \n\tWed, 07 May 2025 01:28:01 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>","Subject":"[RFC PATCH 6/6] ipa: rpi: Rename dropFrameCount_ to startupCount_","Date":"Wed,  7 May 2025 08:52:13 +0100","Message-ID":"<20250507082753.2306743-7-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250507082753.2306743-1-naush@raspberrypi.com>","References":"<20250507082753.2306743-1-naush@raspberrypi.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":"Rename dropFrameCount_ to startupCount_ to better reflect its use as\nframes are no longer dropped by the pipeline handler.\n\nSigned-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(-)","diff":"diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 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 \tunsigned int agcConvergenceFrames = 0, awbConvergenceFrames = 0;\n \tframeCount_ = 0;\n \tif (firstStart_) {\n-\t\tdropFrameCount_ = helper_->hideFramesStartup();\n+\t\tstartupCount_ = helper_->hideFramesStartup();\n \t\tmistrustCount_ = helper_->mistrustFramesStartup();\n \n \t\t/*\n@@ -353,14 +353,14 @@ void IpaBase::start(const ControlList &controls, StartResult *result)\n \t\t\t\tawbConvergenceFrames += mistrustCount_;\n \t\t}\n \t} else {\n-\t\tdropFrameCount_ = helper_->hideFramesModeSwitch();\n+\t\tstartupCount_ = helper_->hideFramesModeSwitch();\n \t\tmistrustCount_ = helper_->mistrustFramesModeSwitch();\n \t}\n \n \tresult->startupFrameCount = std::max({ agcConvergenceFrames, awbConvergenceFrames });\n-\tresult->invalidFrameCount = dropFrameCount_;\n+\tresult->invalidFrameCount = startupCount_;\n \n-\tdropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });\n+\tstartupCount_ = std::max({ startupCount_, agcConvergenceFrames, awbConvergenceFrames });\n \n \tLOG(IPARPI, Debug) << \"Startup frames: \" << result->startupFrameCount\n \t\t\t   << \" Invalid frames: \" << result->invalidFrameCount;\n@@ -443,7 +443,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n \n \t/* Allow a 10% margin on the comparison below. */\n \tDuration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;\n-\tif (lastRunTimestamp_ && frameCount_ > dropFrameCount_ &&\n+\tif (lastRunTimestamp_ && frameCount_ > startupCount_ &&\n \t    delta < controllerMinFrameDuration * 0.9 && !hdrChange) {\n \t\t/*\n \t\t * Ensure we merge the previous frame's metadata with the current\ndiff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h\nindex 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 \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+\t/* Number of frames that need to be marked as dropped on startup. */\n+\tunsigned int startupCount_;\n \n \t/* Frame timestamp for the last run of the controller. */\n \tuint64_t lastRunTimestamp_;\n","prefixes":["RFC","6/6"]}