ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls
The ControlInfos of non-scalar controls that are reported in controls() must have non-scalar default values for controls that have a defined size. This is because applications should be able to directly set the default value from a ControlInfo to the control. Currently this is relevant to the following controls: - ColourGains - ColourCorrectionMatrix - FrameDurationLimits - AfWindows Fix the scalarness of these controls where relevant. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> # rkisp1 Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
cfdc281100
commit
4e9be7d11b
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "ipa_base.h"
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
|
||||
#include <libcamera/base/log.h>
|
||||
@@ -105,7 +106,8 @@ const ControlInfoMap::Map ipaAfControls{
|
||||
{ &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>{ { Rectangle{} } }) },
|
||||
{ &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },
|
||||
{ &controls::AfPause, ControlInfo(controls::AfPauseValues) },
|
||||
{ &controls::LensPosition, ControlInfo(0.0f, 32.0f, 1.0f) }
|
||||
@@ -246,7 +248,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),
|
||||
|
||||
Reference in New Issue
Block a user