libcamera v0.0.1
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 * ipa_context.h - IPU3 IPA Context
6 *
7 */
8
9#pragma once
10
11#include <linux/intel-ipu3.h>
12
14
15#include <libcamera/geometry.h>
16
17#include <libipa/fc_queue.h>
18
19namespace libcamera {
20
21namespace ipa::ipu3 {
22
24 struct {
25 ipu3_uapi_grid_config bdsGrid;
27 uint32_t stride;
29
30 struct {
31 ipu3_uapi_grid_config afGrid;
32 } af;
33
34 struct {
39 } agc;
40
41 struct {
42 int32_t defVBlank;
45};
46
48 struct {
49 uint32_t focus;
51 bool stable;
52 } af;
53
54 struct {
55 uint32_t exposure;
56 double gain;
57 } agc;
58
59 struct {
60 struct {
61 double red;
62 double green;
63 double blue;
65
67 } awb;
68
69 struct {
70 double gamma;
71 struct ipu3_uapi_gamma_corr_lut gammaCorrection;
73};
74
76 struct {
77 uint32_t exposure;
78 double gain;
80};
81
82struct IPAContext {
85
87};
88
89} /* namespace ipa::ipu3 */
90
91} /* namespace libcamera*/
Describe a two-dimensional size.
Definition: geometry.h:53
A support class for managing FrameContext instances in IPA modules.
Definition: fc_queue.h:32
Helper class from std::chrono::duration that represents a time duration in nanoseconds with double pr...
Definition: utils.h:330
Queue of per-frame contexts.
Data structures related to geometric objects.
Top-level libcamera namespace.
Definition: backtrace.h:17
Context for a frame.
Definition: fc_queue.h:24
The active state of the IPA algorithms.
Definition: ipa_context.h:47
struct libcamera::ipa::ipu3::IPAActiveState::@10 toneMapping
Context for ToneMapping and Gamma control.
uint32_t focus
Current position of the lens.
Definition: ipa_context.h:49
double blue
White balance gain for B channel.
Definition: ipa_context.h:63
struct ipu3_uapi_gamma_corr_lut gammaCorrection
Per-pixel tone mapping implemented as a LUT.
Definition: ipa_context.h:71
double temperatureK
Estimated color temperature.
Definition: ipa_context.h:66
struct libcamera::ipa::ipu3::IPAActiveState::@7 af
Context for the Automatic Focus algorithm.
struct libcamera::ipa::ipu3::IPAActiveState::@9 awb
Context for the Automatic White Balance algorithm.
uint32_t exposure
Exposure time expressed as a number of lines.
Definition: ipa_context.h:55
double green
White balance gain for G channel.
Definition: ipa_context.h:62
struct libcamera::ipa::ipu3::IPAActiveState::@8 agc
Context for the Automatic Gain Control algorithm.
double red
White balance gain for R channel.
Definition: ipa_context.h:61
struct libcamera::ipa::ipu3::IPAActiveState::@9::@11 gains
White balance gains.
double gain
Analogue gain multiplier.
Definition: ipa_context.h:56
double maxVariance
The maximum variance of the current image.
Definition: ipa_context.h:50
bool stable
It is set to true, if the best focus is found.
Definition: ipa_context.h:51
double gamma
Gamma value for the LUT.
Definition: ipa_context.h:70
Global IPA context data shared between all algorithms.
Definition: ipa_context.h:82
IPAActiveState activeState
The current state of IPA algorithms.
Definition: ipa_context.h:84
IPASessionConfiguration configuration
The IPA session configuration, immutable during the session.
Definition: ipa_context.h:83
FCQueue< IPAFrameContext > frameContexts
Ring buffer of the IPAFrameContext(s)
Definition: ipa_context.h:86
IPU3-specific FrameContext.
Definition: ipa_context.h:75
struct libcamera::ipa::ipu3::IPAFrameContext::@12 sensor
Effective sensor values that were applied for the frame.
double gain
Analogue gain multiplier.
Definition: ipa_context.h:78
uint32_t exposure
Exposure time expressed as a number of lines.
Definition: ipa_context.h:77
Session configuration for the IPA module.
Definition: ipa_context.h:23
ipu3_uapi_grid_config afGrid
AF scene grid configuration.
Definition: ipa_context.h:31
int32_t defVBlank
The default vblank value of the sensor.
Definition: ipa_context.h:42
double maxAnalogueGain
Maximum analogue gain supported with the configured sensor.
Definition: ipa_context.h:38
utils::Duration maxShutterSpeed
Maximum shutter speed supported with the configured sensor.
Definition: ipa_context.h:36
struct libcamera::ipa::ipu3::IPASessionConfiguration::@4 af
AF grid configuration of the IPA.
uint32_t stride
Number of cells on one line including the ImgU padding.
Definition: ipa_context.h:27
struct libcamera::ipa::ipu3::IPASessionConfiguration::@6 sensor
Sensor-specific configuration of the IPA.
ipu3_uapi_grid_config bdsGrid
Bayer Down Scaler grid plane config used by the kernel.
Definition: ipa_context.h:25
double minAnalogueGain
Minimum analogue gain supported with the configured sensor.
Definition: ipa_context.h:37
utils::Duration minShutterSpeed
Minimum shutter speed supported with the configured sensor.
Definition: ipa_context.h:35
utils::Duration lineDuration
Line duration in microseconds.
Definition: ipa_context.h:43
Size bdsOutputSize
BDS output size configured by the pipeline handler.
Definition: ipa_context.h:26
struct libcamera::ipa::ipu3::IPASessionConfiguration::@3 grid
Grid configuration of the IPA.
struct libcamera::ipa::ipu3::IPASessionConfiguration::@5 agc
AGC parameters configuration of the IPA.
Miscellaneous utility functions.