|
libcamera v0.7.2+rpt20261009
Supporting cameras in Linux since 2019
|
The libipa gamma correction algorithm. More...


Public Member Functions | |
| template<typename T > | |
| void | prepare (gamma::FrameContext &context, std::span< T, NLutNodes > lut) |
Public Member Functions inherited from libcamera::ipa::GammaAlgorithmBase | |
| GammaAlgorithmBase (unsigned int nLutNodes) | |
| Construct an instance of the class. | |
| int | init (ControlInfoMap::Map &controls, const ValueNode &tuningData, std::span< unsigned int > segments={}) |
| Initialise the algorithm with the given tuning data. | |
| 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. | |
Additional Inherited Members | |
Protected Attributes inherited from libcamera::ipa::GammaAlgorithmBase | |
| 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 | |
The libipa gamma correction algorithm.
| NLutNodes | The number of gamma LUT sampling points |
| UQ | The fixedpoint representation of the gamma correction values |
Gamma correction adjusts for the differences in the way light is perceived by a camera and the human eye by applying a function to the input values. The GammaAlgorithm class facilitates this by building a piecewise linear function from a gamma parameter and supplying it in the hardware-specific formats defined by the IPA algorithms.
IPA modules are expected to store an instance of GammaAlgorithm as a class member, templated with the format and number of knee-points in the PWL expected by their hardware and then call its functions in their overload of the Algorithm class's function.
When an application queues a new value for the gamma parameter with a Request, the GammaAlgorithm will recalculate and populate the new LUT to be sent to the ISP.
Useful links:
|
inline |
| T | The type of data expected by the hardware's look-up table |
| [in] | context | The frame context |
| [out] | lut | The std::span into which to place the calculated look-up table |