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.h | 9 +++++++++ 1 file changed, 9 insertions(+) (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 bd02a7a2..2a994d81 100644 --- a/src/ipa/rkisp1/ipa_context.h +++ b/src/ipa/rkisp1/ipa_context.h @@ -104,6 +104,10 @@ struct IPAActiveState { uint8_t denoise; uint8_t sharpness; } filter; + + struct { + double gamma; + } goc; }; struct IPAFrameContext : public FrameContext { @@ -142,6 +146,11 @@ struct IPAFrameContext : public FrameContext { bool update; } filter; + struct { + double gamma; + bool update; + } goc; + struct { uint32_t exposure; double gain; -- cgit v1.2.1