[0/7] LSC for SoftISP simple pipeline
mbox series

Message ID 20260126104256.119697-1-rick.w.ten.wolde@gmail.com
Headers show
Series
  • LSC for SoftISP simple pipeline
Related show

Message

Rick ten Wolde Jan. 26, 2026, 10:42 a.m. UTC
Hi everyone,

Over the last few months we (students from THUAS) have been working on adding LSC support to
the SoftISP simple pipline. These patches are the result of those
efforts. The project was under the supervision of Hans de Goede.

There are patches to both the GpuISP and some scrips for generating the
corrections tables.

The changes to the GpuISP are integrated as an algorithm, including
automatically choosing a correction table based on the measured colour
temperature.

The current version of the LSC textures make use of the type GLubyte instead of float. This is because we could not get floating points values to play nice with the shader. The result is that the LSC factors ranging from 1.0 to 4.0 are maped to 0 to 255.

The last patch (HACK: Add test LSC to src/ipa/simple/data/uncalibrated.yaml) adds sample data to uncalibrated.yaml file for testing, and is a reference of how the tables should (currently) be structured.


Regards,
Xander Pronk,
Rick ten Wolde,
Derek Gielen,
Aron Dosti.


Derek Gielen (1):
  utils/tuning: Add LSC scripts

Xander Pronk (6):
  libcamera: software_isp: egl: Add gl_scale_param to createTexture2D()
  libcamera: software_isp: Add LSC data to DebayerParams
  ipa: simple: Add LSC algorithm
  libcamera: shaders: Add LSC support
  libcamera: software_isp: debayer_egl: Add LSC support
  HACK: Add test LSC to src/ipa/simple/data/uncalibrated.yaml

 include/libcamera/internal/egl.h              |   2 +-
 .../internal/software_isp/debayer_params.h    |   6 +
 src/ipa/simple/algorithms/lsc.cpp             |  69 +++++++
 src/ipa/simple/algorithms/lsc.h               |  49 +++++
 src/ipa/simple/algorithms/meson.build         |   1 +
 src/ipa/simple/data/uncalibrated.yaml         | 183 +++++++++++++++++-
 src/libcamera/egl.cpp                         |   7 +-
 src/libcamera/shaders/bayer_1x_packed.frag    |  10 +
 src/libcamera/shaders/bayer_unpacked.frag     |  10 +
 src/libcamera/software_isp/debayer.cpp        |  18 ++
 src/libcamera/software_isp/debayer_egl.cpp    |  21 ++
 src/libcamera/software_isp/debayer_egl.h      |   9 +
 utils/tuning/exportTuningToLscShader.py       | 120 ++++++++++++
 utils/tuning/generate_lsc_map_plot.py         |  76 ++++++++
 14 files changed, 573 insertions(+), 8 deletions(-)
 create mode 100644 src/ipa/simple/algorithms/lsc.cpp
 create mode 100644 src/ipa/simple/algorithms/lsc.h
 create mode 100644 utils/tuning/exportTuningToLscShader.py
 create mode 100644 utils/tuning/generate_lsc_map_plot.py