ipa: rkisp1: Add enable field for LSC algorithm in IPA context

Add an enable variable in the lsc struct in IPASessionConfiguration
which indicates if the LSC hardware module is enabled. This will allow
other algorithms to retrieve this information.

Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Florian Sylvestre 2022-08-05 14:40:26 +02:00 committed by Laurent Pinchart
parent ea549c46d3
commit 6d20a93177
4 changed files with 23 additions and 0 deletions

View file

@ -119,6 +119,16 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
return 0;
}
/**
* \copydoc libcamera::ipa::Algorithm::configure
*/
int LensShadingCorrection::configure(IPAContext &context,
[[maybe_unused]] const IPACameraSensorInfo &configInfo)
{
context.configuration.lsc.enabled = initialized_;
return 0;
}
/**
* \copydoc libcamera::ipa::Algorithm::prepare
*/

View file

@ -20,6 +20,7 @@ public:
~LensShadingCorrection() = default;
int init(IPAContext &context, const YamlObject &tuningData) override;
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
private:

View file

@ -96,6 +96,14 @@ namespace libcamera::ipa::rkisp1 {
* operates in manual or automatic mode.
*/
/**
* \var IPASessionConfiguration::lsc
* \brief Lens Shading Correction configuration of the IPA
*
* \var IPASessionConfiguration::lsc.enabled
* \brief Indicates if the LSC hardware is enabled
*/
/**
* \var IPASessionConfiguration::sensor
* \brief Sensor-specific configuration of the IPA

View file

@ -32,6 +32,10 @@ struct IPASessionConfiguration {
bool enabled;
} awb;
struct {
bool enabled;
} lsc;
struct {
utils::Duration lineDuration;
Size size;