| Message ID | 20251127022256.178929-23-bryan.odonoghue@linaro.org |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Bryan O'Donoghue (2025-11-27 02:22:54) > 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(+) > > 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 8bcbd5dde..f0307549b 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 > -- > 2.51.2 >
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 8bcbd5dde..f0307549b 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