| Message ID | 20251120232019.3590-23-bryan.odonoghue@linaro.org |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes: > 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(+) > > 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 > + */ Single line, or omit (it's pretty obvious that `contrast' is contrast). > + float contrast; /**< Contrast value for GPUISP */ Extra "*<". With that fixed: Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > }; > > } /* 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/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,
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(+)