[{"id":15082,"web_url":"https://patchwork.libcamera.org/comment/15082/","msgid":"<YCP/biSvyuu9z++e@pendragon.ideasonboard.com>","date":"2021-02-10T15:44:46","subject":"Re: [libcamera-devel] [PATCH 1/2] ipa: raspberrypi: AWB: Remove\n\tunecessary frame count variable","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch.\n\nOn Wed, Feb 10, 2021 at 11:17:42AM +0000, David Plowman wrote:\n> The variable frame_count2_ is not needed as Prepare() and Process()\n> always run in lock step one after the other.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/awb.cpp | 6 ++----\n>  src/ipa/raspberrypi/controller/rpi/awb.hpp | 1 -\n>  2 files changed, 2 insertions(+), 5 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> index 791b5108..1c65eda8 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> @@ -153,7 +153,7 @@ void Awb::Read(boost::property_tree::ptree const &params)\n>  \n>  void Awb::Initialise()\n>  {\n> -\tframe_count2_ = frame_count_ = frame_phase_ = 0;\n> +\tframe_count_ = frame_phase_ = 0;\n>  \t// Put something sane into the status that we are filtering towards,\n>  \t// just in case the first few frames don't have anything meaningful in\n>  \t// them.\n> @@ -288,11 +288,9 @@ void Awb::Process(StatisticsPtr &stats, Metadata *image_metadata)\n>  \t// Count frames since we last poked the async thread.\n>  \tif (frame_phase_ < (int)config_.frame_period)\n>  \t\tframe_phase_++;\n> -\tif (frame_count2_ < (int)config_.startup_frames)\n> -\t\tframe_count2_++;\n>  \tLOG(RPiAwb, Debug) << \"frame_phase \" << frame_phase_;\n>  \tif (frame_phase_ >= (int)config_.frame_period ||\n> -\t    frame_count2_ < (int)config_.startup_frames) {\n> +\t    frame_count_ < (int)config_.startup_frames) {\n>  \t\t// Update any settings and any image metadata that we need.\n>  \t\tstruct LuxStatus lux_status = {};\n>  \t\tlux_status.lux = 400; // in case no metadata\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> index 1b39ab4b..f113c642 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> @@ -130,7 +130,6 @@ private:\n>  \t// counts up to frame_period before restarting the async thread\n>  \tint frame_phase_;\n>  \tint frame_count_; // counts up to startup_frames\n> -\tint frame_count2_; // counts up to startup_frames for Process method\n>  \tAwbStatus sync_results_;\n>  \tAwbStatus prev_sync_results_;\n>  \tstd::string mode_name_;","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 97718BD162\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Feb 2021 15:45:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 044916162A;\n\tWed, 10 Feb 2021 16:45:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 865A2602FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Feb 2021 16:45:10 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E06BFDD;\n\tWed, 10 Feb 2021 16:45:09 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"b3f9oIwv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612971910;\n\tbh=Ovf7tohmdkVOtyCIVSw2BCWTpaWkSD21OmCo1c7BXtQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=b3f9oIwvoUqx1kZiD46YpNa2GilqZW+lCEqdcoDbDX2eQEU1zkZzodDNBtIMRMgRB\n\tUNaF5GNlgqsne+ISNPjPVQjh1MHoE+yr3K5omzFeHdyNek8G6QDwC+45eXDvBSUNRu\n\tLr/YDNWmD807K/67CxmX4AQf4h2duNQBELKwP94U=","Date":"Wed, 10 Feb 2021 17:44:46 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YCP/biSvyuu9z++e@pendragon.ideasonboard.com>","References":"<20210210111743.14374-1-david.plowman@raspberrypi.com>\n\t<20210210111743.14374-2-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210210111743.14374-2-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] ipa: raspberrypi: AWB: Remove\n\tunecessary frame count 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@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>"}},{"id":15084,"web_url":"https://patchwork.libcamera.org/comment/15084/","msgid":"<CAEmqJPp8jH=p81M48vkeys2PxX07_+uA98n1=XnzJdVOxkO_-A@mail.gmail.com>","date":"2021-02-10T17:14:46","subject":"Re: [libcamera-devel] [PATCH 1/2] ipa: raspberrypi: AWB: Remove\n\tunecessary frame count variable","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nThank you for your work.\n\nOn Wed, 10 Feb 2021 at 11:17, David Plowman <david.plowman@raspberrypi.com>\nwrote:\n\n> The variable frame_count2_ is not needed as Prepare() and Process()\n> always run in lock step one after the other.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n>\n\nLooks good!\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/awb.cpp | 6 ++----\n>  src/ipa/raspberrypi/controller/rpi/awb.hpp | 1 -\n>  2 files changed, 2 insertions(+), 5 deletions(-)\n>\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> index 791b5108..1c65eda8 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> @@ -153,7 +153,7 @@ void Awb::Read(boost::property_tree::ptree const\n> &params)\n>\n>  void Awb::Initialise()\n>  {\n> -       frame_count2_ = frame_count_ = frame_phase_ = 0;\n> +       frame_count_ = frame_phase_ = 0;\n>         // Put something sane into the status that we are filtering\n> towards,\n>         // just in case the first few frames don't have anything\n> meaningful in\n>         // them.\n> @@ -288,11 +288,9 @@ void Awb::Process(StatisticsPtr &stats, Metadata\n> *image_metadata)\n>         // Count frames since we last poked the async thread.\n>         if (frame_phase_ < (int)config_.frame_period)\n>                 frame_phase_++;\n> -       if (frame_count2_ < (int)config_.startup_frames)\n> -               frame_count2_++;\n>         LOG(RPiAwb, Debug) << \"frame_phase \" << frame_phase_;\n>         if (frame_phase_ >= (int)config_.frame_period ||\n> -           frame_count2_ < (int)config_.startup_frames) {\n> +           frame_count_ < (int)config_.startup_frames) {\n>                 // Update any settings and any image metadata that we need.\n>                 struct LuxStatus lux_status = {};\n>                 lux_status.lux = 400; // in case no metadata\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> index 1b39ab4b..f113c642 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> @@ -130,7 +130,6 @@ private:\n>         // counts up to frame_period before restarting the async thread\n>         int frame_phase_;\n>         int frame_count_; // counts up to startup_frames\n> -       int frame_count2_; // counts up to startup_frames for Process\n> method\n>         AwbStatus sync_results_;\n>         AwbStatus prev_sync_results_;\n>         std::string mode_name_;\n> --\n> 2.20.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\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 34D3CBD162\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Feb 2021 17:15:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB5406162E;\n\tWed, 10 Feb 2021 18:15:04 +0100 (CET)","from mail-lf1-x134.google.com (mail-lf1-x134.google.com\n\t[IPv6:2a00:1450:4864:20::134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 07089602FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Feb 2021 18:15:03 +0100 (CET)","by mail-lf1-x134.google.com with SMTP id v30so3638104lfq.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Feb 2021 09:15:03 -0800 (PST)"],"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=\"JBo6A/hB\"; 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=nJR+xwp+9+RNWjnJ9xrXZCbUErDIWVyV4DgcTMGV1no=;\n\tb=JBo6A/hBZYwhUmLeeFeN5miK2G419/ui5NQQptWup11nztEtsjt7pmafAJelUWUTom\n\tFikMsE3szKTDmshFSbeWngnhPojQ9MbpCPUWs37NNdu1I+0jJEBnz3GlcDtV0xOEO9M+\n\tbSrp/Kri1x/59lYPB22n6vx6zK8KmgUyGkF/Dik0FCy06XQY9tXcGGK2WNscfKtQWvHH\n\tRXh8QnJnhoExQcBuYlGV4M+495gADDVydgJBcwhNJ/CZYwhbTepej1eTy1MhxHqsPWJg\n\tLdKgNcQ4pEhzd+MeKSBgKVM/miYqP+dEiQgPa7SD9NNJ7Jvfsjg/7Yb7cukcd4QzUD6l\n\trVMQ==","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=nJR+xwp+9+RNWjnJ9xrXZCbUErDIWVyV4DgcTMGV1no=;\n\tb=qqEjswqGMsB2PLJX/D6S2Hu17PXBbqbR5euCgqVnqwEtAA+CS44zQzGfCWA4y3h/PS\n\tHzF0+4QMtkQOD1Emq5sZZi3oQHYIbAIRyeTBfY9fQ9/R2wVKTMUzQU+yF2uriRH9Lm/D\n\tKExXDe/hTjWh1375Vb5a5qR4BHlZW+aLCbx0rlWxTsuuXlaaZxHpXtIFusB9fPYO4pZQ\n\tcnvP7CiM+cCqT+O5ytFmmZy1zxwSaxiQ7a4lfszEpHdsd3NpPqeRJaz9tT1DFwiOqE35\n\tW2TM4ixhs55orXcwUCVo9OOYrNhZpLfOndtNNlrj0EVWON5UrUqzCRX6K/btYcX62O9e\n\tXZcg==","X-Gm-Message-State":"AOAM532kjrMmhqY0wrdMlKdYlb1B0GXdWUUz3dt1gEfnXPnqQ2m9n5D9\n\tU2v0ij+ZSzEIhCNre59ns5Jwn/7larR8VzTiB4QbZg==","X-Google-Smtp-Source":"ABdhPJzqxHUUuFjMvTRdVMkfgaD4z7ZOcpz3i65OFvPFgnOsoJpNyHZKN0FGW/LdhcMiAaWOgYdKHhJtOQLI1+MSWUE=","X-Received":"by 2002:ac2:44a3:: with SMTP id c3mr2112246lfm.210.1612977303278;\n\tWed, 10 Feb 2021 09:15:03 -0800 (PST)","MIME-Version":"1.0","References":"<20210210111743.14374-1-david.plowman@raspberrypi.com>\n\t<20210210111743.14374-2-david.plowman@raspberrypi.com>","In-Reply-To":"<20210210111743.14374-2-david.plowman@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 10 Feb 2021 17:14:46 +0000","Message-ID":"<CAEmqJPp8jH=p81M48vkeys2PxX07_+uA98n1=XnzJdVOxkO_-A@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] ipa: raspberrypi: AWB: Remove\n\tunecessary frame count 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":"multipart/mixed;\n\tboundary=\"===============6241352128493647845==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]