Skip to content

Commit 8cebd77

Browse files
committed
ipa: rpi: Apply default ControlInfo values for sensor controls (2)
Unfortunately the previous fix for default sensor ControlInfo values was incomplete, and the static list must also have default values so that the ConrolInfo during ipa::init() are present. Fix this. Fixes: ca36c77 ("ipa: rpi: Apply default ControlInfo values for sensor controls") Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent ca36c77 commit 8cebd77

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ipa/rpi/common/ipa_base.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ constexpr Duration controllerMinFrameDuration = 1.0s / 30.0;
5858
/* List of controls handled by the Raspberry Pi IPA */
5959
const ControlInfoMap::Map ipaControls{
6060
{ &controls::AeEnable, ControlInfo(false, true) },
61-
{ &controls::ExposureTime, ControlInfo(0, 66666) },
62-
{ &controls::AnalogueGain, ControlInfo(1.0f, 16.0f) },
61+
{ &controls::ExposureTime,
62+
ControlInfo(1, 66666, static_cast<int64_t>(defaultExposureTime.get<std::micro>())) },
63+
{ &controls::AnalogueGain, ControlInfo(1.0f, 16.0f, 1.0f) },
6364
{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },
6465
{ &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },
6566
{ &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },
@@ -73,7 +74,8 @@ const ControlInfoMap::Map ipaControls{
7374
{ &controls::HdrMode, ControlInfo(controls::HdrModeValues) },
7475
{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },
7576
{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },
76-
{ &controls::FrameDurationLimits, ControlInfo(INT64_C(33333), INT64_C(120000)) },
77+
{ &controls::FrameDurationLimits,
78+
ControlInfo(INT64_C(33333), INT64_C(120000), static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>())) },
7779
{ &controls::rpi::SyncMode, ControlInfo(controls::rpi::SyncModeValues) },
7880
{ &controls::rpi::SyncFrames, ControlInfo(1, 1000000, 100) },
7981
{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },

0 commit comments

Comments
 (0)