[{"id":38384,"web_url":"https://patchwork.libcamera.org/comment/38384/","msgid":"<177428584254.4036272.16401333789099941828@ping.linuxembedded.co.uk>","date":"2026-03-23T17:10:42","subject":"Re: [RFC PATCH v2 0/7] C++20 migration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2026-03-23 10:27:17)\n> With gcc 16 switching C++20 by default, and it being released for more\n> than five years now, this is a proof of concept patch set containing the\n> changes needed to make the current CI jobs succeed with cpp_std=c++20.\n> \n> There is still at least one issue that seemingly only appears in C++20:\n> https://gitlab.freedesktop.org/camera/libcamera/-/issues/267\n> the cause is not known, but a potential workaround has been merged.\n> \n> The last two patches drop the use of `libcamera::Span` in favor of\n> `std::span`. However, gcc 9 does not have an implementation, so those\n> two cannot be merged as is.\n\nPerhaps we should consider merging the first 5 patches already then to\nsupport with the migration?\n\nCan we in anyway 'alias' std::span to libcamera::Span for gcc-9, so we\ncould already move forwards ? or would that get too messy ?\n\n> \n> Barnabás Pőcze (7):\n>   gstreamer: Add `-Wno-volatile` for GCC\n>   meson: Ignore `Wredundant-move` with GCC 11 and above\n>   libcamera: base: log: Ignore deprecations\n>   treewide: Use character literal instead of string in some cases\n>   meson: Switch to C++20\n>   treewide: Use `std::span`\n>   libcamera: base: span: Deprecate it\n> \n>  Documentation/guides/pipeline-handler.rst     |  4 +-\n>  include/libcamera/base/file.h                 | 10 ++--\n>  include/libcamera/base/span.h                 | 16 +++----\n>  include/libcamera/base/thread.h               |  4 +-\n>  include/libcamera/camera.h                    |  5 +-\n>  include/libcamera/controls.h                  | 22 ++++++---\n>  include/libcamera/framebuffer.h               | 10 ++--\n>  .../libcamera/internal/byte_stream_buffer.h   |  6 +--\n>  include/libcamera/internal/camera_sensor.h    |  6 +--\n>  .../converter/converter_dw100_vertexmap.h     |  5 +-\n>  include/libcamera/internal/egl.h              |  8 ++--\n>  include/libcamera/internal/framebuffer.h      |  4 +-\n>  .../libcamera/internal/mapped_framebuffer.h   |  4 +-\n>  include/libcamera/internal/matrix.h           | 26 +++++-----\n>  include/libcamera/internal/pipeline_handler.h |  2 +-\n>  include/libcamera/internal/process.h          |  6 +--\n>  include/libcamera/internal/pub_key.h          |  7 ++-\n>  .../libcamera/internal/shared_mem_object.h    |  6 +--\n>  include/libcamera/internal/v4l2_device.h      |  6 +--\n>  include/libcamera/internal/vector.h           |  4 +-\n>  meson.build                                   | 23 ++++-----\n>  src/android/camera_buffer.h                   | 11 +++--\n>  src/android/camera_capabilities.cpp           |  4 +-\n>  src/android/camera_request.cpp                |  4 +-\n>  src/android/jpeg/encoder.h                    |  4 +-\n>  src/android/jpeg/encoder_jea.cpp              |  2 +-\n>  src/android/jpeg/encoder_jea.h                |  2 +-\n>  src/android/jpeg/encoder_libjpeg.cpp          | 10 ++--\n>  src/android/jpeg/encoder_libjpeg.h            | 12 ++---\n>  src/android/jpeg/exif.cpp                     |  2 +-\n>  src/android/jpeg/exif.h                       |  7 ++-\n>  src/android/jpeg/post_processor_jpeg.cpp      |  2 +-\n>  src/android/mm/cros_camera_buffer.cpp         |  4 +-\n>  .../mm/cros_frame_buffer_allocator.cpp        |  2 +-\n>  src/android/mm/generic_camera_buffer.cpp      |  4 +-\n>  .../mm/generic_frame_buffer_allocator.cpp     |  2 +-\n>  src/apps/cam/capture_script.cpp               | 12 ++---\n>  src/apps/cam/drm.cpp                          |  6 +--\n>  src/apps/cam/drm.h                            |  4 +-\n>  src/apps/cam/file_sink.cpp                    |  2 +-\n>  src/apps/cam/sdl_sink.cpp                     |  4 +-\n>  src/apps/cam/sdl_texture.h                    |  4 +-\n>  src/apps/cam/sdl_texture_1plane.cpp           |  2 +-\n>  src/apps/cam/sdl_texture_1plane.h             |  2 +-\n>  src/apps/cam/sdl_texture_mjpg.cpp             |  4 +-\n>  src/apps/cam/sdl_texture_mjpg.h               |  4 +-\n>  src/apps/cam/sdl_texture_yuv.cpp              |  2 +-\n>  src/apps/cam/sdl_texture_yuv.h                |  2 +-\n>  src/apps/common/dng_writer.cpp                |  4 +-\n>  src/apps/common/image.cpp                     |  6 +--\n>  src/apps/common/image.h                       | 10 ++--\n>  src/apps/common/ppm_writer.cpp                |  2 +-\n>  src/apps/common/ppm_writer.h                  |  4 +-\n>  src/apps/ipa-verify/main.cpp                  |  4 +-\n>  src/apps/lc-compliance/helpers/capture.cpp    |  2 +-\n>  src/apps/lc-compliance/helpers/capture.h      |  2 +-\n>  src/gstreamer/gstlibcamera-controls.cpp.in    |  4 +-\n>  src/gstreamer/gstlibcamera-utils.cpp          | 20 ++++----\n>  src/gstreamer/meson.build                     |  7 +++\n>  src/ipa/ipu3/algorithms/af.cpp                |  8 ++--\n>  src/ipa/ipu3/algorithms/af.h                  |  2 +-\n>  src/ipa/ipu3/algorithms/agc.cpp               |  2 +-\n>  src/ipa/ipu3/ipu3.cpp                         |  8 ++--\n>  src/ipa/libipa/exposure_mode_helper.cpp       |  2 +-\n>  src/ipa/libipa/exposure_mode_helper.h         |  4 +-\n>  src/ipa/libipa/histogram.cpp                  |  4 +-\n>  src/ipa/libipa/histogram.h                    |  8 ++--\n>  src/ipa/libipa/lsc_polynomial.h               |  2 +-\n>  src/ipa/libipa/v4l2_params.cpp                |  2 +-\n>  src/ipa/libipa/v4l2_params.h                  | 20 ++++----\n>  src/ipa/mali-c55/algorithms/agc.cpp           | 10 ++--\n>  src/ipa/mali-c55/mali-c55.cpp                 |  4 +-\n>  src/ipa/mali-c55/params.h                     |  2 +-\n>  src/ipa/rkisp1/algorithms/agc.cpp             |  2 +-\n>  src/ipa/rkisp1/algorithms/agc.h               |  7 +--\n>  src/ipa/rkisp1/algorithms/awb.cpp             |  2 +-\n>  src/ipa/rkisp1/algorithms/lsc.cpp             | 24 +++++-----\n>  src/ipa/rkisp1/algorithms/lsc.h               |  4 +-\n>  src/ipa/rkisp1/params.cpp                     |  2 +-\n>  src/ipa/rkisp1/params.h                       |  8 ++--\n>  src/ipa/rkisp1/rkisp1.cpp                     |  2 +-\n>  src/ipa/rpi/cam_helper/cam_helper.cpp         |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper.h           |  6 +--\n>  src/ipa/rpi/cam_helper/cam_helper_imx477.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper_imx519.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper_imx708.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/md_parser.h            |  9 ++--\n>  src/ipa/rpi/cam_helper/md_parser_smia.cpp     |  4 +-\n>  src/ipa/rpi/common/ipa_base.cpp               | 20 ++++----\n>  src/ipa/rpi/common/ipa_base.h                 |  2 +-\n>  src/ipa/rpi/controller/af_algorithm.h         |  5 +-\n>  src/ipa/rpi/controller/rpi/af.cpp             |  2 +-\n>  src/ipa/rpi/controller/rpi/af.h               |  2 +-\n>  src/ipa/rpi/controller/rpi/alsc.cpp           |  2 +-\n>  src/ipa/rpi/pisp/pisp.cpp                     | 12 +++--\n>  src/ipa/rpi/vc4/vc4.cpp                       | 48 ++++++++++---------\n>  src/libcamera/base/backtrace.cpp              |  8 ++--\n>  src/libcamera/base/file.cpp                   |  6 +--\n>  src/libcamera/base/log.cpp                    | 17 ++++---\n>  src/libcamera/base/thread.cpp                 |  2 +-\n>  src/libcamera/byte_stream_buffer.cpp          |  4 +-\n>  src/libcamera/camera.cpp                      |  2 +-\n>  src/libcamera/control_serializer.cpp          |  2 +-\n>  src/libcamera/controls.cpp                    | 22 ++++-----\n>  src/libcamera/converter/converter_dw100.cpp   |  2 +-\n>  .../converter/converter_dw100_vertexmap.cpp   |  4 +-\n>  src/libcamera/egl.cpp                         |  6 +--\n>  src/libcamera/framebuffer.cpp                 |  6 +--\n>  src/libcamera/ipa_manager.cpp                 |  2 +-\n>  src/libcamera/ipa_module.cpp                  | 16 +++----\n>  src/libcamera/mapped_framebuffer.cpp          |  2 +-\n>  src/libcamera/matrix.cpp                      | 26 +++++-----\n>  src/libcamera/media_pipeline.cpp              |  6 +--\n>  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  4 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          |  6 +--\n>  src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  6 +--\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  6 +--\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |  2 +-\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 +--\n>  .../pipeline/rpi/common/pipeline_base.cpp     | 12 ++---\n>  .../pipeline/rpi/common/pipeline_base.h       |  2 +-\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp      |  4 +-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-\n>  src/libcamera/pipeline/simple/simple.cpp      | 10 ++--\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  6 +--\n>  src/libcamera/pipeline/vimc/vimc.cpp          |  6 +--\n>  src/libcamera/pipeline/virtual/virtual.cpp    |  6 +--\n>  src/libcamera/process.cpp                     |  4 +-\n>  src/libcamera/pub_key.cpp                     |  6 +--\n>  src/libcamera/sensor/camera_sensor_legacy.cpp |  8 ++--\n>  src/libcamera/sensor/camera_sensor_raw.cpp    |  8 ++--\n>  src/libcamera/shared_mem_object.cpp           |  2 +-\n>  src/libcamera/v4l2_device.cpp                 | 14 +++---\n>  src/libcamera/v4l2_videodevice.cpp            |  6 +--\n>  src/libcamera/vector.cpp                      |  2 +-\n>  src/libcamera/yaml_parser.cpp                 |  2 +-\n>  src/py/libcamera/py_helpers.cpp               |  2 +-\n>  src/py/libcamera/py_main.cpp                  |  4 +-\n>  src/v4l2/v4l2_camera_proxy.cpp                |  2 +-\n>  src/v4l2/v4l2_compat_manager.cpp              |  4 +-\n>  test/controls/control_value.cpp               | 28 +++++------\n>  test/file.cpp                                 |  2 +-\n>  test/span.cpp                                 |  1 +\n>  test/utils.cpp                                |  4 +-\n>  test/v4l2_videodevice/controls.cpp            |  4 +-\n>  utils/codegen/controls.py                     |  4 +-\n>  utils/gen-debug-controls.py                   |  4 +-\n>  147 files changed, 487 insertions(+), 461 deletions(-)\n> \n> --\n> 2.53.0","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 9A645BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Mar 2026 17:10:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B95E462776;\n\tMon, 23 Mar 2026 18:10:47 +0100 (CET)","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 9FCFE62647\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 18:10:45 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 030C81BA;\n\tMon, 23 Mar 2026 18:09:28 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TRj1GGQD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774285769;\n\tbh=6+TGJnRE3fbuz8U9ziS9Rsq7u8t1rkMMJ52/KdzzQkE=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=TRj1GGQD0fRgIllEJ66alxzQ6eNCYYMfjqyL7s5saTS7dpdk2m5HOq2BFSsdYBmKG\n\tAJ7ro4+1YKqMno1LM0Bst3fE0QwCK9xKChnaUtdXA3reNB12yzrWHdHtQeGyZQouas\n\tH0VWVnd2l3NsZLLLmKRMpnUgJw/2VRXehW6PKgfc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>","Subject":"Re: [RFC PATCH v2 0/7] C++20 migration","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 23 Mar 2026 17:10:42 +0000","Message-ID":"<177428584254.4036272.16401333789099941828@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38420,"web_url":"https://patchwork.libcamera.org/comment/38420/","msgid":"<20260326153128.GA2921592@killaraus.ideasonboard.com>","date":"2026-03-26T15:31:28","subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Barnabás,\n\nThank you for the patch.\n\nOn Mon, Mar 23, 2026 at 11:27:23AM +0100, Barnabás Pőcze wrote:\n> Now that C++20 is used, convert everything to use `std::span` instead of\n> `libcamera::Span`.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  Documentation/guides/pipeline-handler.rst     |  4 +-\n>  include/libcamera/base/file.h                 | 10 ++--\n>  include/libcamera/base/span.h                 | 12 ++---\n>  include/libcamera/base/thread.h               |  4 +-\n>  include/libcamera/camera.h                    |  5 +-\n>  include/libcamera/controls.h                  | 22 ++++++---\n>  include/libcamera/framebuffer.h               | 10 ++--\n>  .../libcamera/internal/byte_stream_buffer.h   |  6 +--\n>  include/libcamera/internal/camera_sensor.h    |  6 +--\n>  .../converter/converter_dw100_vertexmap.h     |  5 +-\n>  include/libcamera/internal/egl.h              |  8 ++--\n>  include/libcamera/internal/framebuffer.h      |  4 +-\n>  .../libcamera/internal/mapped_framebuffer.h   |  4 +-\n>  include/libcamera/internal/matrix.h           | 26 +++++-----\n>  include/libcamera/internal/pipeline_handler.h |  2 +-\n>  include/libcamera/internal/process.h          |  6 +--\n>  include/libcamera/internal/pub_key.h          |  7 ++-\n>  .../libcamera/internal/shared_mem_object.h    |  6 +--\n>  include/libcamera/internal/v4l2_device.h      |  6 +--\n>  include/libcamera/internal/vector.h           |  4 +-\n>  src/android/camera_buffer.h                   | 11 +++--\n>  src/android/camera_capabilities.cpp           |  4 +-\n>  src/android/camera_request.cpp                |  4 +-\n>  src/android/jpeg/encoder.h                    |  4 +-\n>  src/android/jpeg/encoder_jea.cpp              |  2 +-\n>  src/android/jpeg/encoder_jea.h                |  2 +-\n>  src/android/jpeg/encoder_libjpeg.cpp          | 10 ++--\n>  src/android/jpeg/encoder_libjpeg.h            | 12 ++---\n>  src/android/jpeg/exif.cpp                     |  2 +-\n>  src/android/jpeg/exif.h                       |  7 ++-\n>  src/android/jpeg/post_processor_jpeg.cpp      |  2 +-\n>  src/android/mm/cros_camera_buffer.cpp         |  4 +-\n>  .../mm/cros_frame_buffer_allocator.cpp        |  2 +-\n>  src/android/mm/generic_camera_buffer.cpp      |  4 +-\n>  .../mm/generic_frame_buffer_allocator.cpp     |  2 +-\n>  src/apps/cam/capture_script.cpp               | 12 ++---\n>  src/apps/cam/drm.cpp                          |  6 +--\n>  src/apps/cam/drm.h                            |  4 +-\n>  src/apps/cam/file_sink.cpp                    |  2 +-\n>  src/apps/cam/sdl_sink.cpp                     |  4 +-\n>  src/apps/cam/sdl_texture.h                    |  4 +-\n>  src/apps/cam/sdl_texture_1plane.cpp           |  2 +-\n>  src/apps/cam/sdl_texture_1plane.h             |  2 +-\n>  src/apps/cam/sdl_texture_mjpg.cpp             |  4 +-\n>  src/apps/cam/sdl_texture_mjpg.h               |  4 +-\n>  src/apps/cam/sdl_texture_yuv.cpp              |  2 +-\n>  src/apps/cam/sdl_texture_yuv.h                |  2 +-\n>  src/apps/common/dng_writer.cpp                |  4 +-\n>  src/apps/common/image.cpp                     |  6 +--\n>  src/apps/common/image.h                       | 10 ++--\n>  src/apps/common/ppm_writer.cpp                |  2 +-\n>  src/apps/common/ppm_writer.h                  |  4 +-\n>  src/apps/ipa-verify/main.cpp                  |  4 +-\n>  src/apps/lc-compliance/helpers/capture.cpp    |  2 +-\n>  src/apps/lc-compliance/helpers/capture.h      |  2 +-\n>  src/gstreamer/gstlibcamera-controls.cpp.in    |  4 +-\n>  src/gstreamer/gstlibcamera-utils.cpp          | 20 ++++----\n>  src/ipa/ipu3/algorithms/af.cpp                |  8 ++--\n>  src/ipa/ipu3/algorithms/af.h                  |  2 +-\n>  src/ipa/ipu3/algorithms/agc.cpp               |  2 +-\n>  src/ipa/ipu3/ipu3.cpp                         |  8 ++--\n>  src/ipa/libipa/exposure_mode_helper.cpp       |  2 +-\n>  src/ipa/libipa/exposure_mode_helper.h         |  4 +-\n>  src/ipa/libipa/histogram.cpp                  |  4 +-\n>  src/ipa/libipa/histogram.h                    |  8 ++--\n>  src/ipa/libipa/lsc_polynomial.h               |  2 +-\n>  src/ipa/libipa/v4l2_params.cpp                |  2 +-\n>  src/ipa/libipa/v4l2_params.h                  | 20 ++++----\n>  src/ipa/mali-c55/algorithms/agc.cpp           | 10 ++--\n>  src/ipa/mali-c55/mali-c55.cpp                 |  4 +-\n>  src/ipa/mali-c55/params.h                     |  2 +-\n>  src/ipa/rkisp1/algorithms/agc.cpp             |  2 +-\n>  src/ipa/rkisp1/algorithms/agc.h               |  7 +--\n>  src/ipa/rkisp1/algorithms/awb.cpp             |  2 +-\n>  src/ipa/rkisp1/algorithms/lsc.cpp             | 24 +++++-----\n>  src/ipa/rkisp1/algorithms/lsc.h               |  4 +-\n>  src/ipa/rkisp1/params.cpp                     |  2 +-\n>  src/ipa/rkisp1/params.h                       |  8 ++--\n>  src/ipa/rkisp1/rkisp1.cpp                     |  2 +-\n>  src/ipa/rpi/cam_helper/cam_helper.cpp         |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper.h           |  6 +--\n>  src/ipa/rpi/cam_helper/cam_helper_imx477.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper_imx519.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/cam_helper_imx708.cpp  |  4 +-\n>  src/ipa/rpi/cam_helper/md_parser.h            |  9 ++--\n>  src/ipa/rpi/cam_helper/md_parser_smia.cpp     |  4 +-\n>  src/ipa/rpi/common/ipa_base.cpp               | 20 ++++----\n>  src/ipa/rpi/common/ipa_base.h                 |  2 +-\n>  src/ipa/rpi/controller/af_algorithm.h         |  5 +-\n>  src/ipa/rpi/controller/rpi/af.cpp             |  2 +-\n>  src/ipa/rpi/controller/rpi/af.h               |  2 +-\n>  src/ipa/rpi/controller/rpi/alsc.cpp           |  2 +-\n>  src/ipa/rpi/pisp/pisp.cpp                     | 12 +++--\n>  src/ipa/rpi/vc4/vc4.cpp                       | 48 ++++++++++---------\n>  src/libcamera/base/backtrace.cpp              |  8 ++--\n>  src/libcamera/base/file.cpp                   |  6 +--\n>  src/libcamera/base/thread.cpp                 |  2 +-\n>  src/libcamera/byte_stream_buffer.cpp          |  4 +-\n>  src/libcamera/camera.cpp                      |  2 +-\n>  src/libcamera/control_serializer.cpp          |  2 +-\n>  src/libcamera/controls.cpp                    | 22 ++++-----\n>  src/libcamera/converter/converter_dw100.cpp   |  2 +-\n>  .../converter/converter_dw100_vertexmap.cpp   |  4 +-\n>  src/libcamera/egl.cpp                         |  6 +--\n>  src/libcamera/framebuffer.cpp                 |  6 +--\n>  src/libcamera/ipa_manager.cpp                 |  2 +-\n>  src/libcamera/ipa_module.cpp                  | 16 +++----\n>  src/libcamera/mapped_framebuffer.cpp          |  2 +-\n>  src/libcamera/matrix.cpp                      | 26 +++++-----\n>  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  4 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          |  6 +--\n>  src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  6 +--\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  6 +--\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |  2 +-\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 +--\n>  .../pipeline/rpi/common/pipeline_base.cpp     | 12 ++---\n>  .../pipeline/rpi/common/pipeline_base.h       |  2 +-\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp      |  4 +-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-\n>  src/libcamera/pipeline/simple/simple.cpp      |  4 +-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  6 +--\n>  src/libcamera/pipeline/vimc/vimc.cpp          |  6 +--\n>  src/libcamera/pipeline/virtual/virtual.cpp    |  6 +--\n>  src/libcamera/process.cpp                     |  4 +-\n>  src/libcamera/pub_key.cpp                     |  6 +--\n>  src/libcamera/sensor/camera_sensor_legacy.cpp |  8 ++--\n>  src/libcamera/sensor/camera_sensor_raw.cpp    |  8 ++--\n>  src/libcamera/shared_mem_object.cpp           |  2 +-\n>  src/libcamera/v4l2_device.cpp                 | 14 +++---\n>  src/libcamera/v4l2_videodevice.cpp            |  6 +--\n>  src/libcamera/vector.cpp                      |  2 +-\n>  src/libcamera/yaml_parser.cpp                 |  2 +-\n>  src/py/libcamera/py_helpers.cpp               |  2 +-\n>  src/py/libcamera/py_main.cpp                  |  4 +-\n>  src/v4l2/v4l2_camera_proxy.cpp                |  2 +-\n>  src/v4l2/v4l2_compat_manager.cpp              |  4 +-\n>  test/controls/control_value.cpp               | 28 +++++------\n>  test/file.cpp                                 |  2 +-\n>  test/utils.cpp                                |  4 +-\n>  test/v4l2_videodevice/controls.cpp            |  4 +-\n>  utils/codegen/controls.py                     |  4 +-\n>  utils/gen-debug-controls.py                   |  4 +-\n>  142 files changed, 448 insertions(+), 436 deletions(-)\n\nThere are still a few occurrences of Span in the code base that I think\nneed to be addressed. The following occurrences can I think just be\nreplaced with 'std::span':\n\nsrc/ipa/rpi/controller/rpi/awb_nn.cpp:  return \"[\" + utils::join(Span(dims, dimsSize), \",\") + \"]\";\nsrc/libcamera/ipa_data_serializer.cpp: * \\todo Switch to Span instead of byte and fd vector\nsrc/libcamera/mapped_framebuffer.cpp: * The MappedBuffer::Plane uses the Span interface to describe the mapped memory\nsrc/libcamera/matrix.cpp: * \\return Row \\a i from the matrix, as a Span\nutils/gen-debug-controls.py:                    if m.type is not None and m.type.startswith('Span'):\n\nThe following ones could be replaced by either 'std::span' or 'span':\n\nsrc/libcamera/matrix.cpp: * \\a data is a one-dimensional Span and will be turned into a matrix in\nsrc/libcamera/matrix.cpp: * This operator[] returns a Span, which can then be indexed into again with\nsrc/libcamera/matrix.cpp: * matrix. Note that the lifetime of the Span returned by this first-level\nsrc/libcamera/matrix.cpp: * to save the Span that is the result of this operator[].\nsrc/libcamera/shared_mem_object.cpp: * fails, the function returns an empty Span. This can be also checked using the\nsrc/libcamera/shared_mem_object.cpp: * \\return The memory buffer, or an empty Span if allocation failed\n\nThese should probably drop the type name as they're redundant (doxygen\nshows types in the generated documentation):\n\nsrc/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into Span \\a data\nsrc/libcamera/byte_stream_buffer.cpp: * \\param[out] data Span representing the destination memory\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n\nwould become\n\nsrc/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into \\a data\nsrc/libcamera/byte_stream_buffer.cpp: * \\param[out] data The destination memory\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\nsrc/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n\nFinally, thare are two occurrences in control yaml files:\n\nsrc/libcamera/control_ids_rpi.yaml:        Span of the BCM2835 ISP generated statistics for the current frame.\nsrc/libcamera/control_ids_rpi.yaml:        Span of the PiSP Frontend ISP generated statistics for the current\n\nI'd just drop \"Span of\" here too.","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 8C5D6BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Mar 2026 15:31:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DBFB662862;\n\tThu, 26 Mar 2026 16:31:31 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 70E6662781\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2026 16:31:30 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9233F594;\n\tThu, 26 Mar 2026 16:30:11 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nNP0KX0x\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774539011;\n\tbh=DYwwJcgF8XcJfpC6qyU/STJBfN1AtzAZnI5hB89dj+w=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nNP0KX0xgdfx4WmXFB+am89Rit69lWhLPXOt4CfDimbUB1i949m6s7wCS0vDTt/tY\n\tRzU8Iy9/4MWcjlIR8hMQeQuYS9FT5TubBSDB4c39TLF68g7g6w06+Gu+gf3jVz70lx\n\tBb/jVuc6f366kd7meugyRYejgDY3adEo32sJUcro=","Date":"Thu, 26 Mar 2026 17:31:28 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","Message-ID":"<20260326153128.GA2921592@killaraus.ideasonboard.com>","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>\n\t<20260323102724.1385487-7-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260323102724.1385487-7-barnabas.pocze@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38430,"web_url":"https://patchwork.libcamera.org/comment/38430/","msgid":"<c4b38e50-9ea9-46d0-adb8-6d9cd70abf41@ideasonboard.com>","date":"2026-03-27T08:28:36","subject":"Re: [RFC PATCH v2 0/7] C++20 migration","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 03. 23. 18:10 keltezéssel, Kieran Bingham írta:\n> Quoting Barnabás Pőcze (2026-03-23 10:27:17)\n>> With gcc 16 switching C++20 by default, and it being released for more\n>> than five years now, this is a proof of concept patch set containing the\n>> changes needed to make the current CI jobs succeed with cpp_std=c++20.\n>>\n>> There is still at least one issue that seemingly only appears in C++20:\n>> https://gitlab.freedesktop.org/camera/libcamera/-/issues/267\n>> the cause is not known, but a potential workaround has been merged.\n>>\n>> The last two patches drop the use of `libcamera::Span` in favor of\n>> `std::span`. However, gcc 9 does not have an implementation, so those\n>> two cannot be merged as is.\n> \n> Perhaps we should consider merging the first 5 patches already then to\n> support with the migration?\n> \n> Can we in anyway 'alias' std::span to libcamera::Span for gcc-9, so we\n> could already move forwards ? or would that get too messy ?\n\nI am a bit worried it would create more issues than it solves.\n\n\n> \n>>\n>> Barnabás Pőcze (7):\n>>    gstreamer: Add `-Wno-volatile` for GCC\n>>    meson: Ignore `Wredundant-move` with GCC 11 and above\n>>    libcamera: base: log: Ignore deprecations\n>>    treewide: Use character literal instead of string in some cases\n>>    meson: Switch to C++20\n>>    treewide: Use `std::span`\n>>    libcamera: base: span: Deprecate it\n>>\n>>   Documentation/guides/pipeline-handler.rst     |  4 +-\n>>   include/libcamera/base/file.h                 | 10 ++--\n>>   include/libcamera/base/span.h                 | 16 +++----\n>>   include/libcamera/base/thread.h               |  4 +-\n>>   include/libcamera/camera.h                    |  5 +-\n>>   include/libcamera/controls.h                  | 22 ++++++---\n>>   include/libcamera/framebuffer.h               | 10 ++--\n>>   .../libcamera/internal/byte_stream_buffer.h   |  6 +--\n>>   include/libcamera/internal/camera_sensor.h    |  6 +--\n>>   .../converter/converter_dw100_vertexmap.h     |  5 +-\n>>   include/libcamera/internal/egl.h              |  8 ++--\n>>   include/libcamera/internal/framebuffer.h      |  4 +-\n>>   .../libcamera/internal/mapped_framebuffer.h   |  4 +-\n>>   include/libcamera/internal/matrix.h           | 26 +++++-----\n>>   include/libcamera/internal/pipeline_handler.h |  2 +-\n>>   include/libcamera/internal/process.h          |  6 +--\n>>   include/libcamera/internal/pub_key.h          |  7 ++-\n>>   .../libcamera/internal/shared_mem_object.h    |  6 +--\n>>   include/libcamera/internal/v4l2_device.h      |  6 +--\n>>   include/libcamera/internal/vector.h           |  4 +-\n>>   meson.build                                   | 23 ++++-----\n>>   src/android/camera_buffer.h                   | 11 +++--\n>>   src/android/camera_capabilities.cpp           |  4 +-\n>>   src/android/camera_request.cpp                |  4 +-\n>>   src/android/jpeg/encoder.h                    |  4 +-\n>>   src/android/jpeg/encoder_jea.cpp              |  2 +-\n>>   src/android/jpeg/encoder_jea.h                |  2 +-\n>>   src/android/jpeg/encoder_libjpeg.cpp          | 10 ++--\n>>   src/android/jpeg/encoder_libjpeg.h            | 12 ++---\n>>   src/android/jpeg/exif.cpp                     |  2 +-\n>>   src/android/jpeg/exif.h                       |  7 ++-\n>>   src/android/jpeg/post_processor_jpeg.cpp      |  2 +-\n>>   src/android/mm/cros_camera_buffer.cpp         |  4 +-\n>>   .../mm/cros_frame_buffer_allocator.cpp        |  2 +-\n>>   src/android/mm/generic_camera_buffer.cpp      |  4 +-\n>>   .../mm/generic_frame_buffer_allocator.cpp     |  2 +-\n>>   src/apps/cam/capture_script.cpp               | 12 ++---\n>>   src/apps/cam/drm.cpp                          |  6 +--\n>>   src/apps/cam/drm.h                            |  4 +-\n>>   src/apps/cam/file_sink.cpp                    |  2 +-\n>>   src/apps/cam/sdl_sink.cpp                     |  4 +-\n>>   src/apps/cam/sdl_texture.h                    |  4 +-\n>>   src/apps/cam/sdl_texture_1plane.cpp           |  2 +-\n>>   src/apps/cam/sdl_texture_1plane.h             |  2 +-\n>>   src/apps/cam/sdl_texture_mjpg.cpp             |  4 +-\n>>   src/apps/cam/sdl_texture_mjpg.h               |  4 +-\n>>   src/apps/cam/sdl_texture_yuv.cpp              |  2 +-\n>>   src/apps/cam/sdl_texture_yuv.h                |  2 +-\n>>   src/apps/common/dng_writer.cpp                |  4 +-\n>>   src/apps/common/image.cpp                     |  6 +--\n>>   src/apps/common/image.h                       | 10 ++--\n>>   src/apps/common/ppm_writer.cpp                |  2 +-\n>>   src/apps/common/ppm_writer.h                  |  4 +-\n>>   src/apps/ipa-verify/main.cpp                  |  4 +-\n>>   src/apps/lc-compliance/helpers/capture.cpp    |  2 +-\n>>   src/apps/lc-compliance/helpers/capture.h      |  2 +-\n>>   src/gstreamer/gstlibcamera-controls.cpp.in    |  4 +-\n>>   src/gstreamer/gstlibcamera-utils.cpp          | 20 ++++----\n>>   src/gstreamer/meson.build                     |  7 +++\n>>   src/ipa/ipu3/algorithms/af.cpp                |  8 ++--\n>>   src/ipa/ipu3/algorithms/af.h                  |  2 +-\n>>   src/ipa/ipu3/algorithms/agc.cpp               |  2 +-\n>>   src/ipa/ipu3/ipu3.cpp                         |  8 ++--\n>>   src/ipa/libipa/exposure_mode_helper.cpp       |  2 +-\n>>   src/ipa/libipa/exposure_mode_helper.h         |  4 +-\n>>   src/ipa/libipa/histogram.cpp                  |  4 +-\n>>   src/ipa/libipa/histogram.h                    |  8 ++--\n>>   src/ipa/libipa/lsc_polynomial.h               |  2 +-\n>>   src/ipa/libipa/v4l2_params.cpp                |  2 +-\n>>   src/ipa/libipa/v4l2_params.h                  | 20 ++++----\n>>   src/ipa/mali-c55/algorithms/agc.cpp           | 10 ++--\n>>   src/ipa/mali-c55/mali-c55.cpp                 |  4 +-\n>>   src/ipa/mali-c55/params.h                     |  2 +-\n>>   src/ipa/rkisp1/algorithms/agc.cpp             |  2 +-\n>>   src/ipa/rkisp1/algorithms/agc.h               |  7 +--\n>>   src/ipa/rkisp1/algorithms/awb.cpp             |  2 +-\n>>   src/ipa/rkisp1/algorithms/lsc.cpp             | 24 +++++-----\n>>   src/ipa/rkisp1/algorithms/lsc.h               |  4 +-\n>>   src/ipa/rkisp1/params.cpp                     |  2 +-\n>>   src/ipa/rkisp1/params.h                       |  8 ++--\n>>   src/ipa/rkisp1/rkisp1.cpp                     |  2 +-\n>>   src/ipa/rpi/cam_helper/cam_helper.cpp         |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper.h           |  6 +--\n>>   src/ipa/rpi/cam_helper/cam_helper_imx477.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper_imx519.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper_imx708.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/md_parser.h            |  9 ++--\n>>   src/ipa/rpi/cam_helper/md_parser_smia.cpp     |  4 +-\n>>   src/ipa/rpi/common/ipa_base.cpp               | 20 ++++----\n>>   src/ipa/rpi/common/ipa_base.h                 |  2 +-\n>>   src/ipa/rpi/controller/af_algorithm.h         |  5 +-\n>>   src/ipa/rpi/controller/rpi/af.cpp             |  2 +-\n>>   src/ipa/rpi/controller/rpi/af.h               |  2 +-\n>>   src/ipa/rpi/controller/rpi/alsc.cpp           |  2 +-\n>>   src/ipa/rpi/pisp/pisp.cpp                     | 12 +++--\n>>   src/ipa/rpi/vc4/vc4.cpp                       | 48 ++++++++++---------\n>>   src/libcamera/base/backtrace.cpp              |  8 ++--\n>>   src/libcamera/base/file.cpp                   |  6 +--\n>>   src/libcamera/base/log.cpp                    | 17 ++++---\n>>   src/libcamera/base/thread.cpp                 |  2 +-\n>>   src/libcamera/byte_stream_buffer.cpp          |  4 +-\n>>   src/libcamera/camera.cpp                      |  2 +-\n>>   src/libcamera/control_serializer.cpp          |  2 +-\n>>   src/libcamera/controls.cpp                    | 22 ++++-----\n>>   src/libcamera/converter/converter_dw100.cpp   |  2 +-\n>>   .../converter/converter_dw100_vertexmap.cpp   |  4 +-\n>>   src/libcamera/egl.cpp                         |  6 +--\n>>   src/libcamera/framebuffer.cpp                 |  6 +--\n>>   src/libcamera/ipa_manager.cpp                 |  2 +-\n>>   src/libcamera/ipa_module.cpp                  | 16 +++----\n>>   src/libcamera/mapped_framebuffer.cpp          |  2 +-\n>>   src/libcamera/matrix.cpp                      | 26 +++++-----\n>>   src/libcamera/media_pipeline.cpp              |  6 +--\n>>   src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  4 +-\n>>   src/libcamera/pipeline/ipu3/ipu3.cpp          |  6 +--\n>>   src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  6 +--\n>>   src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  6 +--\n>>   src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |  2 +-\n>>   src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 +--\n>>   .../pipeline/rpi/common/pipeline_base.cpp     | 12 ++---\n>>   .../pipeline/rpi/common/pipeline_base.h       |  2 +-\n>>   src/libcamera/pipeline/rpi/pisp/pisp.cpp      |  4 +-\n>>   src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-\n>>   src/libcamera/pipeline/simple/simple.cpp      | 10 ++--\n>>   src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  6 +--\n>>   src/libcamera/pipeline/vimc/vimc.cpp          |  6 +--\n>>   src/libcamera/pipeline/virtual/virtual.cpp    |  6 +--\n>>   src/libcamera/process.cpp                     |  4 +-\n>>   src/libcamera/pub_key.cpp                     |  6 +--\n>>   src/libcamera/sensor/camera_sensor_legacy.cpp |  8 ++--\n>>   src/libcamera/sensor/camera_sensor_raw.cpp    |  8 ++--\n>>   src/libcamera/shared_mem_object.cpp           |  2 +-\n>>   src/libcamera/v4l2_device.cpp                 | 14 +++---\n>>   src/libcamera/v4l2_videodevice.cpp            |  6 +--\n>>   src/libcamera/vector.cpp                      |  2 +-\n>>   src/libcamera/yaml_parser.cpp                 |  2 +-\n>>   src/py/libcamera/py_helpers.cpp               |  2 +-\n>>   src/py/libcamera/py_main.cpp                  |  4 +-\n>>   src/v4l2/v4l2_camera_proxy.cpp                |  2 +-\n>>   src/v4l2/v4l2_compat_manager.cpp              |  4 +-\n>>   test/controls/control_value.cpp               | 28 +++++------\n>>   test/file.cpp                                 |  2 +-\n>>   test/span.cpp                                 |  1 +\n>>   test/utils.cpp                                |  4 +-\n>>   test/v4l2_videodevice/controls.cpp            |  4 +-\n>>   utils/codegen/controls.py                     |  4 +-\n>>   utils/gen-debug-controls.py                   |  4 +-\n>>   147 files changed, 487 insertions(+), 461 deletions(-)\n>>\n>> --\n>> 2.53.0","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 D961EBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Mar 2026 08:28:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8B51E62C43;\n\tFri, 27 Mar 2026 09:28:40 +0100 (CET)","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 A1F1B6271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2026 09:28:39 +0100 (CET)","from [192.168.33.24] (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E9157CA;\n\tFri, 27 Mar 2026 09:27:20 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QWzahvBD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774600040;\n\tbh=XoVh/Zxkv96ciPS+iOepLcalQBXLv0qjILsl4z0u6/o=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=QWzahvBDAFwjV1Jq2Ugs7fJbHt9DnkdZyxmfOFAFLZuy0ZonKFZYrt92dprsyU3St\n\twLcwl8l+pWYQfGSlZlcK61LD08nIz/gF2OXZtKcMpHdiEUbAI2wrBQWDoRRiOSzuWi\n\tTwnXgdeFXkGvg5CGy4xcbysCaWNKIDAzUXeNVhlE=","Message-ID":"<c4b38e50-9ea9-46d0-adb8-6d9cd70abf41@ideasonboard.com>","Date":"Fri, 27 Mar 2026 09:28:36 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 0/7] C++20 migration","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>\n\t<177428584254.4036272.16401333789099941828@ping.linuxembedded.co.uk>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<177428584254.4036272.16401333789099941828@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38432,"web_url":"https://patchwork.libcamera.org/comment/38432/","msgid":"<31d357ff-8bb6-4d61-88ec-d7f08918a6ce@ideasonboard.com>","date":"2026-03-27T08:28:53","subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 03. 26. 16:31 keltezéssel, Laurent Pinchart írta:\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> On Mon, Mar 23, 2026 at 11:27:23AM +0100, Barnabás Pőcze wrote:\n>> Now that C++20 is used, convert everything to use `std::span` instead of\n>> `libcamera::Span`.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   Documentation/guides/pipeline-handler.rst     |  4 +-\n>>   include/libcamera/base/file.h                 | 10 ++--\n>>   include/libcamera/base/span.h                 | 12 ++---\n>>   include/libcamera/base/thread.h               |  4 +-\n>>   include/libcamera/camera.h                    |  5 +-\n>>   include/libcamera/controls.h                  | 22 ++++++---\n>>   include/libcamera/framebuffer.h               | 10 ++--\n>>   .../libcamera/internal/byte_stream_buffer.h   |  6 +--\n>>   include/libcamera/internal/camera_sensor.h    |  6 +--\n>>   .../converter/converter_dw100_vertexmap.h     |  5 +-\n>>   include/libcamera/internal/egl.h              |  8 ++--\n>>   include/libcamera/internal/framebuffer.h      |  4 +-\n>>   .../libcamera/internal/mapped_framebuffer.h   |  4 +-\n>>   include/libcamera/internal/matrix.h           | 26 +++++-----\n>>   include/libcamera/internal/pipeline_handler.h |  2 +-\n>>   include/libcamera/internal/process.h          |  6 +--\n>>   include/libcamera/internal/pub_key.h          |  7 ++-\n>>   .../libcamera/internal/shared_mem_object.h    |  6 +--\n>>   include/libcamera/internal/v4l2_device.h      |  6 +--\n>>   include/libcamera/internal/vector.h           |  4 +-\n>>   src/android/camera_buffer.h                   | 11 +++--\n>>   src/android/camera_capabilities.cpp           |  4 +-\n>>   src/android/camera_request.cpp                |  4 +-\n>>   src/android/jpeg/encoder.h                    |  4 +-\n>>   src/android/jpeg/encoder_jea.cpp              |  2 +-\n>>   src/android/jpeg/encoder_jea.h                |  2 +-\n>>   src/android/jpeg/encoder_libjpeg.cpp          | 10 ++--\n>>   src/android/jpeg/encoder_libjpeg.h            | 12 ++---\n>>   src/android/jpeg/exif.cpp                     |  2 +-\n>>   src/android/jpeg/exif.h                       |  7 ++-\n>>   src/android/jpeg/post_processor_jpeg.cpp      |  2 +-\n>>   src/android/mm/cros_camera_buffer.cpp         |  4 +-\n>>   .../mm/cros_frame_buffer_allocator.cpp        |  2 +-\n>>   src/android/mm/generic_camera_buffer.cpp      |  4 +-\n>>   .../mm/generic_frame_buffer_allocator.cpp     |  2 +-\n>>   src/apps/cam/capture_script.cpp               | 12 ++---\n>>   src/apps/cam/drm.cpp                          |  6 +--\n>>   src/apps/cam/drm.h                            |  4 +-\n>>   src/apps/cam/file_sink.cpp                    |  2 +-\n>>   src/apps/cam/sdl_sink.cpp                     |  4 +-\n>>   src/apps/cam/sdl_texture.h                    |  4 +-\n>>   src/apps/cam/sdl_texture_1plane.cpp           |  2 +-\n>>   src/apps/cam/sdl_texture_1plane.h             |  2 +-\n>>   src/apps/cam/sdl_texture_mjpg.cpp             |  4 +-\n>>   src/apps/cam/sdl_texture_mjpg.h               |  4 +-\n>>   src/apps/cam/sdl_texture_yuv.cpp              |  2 +-\n>>   src/apps/cam/sdl_texture_yuv.h                |  2 +-\n>>   src/apps/common/dng_writer.cpp                |  4 +-\n>>   src/apps/common/image.cpp                     |  6 +--\n>>   src/apps/common/image.h                       | 10 ++--\n>>   src/apps/common/ppm_writer.cpp                |  2 +-\n>>   src/apps/common/ppm_writer.h                  |  4 +-\n>>   src/apps/ipa-verify/main.cpp                  |  4 +-\n>>   src/apps/lc-compliance/helpers/capture.cpp    |  2 +-\n>>   src/apps/lc-compliance/helpers/capture.h      |  2 +-\n>>   src/gstreamer/gstlibcamera-controls.cpp.in    |  4 +-\n>>   src/gstreamer/gstlibcamera-utils.cpp          | 20 ++++----\n>>   src/ipa/ipu3/algorithms/af.cpp                |  8 ++--\n>>   src/ipa/ipu3/algorithms/af.h                  |  2 +-\n>>   src/ipa/ipu3/algorithms/agc.cpp               |  2 +-\n>>   src/ipa/ipu3/ipu3.cpp                         |  8 ++--\n>>   src/ipa/libipa/exposure_mode_helper.cpp       |  2 +-\n>>   src/ipa/libipa/exposure_mode_helper.h         |  4 +-\n>>   src/ipa/libipa/histogram.cpp                  |  4 +-\n>>   src/ipa/libipa/histogram.h                    |  8 ++--\n>>   src/ipa/libipa/lsc_polynomial.h               |  2 +-\n>>   src/ipa/libipa/v4l2_params.cpp                |  2 +-\n>>   src/ipa/libipa/v4l2_params.h                  | 20 ++++----\n>>   src/ipa/mali-c55/algorithms/agc.cpp           | 10 ++--\n>>   src/ipa/mali-c55/mali-c55.cpp                 |  4 +-\n>>   src/ipa/mali-c55/params.h                     |  2 +-\n>>   src/ipa/rkisp1/algorithms/agc.cpp             |  2 +-\n>>   src/ipa/rkisp1/algorithms/agc.h               |  7 +--\n>>   src/ipa/rkisp1/algorithms/awb.cpp             |  2 +-\n>>   src/ipa/rkisp1/algorithms/lsc.cpp             | 24 +++++-----\n>>   src/ipa/rkisp1/algorithms/lsc.h               |  4 +-\n>>   src/ipa/rkisp1/params.cpp                     |  2 +-\n>>   src/ipa/rkisp1/params.h                       |  8 ++--\n>>   src/ipa/rkisp1/rkisp1.cpp                     |  2 +-\n>>   src/ipa/rpi/cam_helper/cam_helper.cpp         |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper.h           |  6 +--\n>>   src/ipa/rpi/cam_helper/cam_helper_imx477.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper_imx519.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/cam_helper_imx708.cpp  |  4 +-\n>>   src/ipa/rpi/cam_helper/md_parser.h            |  9 ++--\n>>   src/ipa/rpi/cam_helper/md_parser_smia.cpp     |  4 +-\n>>   src/ipa/rpi/common/ipa_base.cpp               | 20 ++++----\n>>   src/ipa/rpi/common/ipa_base.h                 |  2 +-\n>>   src/ipa/rpi/controller/af_algorithm.h         |  5 +-\n>>   src/ipa/rpi/controller/rpi/af.cpp             |  2 +-\n>>   src/ipa/rpi/controller/rpi/af.h               |  2 +-\n>>   src/ipa/rpi/controller/rpi/alsc.cpp           |  2 +-\n>>   src/ipa/rpi/pisp/pisp.cpp                     | 12 +++--\n>>   src/ipa/rpi/vc4/vc4.cpp                       | 48 ++++++++++---------\n>>   src/libcamera/base/backtrace.cpp              |  8 ++--\n>>   src/libcamera/base/file.cpp                   |  6 +--\n>>   src/libcamera/base/thread.cpp                 |  2 +-\n>>   src/libcamera/byte_stream_buffer.cpp          |  4 +-\n>>   src/libcamera/camera.cpp                      |  2 +-\n>>   src/libcamera/control_serializer.cpp          |  2 +-\n>>   src/libcamera/controls.cpp                    | 22 ++++-----\n>>   src/libcamera/converter/converter_dw100.cpp   |  2 +-\n>>   .../converter/converter_dw100_vertexmap.cpp   |  4 +-\n>>   src/libcamera/egl.cpp                         |  6 +--\n>>   src/libcamera/framebuffer.cpp                 |  6 +--\n>>   src/libcamera/ipa_manager.cpp                 |  2 +-\n>>   src/libcamera/ipa_module.cpp                  | 16 +++----\n>>   src/libcamera/mapped_framebuffer.cpp          |  2 +-\n>>   src/libcamera/matrix.cpp                      | 26 +++++-----\n>>   src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  4 +-\n>>   src/libcamera/pipeline/ipu3/ipu3.cpp          |  6 +--\n>>   src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  6 +--\n>>   src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  6 +--\n>>   src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |  2 +-\n>>   src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 +--\n>>   .../pipeline/rpi/common/pipeline_base.cpp     | 12 ++---\n>>   .../pipeline/rpi/common/pipeline_base.h       |  2 +-\n>>   src/libcamera/pipeline/rpi/pisp/pisp.cpp      |  4 +-\n>>   src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-\n>>   src/libcamera/pipeline/simple/simple.cpp      |  4 +-\n>>   src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  6 +--\n>>   src/libcamera/pipeline/vimc/vimc.cpp          |  6 +--\n>>   src/libcamera/pipeline/virtual/virtual.cpp    |  6 +--\n>>   src/libcamera/process.cpp                     |  4 +-\n>>   src/libcamera/pub_key.cpp                     |  6 +--\n>>   src/libcamera/sensor/camera_sensor_legacy.cpp |  8 ++--\n>>   src/libcamera/sensor/camera_sensor_raw.cpp    |  8 ++--\n>>   src/libcamera/shared_mem_object.cpp           |  2 +-\n>>   src/libcamera/v4l2_device.cpp                 | 14 +++---\n>>   src/libcamera/v4l2_videodevice.cpp            |  6 +--\n>>   src/libcamera/vector.cpp                      |  2 +-\n>>   src/libcamera/yaml_parser.cpp                 |  2 +-\n>>   src/py/libcamera/py_helpers.cpp               |  2 +-\n>>   src/py/libcamera/py_main.cpp                  |  4 +-\n>>   src/v4l2/v4l2_camera_proxy.cpp                |  2 +-\n>>   src/v4l2/v4l2_compat_manager.cpp              |  4 +-\n>>   test/controls/control_value.cpp               | 28 +++++------\n>>   test/file.cpp                                 |  2 +-\n>>   test/utils.cpp                                |  4 +-\n>>   test/v4l2_videodevice/controls.cpp            |  4 +-\n>>   utils/codegen/controls.py                     |  4 +-\n>>   utils/gen-debug-controls.py                   |  4 +-\n>>   142 files changed, 448 insertions(+), 436 deletions(-)\n> \n> There are still a few occurrences of Span in the code base that I think\n> need to be addressed. The following occurrences can I think just be\n> replaced with 'std::span':\n\nOops, you're right. I made the suggested changes. I should do something so that\n`awb_nn.cpp` is built...\n\n\n> \n> src/ipa/rpi/controller/rpi/awb_nn.cpp:  return \"[\" + utils::join(Span(dims, dimsSize), \",\") + \"]\";\n> src/libcamera/ipa_data_serializer.cpp: * \\todo Switch to Span instead of byte and fd vector\n> src/libcamera/mapped_framebuffer.cpp: * The MappedBuffer::Plane uses the Span interface to describe the mapped memory\n> src/libcamera/matrix.cpp: * \\return Row \\a i from the matrix, as a Span\n> utils/gen-debug-controls.py:                    if m.type is not None and m.type.startswith('Span'):\n> \n> The following ones could be replaced by either 'std::span' or 'span':\n> \n> src/libcamera/matrix.cpp: * \\a data is a one-dimensional Span and will be turned into a matrix in\n> src/libcamera/matrix.cpp: * This operator[] returns a Span, which can then be indexed into again with\n> src/libcamera/matrix.cpp: * matrix. Note that the lifetime of the Span returned by this first-level\n> src/libcamera/matrix.cpp: * to save the Span that is the result of this operator[].\n> src/libcamera/shared_mem_object.cpp: * fails, the function returns an empty Span. This can be also checked using the\n> src/libcamera/shared_mem_object.cpp: * \\return The memory buffer, or an empty Span if allocation failed\n> \n> These should probably drop the type name as they're redundant (doxygen\n> shows types in the generated documentation):\n> \n> src/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into Span \\a data\n> src/libcamera/byte_stream_buffer.cpp: * \\param[out] data Span representing the destination memory\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> \n> would become\n> \n> src/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into \\a data\n> src/libcamera/byte_stream_buffer.cpp: * \\param[out] data The destination memory\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> \n> Finally, thare are two occurrences in control yaml files:\n> \n> src/libcamera/control_ids_rpi.yaml:        Span of the BCM2835 ISP generated statistics for the current frame.\n> src/libcamera/control_ids_rpi.yaml:        Span of the PiSP Frontend ISP generated statistics for the current\n> \n> I'd just drop \"Span of\" here too.\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 8F215BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Mar 2026 08:28:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C1C662CB3;\n\tFri, 27 Mar 2026 09:28:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1378E6271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2026 09:28:57 +0100 (CET)","from [192.168.33.24] (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A727C7CA;\n\tFri, 27 Mar 2026 09:27:37 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nV0B1Wnh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774600057;\n\tbh=e0hAZRd+ZuMtGyTp1RadgzXjAJtnxtdXU049ApgEN68=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=nV0B1WnhjIurd1NYY7TS9iHMxK86WmY1xRkzEjgikBtaXU+oCvros2ozpewxWNnkt\n\ttSfQGURBRUJIdE6Ta2zIzdl4EARNe8FJmK7YLSaVCCYKq1ef93mAmrJjwKrtch+607\n\tluFwWEzw3gXA1g9C9SVT/ORY9mfC5MD41c8Dcvno=","Message-ID":"<31d357ff-8bb6-4d61-88ec-d7f08918a6ce@ideasonboard.com>","Date":"Fri, 27 Mar 2026 09:28:53 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>\n\t<20260323102724.1385487-7-barnabas.pocze@ideasonboard.com>\n\t<20260326153128.GA2921592@killaraus.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260326153128.GA2921592@killaraus.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38433,"web_url":"https://patchwork.libcamera.org/comment/38433/","msgid":"<20260327083507.GB2993961@killaraus.ideasonboard.com>","date":"2026-03-27T08:35:07","subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Mar 27, 2026 at 09:28:53AM +0100, Barnabás Pőcze wrote:\n> 2026. 03. 26. 16:31 keltezéssel, Laurent Pinchart írta:\n> > On Mon, Mar 23, 2026 at 11:27:23AM +0100, Barnabás Pőcze wrote:\n> >> Now that C++20 is used, convert everything to use `std::span` instead of\n> >> `libcamera::Span`.\n> >>\n> >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >> ---\n> >>   Documentation/guides/pipeline-handler.rst     |  4 +-\n> >>   include/libcamera/base/file.h                 | 10 ++--\n> >>   include/libcamera/base/span.h                 | 12 ++---\n> >>   include/libcamera/base/thread.h               |  4 +-\n> >>   include/libcamera/camera.h                    |  5 +-\n> >>   include/libcamera/controls.h                  | 22 ++++++---\n> >>   include/libcamera/framebuffer.h               | 10 ++--\n> >>   .../libcamera/internal/byte_stream_buffer.h   |  6 +--\n> >>   include/libcamera/internal/camera_sensor.h    |  6 +--\n> >>   .../converter/converter_dw100_vertexmap.h     |  5 +-\n> >>   include/libcamera/internal/egl.h              |  8 ++--\n> >>   include/libcamera/internal/framebuffer.h      |  4 +-\n> >>   .../libcamera/internal/mapped_framebuffer.h   |  4 +-\n> >>   include/libcamera/internal/matrix.h           | 26 +++++-----\n> >>   include/libcamera/internal/pipeline_handler.h |  2 +-\n> >>   include/libcamera/internal/process.h          |  6 +--\n> >>   include/libcamera/internal/pub_key.h          |  7 ++-\n> >>   .../libcamera/internal/shared_mem_object.h    |  6 +--\n> >>   include/libcamera/internal/v4l2_device.h      |  6 +--\n> >>   include/libcamera/internal/vector.h           |  4 +-\n> >>   src/android/camera_buffer.h                   | 11 +++--\n> >>   src/android/camera_capabilities.cpp           |  4 +-\n> >>   src/android/camera_request.cpp                |  4 +-\n> >>   src/android/jpeg/encoder.h                    |  4 +-\n> >>   src/android/jpeg/encoder_jea.cpp              |  2 +-\n> >>   src/android/jpeg/encoder_jea.h                |  2 +-\n> >>   src/android/jpeg/encoder_libjpeg.cpp          | 10 ++--\n> >>   src/android/jpeg/encoder_libjpeg.h            | 12 ++---\n> >>   src/android/jpeg/exif.cpp                     |  2 +-\n> >>   src/android/jpeg/exif.h                       |  7 ++-\n> >>   src/android/jpeg/post_processor_jpeg.cpp      |  2 +-\n> >>   src/android/mm/cros_camera_buffer.cpp         |  4 +-\n> >>   .../mm/cros_frame_buffer_allocator.cpp        |  2 +-\n> >>   src/android/mm/generic_camera_buffer.cpp      |  4 +-\n> >>   .../mm/generic_frame_buffer_allocator.cpp     |  2 +-\n> >>   src/apps/cam/capture_script.cpp               | 12 ++---\n> >>   src/apps/cam/drm.cpp                          |  6 +--\n> >>   src/apps/cam/drm.h                            |  4 +-\n> >>   src/apps/cam/file_sink.cpp                    |  2 +-\n> >>   src/apps/cam/sdl_sink.cpp                     |  4 +-\n> >>   src/apps/cam/sdl_texture.h                    |  4 +-\n> >>   src/apps/cam/sdl_texture_1plane.cpp           |  2 +-\n> >>   src/apps/cam/sdl_texture_1plane.h             |  2 +-\n> >>   src/apps/cam/sdl_texture_mjpg.cpp             |  4 +-\n> >>   src/apps/cam/sdl_texture_mjpg.h               |  4 +-\n> >>   src/apps/cam/sdl_texture_yuv.cpp              |  2 +-\n> >>   src/apps/cam/sdl_texture_yuv.h                |  2 +-\n> >>   src/apps/common/dng_writer.cpp                |  4 +-\n> >>   src/apps/common/image.cpp                     |  6 +--\n> >>   src/apps/common/image.h                       | 10 ++--\n> >>   src/apps/common/ppm_writer.cpp                |  2 +-\n> >>   src/apps/common/ppm_writer.h                  |  4 +-\n> >>   src/apps/ipa-verify/main.cpp                  |  4 +-\n> >>   src/apps/lc-compliance/helpers/capture.cpp    |  2 +-\n> >>   src/apps/lc-compliance/helpers/capture.h      |  2 +-\n> >>   src/gstreamer/gstlibcamera-controls.cpp.in    |  4 +-\n> >>   src/gstreamer/gstlibcamera-utils.cpp          | 20 ++++----\n> >>   src/ipa/ipu3/algorithms/af.cpp                |  8 ++--\n> >>   src/ipa/ipu3/algorithms/af.h                  |  2 +-\n> >>   src/ipa/ipu3/algorithms/agc.cpp               |  2 +-\n> >>   src/ipa/ipu3/ipu3.cpp                         |  8 ++--\n> >>   src/ipa/libipa/exposure_mode_helper.cpp       |  2 +-\n> >>   src/ipa/libipa/exposure_mode_helper.h         |  4 +-\n> >>   src/ipa/libipa/histogram.cpp                  |  4 +-\n> >>   src/ipa/libipa/histogram.h                    |  8 ++--\n> >>   src/ipa/libipa/lsc_polynomial.h               |  2 +-\n> >>   src/ipa/libipa/v4l2_params.cpp                |  2 +-\n> >>   src/ipa/libipa/v4l2_params.h                  | 20 ++++----\n> >>   src/ipa/mali-c55/algorithms/agc.cpp           | 10 ++--\n> >>   src/ipa/mali-c55/mali-c55.cpp                 |  4 +-\n> >>   src/ipa/mali-c55/params.h                     |  2 +-\n> >>   src/ipa/rkisp1/algorithms/agc.cpp             |  2 +-\n> >>   src/ipa/rkisp1/algorithms/agc.h               |  7 +--\n> >>   src/ipa/rkisp1/algorithms/awb.cpp             |  2 +-\n> >>   src/ipa/rkisp1/algorithms/lsc.cpp             | 24 +++++-----\n> >>   src/ipa/rkisp1/algorithms/lsc.h               |  4 +-\n> >>   src/ipa/rkisp1/params.cpp                     |  2 +-\n> >>   src/ipa/rkisp1/params.h                       |  8 ++--\n> >>   src/ipa/rkisp1/rkisp1.cpp                     |  2 +-\n> >>   src/ipa/rpi/cam_helper/cam_helper.cpp         |  4 +-\n> >>   src/ipa/rpi/cam_helper/cam_helper.h           |  6 +--\n> >>   src/ipa/rpi/cam_helper/cam_helper_imx477.cpp  |  4 +-\n> >>   src/ipa/rpi/cam_helper/cam_helper_imx519.cpp  |  4 +-\n> >>   src/ipa/rpi/cam_helper/cam_helper_imx708.cpp  |  4 +-\n> >>   src/ipa/rpi/cam_helper/md_parser.h            |  9 ++--\n> >>   src/ipa/rpi/cam_helper/md_parser_smia.cpp     |  4 +-\n> >>   src/ipa/rpi/common/ipa_base.cpp               | 20 ++++----\n> >>   src/ipa/rpi/common/ipa_base.h                 |  2 +-\n> >>   src/ipa/rpi/controller/af_algorithm.h         |  5 +-\n> >>   src/ipa/rpi/controller/rpi/af.cpp             |  2 +-\n> >>   src/ipa/rpi/controller/rpi/af.h               |  2 +-\n> >>   src/ipa/rpi/controller/rpi/alsc.cpp           |  2 +-\n> >>   src/ipa/rpi/pisp/pisp.cpp                     | 12 +++--\n> >>   src/ipa/rpi/vc4/vc4.cpp                       | 48 ++++++++++---------\n> >>   src/libcamera/base/backtrace.cpp              |  8 ++--\n> >>   src/libcamera/base/file.cpp                   |  6 +--\n> >>   src/libcamera/base/thread.cpp                 |  2 +-\n> >>   src/libcamera/byte_stream_buffer.cpp          |  4 +-\n> >>   src/libcamera/camera.cpp                      |  2 +-\n> >>   src/libcamera/control_serializer.cpp          |  2 +-\n> >>   src/libcamera/controls.cpp                    | 22 ++++-----\n> >>   src/libcamera/converter/converter_dw100.cpp   |  2 +-\n> >>   .../converter/converter_dw100_vertexmap.cpp   |  4 +-\n> >>   src/libcamera/egl.cpp                         |  6 +--\n> >>   src/libcamera/framebuffer.cpp                 |  6 +--\n> >>   src/libcamera/ipa_manager.cpp                 |  2 +-\n> >>   src/libcamera/ipa_module.cpp                  | 16 +++----\n> >>   src/libcamera/mapped_framebuffer.cpp          |  2 +-\n> >>   src/libcamera/matrix.cpp                      | 26 +++++-----\n> >>   src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  4 +-\n> >>   src/libcamera/pipeline/ipu3/ipu3.cpp          |  6 +--\n> >>   src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  6 +--\n> >>   src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  6 +--\n> >>   src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |  2 +-\n> >>   src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 +--\n> >>   .../pipeline/rpi/common/pipeline_base.cpp     | 12 ++---\n> >>   .../pipeline/rpi/common/pipeline_base.h       |  2 +-\n> >>   src/libcamera/pipeline/rpi/pisp/pisp.cpp      |  4 +-\n> >>   src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-\n> >>   src/libcamera/pipeline/simple/simple.cpp      |  4 +-\n> >>   src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  6 +--\n> >>   src/libcamera/pipeline/vimc/vimc.cpp          |  6 +--\n> >>   src/libcamera/pipeline/virtual/virtual.cpp    |  6 +--\n> >>   src/libcamera/process.cpp                     |  4 +-\n> >>   src/libcamera/pub_key.cpp                     |  6 +--\n> >>   src/libcamera/sensor/camera_sensor_legacy.cpp |  8 ++--\n> >>   src/libcamera/sensor/camera_sensor_raw.cpp    |  8 ++--\n> >>   src/libcamera/shared_mem_object.cpp           |  2 +-\n> >>   src/libcamera/v4l2_device.cpp                 | 14 +++---\n> >>   src/libcamera/v4l2_videodevice.cpp            |  6 +--\n> >>   src/libcamera/vector.cpp                      |  2 +-\n> >>   src/libcamera/yaml_parser.cpp                 |  2 +-\n> >>   src/py/libcamera/py_helpers.cpp               |  2 +-\n> >>   src/py/libcamera/py_main.cpp                  |  4 +-\n> >>   src/v4l2/v4l2_camera_proxy.cpp                |  2 +-\n> >>   src/v4l2/v4l2_compat_manager.cpp              |  4 +-\n> >>   test/controls/control_value.cpp               | 28 +++++------\n> >>   test/file.cpp                                 |  2 +-\n> >>   test/utils.cpp                                |  4 +-\n> >>   test/v4l2_videodevice/controls.cpp            |  4 +-\n> >>   utils/codegen/controls.py                     |  4 +-\n> >>   utils/gen-debug-controls.py                   |  4 +-\n> >>   142 files changed, 448 insertions(+), 436 deletions(-)\n> > \n> > There are still a few occurrences of Span in the code base that I think\n> > need to be addressed. The following occurrences can I think just be\n> > replaced with 'std::span':\n> \n> Oops, you're right. I made the suggested changes. I should do something so that\n> `awb_nn.cpp` is built...\n\nIt would be great to ensure it gets built in CI.\n\n> > src/ipa/rpi/controller/rpi/awb_nn.cpp:  return \"[\" + utils::join(Span(dims, dimsSize), \",\") + \"]\";\n> > src/libcamera/ipa_data_serializer.cpp: * \\todo Switch to Span instead of byte and fd vector\n> > src/libcamera/mapped_framebuffer.cpp: * The MappedBuffer::Plane uses the Span interface to describe the mapped memory\n> > src/libcamera/matrix.cpp: * \\return Row \\a i from the matrix, as a Span\n> > utils/gen-debug-controls.py:                    if m.type is not None and m.type.startswith('Span'):\n> > \n> > The following ones could be replaced by either 'std::span' or 'span':\n> > \n> > src/libcamera/matrix.cpp: * \\a data is a one-dimensional Span and will be turned into a matrix in\n> > src/libcamera/matrix.cpp: * This operator[] returns a Span, which can then be indexed into again with\n> > src/libcamera/matrix.cpp: * matrix. Note that the lifetime of the Span returned by this first-level\n> > src/libcamera/matrix.cpp: * to save the Span that is the result of this operator[].\n> > src/libcamera/shared_mem_object.cpp: * fails, the function returns an empty Span. This can be also checked using the\n> > src/libcamera/shared_mem_object.cpp: * \\return The memory buffer, or an empty Span if allocation failed\n> > \n> > These should probably drop the type name as they're redundant (doxygen\n> > shows types in the generated documentation):\n> > \n> > src/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into Span \\a data\n> > src/libcamera/byte_stream_buffer.cpp: * \\param[out] data Span representing the destination memory\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Span of preprocessor definitions to prepend\n> > \n> > would become\n> > \n> > src/libcamera/byte_stream_buffer.cpp: * \\brief Read data from the managed memory buffer into \\a data\n> > src/libcamera/byte_stream_buffer.cpp: * \\param[out] data The destination memory\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> > src/libcamera/egl.cpp: * \\param[in] shaderEnv Preprocessor definitions to prepend\n> > \n> > Finally, thare are two occurrences in control yaml files:\n> > \n> > src/libcamera/control_ids_rpi.yaml:        Span of the BCM2835 ISP generated statistics for the current frame.\n> > src/libcamera/control_ids_rpi.yaml:        Span of the PiSP Frontend ISP generated statistics for the current\n> > \n> > I'd just drop \"Span of\" here too.","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 36487BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Mar 2026 08:35:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6CE1862C64;\n\tFri, 27 Mar 2026 09:35:10 +0100 (CET)","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 1269C6271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2026 09:35:09 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id A9DE67CA;\n\tFri, 27 Mar 2026 09:33:49 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SiwVdVfK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774600429;\n\tbh=mTnfc4PP7uIcQmda7qDkOJoBxQ5MAirnouk3odM7Nv4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SiwVdVfKdhmmfe8sHdi/wdY6tFmx3EXspL34PBTFGJR5ldP1P0msc0rEG4Np97uOY\n\tL4D01sCywu9czmQzxsgVa28NDy578pMolDUALhLXOcrQW54SCm9aGeWERGZdPVJWFJ\n\tzuLfAwRW/Bka6dvIB/ea7nQMMlfLl+CYv+5zxQ/E=","Date":"Fri, 27 Mar 2026 10:35:07 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 6/7] treewide: Use `std::span`","Message-ID":"<20260327083507.GB2993961@killaraus.ideasonboard.com>","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>\n\t<20260323102724.1385487-7-barnabas.pocze@ideasonboard.com>\n\t<20260326153128.GA2921592@killaraus.ideasonboard.com>\n\t<31d357ff-8bb6-4d61-88ec-d7f08918a6ce@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<31d357ff-8bb6-4d61-88ec-d7f08918a6ce@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38441,"web_url":"https://patchwork.libcamera.org/comment/38441/","msgid":"<177461381555.1230693.14018468846793152895@ping.linuxembedded.co.uk>","date":"2026-03-27T12:16:55","subject":"Re: [RFC PATCH v2 0/7] C++20 migration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2026-03-27 08:28:36)\n> 2026. 03. 23. 18:10 keltezéssel, Kieran Bingham írta:\n> > Quoting Barnabás Pőcze (2026-03-23 10:27:17)\n> >> With gcc 16 switching C++20 by default, and it being released for more\n> >> than five years now, this is a proof of concept patch set containing the\n> >> changes needed to make the current CI jobs succeed with cpp_std=c++20.\n> >>\n> >> There is still at least one issue that seemingly only appears in C++20:\n> >> https://gitlab.freedesktop.org/camera/libcamera/-/issues/267\n> >> the cause is not known, but a potential workaround has been merged.\n> >>\n> >> The last two patches drop the use of `libcamera::Span` in favor of\n> >> `std::span`. However, gcc 9 does not have an implementation, so those\n> >> two cannot be merged as is.\n> > \n> > Perhaps we should consider merging the first 5 patches already then to\n> > support with the migration?\n> > \n> > Can we in anyway 'alias' std::span to libcamera::Span for gcc-9, so we\n> > could already move forwards ? or would that get too messy ?\n> \n> I am a bit worried it would create more issues than it solves.\n\nOk, don't worry then.\n\n--\nKieran","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 647B9BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Mar 2026 12:17:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD88562CD9;\n\tFri, 27 Mar 2026 13:16:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BB12C62CB8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2026 13:16:58 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 58DCF1E31;\n\tFri, 27 Mar 2026 13:15:39 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"W+LMO189\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774613739;\n\tbh=gcTRhO0FARjtSnkNNvkrVigjuvQ+VQ1IbvaxBhCFRYQ=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=W+LMO189WXla9apisWrOQOndC111qyJC/2A/Tj1FzWmOIgeKNvzx9JsoOs2qgGhuQ\n\tn71qWv4XvU5cVnq+BqQWdfP2W1rLP7skscLqOSUNkANft16IA+fsEkADSOcgNBnbQJ\n\tWtisYANu0ZsQY3xzhkz7VRYmrC42YkZJWjPfAGmw=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<c4b38e50-9ea9-46d0-adb8-6d9cd70abf41@ideasonboard.com>","References":"<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>\n\t<177428584254.4036272.16401333789099941828@ping.linuxembedded.co.uk>\n\t<c4b38e50-9ea9-46d0-adb8-6d9cd70abf41@ideasonboard.com>","Subject":"Re: [RFC PATCH v2 0/7] C++20 migration","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 27 Mar 2026 12:16:55 +0000","Message-ID":"<177461381555.1230693.14018468846793152895@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]