diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-03-27 13:20:26 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-03-31 13:29:18 +0100 |
commit | d8685a579ccf3246b11eef404786cdd9f19f087e (patch) | |
tree | af335629e465efa521372b5e517b30e183b6c5ac /src/ipa/raspberrypi/controller/contrast_status.h | |
parent | a82d08973f09f951e1de016ed8c1137663e7a58c (diff) |
ipa: raspberrypi: Generalise the contrast algorithm
Generalise the contrast algorithm code by removing any hard-coded
assumptions about the target hardware platform. Instead, the algorithm
code creates a generic Pwl that gets returned to the IPA, where it gets
converted to the bcm2835 hardware specific lookup table.
As a drive-by, remove an unused mutex.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/contrast_status.h')
-rw-r--r-- | src/ipa/raspberrypi/controller/contrast_status.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/ipa/raspberrypi/controller/contrast_status.h b/src/ipa/raspberrypi/controller/contrast_status.h index ef2a7c68..fb9fe4ba 100644 --- a/src/ipa/raspberrypi/controller/contrast_status.h +++ b/src/ipa/raspberrypi/controller/contrast_status.h @@ -6,20 +6,15 @@ */ #pragma once +#include "pwl.h" + /* * The "contrast" algorithm creates a gamma curve, optionally doing a little bit * of contrast stretching based on the AGC histogram. */ -constexpr unsigned int ContrastNumPoints = 33; - -struct ContrastPoint { - uint16_t x; - uint16_t y; -}; - struct ContrastStatus { - struct ContrastPoint points[ContrastNumPoints]; + RPiController::Pwl gammaCurve; double brightness; double contrast; }; |