diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-12-04 16:19:01 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-01-09 15:39:03 +0000 |
commit | 0110d9915e6bbea06707a9b62f313d3ec44a059a (patch) | |
tree | 867d981f2dceb8669c66c0ce510db6c8a9252f44 /src/ipa/rpi/common/ipa_base.cpp | |
parent | 12ffe28e1c6d43bd2a4e4bc15d36821d78f42e74 (diff) |
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 <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi/common/ipa_base.cpp')
-rw-r--r-- | src/ipa/rpi/common/ipa_base.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 6ec91575..ed42647e 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -70,7 +70,8 @@ const ControlInfoMap::Map ipaControls{ { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) }, { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) }, { &controls::FrameDurationLimits, ControlInfo(INT64_C(33333), INT64_C(120000)) }, - { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) } + { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }, + { &controls::rpi::StatsOutputEnable, ControlInfo(false, true) }, }; /* IPA controls handled conditionally, if the sensor is not mono */ @@ -100,8 +101,9 @@ LOG_DEFINE_CATEGORY(IPARPI) namespace ipa::RPi { IpaBase::IpaBase() - : controller_(), frameLengths_(FrameLengthsQueueSize, 0s), frameCount_(0), - mistrustCount_(0), lastRunTimestamp_(0), firstStart_(true), flickerState_({ 0, 0s }) + : controller_(), frameLengths_(FrameLengthsQueueSize, 0s), statsMetadataOutput_(false), + frameCount_(0), mistrustCount_(0), lastRunTimestamp_(0), firstStart_(true), + flickerState_({ 0, 0s }) { } @@ -1162,6 +1164,10 @@ void IpaBase::applyControls(const ControlList &controls) break; } + case controls::rpi::STATS_OUTPUT_ENABLE: + statsMetadataOutput_ = ctrl.second.get<bool>(); + break; + default: LOG(IPARPI, Warning) << "Ctrl " << controls::controls.at(ctrl.first)->name() |