{"id":23391,"url":"https://patchwork.libcamera.org/api/1.1/patches/23391/?format=json","web_url":"https://patchwork.libcamera.org/patch/23391/","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":"<20250519092245.269048-7-naush@raspberrypi.com>","date":"2025-05-19T09:20:54","name":"[v1,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/23391/mbox/","series":[{"id":5182,"url":"https://patchwork.libcamera.org/api/1.1/series/5182/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5182","date":"2025-05-19T09:20:48","name":"Eliminating startup frames","version":1,"mbox":"https://patchwork.libcamera.org/series/5182/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23391/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23391/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 1B9C1C322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 May 2025 09:23:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D2DF168D85;\n\tMon, 19 May 2025 11:23:04 +0200 (CEST)","from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DBEB68C91\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 11:22:55 +0200 (CEST)","by mail-wr1-x42b.google.com with SMTP id\n\tffacd0b85a97d-3a35c339e95so446780f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 02:22:55 -0700 (PDT)","from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3a366e08747sm8645961f8f.95.2025.05.19.02.22.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 19 May 2025 02:22:54 -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=\"PAXxyTPp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1747646574; x=1748251374;\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=PAXxyTPpoZ6ATP/IzuAYo53fg//LUciYZ0eaiLfl+jYec6gARyp7qiADLcND5qHWif\n\tjS/5F5NEHCrC6ypWNBiyfX/AMhJvyxHSeDFoOqyq5Sbe9yM4x9D24LDVTVIi8t6ONhDW\n\tCZvMF36x9IXswXY9dUMInhhznZqH7aw95M94aMgCDv/4lHLa0+/0H7rcdq8cbg2qYrAN\n\tuvqiRvp74Xy60hWx4HvISjVhoWvmVVz2pTVfI3sxRqrBNWQHGtsCDyWhWD0XguGjjxSR\n\ts7S+lcRG+zxpoArUNA0CM2BTuoJy2iTiA7V2BoWB9x6Snmq1eRYOmF4opUQobKJMcz7h\n\tQ7iQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1747646574; x=1748251374;\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=oy329vJg6yDn9RvgNlCDip91EKYVqoly8vukFJA3vA1U3n0hREAZC+E83p9tmnzTKR\n\tdecqrUBJIQKBY3JwRk1nUdwabmnzT5NVLMTVtfAehJ7bllfeTJUV32mFcvPJBSPh31wo\n\t3/Qx8DtkpdSbs3pCLUvxKz0/L+KTFxvKsTMbUIW5zcEumUHMCikQzt+1CFOL03glEH0M\n\tryBfbZ28mhOp+O2r/HTrFCqDZPwlZi7hEtAStaN11UvgAL6XuLxXpE5SFe6D8n/cFmET\n\t5sPVlBpTf7utmhUduQyeCCn7L+KOBNSfM+Et42xQKKKAw6s+gWzcH0QSEuagUsB4mTGI\n\tNFWg==","X-Gm-Message-State":"AOJu0YzvPa/VAyZWIqdtp/sVU0e34OHinMfoPl+qKuDo8yqfAF8vKn6z\n\tdg5g9YcWhDk5PX65DN8NqerDA0+iXHpgBCiSPe0VmLSykwPl9CLmE2ypXKsA4ZVRbsCQG2TKeaI\n\tVXB9I","X-Gm-Gg":"ASbGncvPX20lgBzfdLR6ioDZfi5DZHyVObsphV3XA78OV8GJbE4TTmGugQ4s8PkUAZc\n\tVaBUpYIxWP1tfYhFdp4Njns7OFwP+lXsT4iGvCVxqTYBetbtBI6IF8f2JyIIsN2wbf1dFO11jl8\n\tFl5rNnETRuL7OTdq3JQBrTNY8LT9nAflTfgSeHptMWq+8NXvmBIZWrxLs9f3FsmZnJUWqr3PvW5\n\tJJ4Y4AL6vdwbMR4896iRQbONPHBPu2ZEYrL1ancKDvHCFZA3IIhvgAxy4SXBiWXSaDG4XX5IGwF\n\tZNqxbDNmiyKNN/YWHO8M+yRdooPb98CWASMbXEvP53WPM76jk+681rPOKqUE1WPOXGtQpRM=","X-Google-Smtp-Source":"AGHT+IGjOTq95UtX2EB5DWIuy2WVmx2OoCIrmpIMFx85c+3/6l4+ikKdajIARCnR5jo2crSuR0wTBA==","X-Received":"by 2002:a5d:5848:0:b0:3a0:99a4:e53f with SMTP id\n\tffacd0b85a97d-3a35c843e2cmr3406507f8f.8.1747646574387; \n\tMon, 19 May 2025 02:22:54 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>","Subject":"[PATCH v1 6/6] ipa: rpi: Rename dropFrameCount_ to startupCount_","Date":"Mon, 19 May 2025 10:20:54 +0100","Message-ID":"<20250519092245.269048-7-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250519092245.269048-1-naush@raspberrypi.com>","References":"<20250519092245.269048-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":["v1","6/6"]}