summaryrefslogtreecommitdiff
path: root/src/ipa/simple/ipa_context.cpp
blob: 5fa492cbe4bcd545243dcb436ad3efaa68d7da17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2021, Google Inc.
 * Copyright (C) 2024 Red Hat Inc.
 *
 * Software ISP IPA Context
 */

#include "ipa_context.h"

/**
 * \file ipa_context.h
 * \brief Context and state information shared between the algorithms
 */

namespace libcamera::ipa::soft {

/**
 * \struct IPASessionConfiguration
 * \brief Session configuration for the IPA module
 *
 * The session configuration contains all IPA configuration parameters that
 * remain constant during the capture session, from IPA module start to stop.
 * It is typically set during the configure() operation of the IPA module, but
 * may also be updated in the start() operation.
 */

/**
 * \struct IPAActiveState
 * \brief The active state of the IPA algorithms
 *
 * The IPA is fed with the statistics generated from the latest frame processed.
 * The statistics are then processed by the IPA algorithms to compute parameters
 * required for the next frame capture and processing. The current state of the
 * algorithms is reflected through the IPAActiveState to store the values most
 * recently computed by the IPA algorithms.
 */

/**
 * \struct IPAContext
 * \brief Global IPA context data shared between all algorithms
 *
 * \var IPAContext::configuration
 * \brief The IPA session configuration, immutable during the session
 *
 * \var IPAContext::frameContexts
 * \brief Ring buffer of the IPAFrameContext(s)
 *
 * \var IPAContext::activeState
 * \brief The current state of IPA algorithms
 */

/**
 * \var IPASessionConfiguration::gamma
 * \brief Gamma value to be used in the raw image processing
 */

/**
 * \var IPAActiveState::black
 * \brief Context for the Black Level algorithm
 *
 * \var IPAActiveState::black.level
 * \brief Current determined black level
 */

/**
 * \var IPAActiveState::gains
 * \brief Context for gains in the Colors algorithm
 *
 * \var IPAActiveState::gains.red
 * \brief Gain of red color
 *
 * \var IPAActiveState::gains.green
 * \brief Gain of green color
 *
 * \var IPAActiveState::gains.blue
 * \brief Gain of blue color
 */

/**
 * \var IPAActiveState::gamma
 * \brief Context for gamma in the Colors algorithm
 *
 * \var IPAActiveState::gamma.gammaTable
 * \brief Computed gamma table
 *
 * \var IPAActiveState::gamma.blackLevel
 * \brief Black level used for the gamma table computation
 */

} /* namespace libcamera::ipa::soft */