{"id":17832,"url":"https://patchwork.libcamera.org/api/patches/17832/?format=json","web_url":"https://patchwork.libcamera.org/patch/17832/","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":"<20221122112224.31691-4-naush@raspberrypi.com>","date":"2022-11-22T11:22:22","name":"[libcamera-devel,v1,3/5] ipa: raspberrypi: awb: Delay release of the statistics buffer","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"bfeaf5625c13acb70d2cf68ebd0eaf6be7f73509","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/17832/mbox/","series":[{"id":3627,"url":"https://patchwork.libcamera.org/api/series/3627/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3627","date":"2022-11-22T11:22:19","name":"Raspberry Pi: Generalise statistics","version":1,"mbox":"https://patchwork.libcamera.org/series/3627/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17832/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17832/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 7577DBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Nov 2022 11:22:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0535063319;\n\tTue, 22 Nov 2022 12:22:32 +0100 (CET)","from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 823526331D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Nov 2022 12:22:29 +0100 (CET)","by mail-wm1-x32f.google.com with SMTP id\n\tp13-20020a05600c468d00b003cf8859ed1bso11059905wmo.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Nov 2022 03:22:29 -0800 (PST)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq125-20020a1c4383000000b003c6cd82596esm21400388wma.43.2022.11.22.03.22.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Nov 2022 03:22:28 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669116152;\n\tbh=ITa9tEwEKy2zHLDsWR78Jt6uw0jVRF4OguWTlKQnrZU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=jRb/K13yap7DpPELnTVpZ0rJL3X1XLhil4GquMLZ7lLnBdpJUNaprnboLxH+ELhp6\n\t62JDXAXtcbiHkeLlfwcm0sdCRKN9g2cpKq40n3kDeRmKUnfXmpfSXeKjQYmNOQYKrE\n\tenSoBF6Y37ie70Cc+VFSDo0LquakAIx2Ikn2z5y9o4dSfSWrTpE04h7kRdgSL+9fq9\n\tstap7QvRmLNfkYtx/iRv/g6elvjkDKZZQn08ZaEMk62JA94W3z2I2JU/DrLw/IbKka\n\tj2YgQGxTFsKFMEeos9yMIDN0cKUkA7Kpky9jxwo6RFTKQFzukdizgXTpTDtXio4G26\n\t5dNK5va9l/ZCQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=iiHzRQDeANfYrEuD7IDZlbSTxQgE8EZsA8eKtigFok4=;\n\tb=rOiaQKp05GdVNO7PWtguf25TO8J+sryTDtB1b2F/SLZ0KTo4ltNzI9kDa9VMibZkj8\n\tzB7AhqX0KECmW1GqM9GdG1QErY1wGOar4Vqpl2bxLsgJw/4F2EcTcwHoFE/pKqBJRPGc\n\tcNeFJSI78nekpcmLa+N33InuMg5eHX8ubysGEbq+0fho4BRgihk8jwTBMRza6Sba6XmN\n\tREl/IURH5cW0anwS+mdWOlqxADBBtxZUv+Jd0bJXhS4XECHWLhz8MIzQSifgZzU9qmy+\n\t1Gq2p4PGHB8xvj58aiOh/gvfMJNEamaRT2vsmtcaM6O7bku0Vn5/ba4eVz3HF3jumrqR\n\tZG4w=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"rOiaQKp0\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=iiHzRQDeANfYrEuD7IDZlbSTxQgE8EZsA8eKtigFok4=;\n\tb=r4tWLouZKiXxY9cZ0A7VlN+OzUQKoGXuMsEVkckKxX8QqAb50ANQBs6T66DAwMaqeb\n\tqxFe215N0UHZK9J7+Kl1Wc8+JJorrDBO/VhNGNwTiDTqRapIV7jRihqw14icvewPX/xX\n\t+vC3RKINTiUt9xKCsC+nH8edJznAIHVRbOnLqwnxZXscJ19ChIgMakhoscO0dzJmgfgV\n\tAM1J26KAyY9pbOfrGEjzeh7Pcske45NOivghQT1spc+CFWpuvBRix1TxOidnGHk4Q0Mw\n\ttcVB1dqwVJ9iElWzqu4x9CvdaHKNcJtthyn8Qu/C1JTOTXDbl42dibi2XBaynQK6CtFZ\n\tUFuQ==","X-Gm-Message-State":"ANoB5pnNe+ZBrIy7tUOUrJrcY8WruvCdnywlJKbt7xAb6vW7R0o1brkm\n\tNwb6kOychriB/i1HY/H8JhtkHyrp3R4z1w==","X-Google-Smtp-Source":"AA0mqf7gE9xIW4GdnDrQKu5R2fNHDvAxLXMd8Lb3lNWTbnvJ3IFyisR1DOovlp8CEVzbJvg+ut6fIA==","X-Received":"by 2002:a05:600c:1f1b:b0:3cf:35c8:289f with SMTP id\n\tbd27-20020a05600c1f1b00b003cf35c8289fmr7112407wmb.153.1669116148965; \n\tTue, 22 Nov 2022 03:22:28 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 22 Nov 2022 11:22:22 +0000","Message-Id":"<20221122112224.31691-4-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20221122112224.31691-1-naush@raspberrypi.com>","References":"<20221122112224.31691-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 3/5] ipa: raspberrypi: awb: Delay\n\trelease of the statistics buffer","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Release the statistics buffer after running the through the AWB calculations.\nOnly the \"counted\" statistics are copied out to a local structure, so keeping\nthe statistics buffer allows the algorithm to see the \"uncounted\" statistics as\nwell.\n\nThis is currently handled by hard-coding the total number of statistics regions\nregions based on the structure definition in the bcm2835_isp_stats structure.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/rpi/awb.cpp | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex 8d8ddf0913f7..861022014896 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -432,11 +432,6 @@ void Awb::prepareStats()\n \t */\n \tgenerateStats(zones_, statistics_->awb_stats, config_.minPixels,\n \t\t      config_.minG);\n-\t/*\n-\t * we're done with these; we may as well relinquish our hold on the\n-\t * pointer.\n-\t */\n-\tstatistics_.reset();\n \t/*\n \t * apply sensitivities, so values appear to come from our \"canonical\"\n \t * sensor.\n@@ -733,6 +728,11 @@ void Awb::doAwb()\n \t\t\t<< \" with gains r \" << asyncResults_.gainR\n \t\t\t<< \" and b \" << asyncResults_.gainB;\n \t}\n+\t/*\n+\t * we're done with these; we may as well relinquish our hold on the\n+\t * pointer.\n+\t */\n+\tstatistics_.reset();\n }\n \n /* Register algorithm with the system. */\n","prefixes":["libcamera-devel","v1","3/5"]}