{"id":11205,"url":"https://patchwork.libcamera.org/api/1.1/patches/11205/?format=json","web_url":"https://patchwork.libcamera.org/patch/11205/","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":"<20210210111743.14374-2-david.plowman@raspberrypi.com>","date":"2021-02-10T11:17:42","name":"[libcamera-devel,1/2] ipa: raspberrypi: AWB: Remove unecessary frame count variable","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"aebe79bcbc3b6726bb2e33f6ae876a6bddb2ffbf","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/1.1/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11205/mbox/","series":[{"id":1673,"url":"https://patchwork.libcamera.org/api/1.1/series/1673/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1673","date":"2021-02-10T11:17:41","name":"Raspberry Pi AWB race condition and maintenance","version":1,"mbox":"https://patchwork.libcamera.org/series/1673/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11205/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11205/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 1E1BCBD16C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Feb 2021 11:17:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC14461631;\n\tWed, 10 Feb 2021 12:17:50 +0100 (CET)","from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com\n\t[IPv6:2a00:1450:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FF7760300\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Feb 2021 12:17:49 +0100 (CET)","by mail-ej1-x62a.google.com with SMTP id w1so3391505ejf.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Feb 2021 03:17:49 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tdt17sm892659ejb.70.2021.02.10.03.17.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 10 Feb 2021 03:17:48 -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=\"ppX+AkQA\"; 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=2uPjPtRGwcM8UxYCkq6ukzmkPLRNZbgsghs2S7MjZSI=;\n\tb=ppX+AkQAiTlxp+VZzmI8rm60cAm/fb7weGpNj7GKQMeP0UvQb8N1Rya329ltnAZRTC\n\tUwDEJ7oF+46RjFBDsIWRFb1b9ciLm/gVwHeD1AWz5XP/v3lsGiDAVUNWg79n4I/b2dqF\n\t8Q5hyBPyyy/Ip6ACOqiZ3L82LB8G1+Mx9fwPS94XVjWUyEc6OM47M9cRPd0qghjz4Ftg\n\t+0Fe7Sy9C4B6OTNbOlDc5vtsDEPgQ7u1x/nIda9pmiu+Gx+NjkpQmKJBzPVNahR0RNya\n\t5v2wctEYVZYvIxgANrg02w56Y9pVfcV2gqzy3dkXXtRfxy54PFdPsB/hDzWvN7DLxFQS\n\t6Q1w==","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=2uPjPtRGwcM8UxYCkq6ukzmkPLRNZbgsghs2S7MjZSI=;\n\tb=A+mMZ3BiEDcnHoDz8ZYzuhNl+wmmscZcPk74Mfgy+6S2ve10WpSvX4qh7ggGUqxWtt\n\tVnKuTQ4CrVUOVNnW/2w5HTZJlWsFtrKLFS0huPZnxJe24Q9KuYJMBRRuUdt+df5axfMI\n\tIgvHfVyv+fK3hCPSUd/eWTaalZPcrHE8dHGkD91tDhcGLRIavBkjv7afD0pEVGP4rsHg\n\tTrhh1sgJgsZj4cup2DfOPP6gVQw43WocpIGuwrtvNxKcWT07D0Qt8f0a3d52udtl2CPz\n\tAejKvN8vQBb/6z7Bacb+Y1V3miLO7F3jV6vHsptrBTCfDCgsWZbBhGDVLE2PjBuHpzCK\n\t51zQ==","X-Gm-Message-State":"AOAM531dynWRHjyc8RENhfzZibVYmLP8knZcbIGchWhmm0yoZ3ecqAga\n\tqqfHYP4WjiY4pxQQQqbGBTTFAjfgdObeQ8zY","X-Google-Smtp-Source":"ABdhPJyeB0nrjZXlI0hch8rdJtOioMFNI1LrLSxaEYH48/AVwzpVdrTicfiCY/LIzzkyZdLmH5M6Jw==","X-Received":"by 2002:a17:907:2058:: with SMTP id\n\tpg24mr2381793ejb.441.1612955868540; \n\tWed, 10 Feb 2021 03:17:48 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 10 Feb 2021 11:17:42 +0000","Message-Id":"<20210210111743.14374-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20210210111743.14374-1-david.plowman@raspberrypi.com>","References":"<20210210111743.14374-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[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>","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":"The variable frame_count2_ is not needed as Prepare() and Process()\nalways run in lock step one after the other.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\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(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex 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\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\nindex 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_;\n","prefixes":["libcamera-devel","1/2"]}