libcamera v0.7.2+rpt20260817
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::ipa::CcmAlgorithmBase Class Reference

Base class for CcmAlgorithm for non-templated functions implementation. More...

Inheritance diagram for libcamera::ipa::CcmAlgorithmBase:

Public Member Functions

int init (const ValueNode &tuningData)
 Initialize the algorithm with the given tuning data.
 
int configure (ccm::ActiveState &state, unsigned int temperatureK)
 Configure the CCM algorithm.
 
void queueRequest (ccm::ActiveState &state, ccm::FrameContext &context, const ControlList &controls)
 Queue a Request to the CCM algorithm.
 
void prepare (ccm::ActiveState &state, ccm::FrameContext &context, unsigned int frame, unsigned int temperatureK)
 Calculate the matrix coefficients for a colour temperature.
 
void process (ccm::FrameContext &context, ControlList &metadata)
 Populate metadata with the latest correction matrix coefficients.
 

Detailed Description

Base class for CcmAlgorithm for non-templated functions implementation.

Base class for CcmAlgorithm where non-templated functions are implemented. IPA implementations shall use CcmAlgorithm and not this class.

Member Function Documentation

◆ configure()

int libcamera::ipa::CcmAlgorithmBase::configure ( ccm::ActiveState state,
unsigned int  temperatureK 
)

Configure the CCM algorithm.

Parameters
[in]stateThe CCM active state
[in]temperatureKThe colour temperature in Kelvin

Configure the CCM algorithm by initializing the manual and automatic states in state by interpolating the default colour correction matrix with the given colour temperature temperatureK.

Returns
0 if successful, an error code otherwise

◆ init()

int libcamera::ipa::CcmAlgorithmBase::init ( const ValueNode tuningData)

Initialize the algorithm with the given tuning data.

Parameters
[in]tuningDataThe tuning data to use for the algorithm

Parse tuningData to initialize the CCM algorithm and register controls. IPA modules are expected to call this function as part of their implementation of Algorithm::init().

Returns
0 on success, a negative error code otherwise

◆ prepare()

void libcamera::ipa::CcmAlgorithmBase::prepare ( ccm::ActiveState state,
ccm::FrameContext context,
unsigned int  frame,
unsigned int  temperatureK 
)

Calculate the matrix coefficients for a colour temperature.

Parameters
[in]stateThe CCM active state
[in]contextThe CCM frame context
[in]frameThe frame number
[in]temperatureKThe colour temperature in Kelvin

Interpolate the colour correction matrices as loaded from configuration file for colour temperature temperatureK.

The function shall only be called if the IPA algorithm is running in auto mode. If running in manual mode the application supplied correction matrix is stored in frameContext at queueRequest() time.

◆ process()

void libcamera::ipa::CcmAlgorithmBase::process ( ccm::FrameContext context,
ControlList metadata 
)

Populate metadata with the latest correction matrix coefficients.

Parameters
[in]contextThe CCM frame context
[out]metadataThe metadata list

◆ queueRequest()

void libcamera::ipa::CcmAlgorithmBase::queueRequest ( ccm::ActiveState state,
ccm::FrameContext context,
const ControlList controls 
)

Queue a Request to the CCM algorithm.

Parameters
[in]stateThe CCM active state
[in]contextThe CCM frame context
[in]controlsThe list of controls associated with the Request

Queue a new Request to the CCM algorithm and store the manual colour correction matrix and temperature in frameContext.

The currently handled controls are:

When controls::ColourCorrectionMatrix is passed in the supplied matrix is stored in state and context.

When controls::ColourTemperature is passed in, the matrices loaded from configuration file are interpolated with the given temperature and the result is stored in state and context.

If the IPA is running in manual mode, the IPA CCM algorithm implementations can use the matrix coefficients and offsets directly from context after calling this function to program the HW CCM engine, without calling prepare().


The documentation for this class was generated from the following files: