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>
This commit is contained in:
Naushir Patuck 2022-07-27 09:55:23 +01:00 committed by Laurent Pinchart
parent 8757cc7c42
commit d1c89a1824
10 changed files with 41 additions and 43 deletions

View file

@ -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()