{"id":12234,"url":"https://patchwork.libcamera.org/api/1.1/patches/12234/?format=json","web_url":"https://patchwork.libcamera.org/patch/12234/","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":"<20210510095814.3732400-2-naush@raspberrypi.com>","date":"2021-05-10T09:58:10","name":"[libcamera-devel,v6,1/6] ipa: raspberrypi: Store dropped frame count in a member variable","commit_ref":"3099e91c7b1a9f38e156025c4fac5f908afed0f9","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/12234/mbox/","series":[{"id":2015,"url":"https://patchwork.libcamera.org/api/1.1/series/2015/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2015","date":"2021-05-10T09:58:09","name":"ipa: raspberrypi: Rate-limit the controller algorithms","version":6,"mbox":"https://patchwork.libcamera.org/series/2015/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12234/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12234/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 0D297BF829\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 May 2021 09:59:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DA576891E;\n\tMon, 10 May 2021 11:59:08 +0200 (CEST)","from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B022C6890C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 May 2021 11:59:06 +0200 (CEST)","by mail-wm1-x330.google.com with SMTP id\n\tp14-20020a05600c358eb029015c01f207d7so2798583wmq.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 May 2021 02:59:06 -0700 (PDT)","from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:e710:3ec:6dad:dc2])\n\tby smtp.gmail.com with ESMTPSA id\n\ty17sm24767917wrw.90.2021.05.10.02.59.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 10 May 2021 02:59:05 -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=\"mSWWRfId\"; 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=KgKpcksnv6s1nkIaPgdoTr/RRRZK1ZRchgD3iCqTLKU=;\n\tb=mSWWRfIdSJryyUxVmYJoZP40YEPqCNi2ifzIDxwu9O5b809jnofovvIdWV0x9uW7mE\n\t75YCI4aajYVaEw5mvSgx2+3j2yw3WDHs/Lbaw0/wKjCGBG5RClGAzcn8Bal8lULTrQmk\n\tXGYGUUmY+sBegtjjK9iRDYextjcyds2Wz383XOqyEZ3IoFm9/pCi2pV1ayQQL86NbZtO\n\t92ONp3C71n1nMHQdXEvcOgjtZ4zlXwf+sbMhYKvQVGbJNXM+C0zr5oYC9vQkzt9joHJi\n\t9/1hMvLDgk1tJ8n+vqo+RbXSKXMbarmfPyQBZMbIeQxDlcNqu70/UrcvNY/HgKV9AXa7\n\tLhQg==","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=KgKpcksnv6s1nkIaPgdoTr/RRRZK1ZRchgD3iCqTLKU=;\n\tb=V94LzWdQgrJlbO0pBLJPH3mn/CgO3o4xfVJYFvPssUhDPVG8GWcl8O+Fz8o2GtI01H\n\t7i30XkkR+qLZucYHQM5tRUd+vkrYbvmdns+sTDqdDfXzuK11plIUs/ZonBs8g1NcmS3c\n\tScYhPgqh0osMAj2hJIQWBBb2AoeM7UOV9neg7NF81tNPZBew5VzUFUKZxPxbPuWV5Cl6\n\tpah6A4/BhjqvuK4h7mi6fMye/TRJE3/L+VazNIsXMKw1Jy2ZVcwqgvTGz9Yq+H7b2GOk\n\t72jfq4nhH1sNdmobahhXJvOJkuIWkTVNZIvzl6Jmd4LdmSsAxdFJoQ68FhyWYrnyXMy0\n\tPG4w==","X-Gm-Message-State":"AOAM5309ud21hQIPzE5TIM49Wh7vfjUahgFBRJ3QMTny2ks/GApW8gJw\n\t/6en6KEZ5ROiM1BcPyxfvcUzjrppFRU87Q==","X-Google-Smtp-Source":"ABdhPJyJb0TWul5TdK/ukZ9ubh6EBEhDyQG9/W7GFR+p0iIPAKJYjGA1At967AI+b9rtP5ekX3ozCg==","X-Received":"by 2002:a7b:c0cf:: with SMTP id\n\ts15mr36205446wmh.110.1620640746185; \n\tMon, 10 May 2021 02:59:06 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 10 May 2021 10:58:10 +0100","Message-Id":"<20210510095814.3732400-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210510095814.3732400-1-naush@raspberrypi.com>","References":"<20210510095814.3732400-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v6 1/6] 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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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 bb55f9317788..07409621a03a 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","v6","1/6"]}