libcamera: control_serializer: Add array info to serialized ControlValue
Array controls (eg. ColourCorrectionMatrix, FrameDurationLimits, ColourGains) are serialized properly by the ControlSerializer, but are not deserialized properly. This is because their arrayness and size are not considered during deserialization. Fix this by adding arrayness and size to the serialized form of all ControlValues. This is achieved by fully serializing the min/max/def ControlValue's metadata associated with each ControlInfo entry in the ControlInfoMap. While at it, clean up the serialization format of ControlValues and ControlLists: - ControlValue's id is only used by ControlList, so add a new struct for ControlList entries to contain it, and remove id from ControlValue - Remove offset from ControlInfo's entry, as it is no longer needed, since the serialized data of a ControlInfo has now been converted to simply three serialized ControlValues - Remove the type from the serialized data of ControlValue, as it is already in the metadata entry The issue regarding array controls was not noticed before because the default value of the ControlInfo of other array controls had been set to scalar values similar to how min/max are set, and ColourCorrectionMatrix was the first control to properly define a non-scalar default value. Bug: https://bugs.libcamera.org/show_bug.cgi?id=285 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> # rkisp1 Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
7313f046a2
commit
cfdc281100
@@ -47,9 +47,13 @@ private:
|
||||
static void store(const ControlValue &value, ByteStreamBuffer &buffer);
|
||||
static void store(const ControlInfo &info, ByteStreamBuffer &buffer);
|
||||
|
||||
void populateControlValueEntry(struct ipa_control_value_entry &entry,
|
||||
const ControlValue &value,
|
||||
uint32_t offset);
|
||||
|
||||
ControlValue loadControlValue(ByteStreamBuffer &buffer,
|
||||
bool isArray = false, unsigned int count = 1);
|
||||
ControlInfo loadControlInfo(ByteStreamBuffer &buffer);
|
||||
ControlType type,
|
||||
bool isArray, unsigned int count);
|
||||
|
||||
unsigned int serial_;
|
||||
unsigned int serialSeed_;
|
||||
|
||||
Reference in New Issue
Block a user