| Message ID | 20260323102724.1385487-1-barnabas.pocze@ideasonboard.com |
|---|---|
| Headers | show |
| Series |
|
| Related | show |
Quoting Barnabás Pőcze (2026-03-23 10:27:17) > With gcc 16 switching C++20 by default, and it being released for more > than five years now, this is a proof of concept patch set containing the > changes needed to make the current CI jobs succeed with cpp_std=c++20. > > There is still at least one issue that seemingly only appears in C++20: > https://gitlab.freedesktop.org/camera/libcamera/-/issues/267 > the cause is not known, but a potential workaround has been merged. > > The last two patches drop the use of `libcamera::Span` in favor of > `std::span`. However, gcc 9 does not have an implementation, so those > two cannot be merged as is. Perhaps we should consider merging the first 5 patches already then to support with the migration? Can we in anyway 'alias' std::span to libcamera::Span for gcc-9, so we could already move forwards ? or would that get too messy ? > > Barnabás Pőcze (7): > gstreamer: Add `-Wno-volatile` for GCC > meson: Ignore `Wredundant-move` with GCC 11 and above > libcamera: base: log: Ignore deprecations > treewide: Use character literal instead of string in some cases > meson: Switch to C++20 > treewide: Use `std::span` > libcamera: base: span: Deprecate it > > Documentation/guides/pipeline-handler.rst | 4 +- > include/libcamera/base/file.h | 10 ++-- > include/libcamera/base/span.h | 16 +++---- > include/libcamera/base/thread.h | 4 +- > include/libcamera/camera.h | 5 +- > include/libcamera/controls.h | 22 ++++++--- > include/libcamera/framebuffer.h | 10 ++-- > .../libcamera/internal/byte_stream_buffer.h | 6 +-- > include/libcamera/internal/camera_sensor.h | 6 +-- > .../converter/converter_dw100_vertexmap.h | 5 +- > include/libcamera/internal/egl.h | 8 ++-- > include/libcamera/internal/framebuffer.h | 4 +- > .../libcamera/internal/mapped_framebuffer.h | 4 +- > include/libcamera/internal/matrix.h | 26 +++++----- > include/libcamera/internal/pipeline_handler.h | 2 +- > include/libcamera/internal/process.h | 6 +-- > include/libcamera/internal/pub_key.h | 7 ++- > .../libcamera/internal/shared_mem_object.h | 6 +-- > include/libcamera/internal/v4l2_device.h | 6 +-- > include/libcamera/internal/vector.h | 4 +- > meson.build | 23 ++++----- > src/android/camera_buffer.h | 11 +++-- > src/android/camera_capabilities.cpp | 4 +- > src/android/camera_request.cpp | 4 +- > src/android/jpeg/encoder.h | 4 +- > src/android/jpeg/encoder_jea.cpp | 2 +- > src/android/jpeg/encoder_jea.h | 2 +- > src/android/jpeg/encoder_libjpeg.cpp | 10 ++-- > src/android/jpeg/encoder_libjpeg.h | 12 ++--- > src/android/jpeg/exif.cpp | 2 +- > src/android/jpeg/exif.h | 7 ++- > src/android/jpeg/post_processor_jpeg.cpp | 2 +- > src/android/mm/cros_camera_buffer.cpp | 4 +- > .../mm/cros_frame_buffer_allocator.cpp | 2 +- > src/android/mm/generic_camera_buffer.cpp | 4 +- > .../mm/generic_frame_buffer_allocator.cpp | 2 +- > src/apps/cam/capture_script.cpp | 12 ++--- > src/apps/cam/drm.cpp | 6 +-- > src/apps/cam/drm.h | 4 +- > src/apps/cam/file_sink.cpp | 2 +- > src/apps/cam/sdl_sink.cpp | 4 +- > src/apps/cam/sdl_texture.h | 4 +- > src/apps/cam/sdl_texture_1plane.cpp | 2 +- > src/apps/cam/sdl_texture_1plane.h | 2 +- > src/apps/cam/sdl_texture_mjpg.cpp | 4 +- > src/apps/cam/sdl_texture_mjpg.h | 4 +- > src/apps/cam/sdl_texture_yuv.cpp | 2 +- > src/apps/cam/sdl_texture_yuv.h | 2 +- > src/apps/common/dng_writer.cpp | 4 +- > src/apps/common/image.cpp | 6 +-- > src/apps/common/image.h | 10 ++-- > src/apps/common/ppm_writer.cpp | 2 +- > src/apps/common/ppm_writer.h | 4 +- > src/apps/ipa-verify/main.cpp | 4 +- > src/apps/lc-compliance/helpers/capture.cpp | 2 +- > src/apps/lc-compliance/helpers/capture.h | 2 +- > src/gstreamer/gstlibcamera-controls.cpp.in | 4 +- > src/gstreamer/gstlibcamera-utils.cpp | 20 ++++---- > src/gstreamer/meson.build | 7 +++ > src/ipa/ipu3/algorithms/af.cpp | 8 ++-- > src/ipa/ipu3/algorithms/af.h | 2 +- > src/ipa/ipu3/algorithms/agc.cpp | 2 +- > src/ipa/ipu3/ipu3.cpp | 8 ++-- > src/ipa/libipa/exposure_mode_helper.cpp | 2 +- > src/ipa/libipa/exposure_mode_helper.h | 4 +- > src/ipa/libipa/histogram.cpp | 4 +- > src/ipa/libipa/histogram.h | 8 ++-- > src/ipa/libipa/lsc_polynomial.h | 2 +- > src/ipa/libipa/v4l2_params.cpp | 2 +- > src/ipa/libipa/v4l2_params.h | 20 ++++---- > src/ipa/mali-c55/algorithms/agc.cpp | 10 ++-- > src/ipa/mali-c55/mali-c55.cpp | 4 +- > src/ipa/mali-c55/params.h | 2 +- > src/ipa/rkisp1/algorithms/agc.cpp | 2 +- > src/ipa/rkisp1/algorithms/agc.h | 7 +-- > src/ipa/rkisp1/algorithms/awb.cpp | 2 +- > src/ipa/rkisp1/algorithms/lsc.cpp | 24 +++++----- > src/ipa/rkisp1/algorithms/lsc.h | 4 +- > src/ipa/rkisp1/params.cpp | 2 +- > src/ipa/rkisp1/params.h | 8 ++-- > src/ipa/rkisp1/rkisp1.cpp | 2 +- > src/ipa/rpi/cam_helper/cam_helper.cpp | 4 +- > src/ipa/rpi/cam_helper/cam_helper.h | 6 +-- > src/ipa/rpi/cam_helper/cam_helper_imx477.cpp | 4 +- > src/ipa/rpi/cam_helper/cam_helper_imx519.cpp | 4 +- > src/ipa/rpi/cam_helper/cam_helper_imx708.cpp | 4 +- > src/ipa/rpi/cam_helper/md_parser.h | 9 ++-- > src/ipa/rpi/cam_helper/md_parser_smia.cpp | 4 +- > src/ipa/rpi/common/ipa_base.cpp | 20 ++++---- > src/ipa/rpi/common/ipa_base.h | 2 +- > src/ipa/rpi/controller/af_algorithm.h | 5 +- > src/ipa/rpi/controller/rpi/af.cpp | 2 +- > src/ipa/rpi/controller/rpi/af.h | 2 +- > src/ipa/rpi/controller/rpi/alsc.cpp | 2 +- > src/ipa/rpi/pisp/pisp.cpp | 12 +++-- > src/ipa/rpi/vc4/vc4.cpp | 48 ++++++++++--------- > src/libcamera/base/backtrace.cpp | 8 ++-- > src/libcamera/base/file.cpp | 6 +-- > src/libcamera/base/log.cpp | 17 ++++--- > src/libcamera/base/thread.cpp | 2 +- > src/libcamera/byte_stream_buffer.cpp | 4 +- > src/libcamera/camera.cpp | 2 +- > src/libcamera/control_serializer.cpp | 2 +- > src/libcamera/controls.cpp | 22 ++++----- > src/libcamera/converter/converter_dw100.cpp | 2 +- > .../converter/converter_dw100_vertexmap.cpp | 4 +- > src/libcamera/egl.cpp | 6 +-- > src/libcamera/framebuffer.cpp | 6 +-- > src/libcamera/ipa_manager.cpp | 2 +- > src/libcamera/ipa_module.cpp | 16 +++---- > src/libcamera/mapped_framebuffer.cpp | 2 +- > src/libcamera/matrix.cpp | 26 +++++----- > src/libcamera/media_pipeline.cpp | 6 +-- > src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 4 +- > src/libcamera/pipeline/ipu3/ipu3.cpp | 6 +-- > src/libcamera/pipeline/mali-c55/mali-c55.cpp | 6 +-- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 +-- > src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +- > src/libcamera/pipeline/rkisp1/rkisp1_path.h | 6 +-- > .../pipeline/rpi/common/pipeline_base.cpp | 12 ++--- > .../pipeline/rpi/common/pipeline_base.h | 2 +- > src/libcamera/pipeline/rpi/pisp/pisp.cpp | 4 +- > src/libcamera/pipeline/rpi/vc4/vc4.cpp | 2 +- > src/libcamera/pipeline/simple/simple.cpp | 10 ++-- > src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 6 +-- > src/libcamera/pipeline/vimc/vimc.cpp | 6 +-- > src/libcamera/pipeline/virtual/virtual.cpp | 6 +-- > src/libcamera/process.cpp | 4 +- > src/libcamera/pub_key.cpp | 6 +-- > src/libcamera/sensor/camera_sensor_legacy.cpp | 8 ++-- > src/libcamera/sensor/camera_sensor_raw.cpp | 8 ++-- > src/libcamera/shared_mem_object.cpp | 2 +- > src/libcamera/v4l2_device.cpp | 14 +++--- > src/libcamera/v4l2_videodevice.cpp | 6 +-- > src/libcamera/vector.cpp | 2 +- > src/libcamera/yaml_parser.cpp | 2 +- > src/py/libcamera/py_helpers.cpp | 2 +- > src/py/libcamera/py_main.cpp | 4 +- > src/v4l2/v4l2_camera_proxy.cpp | 2 +- > src/v4l2/v4l2_compat_manager.cpp | 4 +- > test/controls/control_value.cpp | 28 +++++------ > test/file.cpp | 2 +- > test/span.cpp | 1 + > test/utils.cpp | 4 +- > test/v4l2_videodevice/controls.cpp | 4 +- > utils/codegen/controls.py | 4 +- > utils/gen-debug-controls.py | 4 +- > 147 files changed, 487 insertions(+), 461 deletions(-) > > -- > 2.53.0