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

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

Commit Message

Bryan O'Donoghue Nov. 20, 2025, 11:20 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.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 include/libcamera/internal/software_isp/debayer_params.h | 5 +++++
 src/ipa/simple/algorithms/lut.cpp                        | 1 +
 2 files changed, 6 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 5f340a7a6..2bfa71529 100644
--- a/include/libcamera/internal/software_isp/debayer_params.h
+++ b/include/libcamera/internal/software_isp/debayer_params.h
@@ -67,6 +67,11 @@  struct DebayerParams {
 	 * Gamma value as provided by the IPA
 	 */
 	float gamma;			/**< Gamma for GPUISP */
+
+	/*
+	 * Contrast
+	 */
+	float contrast;			/**< Contrast value for GPUISP */
 };
 
 } /* 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,