[{"id":23320,"web_url":"https://patchwork.libcamera.org/comment/23320/","msgid":"<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","date":"2022-06-04T22:47:46","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Christian,\n\nThank you for the patches.\n\nOn Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n> Hello,\n> \n> Compared to the previous version, this 1) avoids a couple of more\n> \"value_or\" fallbacks if the validity of a control value or property\n> was previously checked with \"contains\" and 2) avoids references to\n> potential invalid control values or properties. The last point fixes\n> compiler errors reported by clang.\n\nI'm afraid I'm still seeing compilation errors :-( Here are a few:\n\n\naarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\nIn file included from ../../include/libcamera/camera.h:20,\n                 from ../../src/android/camera_capabilities.h:17,\n                 from ../../src/android/camera_capabilities.cpp:8:\nIn member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n    inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n  381 |                         return std::nullopt;\n      |                                     ^~~~~~~\n../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n  381 |                         return std::nullopt;\n      |                                     ^~~~~~~\nIn member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n    inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n  381 |                         return std::nullopt;\n      |                                     ^~~~~~~\n../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n  381 |                         return std::nullopt;\n      |                                     ^~~~~~~\n\n\ng++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\nIn file included from ../../include/libcamera/camera.h:20,\n                 from ../../src/android/camera_capabilities.h:17,\n                 from ../../src/android/camera_capabilities.cpp:8:\n../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n  381 |    return std::nullopt;\n      |                ^~~~~~~\n../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n\n\ng++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n  constexpr Span(const Span &other) noexcept = default;\n            ^~~~\n../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n  explicit constexpr Span(const Span<U, N> &s,\n                     ^~~~\n../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n  explicit constexpr Span(const Container &cont,\n                     ^~~~\n../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n  explicit constexpr Span(Container &cont,\n                     ^~~~\n../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n  constexpr Span(const std::array<value_type, N> &arr,\n            ^~~~\n../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n  constexpr Span(std::array<value_type, N> &arr,\n            ^~~~\n../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n  constexpr Span(element_type (&arr)[N],\n            ^~~~\n../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n         blackLevelStatus->black_level_b }));\n                                          ^\nIn file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n  explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n                     ^~~~\n../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n  explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n                     ^~~~\n../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n  constexpr Span() noexcept\n            ^~~~\n../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n         blackLevelStatus->black_level_b }));\n                                          ^\n\n> Christian Rauch (5):\n>   libcamera: controls: Use std::optional to handle invalid control\n>     values\n>   libcamera: ipu3: Fix rogue whitespace\n>   libcamera: controls: Define size of array controls as a shape vector\n>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n>   libcamera: controls: Apply explicit fixed-sized Span type casts\n> \n>  include/libcamera/controls.h                  |  7 ++--\n>  src/android/camera_capabilities.cpp           | 12 +++----\n>  src/android/camera_device.cpp                 | 21 ++++++------\n>  src/android/camera_hal_manager.cpp            |  2 +-\n>  src/cam/main.cpp                              |  4 +--\n>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n>  src/libcamera/control_ids.yaml                |  4 +--\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n>  src/libcamera/property_ids.yaml               |  4 +--\n>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n>  utils/gen-controls.py                         | 32 +++++++++++++------\n>  12 files changed, 81 insertions(+), 68 deletions(-)","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 0F436BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jun 2022 22:47:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5683665635;\n\tSun,  5 Jun 2022 00:47:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BADA60105\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  5 Jun 2022 00:47:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ACC8F6CF;\n\tSun,  5 Jun 2022 00:47:50 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654382873;\n\tbh=Fck+H6NYqPH3YvAEDmiIsjLaDOaTvaxcI+F3ef4qPgM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=EjJkQnp8sBDSbfGlp3XLJR4AONW7ohR+fboJifkxo0UrP5mB5Nm0P+5CaOwCUCOi3\n\tLkiVujUvtfqDD/jtmSjmJqnGS6k3O1rcO4zOeYDYjlyaycqskVPEA0+Q0E7epdAkAK\n\txVt6c/PHJpOqJlUvrSZmdC9+aU9Tvz+fb4b6tQVFWsmpaV1yvaqVmsr+UNN24OoHL5\n\tTl67gRwzS+/8okIdm/zDY41TU1c0lYwFJjSGpvZoUcMT05oQQRax5Oostt6084WKA2\n\tTySMly2YQRwThRLh6jbC1KLUcp1rPb6d6k2O/mcnRv3ODdKhp6lNAtgFqFaYhwEjOY\n\tdGYxTOF6mwjHg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1654382870;\n\tbh=Fck+H6NYqPH3YvAEDmiIsjLaDOaTvaxcI+F3ef4qPgM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=h0jAo0pg3GNzmunFyZnpd6+KxDfEIQeorX3o1+nDuTwxO+fvj4H8LHPGonnJT0bCA\n\tlfvvSfZJa9Jt/PDyBjJ8TaxIghtXvp3I4/fSlvYqEFhcxSb83W/DJabRi7bcPSUGkO\n\t0ON9Z2EBUkkbKMRpsAznaKoEGYmYyf4/vP8eiYhw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"h0jAo0pg\"; dkim-atps=neutral","Date":"Sun, 5 Jun 2022 01:47:46 +0300","To":"Christian Rauch <Rauch.Christian@gmx.de>","Message-ID":"<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20220604211148.188421-1-Rauch.Christian@gmx.de>","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23321,"web_url":"https://patchwork.libcamera.org/comment/23321/","msgid":"<c32a8fdf-5a91-bd8e-5df5-0702f7d9d1aa@gmx.de>","date":"2022-06-04T23:13:14","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":111,"url":"https://patchwork.libcamera.org/api/people/111/","name":"Christian Rauch","email":"Rauch.Christian@gmx.de"},"content":"Hi Laurent,\n\nCan you let me know which commands (full command line) you run to\nconfigure and build the project?\n\nI tried this with gcc:\n  CC=gcc-12 CXX=g++-12 meson build -Dandroid=enabled -Dwarning_level=2\n\nand clang:\n  CC=clang CXX=clang++ meson build -Dandroid=enabled -Dwarning_level=2\n\non Ubuntu 22.04, but I cannot reproduce this.\n\nAre you cross-compiling this?\n\nBest,\nChristian\n\n\nAm 04.06.22 um 23:47 schrieb Laurent Pinchart:\n> Hi Christian,\n>\n> Thank you for the patches.\n>\n> On Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n>> Hello,\n>>\n>> Compared to the previous version, this 1) avoids a couple of more\n>> \"value_or\" fallbacks if the validity of a control value or property\n>> was previously checked with \"contains\" and 2) avoids references to\n>> potential invalid control values or properties. The last point fixes\n>> compiler errors reported by clang.\n>\n> I'm afraid I'm still seeing compilation errors :-( Here are a few:\n>\n>\n> aarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> In file included from ../../include/libcamera/camera.h:20,\n>                  from ../../src/android/camera_capabilities.h:17,\n>                  from ../../src/android/camera_capabilities.cpp:8:\n> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> ../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> ../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n>\n>\n> g++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> In file included from ../../include/libcamera/camera.h:20,\n>                  from ../../src/android/camera_capabilities.h:17,\n>                  from ../../src/android/camera_capabilities.cpp:8:\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>   381 |    return std::nullopt;\n>       |                ^~~~~~~\n> ../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>\n>\n> g++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n> ../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n>   constexpr Span(const Span &other) noexcept = default;\n>             ^~~~\n> ../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n> ../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   explicit constexpr Span(const Span<U, N> &s,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>   explicit constexpr Span(const Container &cont,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>   explicit constexpr Span(Container &cont,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(const std::array<value_type, N> &arr,\n>             ^~~~\n> ../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(std::array<value_type, N> &arr,\n>             ^~~~\n> ../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(element_type (&arr)[N],\n>             ^~~~\n> ../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n>   explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n>                      ^~~~\n> ../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n> ../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n>   explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n>                      ^~~~\n> ../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n> ../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n>   constexpr Span() noexcept\n>             ^~~~\n> ../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n>\n>> Christian Rauch (5):\n>>   libcamera: controls: Use std::optional to handle invalid control\n>>     values\n>>   libcamera: ipu3: Fix rogue whitespace\n>>   libcamera: controls: Define size of array controls as a shape vector\n>>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n>>   libcamera: controls: Apply explicit fixed-sized Span type casts\n>>\n>>  include/libcamera/controls.h                  |  7 ++--\n>>  src/android/camera_capabilities.cpp           | 12 +++----\n>>  src/android/camera_device.cpp                 | 21 ++++++------\n>>  src/android/camera_hal_manager.cpp            |  2 +-\n>>  src/cam/main.cpp                              |  4 +--\n>>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n>>  src/libcamera/control_ids.yaml                |  4 +--\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n>>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n>>  src/libcamera/property_ids.yaml               |  4 +--\n>>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n>>  utils/gen-controls.py                         | 32 +++++++++++++------\n>>  12 files changed, 81 insertions(+), 68 deletions(-)\n>","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 A99F7BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jun 2022 23:13:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC3AB65635;\n\tSun,  5 Jun 2022 01:13:17 +0200 (CEST)","from mout.gmx.net (mout.gmx.net [212.227.17.21])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C53D60105\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  5 Jun 2022 01:13:16 +0200 (CEST)","from [192.168.1.209] ([92.18.80.244]) by mail.gmx.net (mrgmx104\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id 1M1HZi-1nusrZ1m1K-002m5l\n\tfor\n\t<libcamera-devel@lists.libcamera.org>; Sun, 05 Jun 2022 01:13:15 +0200"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654384397;\n\tbh=KYiDa/rmMZu6Kmm4z67Tjcs+qOg0zJ+rUuFwPbouq7w=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=siWwivdnmLcfKQ8Vo9ewZe0DotR+CM/QFoRZR1OKRxSNPFYPCn1bRe+Sjw3qw1+08\n\tLIAUgrAUlzbaYAvxImVZYCJbqxp11PEZUeN9VKFm7B1ek1bNnaxXspRXndMTYY++y1\n\t44zSVVR5TTBlk7DjuUCR5ss2rozZF08x1o/Lcp//BGD16fyVeQ2u7AC0ZjP6mL/eMa\n\tnv9bsITro0Y8SPLjQPFAyjq/rMMkk4xAM2rufoMhdlrIxGb6dmBoe3fkMdHWj7z76c\n\tphZUErapLsxwG8dqZ39TJXRToKL98RoU+8ZEZ9w2vu+xTl0LEg7lyZQMZLvzHJCQpM\n\tFc/XcPXw1sYdQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;\n\ts=badeba3b8450; t=1654384395;\n\tbh=KYiDa/rmMZu6Kmm4z67Tjcs+qOg0zJ+rUuFwPbouq7w=;\n\th=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To;\n\tb=LFyVwnQNysOtbJ64Ro/DooDo+io78uNjjHZkpuAvI/NKAWBZ3EBcSA1sPIBu42S+7\n\t213Egnx+j02rZ1DPAnU93XwVBVaadGpEsrlrbUKz5+/iekJDuihgtJQRdcmHl8L9GW\n\tfkFrLZzgeHQaNiFCUFWoiVqtLAAbCvZdJ5uX35v4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=gmx.net header.i=@gmx.net\n\theader.b=\"LFyVwnQN\"; dkim-atps=neutral","X-UI-Sender-Class":"01bb95c1-4bf8-414a-932a-4f6e2808ef9c","Message-ID":"<c32a8fdf-5a91-bd8e-5df5-0702f7d9d1aa@gmx.de>","Date":"Sun, 5 Jun 2022 00:13:14 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.9.1","Content-Language":"en-GB","To":"libcamera-devel@lists.libcamera.org","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>\n\t<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","In-Reply-To":"<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-Provags-ID":"V03:K1:BICffkME4y00QM1EZkmR47wk5skEm6lEBLqs/pt6Pn4rWsKxnPo\n\t33bvHQkqdZr/ddD9yTafLnub11o2yNK2NZhv7eLxjcjeVEB84QHjp0+hOUTEdFbwAKrjjaV\n\tlQ8Nvq97+UvoCdXL5Zwi4JnTpwBNxMIMOs8IaKDq7i6pqEB6OL7BkHD287/DqNGIQRQ4mQt\n\t0pKIIBTNaMeBXMthIffUQ==","X-Spam-Flag":"NO","X-UI-Out-Filterresults":"notjunk:1; V03:K0:s6LkQ7fNEEs=:NTb5yB1e72wEUiaks90yVs\n\tJHN+qY5sfWjfFH/uB/LnG7Z+SXg9z72dzESZfGTdKfcxz9ypyHVem6ALUC/jfIlA4b+fJG/v/\n\t/aX+U4PzgSJuDFx+ZnD/931W1calwWr7BXfb6IunvKPA7HDYuWBeojz2/cDuOBnSsphxK2OKV\n\taaoeGFmDiO4nhLbbpYH2yT1/u3Jaz2z+wVIkPUxO76w4aeCrqh5ASl92O1DA5SOK+WWbZ9BGa\n\tKJCyJLs1Y3TYb3tZsM9LWpmfuov5RfLg6cw68F1vH1NVKos7nsScaUMAzGEpLz7P2hNKK3THs\n\t7pvdUAQN/gDhdlLkh4TGL6UHEJego8J4dbU+baYS8zURVkk53tv2FXicJU1ENEFjwEaqIuH+h\n\t0NLK+CUEgY/ZxPctAWLywTgKZIEas3ALFG1R575dgRNmjHG3HLutbIyISnwoeXNxwwp9DLf6Z\n\tWlGXBBLeWRU8OaYkaXErysSd44j+M3e0sWVAFbIYTov3KmmrYxA9+Vrd3tIkUpXjNGr11zeBn\n\tzzZbmrYOFcqP7SwJzwwXvpTSEIoHcDyluPbFCYkN3Xao+MJl/Es+sZdryUf7fss0/UNRmCq3n\n\tR9xLn/0QU+I/FzLyKtUSMbLfMKshsNQqqqfDB5CboB7908ySvHE9MVZnNV+gMisxacro4J8y/\n\t3hZGp+yPiYxwJ8W0uxrHJBNqRFAPXyfZiBFsW2XVww1N3OE5Bpb5Kw31uRVXnhW3R80Ahgslo\n\ttcw0eipKsV9d1biI+/ORfQF30RUCtHTCD14vakzIrGF9uCVAInpI1hVl+NfQcAdlA1yYpI/AE\n\tyZYVgaEVritl5MY7gw7J/cpRSQL/it6BZSt4l4FIUCL3WH5iiBFkinZ3gLMXTKHwrdpFPlHyC\n\tGc4ZW1PtOAyzFbSwnEarku5xAEX6PFXftWzwl9LHGExntytCIzD7XknKs7P43Ypn0g+BeXnDu\n\tm3a4VCspJFZ8HrtE7AfP8x38iHEJ68OZ0PNeEadfYHoj7Ukhfv/zLzsM+Ecw3idqa2+1TdZ/m\n\to1ezS19f8UEnJKuyA1SC2ZA/CrklfooaICtQHZNcA0kR+l34APsY+XD2bG9qUPFehEzVfW5N6\n\tTP9k0oOuXqLk+t5ZFeA1OQH+U6sti+OomF2YKTanxBkr9/WoC+Az+kDog==","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Christian Rauch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Christian Rauch <Rauch.Christian@gmx.de>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23338,"web_url":"https://patchwork.libcamera.org/comment/23338/","msgid":"<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>","date":"2022-06-06T09:55:18","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":111,"url":"https://patchwork.libcamera.org/api/people/111/","name":"Christian Rauch","email":"Rauch.Christian@gmx.de"},"content":"Hi Laurent,\n\nI set up a CI workflow on GitHub for building libcamera on amd64 [1] and\naarch64 [2] with g++ and clang++.\n\nAll of those setups pass the build without issues [3], [4].\n\nDo you have an idea how I have to change the configuration to reproduce\nthe issues that you encountered?\n\nBest,\nChristian\n\n[1]\nhttps://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main.yml\n[2]\nhttps://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main_aarch64.yml\n\n[3] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079999\n[4] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079998\n\n\nAm 04.06.22 um 23:47 schrieb Laurent Pinchart:\n> Hi Christian,\n>\n> Thank you for the patches.\n>\n> On Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n>> Hello,\n>>\n>> Compared to the previous version, this 1) avoids a couple of more\n>> \"value_or\" fallbacks if the validity of a control value or property\n>> was previously checked with \"contains\" and 2) avoids references to\n>> potential invalid control values or properties. The last point fixes\n>> compiler errors reported by clang.\n>\n> I'm afraid I'm still seeing compilation errors :-( Here are a few:\n>\n>\n> aarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> In file included from ../../include/libcamera/camera.h:20,\n>                  from ../../src/android/camera_capabilities.h:17,\n>                  from ../../src/android/camera_capabilities.cpp:8:\n> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> ../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> ../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>   381 |                         return std::nullopt;\n>       |                                     ^~~~~~~\n>\n>\n> g++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> In file included from ../../include/libcamera/camera.h:20,\n>                  from ../../src/android/camera_capabilities.h:17,\n>                  from ../../src/android/camera_capabilities.cpp:8:\n> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> ../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>   381 |    return std::nullopt;\n>       |                ^~~~~~~\n> ../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>\n>\n> g++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n> ../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n>   constexpr Span(const Span &other) noexcept = default;\n>             ^~~~\n> ../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n> ../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   explicit constexpr Span(const Span<U, N> &s,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>   explicit constexpr Span(const Container &cont,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>   explicit constexpr Span(Container &cont,\n>                      ^~~~\n> ../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(const std::array<value_type, N> &arr,\n>             ^~~~\n> ../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(std::array<value_type, N> &arr,\n>             ^~~~\n> ../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>   constexpr Span(element_type (&arr)[N],\n>             ^~~~\n> ../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> ../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n>   explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n>                      ^~~~\n> ../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n> ../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n>   explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n>                      ^~~~\n> ../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n> ../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n>   constexpr Span() noexcept\n>             ^~~~\n> ../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n>          blackLevelStatus->black_level_b }));\n>                                           ^\n>\n>> Christian Rauch (5):\n>>   libcamera: controls: Use std::optional to handle invalid control\n>>     values\n>>   libcamera: ipu3: Fix rogue whitespace\n>>   libcamera: controls: Define size of array controls as a shape vector\n>>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n>>   libcamera: controls: Apply explicit fixed-sized Span type casts\n>>\n>>  include/libcamera/controls.h                  |  7 ++--\n>>  src/android/camera_capabilities.cpp           | 12 +++----\n>>  src/android/camera_device.cpp                 | 21 ++++++------\n>>  src/android/camera_hal_manager.cpp            |  2 +-\n>>  src/cam/main.cpp                              |  4 +--\n>>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n>>  src/libcamera/control_ids.yaml                |  4 +--\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n>>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n>>  src/libcamera/property_ids.yaml               |  4 +--\n>>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n>>  utils/gen-controls.py                         | 32 +++++++++++++------\n>>  12 files changed, 81 insertions(+), 68 deletions(-)\n>","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 F3618BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jun 2022 09:55:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0997465635;\n\tMon,  6 Jun 2022 11:55:23 +0200 (CEST)","from mout.gmx.net (mout.gmx.net [212.227.17.21])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 90312633A4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jun 2022 11:55:21 +0200 (CEST)","from [192.168.1.209] ([92.18.80.244]) by mail.gmx.net (mrgmx104\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id 1MRCKC-1oACAH0KfM-00NArd\n\tfor\n\t<libcamera-devel@lists.libcamera.org>; Mon, 06 Jun 2022 11:55:21 +0200"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654509323;\n\tbh=8c59pIMj09Cfri8AVyuK4l70ios+clQEw4GysmW/CMo=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=4ZuzCYw+RtHyobeUK4Fk3ts85neDupzZSaWjuJbxXo9VdEnm0DD10+ZkTAdZHTcq2\n\tN6N5no5kacSr6RL+lK8FsfBQ6SIiG/Oi2LO7wp5AYmX5mP5WDGZr1dQCBZTneKiX7T\n\tC4zy4qAzydmltaOZJDNugihn6JW9GvS4rysxhIOpADqnYM+89OCZjABky+OLyyUzR0\n\tsZOnI6VtWljOoUUsnqXlFxS7G2xNn6qMZd93oWccs0GcaqDjYVc2803Rob4mtsFPiN\n\tf6yFm4cObwYe7SDBezlL8oe4k9b6p7/l/QZDjNE7+yRews/w8LGBl9kiYGKqUsnflu\n\t/2W7Df8quthKA==","v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;\n\ts=badeba3b8450; t=1654509321;\n\tbh=8c59pIMj09Cfri8AVyuK4l70ios+clQEw4GysmW/CMo=;\n\th=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To;\n\tb=esaRpt/1c7MvjGYtWyImgFxoRl2x6P4l1HC8MgPTptdNpE4aIVMGKc40aC3PbvoG9\n\t84TQ/PYfRU4xOe0NhSDBQlcQuhwtzQkK2uF7tkyuQZQcxWG52KPK+R6xKvstzIqJ6N\n\tmZY9seWxFQZoIAoZCTuhMBAaWUjJfnhGMt8lkI8E="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=gmx.net header.i=@gmx.net\n\theader.b=\"esaRpt/1\"; dkim-atps=neutral","X-UI-Sender-Class":"01bb95c1-4bf8-414a-932a-4f6e2808ef9c","Message-ID":"<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>","Date":"Mon, 6 Jun 2022 10:55:18 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.9.1","Content-Language":"en-GB","To":"libcamera-devel@lists.libcamera.org","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>\n\t<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","In-Reply-To":"<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-Provags-ID":"V03:K1:TBCOHk0XMpZGlpqbgm+jttNk9caQnFgm43WxV6xMeatncZXkaOA\n\t6Y6PvezQizXAQjdCtMVLGnsMSjqPo61/0+hc09AaFbAU1CRtx8F1moMM+FbKfChHnq0wjHP\n\tr/+v+FpzRVyXvbv4IwAd9IQCNymUqEAGkQw13/68kMCQwvE2ZcA2sOZuxjhB10cpA9Twl8U\n\tzh8AjDEYm4UVs4nXyYOPw==","X-Spam-Flag":"NO","X-UI-Out-Filterresults":"notjunk:1; V03:K0:zM2Ku3VPwN8=:3Q1yzvVWLa89aVagYOrE67\n\t6J7PnhPV53gG0ZQGIVlXQcLUIPCXsAGXOjLeRruJtDaRifx0tQIYwrhwUGtf+hPEyCRYTC/vJ\n\tRopC+0F9h1UBCELJpoSnqRqUPHCAKdBZRemIGf7RZvP82IZVUc8JoJqtGZI00ECpjzjOzXV8G\n\tzkSiXO2Xv5WbpHzXaS9zDEJ07dsYeh+1u+juPTY6fFHEPJOrtBXWNKpMX4HPM4wojeZ6MPzvp\n\t0m3XXqSZE7clnkF8tIlqb5d+MSKkomzvMHs0copEG6xJTkKkTA4wX/CW8oxqX1l3jkyreuj41\n\ttt4HvmXPDe8UctvuYrhg7yHkgvfkmQEL2cstK31jXxVNhpAQ5ivr7oIs/6yVl1N0+dCIqsKZc\n\t05szJhWJDD7wRhQduWSnjX3JN0esDrhPYbub80/769aUTxnCVOgRZAxIiD622N6+emr88JXFT\n\tUGqgUruJx1OeZmdHzTtG1NOF0b6qVWiYjhjD5OdKrNxAX/sX6evdi8HeO3qhpCUzlJwg/UiGf\n\to6XFmgHMvj1RyQqwyCVVf2ZJIj7Ut006oW0bVsXyKiYjZl6Y8KIX9hOioCR7TstiiUEM/TY+5\n\tFSCUkU4rUaD+XesTX2Um1NviuSvURSjU5XTJdOng5xQTU2l/lMmYXoYRSKFuhzUzAJsY1SGVc\n\tBxIDrFxWne7bY5DVFTPk+D/W7KJPuiUe/pvfobZsLnMUxVHnlc7SxTau91p3n9aAJ2naS8ghg\n\tkuaayn7/JLK5q2CjYTK4YqiGjm621uOhDLaxtDfolEscVmq4ry8iG9cuoWAO8P0HVs1gUnjae\n\t9rkQUtbA2dQK6VZOKz5JY06ulnmgBUtvbPgolCpmybD3WargF355pzA052RwlyynZoptiHo/k\n\t7lE4mBi0Pva8N5zBgqPYHMAjaJ0bpRxYS3F0uTpDovLY7FCMq2T+YJEIhHXUTmc4T29ylTCc5\n\tnPprKcuCcqkJyQQCKtdLBBVG+Hw8BpOfBmapG/qeWOzn21ZfQ+SOm/Zq9sOmDfdy1Bi3rVKxp\n\tDnQQURottw839aesuMmmVhoPVB4FfmjrMvMb+kIiY/mzG+Y5e8HO//ZXoIPTzmMEoakJLO20B\n\tRozKJAv106Nh8Z67e20b39mpahVeMC2EU2DrUG3W4xRP5v/g0AgtMQoeg==","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Christian Rauch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Christian Rauch <Rauch.Christian@gmx.de>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23348,"web_url":"https://patchwork.libcamera.org/comment/23348/","msgid":"<165464167343.186364.13672862484315151110@Monstersaurus>","date":"2022-06-07T22:41:13","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Christian Rauch via libcamera-devel (2022-06-06 10:55:18)\n> Hi Laurent,\n> \n> I set up a CI workflow on GitHub for building libcamera on amd64 [1] and\n> aarch64 [2] with g++ and clang++.\n\nIf we merge these files in our repository - will they run for any user\nwho pushes a branch on their own fork of libcamera on github?\n\nIf so - perhaps we should add them.\n\n\n> All of those setups pass the build without issues [3], [4].\n> \n> Do you have an idea how I have to change the configuration to reproduce\n> the issues that you encountered?\n\nThese look like they're running an emultated aarch64 environment to be\nable to use arm64 compilers 'natively'.\n\nI wonder if the difference is due to using a native compiler vs a cross\ncompiler.\n\nI've been building a docker container that supports cross compilation\nfor RPi/ARM64 - So I wonder if we can also pre-build some containers\nwith the dependencies met to speed up builds of multiple different\nconfigurations (and tests) without spending all the CI cycles installing\npackages...\n\n--\nKieran\n\n\n> \n> Best,\n> Christian\n> \n> [1]\n> https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main.yml\n> [2]\n> https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main_aarch64.yml\n> \n> [3] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079999\n> [4] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079998\n> \n> \n> Am 04.06.22 um 23:47 schrieb Laurent Pinchart:\n> > Hi Christian,\n> >\n> > Thank you for the patches.\n> >\n> > On Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n> >> Hello,\n> >>\n> >> Compared to the previous version, this 1) avoids a couple of more\n> >> \"value_or\" fallbacks if the validity of a control value or property\n> >> was previously checked with \"contains\" and 2) avoids references to\n> >> potential invalid control values or properties. The last point fixes\n> >> compiler errors reported by clang.\n> >\n> > I'm afraid I'm still seeing compilation errors :-( Here are a few:\n> >\n> >\n> > aarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> > In file included from ../../include/libcamera/camera.h:20,\n> >                  from ../../src/android/camera_capabilities.h:17,\n> >                  from ../../src/android/camera_capabilities.cpp:8:\n> > In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n> >     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> > ../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n> >   381 |                         return std::nullopt;\n> >       |                                     ^~~~~~~\n> > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n> >   381 |                         return std::nullopt;\n> >       |                                     ^~~~~~~\n> > In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n> >     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> > ../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n> >   381 |                         return std::nullopt;\n> >       |                                     ^~~~~~~\n> > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n> >   381 |                         return std::nullopt;\n> >       |                                     ^~~~~~~\n> >\n> >\n> > g++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> > In file included from ../../include/libcamera/camera.h:20,\n> >                  from ../../src/android/camera_capabilities.h:17,\n> >                  from ../../src/android/camera_capabilities.cpp:8:\n> > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > ../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n> >   381 |    return std::nullopt;\n> >       |                ^~~~~~~\n> > ../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n> >\n> >\n> > g++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n> >   constexpr Span(const Span &other) noexcept = default;\n> >             ^~~~\n> > ../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n> > ../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> >   explicit constexpr Span(const Span<U, N> &s,\n> >                      ^~~~\n> > ../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n> >   explicit constexpr Span(const Container &cont,\n> >                      ^~~~\n> > ../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n> >   explicit constexpr Span(Container &cont,\n> >                      ^~~~\n> > ../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> >   constexpr Span(const std::array<value_type, N> &arr,\n> >             ^~~~\n> > ../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> >   constexpr Span(std::array<value_type, N> &arr,\n> >             ^~~~\n> > ../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> >   constexpr Span(element_type (&arr)[N],\n> >             ^~~~\n> > ../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > ../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n> >   explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n> >                      ^~~~\n> > ../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n> > ../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n> >   explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n> >                      ^~~~\n> > ../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n> > ../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n> >   constexpr Span() noexcept\n> >             ^~~~\n> > ../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n> > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n> >          blackLevelStatus->black_level_b }));\n> >                                           ^\n> >\n> >> Christian Rauch (5):\n> >>   libcamera: controls: Use std::optional to handle invalid control\n> >>     values\n> >>   libcamera: ipu3: Fix rogue whitespace\n> >>   libcamera: controls: Define size of array controls as a shape vector\n> >>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n> >>   libcamera: controls: Apply explicit fixed-sized Span type casts\n> >>\n> >>  include/libcamera/controls.h                  |  7 ++--\n> >>  src/android/camera_capabilities.cpp           | 12 +++----\n> >>  src/android/camera_device.cpp                 | 21 ++++++------\n> >>  src/android/camera_hal_manager.cpp            |  2 +-\n> >>  src/cam/main.cpp                              |  4 +--\n> >>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n> >>  src/libcamera/control_ids.yaml                |  4 +--\n> >>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n> >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n> >>  src/libcamera/property_ids.yaml               |  4 +--\n> >>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n> >>  utils/gen-controls.py                         | 32 +++++++++++++------\n> >>  12 files changed, 81 insertions(+), 68 deletions(-)\n> >","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 DBD3EBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 Jun 2022 22:41:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E26065637;\n\tWed,  8 Jun 2022 00:41:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C3C5D633A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jun 2022 00:41:16 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E49080A;\n\tWed,  8 Jun 2022 00:41:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654641679;\n\tbh=GRG0bbSLS/wx6F6mdyb0U60yWXXNZnmz31RyPjcyf4A=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=IpTgVOKRtRMDm2RhuUem4yaf0vi657yJHJ68NVO0q7DhZNxvhwsA+7+/qIm5M+XM8\n\t9GfZUQUZG1/bILXm144v7JB4wnLJFUW+bPulq9EoO1/mcPsAP81MINp/wrkyIsUt4e\n\t20ut8F7wxRhbptOS5tY2jWJB3n23pDuglqk55flsjMJ1E9MwFqDwND0KmsT6ZNWpXF\n\tCPDKXnIwpgVrmVXxoPAHif1uqCLdq6Jk1ZK8i+RD3DE8BYyha5/fnVKhPzpXtuuZ/a\n\tlY/R0CLUmHW9gino0pF7I+fJyrYQLibGgxNBPAxpNRCZ4xSqwAtpZm07+XsnJ1Kfor\n\tLxN/chTkJq3WQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1654641676;\n\tbh=GRG0bbSLS/wx6F6mdyb0U60yWXXNZnmz31RyPjcyf4A=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=rL4rRb8gS0Ok9tjOzaJbCWZ/x/uswrxqNP9Z/FMeDm/XYLOnwmmpn+V+S7iucNKKT\n\t7HRAHFNRJIZNE5jkSNBrzQBeOjub9eZJ5b3AYevqej+XNhFgNzyPIsi6b3zxHrrlz0\n\t7HtvnMM2zhOAlMtaWpSv8NSPKdqXNnUrKjjAn1QM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rL4rRb8g\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>\n\t<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>\n\t<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>","To":"Christian Rauch <Rauch.Christian@gmx.de>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 07 Jun 2022 23:41:13 +0100","Message-ID":"<165464167343.186364.13672862484315151110@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23349,"web_url":"https://patchwork.libcamera.org/comment/23349/","msgid":"<165464175169.186364.6074955443507063441@Monstersaurus>","date":"2022-06-07T22:42:31","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2022-06-07 23:41:13)\n> Quoting Christian Rauch via libcamera-devel (2022-06-06 10:55:18)\n> > Hi Laurent,\n> > \n> > I set up a CI workflow on GitHub for building libcamera on amd64 [1] and\n> > aarch64 [2] with g++ and clang++.\n> \n> If we merge these files in our repository - will they run for any user\n> who pushes a branch on their own fork of libcamera on github?\n> \n> If so - perhaps we should add them.\n> \n> \n> > All of those setups pass the build without issues [3], [4].\n> > \n> > Do you have an idea how I have to change the configuration to reproduce\n> > the issues that you encountered?\n> \n> These look like they're running an emultated aarch64 environment to be\n> able to use arm64 compilers 'natively'.\n> \n> I wonder if the difference is due to using a native compiler vs a cross\n> compiler.\n> \n> I've been building a docker container that supports cross compilation\n> for RPi/ARM64 - So I wonder if we can also pre-build some containers\n> with the dependencies met to speed up builds of multiple different\n> configurations (and tests) without spending all the CI cycles installing\n> packages...\n> \n\nStill a work in progress but this is what I was describing above : \n https://gist.github.com/kbingham/b35cc1402d02b0ef41b450941ad8f0c3\n\n> --\n> Kieran\n> \n> \n> > \n> > Best,\n> > Christian\n> > \n> > [1]\n> > https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main.yml\n> > [2]\n> > https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main_aarch64.yml\n> > \n> > [3] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079999\n> > [4] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079998\n> > \n> > \n> > Am 04.06.22 um 23:47 schrieb Laurent Pinchart:\n> > > Hi Christian,\n> > >\n> > > Thank you for the patches.\n> > >\n> > > On Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n> > >> Hello,\n> > >>\n> > >> Compared to the previous version, this 1) avoids a couple of more\n> > >> \"value_or\" fallbacks if the validity of a control value or property\n> > >> was previously checked with \"contains\" and 2) avoids references to\n> > >> potential invalid control values or properties. The last point fixes\n> > >> compiler errors reported by clang.\n> > >\n> > > I'm afraid I'm still seeing compilation errors :-( Here are a few:\n> > >\n> > >\n> > > aarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> > > In file included from ../../include/libcamera/camera.h:20,\n> > >                  from ../../src/android/camera_capabilities.h:17,\n> > >                  from ../../src/android/camera_capabilities.cpp:8:\n> > > In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n> > >     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> > > ../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n> > >   381 |                         return std::nullopt;\n> > >       |                                     ^~~~~~~\n> > > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > > ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n> > >   381 |                         return std::nullopt;\n> > >       |                                     ^~~~~~~\n> > > In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n> > >     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n> > > ../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n> > >   381 |                         return std::nullopt;\n> > >       |                                     ^~~~~~~\n> > > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > > ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n> > >   381 |                         return std::nullopt;\n> > >       |                                     ^~~~~~~\n> > >\n> > >\n> > > g++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n> > > In file included from ../../include/libcamera/camera.h:20,\n> > >                  from ../../src/android/camera_capabilities.h:17,\n> > >                  from ../../src/android/camera_capabilities.cpp:8:\n> > > ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n> > > ../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n> > >   381 |    return std::nullopt;\n> > >       |                ^~~~~~~\n> > > ../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n> > >\n> > >\n> > > g++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n> > >   constexpr Span(const Span &other) noexcept = default;\n> > >             ^~~~\n> > > ../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n> > > ../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> > >   explicit constexpr Span(const Span<U, N> &s,\n> > >                      ^~~~\n> > > ../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n> > >   explicit constexpr Span(const Container &cont,\n> > >                      ^~~~\n> > > ../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n> > >   explicit constexpr Span(Container &cont,\n> > >                      ^~~~\n> > > ../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> > >   constexpr Span(const std::array<value_type, N> &arr,\n> > >             ^~~~\n> > > ../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> > >   constexpr Span(std::array<value_type, N> &arr,\n> > >             ^~~~\n> > > ../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n> > >   constexpr Span(element_type (&arr)[N],\n> > >             ^~~~\n> > > ../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > > In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n> > > ../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n> > >   explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n> > >                      ^~~~\n> > > ../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n> > > ../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n> > >   explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n> > >                      ^~~~\n> > > ../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n> > > ../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n> > >   constexpr Span() noexcept\n> > >             ^~~~\n> > > ../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n> > > ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n> > >          blackLevelStatus->black_level_b }));\n> > >                                           ^\n> > >\n> > >> Christian Rauch (5):\n> > >>   libcamera: controls: Use std::optional to handle invalid control\n> > >>     values\n> > >>   libcamera: ipu3: Fix rogue whitespace\n> > >>   libcamera: controls: Define size of array controls as a shape vector\n> > >>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n> > >>   libcamera: controls: Apply explicit fixed-sized Span type casts\n> > >>\n> > >>  include/libcamera/controls.h                  |  7 ++--\n> > >>  src/android/camera_capabilities.cpp           | 12 +++----\n> > >>  src/android/camera_device.cpp                 | 21 ++++++------\n> > >>  src/android/camera_hal_manager.cpp            |  2 +-\n> > >>  src/cam/main.cpp                              |  4 +--\n> > >>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n> > >>  src/libcamera/control_ids.yaml                |  4 +--\n> > >>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n> > >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n> > >>  src/libcamera/property_ids.yaml               |  4 +--\n> > >>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n> > >>  utils/gen-controls.py                         | 32 +++++++++++++------\n> > >>  12 files changed, 81 insertions(+), 68 deletions(-)\n> > >","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 63DCABD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 Jun 2022 22:42:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 13A3965631;\n\tWed,  8 Jun 2022 00:42:36 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A5E4D633A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jun 2022 00:42:34 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54892895;\n\tWed,  8 Jun 2022 00:42:34 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654641756;\n\tbh=VW+M1cUXU42L0NlP2Z840ZdCX51O9Qfnwgl7CPUvD0w=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=HA8x89IZS+4kBEMcmbiLW941nZUmijmdcPNV5PedQiAfOa8NfWFezdp0BP+lVi95u\n\txBsfy6zsVUR+3olza9A94x9l/RsgVqFTAcKEUlfXbLQwmG3P1BeUE1mSFssonZzHxK\n\tka+QDBN2E6qQ79l4SceY6I5O0QxINfJHcIGkpDodZrB19jW6Iu3v3eRGcoRKPuet7N\n\tGTtLIROdaprB1S3VUptQunFneeSuc7NBW0D1zGLkCTLpC/JhOg/lLgX3DL9DKSEXgB\n\t5qYkek11z7c6U7Sdvq0F9IzGXgufkPrlY511cT9G4m2PvoOb12ZOgH1LzfzRmFYq6H\n\tEFCwj1BFiqB0A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1654641754;\n\tbh=VW+M1cUXU42L0NlP2Z840ZdCX51O9Qfnwgl7CPUvD0w=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=NByx64YBwv2P1iFLII5ZDGsT+M2STP4VrJr1+1v6h9T92eF0jIWq/hEFixM4pH6zD\n\tuLlyVIugJflFVleYQc0oF+1DWXOFcgHVGC3dv4aN5RXPgqZqWP8WKmVRvE6bsBGcTS\n\tbLQbJBS1d/jXuEYBrU8YBAMtDi26euvPstFeg6Sk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"NByx64YB\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<165464167343.186364.13672862484315151110@Monstersaurus>","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>\n\t<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>\n\t<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>\n\t<165464167343.186364.13672862484315151110@Monstersaurus>","To":"Christian Rauch <Rauch.Christian@gmx.de>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 07 Jun 2022 23:42:31 +0100","Message-ID":"<165464175169.186364.6074955443507063441@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23350,"web_url":"https://patchwork.libcamera.org/comment/23350/","msgid":"<da877442-469b-80ca-1263-a39ac13d8f63@gmx.de>","date":"2022-06-08T00:05:05","subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","submitter":{"id":111,"url":"https://patchwork.libcamera.org/api/people/111/","name":"Christian Rauch","email":"Rauch.Christian@gmx.de"},"content":"Am 07.06.22 um 23:41 schrieb Kieran Bingham:\n> Quoting Christian Rauch via libcamera-devel (2022-06-06 10:55:18)\n>> Hi Laurent,\n>>\n>> I set up a CI workflow on GitHub for building libcamera on amd64 [1] and\n>> aarch64 [2] with g++ and clang++.\n>\n> If we merge these files in our repository - will they run for any user\n> who pushes a branch on their own fork of libcamera on github?\n>\n> If so - perhaps we should add them.\n>\nYes, they would -- after changing the 'branches' to \"master\". But those\nare GitHub specific files and are not reusable by any other hosting\nprovider. Not sure if you are ok with adding \"unused\" files to the repo.\nI created those mainly to test it for myself. But of course, you can use\nthem too.\n>\n>> All of those setups pass the build without issues [3], [4].\n>>\n>> Do you have an idea how I have to change the configuration to reproduce\n>> the issues that you encountered?\n>\n> These look like they're running an emultated aarch64 environment to be\n> able to use arm64 compilers 'natively'.\n\nThat's correct. There are no native arm64 build servers for GitHub right\nnow. The build will be slower, due to the emulation, but the outcome\nshould be the same as running on hardware. I think this is how\ndistributions compile their \"arm64\" or \"riscv64\" packages.\n\n>\n> I wonder if the difference is due to using a native compiler vs a cross\n> compiler.\n\nThis could be. But I don't know how to set up cross-compilation with all\nthose dependencies. It's rather trivial for C/C++ projects that do not\nhave to link other libraries, but I have no experience in\ncross-compiling complex projects.\n>\n> I've been building a docker container that supports cross compilation\n> for RPi/ARM64 - So I wonder if we can also pre-build some containers\n> with the dependencies met to speed up builds of multiple different\n> configurations (and tests) without spending all the CI cycles installing\n> packages...\n\nIndeed. Using a docker image that already has all the dependencies\ninstalled will speed up the workflow a lot.\nHowever, I am using \"plain\" docker images regularly to verify that the\ninstallation intructions with the dependencies are also valid. E.g. I\nnoticed that \"libpython3-dev\" is missing as optional dependency in the\nofficial \"Getting Started\" instructions.\n\nI will have a look into using this \"--cross-file\" option that you\nreferenced in your other email.\n\n>\n> --\n> Kieran\n>\n>\n>>\n>> Best,\n>> Christian\n>>\n>> [1]\n>> https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main.yml\n>> [2]\n>> https://github.com/christianrauch/libcamera-ci/blob/ci/.github/workflows/main_aarch64.yml\n>>\n>> [3] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079999\n>> [4] https://github.com/christianrauch/libcamera-ci/actions/runs/2445079998\n>>\n>>\n>> Am 04.06.22 um 23:47 schrieb Laurent Pinchart:\n>>> Hi Christian,\n>>>\n>>> Thank you for the patches.\n>>>\n>>> On Sat, Jun 04, 2022 at 10:11:43PM +0100, Christian Rauch via libcamera-devel wrote:\n>>>> Hello,\n>>>>\n>>>> Compared to the previous version, this 1) avoids a couple of more\n>>>> \"value_or\" fallbacks if the validity of a control value or property\n>>>> was previously checked with \"contains\" and 2) avoids references to\n>>>> potential invalid control values or properties. The last point fixes\n>>>> compiler errors reported by clang.\n>>>\n>>> I'm afraid I'm still seeing compilation errors :-( Here are a few:\n>>>\n>>>\n>>> aarch64-buildroot-linux-gnu-g++ -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n>>> In file included from ../../include/libcamera/camera.h:20,\n>>>                  from ../../src/android/camera_capabilities.h:17,\n>>>                  from ../../src/android/camera_capabilities.cpp:8:\n>>> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>>>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n>>> ../../include/libcamera/controls.h:381:37: error: ‘*(const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized]\n>>>   381 |                         return std::nullopt;\n>>>       |                                     ^~~~~~~\n>>> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n>>> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>>>   381 |                         return std::nullopt;\n>>>       |                                     ^~~~~~~\n>>> In member function ‘std::optional<_Tp> libcamera::ControlList::get(const libcamera::Control<T>&) const [with T = libcamera::Size]’,\n>>>     inlined from ‘int CameraCapabilities::initializeStaticMetadata()’ at ../../src/android/camera_capabilities.cpp:1053:46:\n>>> ../../include/libcamera/controls.h:381:37: error: ‘((const unsigned int*)((char*)&<unnamed> + offsetof(std::optional<libcamera::Size>,std::optional<libcamera::Size>::<unnamed>.std::_Optional_base<libcamera::Size, true, true>::_M_payload.std::_Optional_payload<libcamera::Size, true, true, true>::<unnamed>.std::_Optional_payload_base<libcamera::Size>::_M_payload)))[1]’ may be used uninitialized [-Werror=maybe-uninitialized]\n>>>   381 |                         return std::nullopt;\n>>>       |                                     ^~~~~~~\n>>> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n>>> ../../include/libcamera/controls.h:381:37: note: ‘<anonymous>’ declared here\n>>>   381 |                         return std::nullopt;\n>>>       |                                     ^~~~~~~\n>>>\n>>>\n>>> g++-10.3.1 -Isrc/android/libcamera-hal.so.p -Isrc/android -I../../src/android -I../../include/android/hardware/libhardware/include -I../../include/android/metadata -I../../include/android/system/core/include -Iinclude -I../../include -I../../subprojects/libyuv/include -Isubprojects/libyuv/__CMake_build -I../../subprojects/libyuv/__CMake_build -Isubprojects/libyuv -I../../subprojects/libyuv -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include/libexif -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -MF src/android/libcamera-hal.so.p/camera_capabilities.cpp.o.d -o src/android/libcamera-hal.so.p/camera_capabilities.cpp.o -c ../../src/android/camera_capabilities.cpp\n>>> In file included from ../../include/libcamera/camera.h:20,\n>>>                  from ../../src/android/camera_capabilities.h:17,\n>>>                  from ../../src/android/camera_capabilities.cpp:8:\n>>> ../../include/libcamera/controls.h: In member function ‘int CameraCapabilities::initializeStaticMetadata()’:\n>>> ../../include/libcamera/controls.h:381:16: error: ‘<anonymous>’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>>>   381 |    return std::nullopt;\n>>>       |                ^~~~~~~\n>>> ../../include/libcamera/controls.h:381:16: error: ‘*((void*)&<anonymous> +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n>>>\n>>>\n>>> g++-8.4.0 -Isrc/ipa/raspberrypi/ipa_rpi.so.p -Isrc/ipa/raspberrypi -I../../src/ipa/raspberrypi -Iinclude -I../../include -Isrc/ipa -I../../src/ipa -I../../src/ipa/raspberrypi/controller -Iinclude/libcamera/ipa -Iinclude/libcamera -I/usr/include -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include config.h -fPIC -DBOOST_ALL_NO_LIB -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -MF src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o.d -o src/ipa/raspberrypi/ipa_rpi.so.p/raspberrypi.cpp.o -c ../../src/ipa/raspberrypi/raspberrypi.cpp\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp: In member function ‘void libcamera::ipa::RPi::IPARPi::reportMetadata()’:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: error: no matching function for call to ‘libcamera::Span<const int, 4>::Span(<brace-enclosed initializer list>)’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:189:12: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<T, Extent>&) [with T = const int; long unsigned int Extent = 4]’\n>>>   constexpr Span(const Span &other) noexcept = default;\n>>>             ^~~~\n>>> ../../include/libcamera/base/span.h:189:12: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const libcamera::Span<const int, 4>&’\n>>> ../../include/libcamera/base/span.h:181:21: note: candidate: ‘template<class U, long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const libcamera::Span<U, N>&, std::enable_if_t<(std::is_convertible<_Up (*)[], _Tp (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>>>   explicit constexpr Span(const Span<U, N> &s,\n>>>                      ^~~~\n>>> ../../include/libcamera/base/span.h:181:21: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘U’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:168:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(const Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>>>   explicit constexpr Span(const Container &cont,\n>>>                      ^~~~\n>>> ../../include/libcamera/base/span.h:168:21: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:156:21: note: candidate: ‘template<class Container> constexpr libcamera::Span<T, Extent>::Span(Container&, std::enable_if_t<((((! libcamera::details::is_span<Container>::value) && (! libcamera::details::is_array<Container>::value)) && (! std::is_array<_Up>::value)) && std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(cont))>::type (*)[], T (*)[]>::value), std::nullptr_t>)’\n>>>   explicit constexpr Span(Container &cont,\n>>>                      ^~~~\n>>> ../../include/libcamera/base/span.h:156:21: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘Container’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:146:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(const std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>>>   constexpr Span(const std::array<value_type, N> &arr,\n>>>             ^~~~\n>>> ../../include/libcamera/base/span.h:146:12: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:136:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(std::array<typename std::remove_cv< <template-parameter-1-1> >::type, N>&, std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>>>   constexpr Span(std::array<value_type, N> &arr,\n>>>             ^~~~\n>>> ../../include/libcamera/base/span.h:136:12: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   couldn't deduce template parameter ‘N’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:126:12: note: candidate: ‘template<long unsigned int N> constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::element_type (&)[N], std::enable_if_t<(std::is_convertible<typename std::remove_pointer<decltype (libcamera::utils::data(arr))>::type (*)[], T (*)[]>::value && (N == Extent)), std::nullptr_t>)’\n>>>   constexpr Span(element_type (&arr)[N],\n>>>             ^~~~\n>>> ../../include/libcamera/base/span.h:126:12: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   mismatched types ‘int’ and ‘short unsigned int’\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>> In file included from ../../src/ipa/raspberrypi/raspberrypi.cpp:20:\n>>> ../../include/libcamera/base/span.h:120:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::pointer) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*]’\n>>>   explicit constexpr Span(pointer first, [[maybe_unused]] pointer last)\n>>>                      ^~~~\n>>> ../../include/libcamera/base/span.h:120:21: note:   candidate expects 2 arguments, 1 provided\n>>> ../../include/libcamera/base/span.h:115:21: note: candidate: ‘constexpr libcamera::Span<T, Extent>::Span(libcamera::Span<T, Extent>::pointer, libcamera::Span<T, Extent>::size_type) [with T = const int; long unsigned int Extent = 4; libcamera::Span<T, Extent>::pointer = const int*; libcamera::Span<T, Extent>::size_type = long unsigned int]’\n>>>   explicit constexpr Span(pointer ptr, [[maybe_unused]] size_type count)\n>>>                      ^~~~\n>>> ../../include/libcamera/base/span.h:115:21: note:   candidate expects 2 arguments, 1 provided\n>>> ../../include/libcamera/base/span.h:110:12: note: candidate: ‘template<bool Dependent, class> constexpr libcamera::Span<T, Extent>::Span()’\n>>>   constexpr Span() noexcept\n>>>             ^~~~\n>>> ../../include/libcamera/base/span.h:110:12: note:   template argument deduction/substitution failed:\n>>> ../../src/ipa/raspberrypi/raspberrypi.cpp:520:42: note:   candidate expects 0 arguments, 1 provided\n>>>          blackLevelStatus->black_level_b }));\n>>>                                           ^\n>>>\n>>>> Christian Rauch (5):\n>>>>   libcamera: controls: Use std::optional to handle invalid control\n>>>>     values\n>>>>   libcamera: ipu3: Fix rogue whitespace\n>>>>   libcamera: controls: Define size of array controls as a shape vector\n>>>>   libcamera: controls: Generate fixed- and variable-sized Span Controls\n>>>>   libcamera: controls: Apply explicit fixed-sized Span type casts\n>>>>\n>>>>  include/libcamera/controls.h                  |  7 ++--\n>>>>  src/android/camera_capabilities.cpp           | 12 +++----\n>>>>  src/android/camera_device.cpp                 | 21 ++++++------\n>>>>  src/android/camera_hal_manager.cpp            |  2 +-\n>>>>  src/cam/main.cpp                              |  4 +--\n>>>>  src/ipa/raspberrypi/raspberrypi.cpp           | 21 ++++++------\n>>>>  src/libcamera/control_ids.yaml                |  4 +--\n>>>>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 11 +++----\n>>>>  .../pipeline/raspberrypi/raspberrypi.cpp      |  9 +++---\n>>>>  src/libcamera/property_ids.yaml               |  4 +--\n>>>>  src/qcam/dng_writer.cpp                       | 22 ++++++-------\n>>>>  utils/gen-controls.py                         | 32 +++++++++++++------\n>>>>  12 files changed, 81 insertions(+), 68 deletions(-)\n>>>","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 52699BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jun 2022 00:05:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4719965637;\n\tWed,  8 Jun 2022 02:05:07 +0200 (CEST)","from mout.gmx.net (mout.gmx.net [212.227.15.18])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 51ECD633A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jun 2022 02:05:06 +0200 (CEST)","from [192.168.1.209] ([92.18.80.244]) by mail.gmx.net (mrgmx005\n\t[212.227.17.190]) with ESMTPSA (Nemesis) id 1MEV3I-1o0MoN2LKU-00G2PA\n\tfor\n\t<libcamera-devel@lists.libcamera.org>; Wed, 08 Jun 2022 02:05:05 +0200"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654646707;\n\tbh=uDxwsy1XYg3mVJAUNJEAuPJxfE79ikAK6JE8rPi3jqY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=SFVH2w5vHp/7l240SYsXFXUf5G373/KHzdigjdg7Ak2tm7fM2DnDryJllUZ/Um//D\n\t/XuTFO3+SWtEcRILzCeVldWF0CMk2IscSA30UFqkhqRghSmbZMr47jcJmrPGD+CTyu\n\tXIvT0vr3rvpOqcGdEbOijJ7cINDc1wuWYHt7SaUG9E1dldt42ASlAprZO31jJ/hvw0\n\t0sHG/iFyCf8TURixAk4C+9iI/nqysdGW+aVLbGNy28wa4OVLo1+jy0pRUFw0u1CA+s\n\te8EE3qMRQXMmI6KU9XE/0ffQXfoiPtTep0HRHqRfP3yNIJMhBzzpZnhUfmIc+/1UY8\n\tmCqgHCfREUqPw==","v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;\n\ts=badeba3b8450; t=1654646705;\n\tbh=uDxwsy1XYg3mVJAUNJEAuPJxfE79ikAK6JE8rPi3jqY=;\n\th=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To;\n\tb=dI6hRObtLAdMR+6awHUwXnsgXWCQPjdqf04n9gPMvwsMlaaUapDbTOBGWeuNshGq3\n\tlk3mHIMiRB99sudOZnd6h8/CpNTcOITSZNIkrAljbbu69tXkm/d8EsywCAueF3pz86\n\tx7a/XUnpddJFp4SYz2ZcJwd2+h+B3CJWT9l7Z/FQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=gmx.net header.i=@gmx.net\n\theader.b=\"dI6hRObt\"; dkim-atps=neutral","X-UI-Sender-Class":"01bb95c1-4bf8-414a-932a-4f6e2808ef9c","Message-ID":"<da877442-469b-80ca-1263-a39ac13d8f63@gmx.de>","Date":"Wed, 8 Jun 2022 01:05:05 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.9.1","Content-Language":"en-GB","To":"libcamera-devel@lists.libcamera.org","References":"<20220604211148.188421-1-Rauch.Christian@gmx.de>\n\t<YpvhEkD+YgttDqBT@pendragon.ideasonboard.com>\n\t<2674f798-3b16-057a-2907-c01a91deb23b@gmx.de>\n\t<165464167343.186364.13672862484315151110@Monstersaurus>","In-Reply-To":"<165464167343.186364.13672862484315151110@Monstersaurus>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-Provags-ID":"V03:K1:r+Cn7BvLu8HdDFVI14gGybLCgrtqdMTb4V7peDciQ5BNL12aJQD\n\tk0sU1Yu/NsnxeyxhRE9PqN4DJIgILImhf36Ekgr/9T+aYK0PPIs0HF+/iOZdhz9ZN0kIt48\n\tqNSbTqLZ1VBqOF0LDO7DMYO63GwYKRlYjuJkHAyVDsgonpuHd4327wHimPa+Duqk8LuJyHV\n\t5t8RIgPVyaKLaqc/VBfEw==","X-Spam-Flag":"NO","X-UI-Out-Filterresults":"notjunk:1; V03:K0:ck5PQHAqxhw=:21i6IJZSddYvRFqOs0OSZp\n\t/ko187p6KIpnwhIcFVm/ICHjKDuzOiAzFURfGINyZfupmRWkXrRzvdhNSlK+hNOaJkFWXM+R8\n\tOM7pGEMm5k3UOvsEAp5M/Sc3fXexhV2geG18I9/D22kZLSFFXgHHrkEGdokDoglh+rdcZvo36\n\tyDzpkf+35/LEzIuFv3bJAMGf6SDEvK3r2gY2u38FvaMgm/pEEc9aNOj8nevyPXeJH8lRyZmmG\n\tLBz1LUo7dVYUQmpAQJgZNSQFZ39v+Ufj65hGXqvQ9JGYyXW6nLLn8C8FLXfjSpLvLo/rNK4GN\n\t/JlXa1lM6OrpVUfu50x9zeRDB6hT7spejv6Su2ejaKS33GrqEkMWl60D38loNt13QdzSEizbt\n\tIjDBgRAZ9t5m9tpl3RhtF4h/J7M3L56eLpEU17nzsjr3Savk0cyRMynOaKV4WrTRulHELO8bB\n\t4A1M15epmJoLmTaPZjRzoLE03KBmjw5REQvMSxMFpPfQudndFVdMultriaqxYGdfiPDEMrQ65\n\tbhtvRenm8t4d7qL2hwg8Fu0zqNr8Yx82x62bhb6ZJ0ido67f6/gMW5zKLezf+RVUk9fqyWZYF\n\tJbO2vX7zLeILo0gWaAraGnn7gwC2YJbcE5f4UIAT/p98AKuCpd3PF+j66nIvov7N+mpJmGStz\n\tHd6tSH12f+ahCsUatqIPTt0TB+6G/XqsdUplN6MAJ8E/N3mQ9rNYQ3DS+lvspFaiCij5gZLrC\n\trpJWY7Q+trslkL/qrtB4wQOmD+Cbj0Zu9lBruJROHI0wKNHCkjSEit70peAed/iUceksgE0/E\n\tkt7pdHM8tF/RyLNc2hU+7q4vN71JbsCbFQm0Slmdg4tTQe30AdMmE4mSjKYcJ7VVF9K+wLQhf\n\tqrh65NFTOW2qaer++PZ38qDiFTBXuKadomEgcRrIAAT1Ht0tiDU3GVNAn57BztwIKxutA9x36\n\tZ76WpkEuHxCdWGston+K7VHiHhO3e8SD6fyf13CH80UMxNdJu8JAuwyzO4Ipjf1gzJUiVapdM\n\tmaNZU13d9qlc2ExKcD+lAZwgqXHelKo/mw80h1AJGMDQRxXoHDjwoZ1k93wy0RkM9Iuc1DREf\n\tB+Zl9rKHzNj4n2HzbsiLkGQjiksXJjk2kkbQvcr19k8P57uZJyLJY3+ZA==","Subject":"Re: [libcamera-devel] [PATCH v7 0/5] generate and use fixed-sized\n\tSpan Control types","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>","From":"Christian Rauch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Christian Rauch <Rauch.Christian@gmx.de>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]