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

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

Inheritance diagram for libcamera::ipa::AwbAlgorithmBase:

Public Member Functions

int init (const ValueNode &tuningData)
 Initialize the algorithm with the given tuning data.
 
int configure (awb::ActiveState &state)
 Configure the AWB algorithm.
 
void queueRequest (awb::ActiveState &state, const uint32_t frame, awb::FrameContext &frameContext, const ControlList &controls)
 Queue a Request to the AWB algorithm.
 
void prepare (awb::ActiveState &state, awb::FrameContext &frameContext)
 Set the gains and colour temperature values in frameContext.
 
void process (awb::ActiveState &state, awb::FrameContext &frameContext, const AwbStats &stats, unsigned int lux, ControlList &metadata)
 Process AWB statistics to calculate gains and populate metadata.
 

Protected Attributes

ControlInfoMap::Map controls_
 Controls info map for the controls registered by the AWB algorithm.
 
float gainMin_
 The minimum supported gain value.
 
float gainMax_
 The maximum supported gain value.
 

Detailed Description

Base class for AwbAlgorithm for non-templated functions implementation.

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

Member Function Documentation

◆ configure()

int libcamera::ipa::AwbAlgorithmBase::configure ( awb::ActiveState state)

Configure the AWB algorithm.

Parameters
[in]stateThe AWB active state
Returns
0 if successful, an error code otherwise

◆ init()

int libcamera::ipa::AwbAlgorithmBase::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 AWB 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::AwbAlgorithmBase::prepare ( awb::ActiveState state,
awb::FrameContext frameContext 
)

Set the gains and colour temperature values in frameContext.

Parameters
[in]stateThe AWB active state
[in]frameContextThe AWB frame context

If auto mode is enabled, take the most recently computed gains and use them for the current frame. Otherwise, if in manual mode, gains and colour temperature for a frame are set at queueRequest() time.

◆ process()

void libcamera::ipa::AwbAlgorithmBase::process ( awb::ActiveState state,
awb::FrameContext frameContext,
const AwbStats stats,
unsigned int  lux,
ControlList metadata 
)

Process AWB statistics to calculate gains and populate metadata.

Parameters
[in]stateThe AWB active state
[in]frameContextThe AWB frame context
[in]statsThe AWB statistics
[in]luxThe lux value as estimated by the IPA module
[out]metadataThe metadata list

Process stats to calculate new gains and colour temperature and populate metadata with the results.

◆ queueRequest()

void libcamera::ipa::AwbAlgorithmBase::queueRequest ( awb::ActiveState state,
const uint32_t  frame,
awb::FrameContext frameContext,
const ControlList controls 
)

Queue a Request to the AWB algorithm.

Parameters
[in]stateThe AWB active state
[in]frameThe frame number
[in]frameContextThe AWB frame context
[in]controlsThe list of controls part of the Request

Queue a new Request to the AWB algorithm and modify its behaviour according to the provided controls.

The currently handled controls are:

Member Data Documentation

◆ gainMax_

libcamera::ipa::AwbAlgorithmBase::gainMax_
protected

The maximum supported gain value.

Maximum gain value used to clamp the AWB algorithm calculation results in the range supported by the platform AWB engine.

The min and max gain values are initialized by AwbAlgorithm::init().

◆ gainMin_

libcamera::ipa::AwbAlgorithmBase::gainMin_
protected

The minimum supported gain value.

Minimum gain value used to clamp the AWB algorithm calculation results in the range supported by the platform AWB engine.

The min and max gain values are initialized by AwbAlgorithm::init().


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