mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 01:15:06 +03:00
ipa: rkisp1: Remove initialized_ flags from algorithms
Multiple algorithms have an initialized_ flag that they set to true at the end of the init() function, and check at the beginning of prepare() to skip preparation. This serves no real purpose, as the flag can only be false if init() fails, in which case the IPA module initialization as a whole will fail. Drop the initialized_ flags. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
c97cf467ea
commit
79f0fc937d
8 changed files with 3 additions and 29 deletions
|
@ -89,7 +89,6 @@ static std::vector<uint16_t> parseTable(const YamlObject &tuningData,
|
|||
}
|
||||
|
||||
LensShadingCorrection::LensShadingCorrection()
|
||||
: initialized_(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -114,8 +113,6 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
|
|||
gbData_.empty() || bData_.empty())
|
||||
return -EINVAL;
|
||||
|
||||
initialized_ = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -125,7 +122,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
|
|||
int LensShadingCorrection::configure(IPAContext &context,
|
||||
[[maybe_unused]] const IPACameraSensorInfo &configInfo)
|
||||
{
|
||||
context.configuration.lsc.enabled = initialized_;
|
||||
context.configuration.lsc.enabled = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -139,9 +136,6 @@ void LensShadingCorrection::prepare(IPAContext &context, const uint32_t frame,
|
|||
if (frame > 0)
|
||||
return;
|
||||
|
||||
if (!initialized_)
|
||||
return;
|
||||
|
||||
struct rkisp1_cif_isp_lsc_config &config = params->others.lsc_config;
|
||||
const Size &size = context.configuration.sensor.size;
|
||||
Size totalSize{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue