[RFC,v3,00/17] Software ISP: Share params and stats buffers
mbox series

Message ID 20260604095105.68798-1-mzamazal@redhat.com
Headers show
Series
  • Software ISP: Share params and stats buffers
Related show

Message

Milan Zamazal June 4, 2026, 9:50 a.m. UTC
This patch series implements parameters and statistics buffer sharing in
software ISP.  It implements the following software ISP TODOs:

- 2. Reconsider stats sharing
- 5. Store ISP parameters in per-frame buffers

The series consists of three parts:

1. introductory cleanups and fixes
2. parameters buffers changes
3. statistics buffers changes

It’s a way to make params correspond to the respective frames, which is
currently not the case with software ISP.

This series is RFC because it’ll conflict with the GPU ISP and libipa
changes in progress (but the first 4 preparatory patches can be separated and handled independently).

Changes in v3:
- Rebased on current master.
- setIspParams renamed to paramsComputed.
- availableParams_ changed from queue to vector.
- Input buffers queued per each output.
- Busy loops removed.
- releaseIspParams renamed to paramsBufferReady.
- File descriptor numbers are no longer used as buffer identifiers.
- Miscellaneous typo fixes and other cosmetic changes.
- Fixes of buffer handling on errors.
- Missing unmapping of params buffers added.
- Missing PROT_READ flag added to mmap.
- Unnecessary SwIspStatsRef wrapper removed.

Changes in v2:
- Rebase on master and make it working with GPU ISP.

Milan Zamazal (17):
  libcamera: software_isp: Fix misplacement in SoftwareIsp docstring
  libcamera: ipa: simple: Rename setIspParams to paramsComputed
  libcamera: software_isp: Queue the input buffer per each output
  libcamera: software_isp: Handle queueBuffers failure
  libcamera: software_isp: Introduce arguments for parameters buffers
  libcamera: software_isp: Separate allocation of the parameters buffer
  libcamera: software_isp: Track unused parameters buffers
  libcamera: software_isp: Allocation of multiple params buffers
  libcamera: software_isp: Allocate multiple parameters buffers
  libcamera: software_isp: Use multiple parameters buffers in IPA
  libcamera: software_isp: Share parameters buffers with debayering
  libcamera: software_isp: Remove per-frame params buffers TODO item
  libcamera: software_isp: Introduce arguments for statistics buffers
  libcamera: software_isp: Allocate statistics buffers
  libcamera: software_isp: Track statistics buffers
  libcamera: software_isp: Share statistics buffers with IPA
  libcamera: software_isp: Remove stats-sharing TODO item

 .../internal/software_isp/software_isp.h      |  21 ++-
 .../internal/software_isp/swstats_cpu.h       |  16 +-
 include/libcamera/ipa/soft.mojom              |  11 +-
 src/ipa/simple/soft_simple.cpp                |  91 ++++++------
 src/libcamera/pipeline/simple/simple.cpp      |  41 ++++--
 src/libcamera/software_isp/TODO.md            |  45 ------
 src/libcamera/software_isp/debayer.cpp        |  46 ++++--
 src/libcamera/software_isp/debayer.h          |  14 +-
 src/libcamera/software_isp/debayer_cpu.cpp    |  76 +++++-----
 src/libcamera/software_isp/debayer_cpu.h      |  16 +-
 src/libcamera/software_isp/debayer_egl.cpp    |  18 ++-
 src/libcamera/software_isp/debayer_egl.h      |  12 +-
 src/libcamera/software_isp/software_isp.cpp   | 137 ++++++++++++++----
 src/libcamera/software_isp/swstats_cpu.cpp    |  57 +++-----
 14 files changed, 350 insertions(+), 251 deletions(-)