ipa: rkisp1: Use the new ISP parameters abstraction
Use the new ISP parameters abstraction class RkISP1Params to access the ISP parameters in the IPA algorithms. The class replaces the pointer to the rkisp1_params_cfg structure passed to the algorithms' prepare() function, and is used to access individual parameters blocks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
parent
9cacf4e420
commit
9861678f23
24 changed files with 163 additions and 193 deletions
|
@ -71,12 +71,10 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Ccm::setParameters(rkisp1_params_cfg *params,
|
||||
void Ccm::setParameters(struct rkisp1_cif_isp_ctk_config &config,
|
||||
const Matrix<float, 3, 3> &matrix,
|
||||
const Matrix<int16_t, 3, 1> &offsets)
|
||||
{
|
||||
struct rkisp1_cif_isp_ctk_config &config = params->others.ctk_config;
|
||||
|
||||
/*
|
||||
* 4 bit integer and 7 bit fractional, ranging from -8 (0x400) to
|
||||
* +7.992 (0x3ff)
|
||||
|
@ -92,18 +90,13 @@ void Ccm::setParameters(rkisp1_params_cfg *params,
|
|||
|
||||
LOG(RkISP1Ccm, Debug) << "Setting matrix " << matrix;
|
||||
LOG(RkISP1Ccm, Debug) << "Setting offsets " << offsets;
|
||||
|
||||
params->module_en_update |= RKISP1_CIF_ISP_MODULE_CTK;
|
||||
params->module_ens |= RKISP1_CIF_ISP_MODULE_CTK;
|
||||
params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_CTK;
|
||||
}
|
||||
|
||||
/**
|
||||
* \copydoc libcamera::ipa::Algorithm::prepare
|
||||
*/
|
||||
void Ccm::prepare(IPAContext &context, const uint32_t frame,
|
||||
IPAFrameContext &frameContext,
|
||||
rkisp1_params_cfg *params)
|
||||
IPAFrameContext &frameContext, RkISP1Params *params)
|
||||
{
|
||||
uint32_t ct = context.activeState.awb.temperatureK;
|
||||
|
||||
|
@ -123,7 +116,9 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame,
|
|||
context.activeState.ccm.ccm = ccm;
|
||||
frameContext.ccm.ccm = ccm;
|
||||
|
||||
setParameters(params, ccm, offsets);
|
||||
auto config = params->block<BlockType::Ctk>();
|
||||
config.setEnabled(true);
|
||||
setParameters(*config, ccm, offsets);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue