[{"id":27629,"web_url":"https://patchwork.libcamera.org/comment/27629/","msgid":"<CAEmqJPoW+EnJJE7nzwe3P2is6hQW48SoXTd8QtEyMUm_qnx5Ww@mail.gmail.com>","date":"2023-07-28T12:52:17","subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: vc4: Make the StatisticsPtr\n\tconstruction clearer","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nOops, thanks for the fix!\n\nOn Fri, 28 Jul 2023 at 13:49, David Plowman via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> StatisticsPtr is a shared pointer, so the use of std::make_unique to\n> create it was a bit confusing. Use std::make_shared instead.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>  src/ipa/rpi/vc4/vc4.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp\n> index 789a345f..3eea40a6 100644\n> --- a/src/ipa/rpi/vc4/vc4.cpp\n> +++ b/src/ipa/rpi/vc4/vc4.cpp\n> @@ -191,7 +191,7 @@ RPiController::StatisticsPtr IpaVc4::platformProcessStats(Span<uint8_t> mem)\n>         using namespace RPiController;\n>\n>         const bcm2835_isp_stats *stats = reinterpret_cast<bcm2835_isp_stats *>(mem.data());\n> -       StatisticsPtr statistics = std::make_unique<Statistics>(Statistics::AgcStatsPos::PreWb,\n> +       StatisticsPtr statistics = std::make_shared<Statistics>(Statistics::AgcStatsPos::PreWb,\n>                                                                 Statistics::ColourStatsPos::PostLsc);\n>         const Controller::HardwareConfig &hw = controller_.getHardwareConfig();\n>         unsigned int i;\n> --\n> 2.30.2\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 65589BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Jul 2023 12:52:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0B57627EC;\n\tFri, 28 Jul 2023 14:52:24 +0200 (CEST)","from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com\n\t[IPv6:2607:f8b0:4864:20::1131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BE135627E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 14:52:23 +0200 (CEST)","by mail-yw1-x1131.google.com with SMTP id\n\t00721157ae682-583ae4818c8so21777767b3.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 05:52:23 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690548744;\n\tbh=aK/Swwe81bzD3GrlvjNHq+6WSZbs+Uu2hFa5ExfRc3Y=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=D4g/PoW0i325M8dT1yQyTx4Zk+iXiqb7CoMQqIIdvJIKeQ68ybE4ryjelxu0CFDDz\n\t31cYij4bYGPdhyy84c7v0QrJb3HjEWSVMnsoOFfUU6Rto5GhXw6gTCgmlt54bsJhIE\n\t/69gKrPNNufpyu1K6nnacZlkAKGnA0Apw61aQigX424/Oyyy+0CdLQ/ZcGUyiicUWs\n\tUVZz74dK0CtIO7W564YqCF/DFT60w8n8nN8sT+Uiq8EgiDg/c+l4X4XbMjUqQgYMX7\n\td7N1sub+XEknoUfAEKcil6oa1RvaSEZSPqCW71Pl/n7Lw8MnJ/XwBlxMJndvN+unMQ\n\tcxpUx/o8zICbA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690548742; x=1691153542;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=zIZIo64i6Ybevi8kdRYqz1q95ac86zVvCL36VOFZbLo=;\n\tb=lHBSb9sNmb5JK8EjAyof/row34DYMCGSmKRTjcmC3I5JLrNvPVLrp59QzFUBG8ELcz\n\tv/0S2Pz3BtF7DL5IMndRn6//KR8GqJ6P4Vs1zk2k8Ts71Qf0cjQOmadwHnKHn7/uTxIy\n\tmZ88tI4M8BrOqPpGG8ByQVHiV55/fs6zHwFh9thNlS215Vk0FYxjVi3xrqCmF1CNkTMw\n\t//9INUDKx55I7gCEXDsAqzcgZmQM8Kt+1mXAzn7W3WPkrFG/J9EZrx5IZEUwORZn0ojx\n\tWBHBHBouHa+7Z1NIVemoa/fIWGCdo1xnk2D0xUwFoOQUuAu66dTSdgOTDdMG9lawq1jw\n\tZR1w=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"lHBSb9sN\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690548742; x=1691153542;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=zIZIo64i6Ybevi8kdRYqz1q95ac86zVvCL36VOFZbLo=;\n\tb=CaT4A9A/09adTouzKPRjKKsDDDW/h0aA1hqpsITGLVEtWoHogwlP+BAmTPtR9OOYEp\n\tQ9SChFxTDDPifMlLGNWUemFeZDMgjfoSKZkZCNcl7IpLVntPdYmBfjMW/zr3+pMO3DTc\n\tqfjaqIIwgcCnv8CoJw09M07bzokzb8hLEcjS6P5AC3dMK5oPscvCTXjkZL+tq3/1CNdw\n\tTBx2HVROXYz7ZusrK1/np6dBr5KQR1ldwvTisgqtvkeZnuxiqjK7QauLC1eyjOQaZz/X\n\tpBx4J5Ext5u6wBdYpAFxmg3cXVAbRBvgeOtwbkpEhx42IW8H0hidZS5Hme9wYNqluVAz\n\twt+A==","X-Gm-Message-State":"ABy/qLb+Q0F0WlCAMYnglWXJtxRgg0iIjg1c5aKj4vy6maFT3vOQ0Nuu\n\troEY+drYW2VPFOd1D1qB3+WggteBSuTEW5h7FoHuMQ==","X-Google-Smtp-Source":"APBJJlGiV/3jADQuv5GKtzt6Ev684TLI2bQaMsMNzBY9TpLDMOObg5zTj2ySah9iMa1CNGF+BLAtZAS+9sjDau+WUJA=","X-Received":"by 2002:a0d:db44:0:b0:561:c5d4:ee31 with SMTP id\n\td65-20020a0ddb44000000b00561c5d4ee31mr1990267ywe.38.1690548742482;\n\tFri, 28 Jul 2023 05:52:22 -0700 (PDT)","MIME-Version":"1.0","References":"<20230728124907.3113-1-david.plowman@raspberrypi.com>","In-Reply-To":"<20230728124907.3113-1-david.plowman@raspberrypi.com>","Date":"Fri, 28 Jul 2023 13:52:17 +0100","Message-ID":"<CAEmqJPoW+EnJJE7nzwe3P2is6hQW48SoXTd8QtEyMUm_qnx5Ww@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: vc4: Make the StatisticsPtr\n\tconstruction clearer","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27730,"web_url":"https://patchwork.libcamera.org/comment/27730/","msgid":"<169384673848.3149831.16837471410323581075@ping.linuxembedded.co.uk>","date":"2023-09-04T16:58:58","subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: vc4: Make the StatisticsPtr\n\tconstruction clearer","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman via libcamera-devel (2023-07-28 13:49:07)\n> StatisticsPtr is a shared pointer, so the use of std::make_unique to\n> create it was a bit confusing. Use std::make_shared instead.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/rpi/vc4/vc4.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp\n> index 789a345f..3eea40a6 100644\n> --- a/src/ipa/rpi/vc4/vc4.cpp\n> +++ b/src/ipa/rpi/vc4/vc4.cpp\n> @@ -191,7 +191,7 @@ RPiController::StatisticsPtr IpaVc4::platformProcessStats(Span<uint8_t> mem)\n>         using namespace RPiController;\n>  \n>         const bcm2835_isp_stats *stats = reinterpret_cast<bcm2835_isp_stats *>(mem.data());\n> -       StatisticsPtr statistics = std::make_unique<Statistics>(Statistics::AgcStatsPos::PreWb,\n> +       StatisticsPtr statistics = std::make_shared<Statistics>(Statistics::AgcStatsPos::PreWb,\n>                                                                 Statistics::ColourStatsPos::PostLsc);\n>         const Controller::HardwareConfig &hw = controller_.getHardwareConfig();\n>         unsigned int i;\n> -- \n> 2.30.2\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 C2FCDC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Sep 2023 16:59:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F3C34628E9;\n\tMon,  4 Sep 2023 18:59:02 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DC7C628D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Sep 2023 18:59:01 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 026C375A;\n\tMon,  4 Sep 2023 18:57:34 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1693846743;\n\tbh=F/8+1WP0fprQB3JsaxZIldxEuI27jZnuVa9ydnzI4Rc=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=i3pRz0lh/oBpacfFS5s9bABZMHVPSUuOSvrBS7zRJ11UkZyIpWwzPS1xBORWvBH4e\n\tT+40QJTiMr+9pKqQbfw2LU8ae1Q7aXU9H9Dmop+qjXsYsoQ1/oeNV9eNocUzUX+Fa9\n\tj5TU4AJPriBP2+O1saF9ZfK49NG5wfuwVimEajriSgBeVMwZ+Sr/t2bXE8CIW0D2bS\n\tqsqMkssPqDQWv6dDhG4xoVGH7L5Dzp76KsHmWK+46PYjBSthJ5OGlSeRhKMWcfqoHT\n\tTo8F/C86JMhl7unlC7GmYtgCZA4zszVGW9MTrEEOm7acHf6L4Tg5jQ3E0EpOuXEcRA\n\tl9Z0rpdoPOe3w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1693846655;\n\tbh=F/8+1WP0fprQB3JsaxZIldxEuI27jZnuVa9ydnzI4Rc=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=HvYmVqesEgEmDnL2njsKbj8L+MhqrogT22ForXe/fBGa6nZWSLsKyaLMXu/PYn2CT\n\ticVgzP7HBkvYZmcZLNDLcWOikZJ4Xma/tuFFwANpUGqe93RvKm7OkichgAro3So2Dx\n\tyWcxYpqT1FDoONaxj1bcbqme++YhBIxP8x4ghv5Y="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HvYmVqes\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230728124907.3113-1-david.plowman@raspberrypi.com>","References":"<20230728124907.3113-1-david.plowman@raspberrypi.com>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 04 Sep 2023 17:58:58 +0100","Message-ID":"<169384673848.3149831.16837471410323581075@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: vc4: Make the StatisticsPtr\n\tconstruction clearer","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]