From 0110d9915e6bbea06707a9b62f313d3ec44a059a Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 4 Dec 2023 16:19:01 +0000 Subject: ipa: vc4: Implement the StatsOutputEnable vendor control Implement the StatsOutputEnable control for the VC4 IPA. When set, this outputs the ISP statistics as a uint8_t span through the Bcm2835StatsOutput metadata control. To get this working, IpaBase::libcameraMetadata_ is moved from a private to a protected member variable. This makes it accessable to the VC4 derived IPA class. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/rpi/vc4/vc4.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ipa/rpi/vc4') diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp index c165a5b8..d2159a51 100644 --- a/src/ipa/rpi/vc4/vc4.cpp +++ b/src/ipa/rpi/vc4/vc4.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -245,6 +246,12 @@ RPiController::StatisticsPtr IpaVc4::platformProcessStats(Span mem) stats->focus_stats[i].contrast_val_num[1][1], stats->focus_stats[i].contrast_val_num[1][0] }); + if (statsMetadataOutput_) { + Span statsSpan(reinterpret_cast(stats), + sizeof(bcm2835_isp_stats)); + libcameraMetadata_.set(controls::rpi::Bcm2835StatsOutput, statsSpan); + } + return statistics; } -- cgit v1.2.1