@@ -20,6 +20,7 @@
#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
+#include <libcamera/base/span.h>
#include <libcamera/base/utils.h>
#include <libcamera/control_ids.h>
@@ -280,10 +281,9 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,
uint64_t frameSize = lineLength * frameHeights[i];
frameDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);
}
-
controls[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],
frameDurations[1],
- frameDurations[2]);
+ Span<const int64_t, 2>{ { frameDurations[2], frameDurations[2] } });
controls.merge(context_.ctrlMap);
*ipaControls = ControlInfoMap(std::move(controls), controls::controls);
@@ -5,6 +5,7 @@
* Mali-C55 ISP image processing algorithms
*/
+#include <array>
#include <map>
#include <string.h>
#include <vector>
@@ -14,6 +15,7 @@
#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
+#include <libcamera/base/span.h>
#include <libcamera/control_ids.h>
#include <libcamera/ipa/ipa_interface.h>
@@ -236,7 +238,7 @@ void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo,
ctrlMap[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],
frameDurations[1],
- frameDurations[2]);
+ Span<const int64_t, 2>{ { frameDurations[2], frameDurations[2] } });
/*
* Compute exposure time limits from the V4L2_CID_EXPOSURE control
@@ -91,7 +91,9 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData)
kMaxColourTemperature,
kDefaultColourTemperature);
cmap[&controls::AwbEnable] = ControlInfo(false, true);
- cmap[&controls::ColourGains] = ControlInfo(0.0f, 3.996f, 1.0f);
+
+ cmap[&controls::ColourGains] = ControlInfo(0.0f, 3.996f,
+ Span<const float, 2>{ { 1.0f, 1.0f } });
if (!tuningData.contains("algorithm"))
LOG(RkISP1Awb, Info) << "No AWB algorithm specified."
@@ -439,7 +439,8 @@ void IPARkISP1::updateControls(const IPACameraSensorInfo &sensorInfo,
/* \todo Move this (and other agc-related controls) to agc */
context_.ctrlMap[&controls::FrameDurationLimits] =
- ControlInfo(frameDurations[0], frameDurations[1], frameDurations[2]);
+ ControlInfo(frameDurations[0], frameDurations[1],
+ ControlValue(Span<const int64_t, 2>{ { frameDurations[2], frameDurations[2] } }));
ctrlMap.insert(context_.ctrlMap.begin(), context_.ctrlMap.end());
*ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);
@@ -7,6 +7,7 @@
#include "ipa_base.h"
+#include <array>
#include <cmath>
#include <libcamera/base/log.h>
@@ -99,13 +100,16 @@ const ControlInfoMap::Map ipaColourControls{
{ &controls::Saturation, ControlInfo(0.0f, 32.0f, 1.0f) },
};
+std::array<Rectangle, 1> defaultAfWindows = { Rectangle{} };
+
/* IPA controls handled conditionally, if the lens has a focus control */
const ControlInfoMap::Map ipaAfControls{
{ &controls::AfMode, ControlInfo(controls::AfModeValues) },
{ &controls::AfRange, ControlInfo(controls::AfRangeValues) },
{ &controls::AfSpeed, ControlInfo(controls::AfSpeedValues) },
{ &controls::AfMetering, ControlInfo(controls::AfMeteringValues) },
- { &controls::AfWindows, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },
+ { &controls::AfWindows, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535),
+ Span<const Rectangle, 1>{ defaultAfWindows }) },
{ &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },
{ &controls::AfPause, ControlInfo(controls::AfPauseValues) },
{ &controls::LensPosition, ControlInfo(0.0f, 32.0f, 1.0f) }
@@ -246,7 +250,8 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa
ctrlMap[&controls::FrameDurationLimits] =
ControlInfo(static_cast<int64_t>(mode_.minFrameDuration.get<std::micro>()),
static_cast<int64_t>(mode_.maxFrameDuration.get<std::micro>()),
- static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()));
+ Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()),
+ static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } });
ctrlMap[&controls::AnalogueGain] =
ControlInfo(static_cast<float>(mode_.minAnalogueGain),