From acbad32b2e419558a55c7a2a26c19397d7c28191 Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Mon, 6 Sep 2021 18:01:26 +0200 Subject: ipa: ipu3: tonemapping: Generate the LUT only on gamma change The tone mapping algorithm calculates the gamma curve for every frame, regardless of whether the gamma value has changed or not. This issue is exasperated as we currently hardcode the gamma to a single value. Optimise the implementation to only recalculate the look up table when the gamma setting is changed, and store the gamma setting of the LUT curve as part of the IPA context. Signed-off-by: Jean-Michel Hautbois Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/ipu3/ipu3.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ipa/ipu3/ipu3.cpp') diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index bcaa34da..4c0fff00 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -151,6 +151,9 @@ * \struct IPAFrameContext::toneMapping * \brief Context for ToneMapping and Gamma control * + * \var IPAFrameContext::toneMapping::gamma + * \brief Gamma value for the LUT + * * \var IPAFrameContext::toneMapping::gammaCorrection * \brief Per-pixel tone mapping implemented as a LUT * -- cgit v1.2.1