summaryrefslogtreecommitdiff
path: root/stats/ipa_ipu3_stats.h
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2021-05-10 22:59:43 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2021-06-28 17:54:08 +0530
commit03d07648fe3ba288922609b5f310d159cc41001a (patch)
treeb1fbf8a057ae5fac96fcc11739422db1a706f1ee /stats/ipa_ipu3_stats.h
parent12241d3b3be9ef911600194255904fbffeadc377 (diff)
stats: Create IPAIPU3Stats and import intel_skycam_statistics_convert()
This is will be used to convert statistics received from kernel to AIQ stats format. Specific 3a conversion functions will be added in IPAIP3Stats in subsequent commits. ipu3_stats_get_3a() will extract, memcpy each of 3A relevant structures. It's is intended just before setting the stats for next frame in AIQ::setStatistics(). It receives ipu3_uapi_stats_3a struct from the kernel. This API will be developed per parameter of ipu3_uapi_stats_3a struct in subsequent commit. IPAIPU3Stats will be responsible to take in the AIQ algorithms results set and hardware statistics as input and generate(and convert) AIQ consumable ia_aiq_statistics_input_param structure. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'stats/ipa_ipu3_stats.h')
-rw-r--r--stats/ipa_ipu3_stats.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/stats/ipa_ipu3_stats.h b/stats/ipa_ipu3_stats.h
new file mode 100644
index 0000000..4320024
--- /dev/null
+++ b/stats/ipa_ipu3_stats.h
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/*
+ * Copyright (C) 2017 Intel Corporation.
+ *
+ * IPAIPU3Stats.cpp: Generate statistics in IA AIQ consumable format.
+ */
+
+#include "aiq/aiq_results.h"
+
+#ifndef IPA_IPU3_STATS_H
+#define IPA_IPU3_STATS_H
+
+#include <ia_imaging/ia_aiq_types.h>
+#include <linux/intel-ipu3.h>
+
+#include "shared_item_pool.h"
+
+namespace libcamera::ipa::ipu3 {
+
+struct AiqResults;
+
+class IPAIPU3Stats
+{
+public:
+ IPAIPU3Stats();
+ ~IPAIPU3Stats();
+
+ ia_aiq_statistics_input_params *
+ getInputStatsParams(int frame,
+ aiq::AiqResults *results,
+ const ipu3_uapi_stats_3a *stats);
+
+private:
+ void freeStatBufferPools();
+ int allocateStatBufferPools(int numBufs);
+
+ ia_aiq_statistics_input_params aiqStatsInputParams_;
+ std::shared_ptr<SharedItemPool<ia_aiq_af_grid>> afFilterBuffPool_;
+ std::shared_ptr<SharedItemPool<ia_aiq_rgbs_grid>> rgbsGridBuffPool_;
+};
+
+} /* namespace libcamera::ipa::ipu3 */
+
+#endif /* IPA_IPU3_STATS_H */
+