{"id":12002,"url":"https://patchwork.libcamera.org/api/1.1/patches/12002/?format=json","web_url":"https://patchwork.libcamera.org/patch/12002/","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":"<20210419133451.263733-2-naush@raspberrypi.com>","date":"2021-04-19T13:34:47","name":"[libcamera-devel,v5,1/5] ipa: raspberrypi: Store dropped frame count in a member variable","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"99b0cf3fca595fc87c0da11ee01a39e1f067c84f","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/12002/mbox/","series":[{"id":1950,"url":"https://patchwork.libcamera.org/api/1.1/series/1950/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1950","date":"2021-04-19T13:34:46","name":"ipa: raspberrypi: Rate-limit the controller algorithms","version":5,"mbox":"https://patchwork.libcamera.org/series/1950/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12002/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12002/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 92F54BD814\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 Apr 2021 13:35:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19E2B68839;\n\tMon, 19 Apr 2021 15:35:02 +0200 (CEST)","from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9F901602CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Apr 2021 15:34:58 +0200 (CEST)","by mail-wr1-x435.google.com with SMTP id h4so25037318wrt.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Apr 2021 06:34:58 -0700 (PDT)","from naush-laptop.pitowers.org\n\t([2a00:1098:3142:15:5363:8f56:4f84:754])\n\tby smtp.gmail.com with ESMTPSA id\n\tk11sm19952238wrx.88.2021.04.19.06.34.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 19 Apr 2021 06:34:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"YYHhqV32\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Jo8WkXMl8c5cRR6Ta7ynE+2nvwPxIi03CyEKeDa4jWM=;\n\tb=YYHhqV32uRwxKd6bnghJbhyAvakXbTqkj2xOGrR0z42bwEtAzmXnhpG023pRX2/yk3\n\tC8eV6rNkC7ml0DzbP9wBkX5VqF6Y7yB0vUFvbQnpW2vgdjz2awlS9NSaHyRTAyXqNvbu\n\t+sRU5YnfzP+NOL1IewXiEjP0Kyg2QmIlHazkkjg4iMovWoJ1Q2W7gYR3YOZty5y61Glb\n\tVBbAWUfsfUD7hvop9KyX/g8htZCEXBBm4+1uLwgGikrQPYFq3OnpASZdlX3wYzbSHbDF\n\tCXQW0sSgpoWdcIGhkRMNmd6WvLAzYi31fVF9ygcD9EXadk4snvTWBd6odYpanqKHkOWn\n\tNvXg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=Jo8WkXMl8c5cRR6Ta7ynE+2nvwPxIi03CyEKeDa4jWM=;\n\tb=RWFywN+ZVgnIM55QURj081G1u4Ir/wLMCQ0VWK6/bQbp8U2zS+rJ1XnUauob6ElJUz\n\timC6QMAlj68roaR/UpbByuFoRjF3OspClKU38yI1hxvviA2MICAgm0zcCB/FJuwFtMuA\n\tzHgG4WkcEq2BEciBsYV294ImlxSfGEfO9S4cfHHIPTvt2ewC7varhzcb2snNHCiuyg9u\n\tYHedUfYKafXjRsf0tvP1CqOcI18crDTBWJchB3wQIyHGik0lti4vnzdnhCksNKy/JMHw\n\tdMjKJ7GVXwVivtynPHl3J17P6ejg0TD8m+9vQ0uWgbsIS95ez+jExazs5fRd5KnuMjKq\n\tPTFQ==","X-Gm-Message-State":"AOAM5309gya0JUoImZl5tNbuiCMPZA5xikdUUoS78HhR3yrWMucZeywB\n\tGx7FCxBCRO6DPcQ1oy6+PuF1vb+s5T5ZvA==","X-Google-Smtp-Source":"ABdhPJxEou7YCBnt8iOCjokRxtLZbeD74oOYpqTDNyrew/ClzhuMh8xRnglin43cWRXsz7kdnHOzGA==","X-Received":"by 2002:adf:ea84:: with SMTP id\n\ts4mr14656396wrm.142.1618839298181; \n\tMon, 19 Apr 2021 06:34:58 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 19 Apr 2021 14:34:47 +0100","Message-Id":"<20210419133451.263733-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210419133451.263733-1-naush@raspberrypi.com>","References":"<20210419133451.263733-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v5 1/5] ipa: raspberrypi: Store dropped\n\tframe 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>","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>"},"content":"Store the number of dropped frames on startup in a member variable. This\nwill be used in a subsequent change for rate limiting the controller\nalgorithms.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/raspberrypi.cpp | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)","diff":"diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 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 }\n","prefixes":["libcamera-devel","v5","1/5"]}