{"id":25984,"url":"https://patchwork.libcamera.org/api/covers/25984/?format=json","web_url":"https://patchwork.libcamera.org/cover/25984/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260128074956.760538-1-paul.elder@ideasonboard.com>","date":"2026-01-28T07:49:48","name":"[v5,0/8] Add Layers support","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/25984/mbox/","series":[{"id":5747,"url":"https://patchwork.libcamera.org/api/series/5747/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5747","date":"2026-01-28T07:49:48","name":"Add Layers support","version":5,"mbox":"https://patchwork.libcamera.org/series/5747/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/25984/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6AF71C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Jan 2026 07:50:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB81261FC9;\n\tWed, 28 Jan 2026 08:50:10 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17CCE61A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Jan 2026 08:50:09 +0100 (CET)","from neptunite.hamster-moth.ts.net (unknown\n\t[IPv6:2404:7a81:160:2100:508d:7983:72a6:2eeb])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2086373B;\n\tWed, 28 Jan 2026 08:49:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"iCL07mgz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769586571;\n\tbh=Ikhnz3U+nfyBSZ4iGmrNlkOSWefRRHbZ4PwSTfeYqIc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=iCL07mgzen9xxkIy6+gwIf1vaNz2TaPGtRf247DBvOhQ6VteT7iipha2L4AcQ8fR6\n\tEwMNdES0dVAVbp9bYk9snhBwLcfB9YyR0HolqNTI9YFBGcNyU7tOmhYBo1ggyJXIkR\n\t/558mEIzhyova8o786JrydVmy7AJ4UReLrgzeZcM=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Paul Elder <paul.elder@ideasonboard.com>, kieran.bingham@ideasonboard.com,\n\tstefan.klug@ideasonboard.com, barnabas.pocze@ideasonboard.com","Subject":"[PATCH v5 0/8] Add Layers support","Date":"Wed, 28 Jan 2026 16:49:48 +0900","Message-ID":"<20260128074956.760538-1-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.47.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This series introduces a new concept to libcamera, called Layers. They\nsit between the application and the Camera, and hook into a subset of\nthe Camera calls. This allows things that don't belong inside a\nCamera/IPA nor inside an application to be implemented, such as the Sync\nalgorithm. As a light demonstration of the capabilities of Layers, this\nseries implements a Layer that intercepts all control-related calls to\nimplement the AeEnable control transparently.\n\nPatches 1~3 are refactoring and reorganizing existing code. Patch 4\nimplements the LayerManager, which is the main component. Patch 5~6\nconnects the Camera to the layer infrastructure. Finally patches 7~8\nimplement a simple layer that implements the AeEnable control, to\ndemonstrate how a Layer might work.\n\nv2 most notably reorganizes the LayerManager to be under the\nCameraManager instead of the Camera, and adds support for closures so\nthat each layer can store its data per camera.\n\nv3 adds the LayerController that belongs to each Camera, one to simplify\ncode and to make it more correct in terms of ownership, but also to pave\nthe way for each Camera to select different layers. This is not\nimplemented at the moment however as it requires configuration file\nsupport.\n\nv4 adds a LayerInstance class that bundles a LayerLoaded together with\nits closure, and simplifies code for LayerController when it checks\nthat the layer implements a function before calling it from its vtable\n\nNo changes in v5; just a rebase and resend because it's been a long time\nsince v4.\n\nPaul Elder (8):\n  libcamera: ipa_manager: Factor out .so file searching\n  libcamera: ipa_module: Factor out ELF file handling\n  libcamera: camera: Add indirection to Camera signal emissions\n  libcamera: layer_manager: Add Layer handling implementation\n  libcamera: camera_manager: Add LayerManager\n  libcamera: camera: Hook into the LayerManager\n  layer: Add layer to inject AeEnable control\n  camera, ipa: all: Remove AeEnable handling\n\n include/libcamera/internal/camera.h           |   8 +\n include/libcamera/internal/camera_manager.h   |   3 +\n include/libcamera/internal/ipa_manager.h      |   4 -\n include/libcamera/internal/layer_manager.h    | 199 ++++++\n include/libcamera/internal/meson.build        |   2 +\n include/libcamera/internal/utils.h            |  29 +\n include/libcamera/layer.h                     |  54 ++\n include/libcamera/meson.build                 |   1 +\n src/ipa/mali-c55/algorithms/agc.cpp           |   1 +\n src/ipa/rkisp1/algorithms/agc.cpp             |   2 -\n src/ipa/rpi/common/ipa_base.cpp               |   2 -\n src/layer/inject_controls/inject_controls.cpp | 176 +++++\n src/layer/inject_controls/inject_controls.h   |  24 +\n src/layer/inject_controls/meson.build         |  16 +\n src/layer/meson.build                         |  16 +\n src/libcamera/camera.cpp                      | 113 ++--\n src/libcamera/camera_manager.cpp              |   1 +\n src/libcamera/ipa_manager.cpp                 | 107 +---\n src/libcamera/ipa_module.cpp                  | 152 +----\n src/libcamera/layer.cpp                       | 178 ++++++\n src/libcamera/layer_manager.cpp               | 601 ++++++++++++++++++\n src/libcamera/meson.build                     |   3 +\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   5 -\n src/libcamera/pipeline_handler.cpp            |   2 +-\n src/libcamera/request.cpp                     |   2 +-\n src/libcamera/utils.cpp                       | 270 ++++++++\n src/meson.build                               |   1 +\n 27 files changed, 1678 insertions(+), 294 deletions(-)\n create mode 100644 include/libcamera/internal/layer_manager.h\n create mode 100644 include/libcamera/internal/utils.h\n create mode 100644 include/libcamera/layer.h\n create mode 100644 src/layer/inject_controls/inject_controls.cpp\n create mode 100644 src/layer/inject_controls/inject_controls.h\n create mode 100644 src/layer/inject_controls/meson.build\n create mode 100644 src/layer/meson.build\n create mode 100644 src/libcamera/layer.cpp\n create mode 100644 src/libcamera/layer_manager.cpp\n create mode 100644 src/libcamera/utils.cpp"}