summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rpi/common')
-rw-r--r--src/ipa/rpi/common/ipa_base.cpp12
-rw-r--r--src/ipa/rpi/common/ipa_base.h3
2 files changed, 11 insertions, 4 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()
diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h
index eaa9f711..4db4411e 100644
--- a/src/ipa/rpi/common/ipa_base.h
+++ b/src/ipa/rpi/common/ipa_base.h
@@ -61,6 +61,8 @@ protected:
/* Track the frame length times over FrameLengthsQueueSize frames. */
std::deque<utils::Duration> frameLengths_;
utils::Duration lastTimeout_;
+ ControlList libcameraMetadata_;
+ bool statsMetadataOutput_;
private:
/* Number of metadata objects available in the context list. */
@@ -89,7 +91,6 @@ private:
bool lensPresent_;
bool monoSensor_;
- ControlList libcameraMetadata_;
std::array<RPiController::Metadata, numMetadataContexts> rpiMetadata_;