[v7,0/5] libcamera: software_isp: Add support for raw monochrome formats
mbox series

Message ID 20261026082602.60417-1-alain.cousinie@laposte.net
Headers show
Series
  • libcamera: software_isp: Add support for raw monochrome formats
Related show

Message

Alain Cousinie Oct. 26, 2026, 8:25 a.m. UTC
Hello everyone,

Changes in v7:
- Centralize ccmEnabled_ and lscEnabled_ handling within SoftwareIsp::configure() as requested.
- Add R14 unpacked and packed support across the pipeline (prepared and intentionally
  commented out in debayer_egl.cpp pending official upstreaming of the format).
- Add '#extension GL_EXT_texture_rg : enable' in the unpacked fragment shader.

*** Test Status & Limitations ***

- Real Hardware: Validated exclusively with a single camera providing R10 unpacked format.
- Simulation: For all other formats (R8, R10P, R12, R12P, R14, R14P, R16), logic was
  verified against synthetic RAW data generated via a Python script.

As I lack the physical hardware for most layouts, real-world camera validation remains
the missing step. However, I have strived to keep the implementation as simple, unified,
and strictly modeled after the verified R10 path as possible.

*** Call for Testing ***
If you have access to sensors providing R8, R10P, R12, R12P, R14, R14P, or R16 formats,
your help in validating or refining these code paths on real hardware would be greatly
appreciated!

*** \todo Tracking Notes ***

- debayer_egl.cpp: R14 blocks are prepared but commented out until the format is upstreamed.
- software_isp.cpp: ccmEnabled_ and lscEnabled_ are forced to false for mono profiles.
  A \todo tracks moving this logic to a proper 'uncalibrated-mono.yaml' later.

Alain CousiniƩ (5):
  libcamera: software_isp: Add support for monochrome formats - Shaders
  libcamera: software_isp: Add support for monochrome formats - Stats
  libcamera: software_isp: Add support for monochrome formats - CPU
  libcamera: software_isp: Add support for monochrome formats - GPU
  libcamera: software_isp: Add support for monochrome formats - SOFT

Signed-off-by: Alain CousiniƩ <alain.cousinie@laposte.net>
---

 .../internal/software_isp/swstats_cpu.h       |  17 ++
 src/libcamera/shaders/meson.build             |   3 +
 src/libcamera/shaders/mono.vert               |  25 ++
 src/libcamera/shaders/mono_1x_packed.frag     |  69 ++++++
 src/libcamera/shaders/mono_unpacked.frag      |  54 ++++
 src/libcamera/software_isp/debayer_cpu.cpp    | 231 +++++++++++++++++-
 src/libcamera/software_isp/debayer_cpu.h      |  25 ++
 src/libcamera/software_isp/debayer_egl.cpp    | 159 +++++++++++-
 src/libcamera/software_isp/debayer_egl.h      |   2 +
 src/libcamera/software_isp/software_isp.cpp   |  11 +
 src/libcamera/software_isp/swstats_cpu.cpp    | 225 +++++++++++++++++
 11 files changed, 797 insertions(+), 24 deletions(-)
 create mode 100644 src/libcamera/shaders/mono.vert
 create mode 100644 src/libcamera/shaders/mono_1x_packed.frag
 create mode 100644 src/libcamera/shaders/mono_unpacked.frag

--
2.55.0