[v4,0/3] libcamera: Add gamma control for rkisp1
mbox series

Message ID 20240605095417.157703-1-stefan.klug@ideasonboard.com
Headers show
Series
  • libcamera: Add gamma control for rkisp1
Related show

Message

Stefan Klug June 5, 2024, 9:53 a.m. UTC
This patchset adds a gamma algorithm and the corresponding control for rkisp1.
A camera gamma of roughly 2.2 is necessary to produce correct output images on
a standard monitor and to comply with sRGB.

Further information is available here:
https://en.wikipedia.org/wiki/SRGB
https://www.cambridgeincolour.com/tutorials/gamma-correction.htm

v3 -> v4:
- Changed structure in IPAActiveState and IPAFrameContext to be in line with 
  the other algorithms.

v2 -> v3:
- Renamed the algorithm to GammaOutCorrection which seems to be more in line
  with the other algorithms. (This got clearer to me after writing the schema file)
- Added ability to configure the default gamma value in the tuning file
- Squashed patch 1/4 and 4/4 to make it easier to review
- Applied feedback from reviews

v1 -> v2:
- Fixed some stylistic issues from review
- Added gamma control only if algorithm is present

Stefan Klug (3):
  libcamera: Add gamma control id
  ipa: rkisp1: Fix algorithm controls vanish after configure
  ipa: rkisp1: Add GammaOutCorrection algorithm

 src/ipa/rkisp1/algorithms/goc.cpp     | 153 ++++++++++++++++++++++++++
 src/ipa/rkisp1/algorithms/goc.h       |  42 +++++++
 src/ipa/rkisp1/algorithms/meson.build |   1 +
 src/ipa/rkisp1/ipa_context.h          |   9 ++
 src/ipa/rkisp1/rkisp1.cpp             |   2 +-
 src/libcamera/control_ids_core.yaml   |   7 ++
 6 files changed, 213 insertions(+), 1 deletion(-)
 create mode 100644 src/ipa/rkisp1/algorithms/goc.cpp
 create mode 100644 src/ipa/rkisp1/algorithms/goc.h