libcamera v0.7.2+1-aebe4861-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
agc.h File Reference

libipa AGC algorithm More...

#include <optional>
#include <stdint.h>
#include <utility>
#include <variant>
#include <vector>
#include <linux/v4l2-controls.h>
#include <libcamera/base/utils.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
#include "agc_mean_luminance.h"
#include "agc_msv.h"
#include "camera_sensor_helper.h"
Include dependency graph for agc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  libcamera::ipa::agc::Session
 Session configuration for AgcAlgorithm. More...
 
struct  libcamera::ipa::agc::ActiveState
 Active state for AgcAlgorithm. More...
 
struct  libcamera::ipa::agc::FrameContext
 Per-frame context for AgcAlgorithm. More...
 
class  libcamera::ipa::AgcAlgorithm
 libIPA LSC algorithm algorithm More...
 
struct  libcamera::ipa::AgcAlgorithm::ConfigurationParams
 Parameters for AgcAlgorithm::configure() More...
 
struct  libcamera::ipa::AgcAlgorithm::ProcessParams
 Parameters for AgcAlgorithm::process() More...
 

Namespaces

namespace  libcamera
 Top-level libcamera namespace.
 
namespace  libcamera::ipa
 The IPA (Image Processing Algorithm) namespace.
 

Functions

std::pair< uint32_t, double > libcamera::ipa::agc::extractControls (const ControlList &controls, const CameraSensorHelper *sensor)
 
void libcamera::ipa::agc::prepareControls (ControlList &controls, const CameraSensorHelper *sensor, uint32_t exposure, double gain)
 

Detailed Description

libipa AGC algorithm

Function Documentation

◆ extractControls()

libcamera::ipa::agc::extractControls ( const ControlList controls,
const CameraSensorHelper sensor 
)
inline
Parameters
[in]controlsThe controls list to extract from
[in]sensorThe CameraSensorHelper

This function extracts V4L2_CID_EXPOSURE and V4L2_CID_ANALOGUE_GAIN from controls and then returns the exposure and gain values. The gain code is mapped to the real gain value if sensor is provided, otherwise the gain code is returned.

Returns
A pair of exposure and analogue gain extracted from controls

◆ prepareControls()

libcamera::ipa::agc::prepareControls ( ControlList controls,
const CameraSensorHelper sensor,
uint32_t  exposure,
double  gain 
)
inline
Parameters
[out]controlsThe controls list to populate
[in]sensorThe CameraSensorHelper
[in]exposureThe exposure (in lines)
[in]gainThe analogue gain

This function sets V4L2_CID_EXPOSURE and V4L2_CID_ANALOGUE_GAIN in controls. The gain is mapped to the gain code if sensor is provided, otherwise the gain value will be used directly.