From 528dc21b09cc4c0e202c09677bc742db5a5e484d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 16 Feb 2024 20:54:40 +0200 Subject: 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 Reviewed-by: Paul Elder Reviewed-by: Stefan Klug --- src/ipa/rkisp1/ipa_context.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ipa/rkisp1/ipa_context.h') diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h index b9b20653..10d8f38c 100644 --- a/src/ipa/rkisp1/ipa_context.h +++ b/src/ipa/rkisp1/ipa_context.h @@ -20,6 +20,13 @@ namespace libcamera { namespace ipa::rkisp1 { +struct IPAHwSettings { + unsigned int numAeCells; + unsigned int numHistogramBins; + unsigned int numHistogramWeights; + unsigned int numGammaOutSamples; +}; + struct IPASessionConfiguration { struct { struct rkisp1_cif_isp_window measureWindow; @@ -45,10 +52,6 @@ struct IPASessionConfiguration { Size size; } sensor; - struct { - rkisp1_cif_isp_version revision; - } hw; - bool raw; }; @@ -143,6 +146,7 @@ struct IPAFrameContext : public FrameContext { }; struct IPAContext { + const IPAHwSettings *hw; IPASessionConfiguration configuration; IPAActiveState activeState; -- cgit v1.2.1