| Message ID | 20251120232019.3590-22-bryan.odonoghue@linaro.org |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes: > 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. I'm not sure what "tweak that value from outside" means exactly. My simple IPA refactoring RFC introduces a control for gamma and other changes. This patch is completely sufficient for the purpose of introducing GPU ISP, the rest will be addressed in the refactoring series once GPU ISP is merged. > 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(+) > > 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 > + */ Singe line comment enough? > + float gamma; /**< Gamma 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 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,
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,
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(+)