{"id":11963,"url":"https://patchwork.libcamera.org/api/patches/11963/?format=json","web_url":"https://patchwork.libcamera.org/patch/11963/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210416103141.1483745-2-naush@raspberrypi.com>","date":"2021-04-16T10:31:39","name":"[libcamera-devel,v2,1/3] ipa: raspberrypi: Store dropped frame count in a member variable","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"99b0cf3fca595fc87c0da11ee01a39e1f067c84f","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11963/mbox/","series":[{"id":1939,"url":"https://patchwork.libcamera.org/api/series/1939/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1939","date":"2021-04-16T10:31:38","name":"ipa: raspberrypi: Rate-limit the controller algorithms","version":2,"mbox":"https://patchwork.libcamera.org/series/1939/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11963/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11963/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 514D4BD235\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Apr 2021 10:31:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9EB1B68814;\n\tFri, 16 Apr 2021 12:31:56 +0200 (CEST)","from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A71006880A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Apr 2021 12:31:54 +0200 (CEST)","by mail-wr1-x433.google.com with SMTP id h4so17145532wrt.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Apr 2021 03:31:54 -0700 (PDT)","from naush-laptop.pitowers.org\n\t([2a00:1098:3142:15:4af5:8d45:b5d1:889d])\n\tby smtp.gmail.com with ESMTPSA id\n\td133sm8234500wmf.9.2021.04.16.03.31.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 16 Apr 2021 03:31:53 -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=\"jk6f4MED\"; 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=acVExA1hKkXl0vFbLi5BIT7JBVgIAwd+XnaOAuP9Co0=;\n\tb=jk6f4MEDkidCbbhiP/hycOHXY/z6jZgXqiGPDIiOD9cPC7l3D+KK2aCuYh8GmJrt2f\n\tnni6EKKZbeUAsynHPZ9MOC96AkajSaVbTqSLSOS4OWs6eQmDeGZL4uT25d/+IiUt15NH\n\tqiv4VfnLz8mi5brrC6G61qXyYZQwueq9pln1IegIg4ZzeKfMNI/wf0gw+oeWqbHQDLXg\n\t60dLaDDHfCDxHo+0WRVw16Zp3xVhwpDQZd8myrAC+lihBEUfevwdpMITPMNkyGMEpGd7\n\tqb5CsNswv8LYevmo5eh67d+yCiyGurXsGv3ou74AMyMQXc0XsQ6KCvbn0ccQyXSozZy9\n\tXobg==","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=acVExA1hKkXl0vFbLi5BIT7JBVgIAwd+XnaOAuP9Co0=;\n\tb=igaMq+IlKaQZXbDlbPBF0VyDczwKftqEPzzKL8puDTtJBA+0XwobTgyAwpEPED8Cm6\n\tq4XYJqcoVKZaAlRq1ldCRO4uzwTb2vrh4vn25g9piD6j2tCm2bhqThmGo6JkMMWVlAF/\n\t8n7at+Tq08IteTaSkuCfMj6V0L/9pX1SHMU5mKBVd6rFzgg6u8MLNJauG/86Or+I7TLg\n\tz3b3Lmv0T0iHDgimomZ/NF/fcevX0LkdFPAnpQCSfJAvw8tJSE8XrUebwu3d8TUEwN1b\n\t5wIZkSKT1apx7Awb1ey54jnEyjx2oiqbP+S67HGhgz4HOHAblgfieMR5bSZ+5npH3vcS\n\tdYXg==","X-Gm-Message-State":"AOAM5338wP7I8xBYlFvRu29ejcZgTFgtPTOIRReYuLG7OAXPV83NGU3W\n\tB1KQh5Mi79hcmtfGVEGwYwaEW2sHoaYcvg==","X-Google-Smtp-Source":"ABdhPJz3Tn8gGqCEnMjJHd72J1qATg5iD0WUrV0ELTMqey1ZScIVxwnMEwRaQgYCXiEfAWfbQWSy+g==","X-Received":"by 2002:a5d:678e:: with SMTP id\n\tv14mr8427156wru.156.1618569114251; \n\tFri, 16 Apr 2021 03:31:54 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 16 Apr 2021 11:31:39 +0100","Message-Id":"<20210416103141.1483745-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210416103141.1483745-1-naush@raspberrypi.com>","References":"<20210416103141.1483745-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 1/3] 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>\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","v2","1/3"]}