[v3,22/22] libcamera: software_isp: lut: Make contrast available in debayer params
diff mbox series

Message ID 20251202133157.661407-23-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • GPUISP precursor series
Related show

Commit Message

Bryan O'Donoghue Dec. 2, 2025, 1:31 p.m. UTC
Provide the contrast used in IPA to Bayer parameters. Similar to the
calculated Gamma value we will pass this value into the debayer fragment
shader for further consumption.

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 include/libcamera/internal/software_isp/debayer_params.h | 1 +
 src/ipa/simple/algorithms/lut.cpp                        | 1 +
 src/libcamera/software_isp/debayer.cpp                   | 5 +++++
 3 files changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h
index d5dad1a98..8033f7d5b 100644
--- a/include/libcamera/internal/software_isp/debayer_params.h
+++ b/include/libcamera/internal/software_isp/debayer_params.h
@@ -59,6 +59,7 @@  struct DebayerParams {
 	Matrix<float, 3, 3> ccm;
 	RGB<float> blackLevel;
 	float gamma;
+	float contrast;
 };
 
 } /* namespace libcamera */
diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
index ea5a86b20..9aaab54f1 100644
--- a/src/ipa/simple/algorithms/lut.cpp
+++ b/src/ipa/simple/algorithms/lut.cpp
@@ -149,6 +149,7 @@  void Lut::prepare(IPAContext &context,
 	}
 
 	params->gamma = context.configuration.gamma;
+	params->contrast = context.activeState.gamma.contrast;
 }
 
 void Lut::process([[maybe_unused]] IPAContext &context,
diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp
index 7e8d81c09..e01358720 100644
--- a/src/libcamera/software_isp/debayer.cpp
+++ b/src/libcamera/software_isp/debayer.cpp
@@ -115,6 +115,11 @@  namespace libcamera {
  * \brief Gamma value for the GPUISP
  */
 
+/**
+ * \var DebayerParams::contrast
+ * \brief Contrast value for GPUISP
+ */
+
 /**
  * \class Debayer
  * \brief Base debayering class