[21/22] libcamera: software_isp: lut: Make gamma from lut.cpp available in debayer params
diff mbox series

Message ID 20251120232019.3590-22-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 gamma used in IPA to Bayer parameters. We will pass Gamma into
the shader via a uniform and can then tweak that value from outside at
will.

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                        | 2 ++
 2 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 1a319833c..5f340a7a6 100644
--- a/include/libcamera/internal/software_isp/debayer_params.h
+++ b/include/libcamera/internal/software_isp/debayer_params.h
@@ -62,6 +62,11 @@  struct DebayerParams {
 	 * Per frame blacklevel gains calculated by the IPA
 	 */
 	RGB<float> blackLevel;		/**< Blacklevel gains for GPUISP */
+
+	/*
+	 * Gamma value as provided by the IPA
+	 */
+	float gamma;			/**< Gamma for GPUISP */
 };
 
 } /* namespace libcamera */
diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
index 49482d711..ea5a86b20 100644
--- a/src/ipa/simple/algorithms/lut.cpp
+++ b/src/ipa/simple/algorithms/lut.cpp
@@ -147,6 +147,8 @@  void Lut::prepare(IPAContext &context,
 			params->gammaLut[i] = gammaTable[i / div];
 		}
 	}
+
+	params->gamma = context.configuration.gamma;
 }
 
 void Lut::process([[maybe_unused]] IPAContext &context,