|
libcamera v0.7.2+rpt20260817
Supporting cameras in Linux since 2019
|
Base class for CcmAlgorithm for non-templated functions implementation. More...

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. | |
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.
| int libcamera::ipa::CcmAlgorithmBase::configure | ( | ccm::ActiveState & | state, |
| unsigned int | temperatureK | ||
| ) |
Configure the CCM algorithm.
| [in] | state | The CCM active state |
| [in] | temperatureK | The 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.
| int libcamera::ipa::CcmAlgorithmBase::init | ( | const ValueNode & | tuningData | ) |
Initialize the algorithm with the given tuning data.
| [in] | tuningData | The 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().
| 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.
| [in] | state | The CCM active state |
| [in] | context | The CCM frame context |
| [in] | frame | The frame number |
| [in] | temperatureK | The 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.
| void libcamera::ipa::CcmAlgorithmBase::process | ( | ccm::FrameContext & | context, |
| ControlList & | metadata | ||
| ) |
Populate metadata with the latest correction matrix coefficients.
| [in] | context | The CCM frame context |
| [out] | metadata | The metadata list |
| void libcamera::ipa::CcmAlgorithmBase::queueRequest | ( | ccm::ActiveState & | state, |
| ccm::FrameContext & | context, | ||
| const ControlList & | controls | ||
| ) |
Queue a Request to the CCM algorithm.
| [in] | state | The CCM active state |
| [in] | context | The CCM frame context |
| [in] | controls | The 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().