From eb41f636941e13a92ddce7893d25abd747e23c45 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Thu, 16 May 2024 08:22:20 +0200 Subject: ipa: rkisp1: Add GammaOutCorrection algorithm Add a gamma algorithm for the rkisp1. It defaults to a gamma of 2.2 which closely resembles sRGB. No seperate sRGB mode was implemented because the pwl that models the gamma curve is so coarse that there is basically no difference between srgb and gamma=2.2. The default can be overridden within the tuning file or set at runtime using the gamma control. The gamma algorithm is not enabled by default. This will be done in future tuning file updates. Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/rkisp1/ipa_context.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/ipa/rkisp1/ipa_context.cpp') diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp index 283bc131..65e0c58c 100644 --- a/src/ipa/rkisp1/ipa_context.cpp +++ b/src/ipa/rkisp1/ipa_context.cpp @@ -217,6 +217,14 @@ namespace libcamera::ipa::rkisp1 { * \brief Sharpness level */ +/** + * \var IPAActiveState::goc + * \brief State for the goc algorithm + * + * \var IPAActiveState::goc.gamma + * \brief Gamma value applied as 1.0/gamma + */ + /** * \struct IPAFrameContext * \brief Per-frame context for algorithms @@ -333,6 +341,18 @@ namespace libcamera::ipa::rkisp1 { * previous frame */ +/** + * \var IPAFrameContext::goc + * \brief Gamma out correction parameters for this frame + * + * \var IPAFrameContext::goc.gamma + * \brief Gamma value applied as 1.0/gamma + * + * \var IPAFrameContext::goc.update + * \brief Indicates if the goc parameters have been updated compared to the + * previous frame + */ + /** * \var IPAFrameContext::sensor * \brief Sensor configuration that used been used for this frame -- cgit v1.2.1