libcamera v0.7.2+1-aebe4861-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
ipa_context.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2021, Google Inc.
4 *
5 * IPU3 IPA Context
6 *
7 */
8
9#pragma once
10
11#include <linux/intel-ipu3.h>
12
14
15#include <libcamera/controls.h>
16#include <libcamera/geometry.h>
17
19
20#include <libipa/agc.h>
22#include <libipa/fc_queue.h>
23
24namespace libcamera {
25
26namespace ipa::ipu3 {
27
29 struct {
30 ipu3_uapi_grid_config bdsGrid;
32 uint32_t stride;
34
35 struct {
36 ipu3_uapi_grid_config afGrid;
37 } af;
38
40};
41
43 struct {
44 uint32_t focus;
46 bool stable;
47 } af;
48
50
51 struct {
52 struct {
53 double red;
54 double green;
55 double blue;
57
59 } awb;
60
61 struct {
62 double gamma;
63 struct ipu3_uapi_gamma_corr_lut gammaCorrection;
65};
66
68 struct {
69 uint32_t exposure;
70 double gain;
72
74};
75
93
94} /* namespace ipa::ipu3 */
95
96} /* namespace libcamera*/
Helper class that performs sensor-specific parameter computations.
A map of ControlId to ControlInfo.
Definition controls.h:409
std::unordered_map< const ControlId *, ControlInfo > Map
The base std::unsorted_map<> container.
Definition controls.h:411
Describe a two-dimensional size.
Definition geometry.h:51
A support class for managing FrameContext instances in IPA modules.
Definition fc_queue.h:33
Framework to manage controls related to an object.
libcamera structs for IPAs
Queue of per-frame contexts.
Data structures related to geometric objects.
libipa AGC algorithm
Top-level libcamera namespace.
Definition backtrace.h:17
Report the image sensor characteristics.
Definition core_ipa_interface.h:31
Context for a frame.
Definition fc_queue.h:24
Active state for AgcAlgorithm.
Definition agc.h:55
Per-frame context for AgcAlgorithm.
Definition agc.h:77
Session configuration for AgcAlgorithm.
Definition agc.h:38
The active state of the IPA algorithms.
Definition ipa_context.h:42
struct libcamera::ipa::ipu3::IPAActiveState::@9 toneMapping
Context for ToneMapping and Gamma control.
uint32_t focus
Current position of the lens.
Definition ipa_context.h:44
double blue
White balance gain for B channel.
Definition ipa_context.h:55
struct ipu3_uapi_gamma_corr_lut gammaCorrection
Per-pixel tone mapping implemented as a LUT.
Definition ipa_context.h:63
double temperatureK
Estimated color temperature.
Definition ipa_context.h:58
struct libcamera::ipa::ipu3::IPAActiveState::@7 af
Context for the Automatic Focus algorithm.
struct libcamera::ipa::ipu3::IPAActiveState::@8 awb
Context for the Automatic White Balance algorithm.
double green
White balance gain for G channel.
Definition ipa_context.h:54
agc::ActiveState agc
Context for the Automatic Gain Control algorithm.
Definition ipa_context.h:49
double red
White balance gain for R channel.
Definition ipa_context.h:53
struct libcamera::ipa::ipu3::IPAActiveState::@8::@10 gains
White balance gains.
double maxVariance
The maximum variance of the current image.
Definition ipa_context.h:45
bool stable
It is set to true, if the best focus is found.
Definition ipa_context.h:46
double gamma
Gamma value for the LUT.
Definition ipa_context.h:62
Global IPA context data shared between all algorithms.
Definition ipa_context.h:76
ControlInfoMap sensorControls
The camera sensor controls, immutable during the session.
Definition ipa_context.h:84
IPAActiveState activeState
The current state of IPA algorithms.
Definition ipa_context.h:85
IPASessionConfiguration configuration
The IPA session configuration, immutable during the session.
Definition ipa_context.h:82
ControlInfoMap::Map ctrlMap
A ControlInfoMap::Map of controls populated by the algorithms.
Definition ipa_context.h:91
IPAContext(unsigned int frameContextSize)
Initialize the instance with the given number of frame contexts.
Definition ipa_context.h:77
FCQueue< IPAFrameContext > frameContexts
Ring buffer of the IPAFrameContext(s)
Definition ipa_context.h:87
std::unique_ptr< CameraSensorHelper > camHelper
The camera sensor helper.
Definition ipa_context.h:89
IPACameraSensorInfo sensorInfo
The IPA camera session details, immutable during the session.
Definition ipa_context.h:83
IPU3-specific FrameContext.
Definition ipa_context.h:67
struct libcamera::ipa::ipu3::IPAFrameContext::@11 sensor
Effective sensor values that were applied for the frame.
double gain
Analogue gain multiplier.
Definition ipa_context.h:70
uint32_t exposure
Exposure time expressed as a number of lines.
Definition ipa_context.h:69
agc::FrameContext agc
Per-frame state for the AGC algorithm.
Definition ipa_context.h:73
Session configuration for the IPA module.
Definition ipa_context.h:28
ipu3_uapi_grid_config afGrid
AF scene grid configuration.
Definition ipa_context.h:36
struct libcamera::ipa::ipu3::IPASessionConfiguration::@6 af
AF grid configuration of the IPA.
uint32_t stride
Number of cells on one line including the ImgU padding.
Definition ipa_context.h:32
ipu3_uapi_grid_config bdsGrid
Bayer Down Scaler grid plane config used by the kernel.
Definition ipa_context.h:30
Size bdsOutputSize
BDS output size configured by the pipeline handler.
Definition ipa_context.h:31
struct libcamera::ipa::ipu3::IPASessionConfiguration::@5 grid
Grid configuration of the IPA.
agc::Session agc
AGC parameters configuration of the IPA.
Definition ipa_context.h:39
Miscellaneous utility functions.