|
7 | 7 |
|
8 | 8 | #include "ipa_base.h" |
9 | 9 |
|
| 10 | +#include <array> |
10 | 11 | #include <cmath> |
11 | 12 |
|
12 | 13 | #include <libcamera/base/log.h> |
@@ -99,13 +100,16 @@ const ControlInfoMap::Map ipaColourControls{ |
99 | 100 | { &controls::Saturation, ControlInfo(0.0f, 32.0f, 1.0f) }, |
100 | 101 | }; |
101 | 102 |
|
| 103 | +std::array<Rectangle, 1> defaultAfWindows = { Rectangle{} }; |
| 104 | + |
102 | 105 | /* IPA controls handled conditionally, if the lens has a focus control */ |
103 | 106 | const ControlInfoMap::Map ipaAfControls{ |
104 | 107 | { &controls::AfMode, ControlInfo(controls::AfModeValues) }, |
105 | 108 | { &controls::AfRange, ControlInfo(controls::AfRangeValues) }, |
106 | 109 | { &controls::AfSpeed, ControlInfo(controls::AfSpeedValues) }, |
107 | 110 | { &controls::AfMetering, ControlInfo(controls::AfMeteringValues) }, |
108 | | - { &controls::AfWindows, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) }, |
| 111 | + { &controls::AfWindows, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), |
| 112 | + Span<const Rectangle, 1>{ defaultAfWindows }) }, |
109 | 113 | { &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) }, |
110 | 114 | { &controls::AfPause, ControlInfo(controls::AfPauseValues) }, |
111 | 115 | { &controls::LensPosition, ControlInfo(0.0f, 32.0f, 1.0f) } |
@@ -246,7 +250,8 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa |
246 | 250 | ctrlMap[&controls::FrameDurationLimits] = |
247 | 251 | ControlInfo(static_cast<int64_t>(mode_.minFrameDuration.get<std::micro>()), |
248 | 252 | static_cast<int64_t>(mode_.maxFrameDuration.get<std::micro>()), |
249 | | - static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>())); |
| 253 | + Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()), |
| 254 | + static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } }); |
250 | 255 |
|
251 | 256 | ctrlMap[&controls::AnalogueGain] = |
252 | 257 | ControlInfo(static_cast<float>(mode_.minAnalogueGain), |
|
0 commit comments