libcamera v0.0.0+3240-f2a18172-dirty (2022-05-13T22:21:47+00:00)
Supporting cameras in Linux since 2019
|
Base class for computing sensor tuning parameters using sensor-specific constants. More...
Classes | |
struct | AnalogueGainConstants |
Analogue gain constants used for gain calculation. More... | |
Public Member Functions | |
virtual uint32_t | gainCode (double gain) const |
Construct a CameraSensorHelper instance. More... | |
virtual double | gain (uint32_t gainCode) const |
Compute the real gain from the V4L2 subdev control gain code. More... | |
Protected Types | |
enum | AnalogueGainType { AnalogueGainLinear , AnalogueGainExponential } |
The gain calculation modes as defined by the MIPI CCS. More... | |
Protected Attributes | |
AnalogueGainConstants | analogueGainConstants_ |
The analogue gain parameters used for calculation. More... | |
Base class for computing sensor tuning parameters using sensor-specific constants.
Instances derived from CameraSensorHelper class are sensor-specific. Each supported sensor will have an associated base class defined.
|
protected |
The gain calculation modes as defined by the MIPI CCS.
Describes the image sensor analogue gain capabilities. Two modes are possible, depending on the sensor: Linear and Exponential.
Enumerator | |
---|---|
AnalogueGainLinear | Gain is computed using linear gain estimation. The relationship between the integer gain parameter and the resulting gain multiplier is given by the following equation: Where 'x' is the gain control parameter, and m0, m1, c0 and c1 are image-sensor-specific constants of the sensor. These constants are static parameters, and for any given image sensor either m0 or m1 shall be zero. The full Gain equation therefore reduces to either:
|
AnalogueGainExponential | Gain is computed using exponential gain estimation (introduced in CCS v1.1) Starting with CCS v1.1, Alternate Global Analogue Gain is also available. If the image sensor supports it, then the global analogue gain can be controlled by linear and exponential gain formula:
|
|
virtual |
Compute the real gain from the V4L2 subdev control gain code.
[in] | gainCode | The V4L2 subdev control gain |
This function aims to abstract the calculation of the gain letting the IPA use the real gain for its estimations. It is the counterpart of the function CameraSensorHelper::gainCode.
The parameters come from the MIPI Alliance Camera Specification for Camera Command Set (CCS).
|
virtual |
Construct a CameraSensorHelper instance.
CameraSensorHelper derived class instances shall never be constructed manually but always through the CameraSensorHelperFactory::create() function.
Compute gain code from the analogue gain absolute value
[in] | gain | The real gain to pass |
This function aims to abstract the calculation of the gain letting the IPA use the real gain for its estimations.
The parameters come from the MIPI Alliance Camera Specification for Camera Command Set (CCS).
|
protected |
The analogue gain parameters used for calculation.
The analogue gain is calculated through a formula, and its parameters are sensor specific. Use this variable to store the values at init time.