summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/ipa_context.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-16 20:54:40 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-23 15:12:33 +0200
commit528dc21b09cc4c0e202c09677bc742db5a5e484d (patch)
treea5b2dce2f27a53e34607a198c092024bb6fe9d54 /src/ipa/rkisp1/ipa_context.cpp
parent971c4904ff91e3525fb807567fdb4408b15df00e (diff)
ipa: rkisp1: Store hardware parameters in IPA context
Versions of the ISP differ in the processing blocks they include, as well as in the implementation of some of those blocks. In particular, they have different numbers of histogram bins oe AE statistics cells. The algorithms take these differences into account by checking the ISP version reported by the driver. These checks are currently scattered in multiple places. Centralize them in the IPARkISP1::init() function, and store the version-dependent hardware parameters in the IPA context, accessible by all algorithms. While at it, drop the IPASessionConfiguration::hw member that stores the revision number, unused by the algorithms. It can be added back laer to the IPAHwSettings structure if needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/ipa_context.cpp')
-rw-r--r--src/ipa/rkisp1/ipa_context.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index 9bbf3684..070834fa 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -15,6 +15,25 @@
namespace libcamera::ipa::rkisp1 {
/**
+ * \struct IPAHwSettings
+ * \brief RkISP1 version-specific hardware parameters
+ */
+
+/**
+ * \var IPAHwSettings::numAeCells
+ * \brief Number of cells in the AE exposure means grid
+ *
+ * \var IPAHwSettings::numHistogramBins
+ * \brief Number of bins in the histogram
+ *
+ * \var IPAHwSettings::numHistogramWeights
+ * \brief Number of weights in the histogram grid
+ *
+ * \var IPAHwSettings::numGammaOutSamples
+ * \brief Number of samples in the gamma out table
+ */
+
+/**
* \struct IPASessionConfiguration
* \brief Session configuration for the IPA module
*
@@ -33,14 +52,6 @@ namespace libcamera::ipa::rkisp1 {
*/
/**
- * \var IPASessionConfiguration::hw
- * \brief RkISP1-specific hardware information
- *
- * \var IPASessionConfiguration::hw.revision
- * \brief Hardware revision of the ISP
- */
-
-/**
* \var IPASessionConfiguration::awb
* \brief AWB parameters configuration of the IPA
*
@@ -337,6 +348,9 @@ namespace libcamera::ipa::rkisp1 {
* \struct IPAContext
* \brief Global IPA context data shared between all algorithms
*
+ * \var IPAContext::hw
+ * \brief RkISP1 version-specific hardware parameters
+ *
* \var IPAContext::configuration
* \brief The IPA session configuration, immutable during the session
*