summaryrefslogtreecommitdiff
path: root/src/libcamera/controls.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-05-07 13:44:44 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-05-07 17:21:11 +0100
commit414babb60b5453bf2a2d206088c0b4a1b48da15e (patch)
tree3d7658e3e7796e867c7f0d5e57d9b93bf2babb65 /src/libcamera/controls.cpp
parentd66fd818ec64acb37ede85af78fdb0d1d0041b65 (diff)
libcamera: controls: Remove merge assertion
The ControlList merge operation is protected with an ASSERT to guarantee that the two lists are compatible. Unfortunately this assertion fails when we run IPAs in an isolated case as while the lists are compatible, the isolated IPA has a unique instance of the id map. This breaks the pointer comparison, and the assertion fails with a false positive. Remove the assertion, leaving only a todo in it's place as this breaks active users of the library. Bug: https://bugs.libcamera.org/show_bug.cgi?id=31 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/controls.cpp')
-rw-r--r--src/libcamera/controls.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index b763148d..5aef4e71 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -890,7 +890,17 @@ ControlList::ControlList(const ControlInfoMap &infoMap, ControlValidator *valida
*/
void ControlList::merge(const ControlList &source)
{
- ASSERT(idmap_ == source.idmap_);
+ /**
+ * \todo: ASSERT that the current and source ControlList are derived
+ * from a compatible ControlIdMap, to prevent undefined behaviour due to
+ * id collisions.
+ *
+ * This can not currently be a direct pointer comparison due to the
+ * duplication of the ControlIdMaps in the isolated IPA use cases.
+ * Furthermore, manually checking each entry of the id map is identical
+ * is expensive.
+ * See https://bugs.libcamera.org/show_bug.cgi?id=31 for further details
+ */
for (const auto &ctrl : source) {
if (contains(ctrl.first)) {