{"id":2918,"url":"https://patchwork.libcamera.org/api/1.1/covers/2918/?format=json","web_url":"https://patchwork.libcamera.org/cover/2918/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>","date":"2020-02-29T16:42:23","name":"[libcamera-devel,00/31] libcamera: Add support for array controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/2918/mbox/","series":[{"id":696,"url":"https://patchwork.libcamera.org/api/1.1/series/696/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=696","date":"2020-02-29T16:42:23","name":"libcamera: Add support for array controls","version":1,"mbox":"https://patchwork.libcamera.org/series/696/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/2918/comments/","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4794B62689\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:22 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B49B833E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:21 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1582994601;\n\tbh=10e9c2Qbfi0mSsiKQ3nw1Eq+kgUEHqd8I9IpWQrzg+Q=;\n\th=From:To:Subject:Date:From;\n\tb=qgm6k2Me3Vn40vjHJtSemdimWD/Cu/RxWbPIHHbRxoegDOyA+kVim4qGIPkAa6E/H\n\t1wMKUOPOV7iX18IdRHd2oibYPKb4kUneWiCF3TQ7EVVFTVve7J1wbfa4QLke3CzzKD\n\tbQ73VA88lk7qOG/9DjAz4LMBwbJlRXiquXCCTfxE=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 29 Feb 2020 18:42:23 +0200","Message-Id":"<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 00/31] libcamera: Add support for array\n\tcontrols","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>","X-List-Received-Date":"Sat, 29 Feb 2020 16:43:22 -0000"},"content":"Hello,\n\nThis large patch series is the result of collective work from Jacopo and\nme. It adds support in the libcamera Control classes to handle array of\nvalues, in addition to the single values we support today.\n\nThe first two patches (01/31 and 02/31) add an implementation of the\nC++20 std::span<> class and a related test. This will be used\nextensively to support array controls.\n\nThe next 13 patches (03/31 to 15/31) refactor the control-related\nclasses, as well as the IPA control code, to prepare for array controls.\nPatch 16/31 is then the main change in the series, implementing support\nfor array controls, and patch 17/31 improves the ControlList::set() API\nto make array controls more usable. Patch 18/31 wires this up in the\nyaml parser.\n\nPatches 19/31 and 20/31 are a small intermission that add support for\nfloat and int8_t controls. The latter is particularly useful to create\nbyte array controls.\n\nPatch 21/31 adds support for array controls in the IPA protocol, patches\n22/31 to 24/31 improve the ByteStreamBuffer class and patches 25/31 to\n27/31 extend the control serializer to support array controls.\n\nPatch 28/31 finally extends the cam utility to support array controls.\n\nPatches 29/31 to 31/31 add test-cases specific to array controls. Those\nare not meant to be integrated yet as we're missing a standard array\ncontrol in libcamera, the patches thus create a fictional control for\nthat purpose. They should be rebased on top of the first real array\ncontrol and merged at that point.\n\nJacopo Mondi (14):\n  libcamera: Add a C++20-compliant std::span<> implementation\n  libcamera: gen-controls: Fix documentation issue with <<\n  libcamera: ipa: Remove unused IPA control types\n  libcamera: controls: Reorder ControlValue methods\n  libcamera: controls: Support array controls in ControlValue\n  libcamera: controls: Add a 'size' yaml property\n  libcamera: controls: Add support for float controls\n  libcamera: controls: Add support for int8_t controls\n  libcamera: byte_stream_buffer: Fix documentation of read() and write()\n  libcamera: byte_stream_buffer: Add Span<> support\n  libcamera: control_serializer: Add support for array controls\n  cam: Add option to list camera properties\n  DNI: test array controls\n  DNI: test: serialization: Serialize array controls\n\nLaurent Pinchart (17):\n  test: Add Span test\n  libcamera: ipa: Make <ipa/ipa_controls.h> self-contained\n  libcamera: ipa: Test control structure size with static_assert\n  libcamera: controls: Don't convert 32-bit and 64-bit implicitly\n  libcamera: controls: Decouple control and value type in\n    ControlList::set()\n  libcamera: controls: Return control by value in ControlList::get()\n  libcamera: controls: Add templates to convert a type T to a\n    ControlType\n  libcamera: controls: Move ControlValue get() and set() to controls.h\n  libcamera: controls: Move ControlValue constructor to controls.h\n  libcamera: controls: Move Control constructor to controls.h\n  libcamera: controls: Expose raw data in ControlValue\n  libcamera: controls: Allow passing an std::initializer list to set()\n  libcamera: ipa: Support array controls in ipa_control_value_entry\n  libcamera: byte_stream_buffer: Add zero-copy read() variant\n  libcamera: control_serializer: Simplify serialization of ControlValue\n  libcamera: control_serializer: Use zero-copy ByteStreamBuffer::read()\n  DNI: test: serialization: Serialize array control with a single\n    element\n\n Documentation/Doxyfile.in                    |   6 +-\n include/ipa/ipa_controls.h                   |  19 +-\n include/libcamera/controls.h                 | 170 +++++++-\n include/libcamera/meson.build                |   1 +\n include/libcamera/span.h                     | 417 +++++++++++++++++++\n src/cam/main.cpp                             |  28 ++\n src/cam/main.h                               |   1 +\n src/libcamera/byte_stream_buffer.cpp         |  61 ++-\n src/libcamera/control_ids.yaml               |   5 +\n src/libcamera/control_serializer.cpp         | 180 ++++----\n src/libcamera/controls.cpp                   | 312 ++++++++------\n src/libcamera/gen-controls.py                |  16 +-\n src/libcamera/include/byte_stream_buffer.h   |  26 ++\n src/libcamera/include/control_serializer.h   |   6 +-\n src/libcamera/ipa_controls.cpp               |  53 ++-\n src/libcamera/meson.build                    |   1 +\n src/libcamera/pipeline/vimc.cpp              |   5 +\n src/libcamera/span.cpp                       |  12 +\n test/controls/array_controls.cpp             | 107 +++++\n test/controls/meson.build                    |   1 +\n test/meson.build                             |   1 +\n test/serialization/control_serialization.cpp |   3 +-\n test/span.cpp                                | 177 ++++++++\n 23 files changed, 1336 insertions(+), 272 deletions(-)\n create mode 100644 include/libcamera/span.h\n create mode 100644 src/libcamera/span.cpp\n create mode 100644 test/controls/array_controls.cpp\n create mode 100644 test/span.cpp"}