[v2,0/8] libcamera: Use span in FrameBuffer & assorted cleanups
mbox series

Message ID 20250815113400.20623-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Use span in FrameBuffer & assorted cleanups
Related show

Message

Laurent Pinchart Aug. 15, 2025, 11:33 a.m. UTC
Hello,

This patch series is the second version of the standalone "[PATCH]
libcamera: framebuffer: Replace vector with span in constructor" patch.
It addresses an oversight in v1, where I forgot to convert the
FrameBuffer::planes() function to return a span. The first 7 patches are
a consequence of that change.

With FrameBuffer::planes() returning a span, multiple callers have the
be modified through libcamera. While fixing the compilation issues, I
noticed a set of small issues that patches 1/8 to 7/8 improve. Splitting
them in separate patches also reduces the code changes in 8/8 and makes
it easier to review.

Patches 1/8 to 5/8 and 7/8 are just small drive-by improvements. Please
see individual patches for details. A bit worthier of notice is patch
6/8 that changes the way the IPA data structures are constructed,
leading to possible optimizations.

Compared to v1, the FrameBuffer::planes() class now returns a span.
Required changes to callers are outlined in the patch. This changes the
libcamera ABI and API, requiring recompilation and possibly code
changes.

Laurent Pinchart (8):
  libcamera: v4l2_videodevice: Avoid repeated calls to
    FrameBuffer::planes()
  pipeline: ipu3: Drop unneeded forward declarations
  pipeline: rkisp1: Replace error handling gotos with utils::exit_scope
  pipeline: rpi: Use structured bindings in range-based for loop
  pipelines: Use lambda functions to factor out buffer mapping code
  utils: codegen: ipc: Optimize constructors of IPA interface structures
  apps: cam: drm: Drop unneeded local variable
  libcamera: framebuffer: Replace vector with span in constructor

 include/libcamera/framebuffer.h               |  4 +-
 include/libcamera/internal/framebuffer.h      |  3 +-
 .../mm/cros_frame_buffer_allocator.cpp        |  2 +-
 .../mm/generic_frame_buffer_allocator.cpp     |  2 +-
 src/apps/cam/drm.cpp                          |  4 +-
 src/libcamera/framebuffer.cpp                 | 10 ++---
 src/libcamera/pipeline/ipu3/frames.h          |  4 --
 src/libcamera/pipeline/ipu3/ipu3.cpp          | 19 +++++---
 src/libcamera/pipeline/mali-c55/mali-c55.cpp  | 27 ++++++-----
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 45 ++++++++++---------
 .../pipeline/rpi/common/pipeline_base.cpp     | 10 +++--
 src/libcamera/pipeline/vimc/vimc.cpp          |  5 ++-
 src/libcamera/pipeline/virtual/virtual.cpp    |  3 +-
 src/libcamera/v4l2_videodevice.cpp            | 13 +++---
 .../definition_functions.tmpl                 |  4 +-
 15 files changed, 84 insertions(+), 71 deletions(-)


base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4
--
Regards,

Laurent Pinchart