[{"id":16311,"web_url":"https://patchwork.libcamera.org/comment/16311/","msgid":"<CAHW6GYLLqvhULxRvMiJd_PVY=fXdri7QCj9PsG7nXMNaH92_Dw@mail.gmail.com>","date":"2021-04-16T13:06:32","subject":"Re: [libcamera-devel] [PATCH v2 1/3] ipa: raspberrypi: Store\n\tdropped frame count in a member variable","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nThanks for this patch.\n\nOn Fri, 16 Apr 2021 at 11:31, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Store the number of dropped frames on startup in a member variable. This\n> will be used in a subsequent change for rate limiting the controller\n> algorithms.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nYes, it all looks fine to me:\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n> ---\n>  src/ipa/raspberrypi/raspberrypi.cpp | 14 ++++++++------\n>  1 file changed, 8 insertions(+), 6 deletions(-)\n>\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index b0f61d351e3a..f6d1ab16a290 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -143,6 +143,9 @@ private:\n>         /* How many frames we should avoid running control algos on. */\n>         unsigned int mistrustCount_;\n>\n> +       /* Number of frames that need to be dropped on startup. */\n> +       unsigned int dropFrameCount_;\n> +\n>         /* LS table allocation passed in from the pipeline handler. */\n>         FileDescriptor lsTableHandle_;\n>         void *lsTable_;\n> @@ -220,9 +223,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n>          */\n>         frameCount_ = 0;\n>         checkCount_ = 0;\n> -       unsigned int dropFrame = 0;\n>         if (firstStart_) {\n> -               dropFrame = helper_->HideFramesStartup();\n> +               dropFrameCount_ = helper_->HideFramesStartup();\n>                 mistrustCount_ = helper_->MistrustFramesStartup();\n>\n>                 /*\n> @@ -250,14 +252,14 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n>                                 awbConvergenceFrames += mistrustCount_;\n>                 }\n>\n> -               dropFrame = std::max({ dropFrame, agcConvergenceFrames, awbConvergenceFrames });\n> -               LOG(IPARPI, Debug) << \"Drop \" << dropFrame << \" frames on startup\";\n> +               dropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });\n> +               LOG(IPARPI, Debug) << \"Drop \" << dropFrameCount_ << \" frames on startup\";\n>         } else {\n> -               dropFrame = helper_->HideFramesModeSwitch();\n> +               dropFrameCount_ = helper_->HideFramesModeSwitch();\n>                 mistrustCount_ = helper_->MistrustFramesModeSwitch();\n>         }\n>\n> -       startConfig->dropFrameCount = dropFrame;\n> +       startConfig->dropFrameCount = dropFrameCount_;\n>\n>         firstStart_ = false;\n>  }\n> --\n> 2.25.1\n>","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 79296BD233\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Apr 2021 13:06:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9A75A6880C;\n\tFri, 16 Apr 2021 15:06:45 +0200 (CEST)","from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com\n\t[IPv6:2607:f8b0:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BEF7F68806\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Apr 2021 15:06:44 +0200 (CEST)","by mail-ot1-x32c.google.com with SMTP id\n\t92-20020a9d02e50000b029028fcc3d2c9eso3182286otl.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Apr 2021 06:06:44 -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=\"UEZ8iF4R\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Wsu0HCL/euhfNZ6qUg9qsKLqjB+f5aQR50K/23AnJfY=;\n\tb=UEZ8iF4RD8bcKjH66QxKFsP4o/f1k8RbZwdJGGjgGHKx2pyTkIdJPIDzmnS+9MiYJP\n\tOnSa6ksSnnXy1YJ29AtIyV/j+Llm8KBMblaU+x19GGjnuTTT39mit5/g5SMVqB+G0VWi\n\tYzoaN8v4cYpA+kxYDeb0l8+Q3AvA4bOrT/ByUYgERrkH57VrL4nS2Smh1vYJcQPDQB2m\n\tgTvwjwduuBuhIbeAj91n6QaqmUWQZ4vd1RjmkaSODi+FmT1+Rs23ObAiQ4cyh1WSIbOJ\n\toHSOJUtLENm9qtzyV80Iynu4PA8sFnjoSTlcgm2qPj9XS4T+or9hXQFs0wXbro3Iugye\n\tsm8Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Wsu0HCL/euhfNZ6qUg9qsKLqjB+f5aQR50K/23AnJfY=;\n\tb=qSRyYrWs74jyOy78l9zo0s9mpelSxj3QATo5p1fv37njcxECJwrbj6togLAPmsjrKc\n\tq479bIL5IOFIbio4rMrO9STN+jKU7LVg3C9YzRLYbq2fYAEYxryXMkpusreJEHR/JTij\n\t5b12x7D/sZnV7B6hFC8W1ByiuTJuJSUzyGqgPFrAo28yqPWmD8YogkeKdAqrqmJg+mf0\n\tubAVUuwgTIMplwg9mnBygjJpd5t22RFkMYGzk3BFsBa1h5Pq+MTbtF26lUyXrlVoCm5Y\n\tBTPshUkRYSzciK+G6FNMy7ePjIFHruVHtOo1JUPolhYTAaDEoYJl+Zz94LP/L6IW+qHN\n\t8tHg==","X-Gm-Message-State":"AOAM531wyAF9X1he5HtwazkLX4TBUQYw11eDxECZNPiN7A422/8QIBRz\n\tvq2WlzR8TVzIZ3CPoFiAH5EsihJzghlTpoheq9pbuQ==","X-Google-Smtp-Source":"ABdhPJx/OV7fo0t3Nht53DI/hd/eC36uOmChbr0jiT+kkoOnLcH3F2koyWHCctZcCjxMCEBxi6JasSFNsweOiHa5CIQ=","X-Received":"by 2002:a05:6830:c5:: with SMTP id\n\tx5mr3391747oto.317.1618578403384; \n\tFri, 16 Apr 2021 06:06:43 -0700 (PDT)","MIME-Version":"1.0","References":"<20210416103141.1483745-1-naush@raspberrypi.com>\n\t<20210416103141.1483745-2-naush@raspberrypi.com>","In-Reply-To":"<20210416103141.1483745-2-naush@raspberrypi.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 16 Apr 2021 14:06:32 +0100","Message-ID":"<CAHW6GYLLqvhULxRvMiJd_PVY=fXdri7QCj9PsG7nXMNaH92_Dw@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v2 1/3] ipa: raspberrypi: Store\n\tdropped frame 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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","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>"}}]