30 virtual double gain(uint32_t gainCode)
const;
69 static std::unique_ptr<CameraSensorHelper> create(
const std::string &name);
71 static std::vector<CameraSensorHelperFactoryBase *> &factories();
78 virtual std::unique_ptr<CameraSensorHelper> createInstance()
const = 0;
83 template<
typename _Helper>
93 std::unique_ptr<CameraSensorHelper> createInstance()
const override 95 return std::make_unique<_Helper>();
99 #define REGISTER_CAMERA_SENSOR_HELPER(name, helper) \ 100 static CameraSensorHelperFactory<helper> global_##helper##Factory(name); Registration of CameraSensorHelperFactory classes and creation of instances.
Definition: camera_sensor_helper.h:84
Base class for computing sensor tuning parameters using sensor-specific constants.
Definition: camera_sensor_helper.h:22
virtual double gain(uint32_t gainCode) const
Compute the real gain from the V4L2 subdev control gain code.
Definition: camera_sensor_helper.cpp:120
Utilities to help constructing class interfaces.
AnalogueGainConstants gainConstants_
The analogue gain parameters used for calculation.
Definition: camera_sensor_helper.h:57
double m
Constant used in the exponential gain coding/decoding.
Definition: camera_sensor_helper.h:47
int16_t c1
Constant used in the linear gain coding/decoding.
Definition: camera_sensor_helper.h:42
Base class for camera sensor helper factories.
Definition: camera_sensor_helper.h:63
int16_t m0
Constant used in the linear gain coding/decoding.
Definition: camera_sensor_helper.h:39
CameraSensorHelper()=default
Construct a CameraSensorHelper instance.
Top-level libcamera namespace.
Definition: backtrace.h:17
AnalogueGainType
The gain calculation modes as defined by the MIPI CCS.
Definition: camera_sensor_helper.h:33
int16_t c0
Constant used in the linear gain coding/decoding.
Definition: camera_sensor_helper.h:40
AnalogueGainLinearConstants linear
Constants for the linear gain model.
Definition: camera_sensor_helper.h:51
AnalogueGainExpConstants exp
Constants for the exponential gain model.
Definition: camera_sensor_helper.h:52
CameraSensorHelperFactory(const char *name)
Construct a camera sensor helper factory.
Definition: camera_sensor_helper.h:87
Gain is expressed using an exponential model.
Definition: camera_sensor_helper.h:35
Analogue gain model constants.
Definition: camera_sensor_helper.h:50
Analogue gain constants for the exponential gain model.
Definition: camera_sensor_helper.h:45
virtual uint32_t gainCode(double gain) const
Compute gain code from the analogue gain absolute value.
Definition: camera_sensor_helper.cpp:88
#define LIBCAMERA_DISABLE_COPY_AND_MOVE(klass)
Disable copy and move construction and assignment of the klass.
int16_t m1
Constant used in the linear gain coding/decoding.
Definition: camera_sensor_helper.h:41
double a
Constant used in the exponential gain coding/decoding.
Definition: camera_sensor_helper.h:46
AnalogueGainType gainType_
The analogue gain model type.
Definition: camera_sensor_helper.h:56
Gain is computed using linear gain estimation.
Definition: camera_sensor_helper.h:34
std::optional< int16_t > blackLevel_
The black level of the sensor.
Definition: camera_sensor_helper.h:55
std::optional< int16_t > blackLevel() const
Fetch the black level of the sensor.
Definition: camera_sensor_helper.h:28
Analogue gain constants for the linear gain model.
Definition: camera_sensor_helper.h:38