diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-05-10 23:02:43 +0530 |
---|---|---|
committer | Umang Jain <umang.jain@ideasonboard.com> | 2021-06-28 17:54:08 +0530 |
commit | c1c0f554051200ea051e5e31ee286e5f5e83c744 (patch) | |
tree | 189d52fa931397345bfa6a138272c323ad224000 /aiq/aiq.h | |
parent | 03d07648fe3ba288922609b5f310d159cc41001a (diff) |
aiq: Provide initial Intel AIQ Wrapper support
The AIQ class is the entry point for running IPA algorithms for the
requested frame and handles the statistics being generated. It comprises
of wrapping the ia_aiq_*_run() functions and provide helper functions
that take in the input parameters and location for their results after
the run. These results(AiqResults) can be used for subsequent runs and
setting statistics as required.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'aiq/aiq.h')
-rw-r--r-- | aiq/aiq.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/aiq/aiq.h b/aiq/aiq.h new file mode 100644 index 0000000..fcd02d2 --- /dev/null +++ b/aiq/aiq.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* + * Copyright (C) 2021, Google Inc. + * + * aiq.h - Intel IA Imaging library C++ wrapper + * + * To simplify naming, and prevent confusion the wrapper is named simply aiq + * rather than ia_aiq. + */ + +#include <string> + +#include <ia_imaging/ia_aiq.h> +#include <ia_imaging/ia_cmc_parser.h> +#include <linux/intel-ipu3.h> + +#include <libcamera/geometry.h> + +#include "aiq_input_parameters.h" +#include "aiq_results.h" +#include "binary_data.h" +#include "stats/ipa_ipu3_stats.h" + +#ifndef IPA_IPU3_AIQ_H +#define IPA_IPU3_AIQ_H + +namespace libcamera { + +namespace ipa::ipu3::aiq { + +class AIQ +{ +public: + AIQ(); + ~AIQ(); + + int init(BinaryData &aiqb, BinaryData &nvm, BinaryData &aiqd); + int configure(); + int setStatistics(unsigned int frame, + int64_t timestamp, AiqResults &results, + const ipu3_uapi_stats_3a *stats); + + int run2a(unsigned int frame, AiqInputParameters ¶ms, + AiqResults &results); + +private: + std::string decodeError(ia_err err); + + int aeRun(ia_aiq_ae_input_params &aeParams, AiqResults &results); + int afRun(ia_aiq_af_input_params &afParams, AiqResults &results); + int afBracketRun(ia_aiq_af_bracket_input_params &afBracketParams, + AiqResults &results); + int awbRun(ia_aiq_awb_input_params &awbParams, AiqResults &results); + int dsdRun(ia_aiq_dsd_input_params &dsdParams, AiqResults &results); + int gbceRun(ia_aiq_gbce_input_params &gbceParams, AiqResults &results); + int parameterAdapterRun(ia_aiq_pa_input_params &paParams, + AiqResults &results); + int shadingAdapterRun(ia_aiq_sa_input_params &saParams, + AiqResults &results); + + ia_aiq *aiq_; + ia_cmc_t *iaCmc_; + std::string version_; + + IPAIPU3Stats *aiqStats_; +}; + +} /* namespace ipa::ipu3::aiq */ + +} /* namespace libcamera */ + +#endif /* IPA_IPU3_AIQ_H */ |