summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/contrast.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-07-27 09:55:23 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-27 18:12:18 +0300
commitd1c89a1824416a03da10ebd078869cba79b6015c (patch)
tree4152532504e20902e519027bea3f05ed24a92156 /src/ipa/raspberrypi/controller/rpi/contrast.cpp
parent8757cc7c4291420e94047ea54a735cbaa1eb6adb (diff)
ipa: raspberrypi: Remove #define constants
Replace all #define constant values with equivalent constexpr definitions. As a drive-by, remove the CAMERA_MODE_NAME_LEN constant as it is unused. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/contrast.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/contrast.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
index 04aeb91e..9e60dc5d 100644
--- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
@@ -70,15 +70,15 @@ static void fillInStatus(ContrastStatus &status, double brightness,
{
status.brightness = brightness;
status.contrast = contrast;
- for (int i = 0; i < CONTRAST_NUM_POINTS - 1; i++) {
+ for (unsigned int i = 0; i < ContrastNumPoints - 1; i++) {
int x = i < 16 ? i * 1024
: (i < 24 ? (i - 16) * 2048 + 16384
: (i - 24) * 4096 + 32768);
status.points[i].x = x;
status.points[i].y = std::min(65535.0, gammaCurve.eval(x));
}
- status.points[CONTRAST_NUM_POINTS - 1].x = 65535;
- status.points[CONTRAST_NUM_POINTS - 1].y = 65535;
+ status.points[ContrastNumPoints - 1].x = 65535;
+ status.points[ContrastNumPoints - 1].y = 65535;
}
void Contrast::initialise()