libcamera v0.8.0+1-3c8337a0-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::ipa::GammaAlgorithmBase Class Reference

Base class for GammaAlgorithm to implement non-templated functions. More...

Inheritance diagram for libcamera::ipa::GammaAlgorithmBase:

Public Member Functions

 GammaAlgorithmBase (unsigned int nLutNodes)
 Construct an instance of the class.
 
void configure (gamma::ActiveState &state)
 Configure the gamma correction algorithm.
 
void queueRequest (gamma::ActiveState &state, const uint32_t frame, gamma::FrameContext &context, const ControlList &controls)
 Queue a request to the gamma correction algorithm.
 
void process (gamma::FrameContext &context, ControlList &metadata)
 Populate metadata with the gamma correction values for a frame.
 

Protected Member Functions

int init (ControlInfoMap::Map &controls, const ValueNode &tuningData, std::span< const unsigned int > segments)
 Initialise the algorithm with the given tuning data.
 

Protected Attributes

unsigned int nLutNodes_
 The number of gamma LUT sampling points.
 
float defaultGamma_
 The default gamma parameter.
 
std::vector< float > kneePoints_
 a vector holding the X-position of the knee points of the curve
 

Detailed Description

Base class for GammaAlgorithm to implement non-templated functions.

This base class for GammeaAlgorithm allows us to implement non templated functions. IPA specific implementations shall derive from GammaAlgorithm and not this class.

Constructor & Destructor Documentation

◆ GammaAlgorithmBase()

libcamera::ipa::GammaAlgorithmBase::GammaAlgorithmBase ( unsigned int  nLutNodes)
inline

Construct an instance of the class.

Parameters
[in]nLutNodesSet the number of function knee-points expected by the IPA algorithm

Member Function Documentation

◆ configure()

void libcamera::ipa::GammaAlgorithmBase::configure ( gamma::ActiveState &  state)

Configure the gamma correction algorithm.

Parameters
[out]stateThe gamma correction algorithm's active state

Reset to the default gamma correction value.

IPA modules are expected to call this function as part of their implementation of Algorithm::configure()

◆ init()

int libcamera::ipa::GammaAlgorithmBase::init ( ControlInfoMap::Map &  controls,
const ValueNode &  tuningData,
std::span< const unsigned int >  segments 
)
protected

Initialise the algorithm with the given tuning data.

This function provides the underlying non-templated implementation for GammaAlgorithm::init(). Refer to the documentation of that function for the details.

See also
GammaAlgorithm::init()

◆ process()

void libcamera::ipa::GammaAlgorithmBase::process ( gamma::FrameContext &  context,
ControlList &  metadata 
)

Populate metadata with the gamma correction values for a frame.

Parameters
[in]contextThe frame context
[out]metadataThe ControlList of metadata for a frame

Report the gamma value used to calculate the correction curve that was applied to a frame.

◆ queueRequest()

void libcamera::ipa::GammaAlgorithmBase::queueRequest ( gamma::ActiveState &  state,
const uint32_t  frame,
gamma::FrameContext &  context,
const ControlList &  controls 
)

Queue a request to the gamma correction algorithm.

Parameters
[in]stateThe algorithm's active state
[in]frameThe current frame number
[in]contextThe algorithm's frame context
[in]controlsThe ControlList that was queued with the request

Queue a new request to the gamma correction algorithm and handle any relevant controls that were queued. The only control currently handled is:

If a control with that ID is queued the value is stored in state and context.

IPA modules are expected to call this function as part of their implementation of Algorithm::queueRequest()


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