[libcamera-devel] [PATCH] ipa: rpi: vc4: Make the StatisticsPtr construction clearer
Naushir Patuck
naush at raspberrypi.com
Fri Jul 28 14:52:17 CEST 2023
Hi David,
Oops, thanks for the fix!
On Fri, 28 Jul 2023 at 13:49, David Plowman via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> StatisticsPtr is a shared pointer, so the use of std::make_unique to
> create it was a bit confusing. Use std::make_shared instead.
>
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
Reviewed-by: Naushir Patuck <naush at raspberrypi.com>
> ---
> src/ipa/rpi/vc4/vc4.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp
> index 789a345f..3eea40a6 100644
> --- a/src/ipa/rpi/vc4/vc4.cpp
> +++ b/src/ipa/rpi/vc4/vc4.cpp
> @@ -191,7 +191,7 @@ RPiController::StatisticsPtr IpaVc4::platformProcessStats(Span<uint8_t> mem)
> using namespace RPiController;
>
> const bcm2835_isp_stats *stats = reinterpret_cast<bcm2835_isp_stats *>(mem.data());
> - StatisticsPtr statistics = std::make_unique<Statistics>(Statistics::AgcStatsPos::PreWb,
> + StatisticsPtr statistics = std::make_shared<Statistics>(Statistics::AgcStatsPos::PreWb,
> Statistics::ColourStatsPos::PostLsc);
> const Controller::HardwareConfig &hw = controller_.getHardwareConfig();
> unsigned int i;
> --
> 2.30.2
>
More information about the libcamera-devel
mailing list