diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2022-07-27 09:55:23 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-07-27 18:12:18 +0300 |
commit | d1c89a1824416a03da10ebd078869cba79b6015c (patch) | |
tree | 4152532504e20902e519027bea3f05ed24a92156 /src/ipa/raspberrypi/controller/rpi/alsc.h | |
parent | 8757cc7c4291420e94047ea54a735cbaa1eb6adb (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/alsc.h')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/alsc.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.h b/src/ipa/raspberrypi/controller/rpi/alsc.h index e17f2fe9..4e9a715a 100644 --- a/src/ipa/raspberrypi/controller/rpi/alsc.h +++ b/src/ipa/raspberrypi/controller/rpi/alsc.h @@ -19,7 +19,7 @@ namespace RPiController { struct AlscCalibration { double ct; - double table[ALSC_CELLS_X * ALSC_CELLS_Y]; + double table[AlscCellsX * AlscCellsY]; }; struct AlscConfig { @@ -35,7 +35,7 @@ struct AlscConfig { uint16_t minG; double omega; uint32_t nIter; - double luminanceLut[ALSC_CELLS_X * ALSC_CELLS_Y]; + double luminanceLut[AlscCellsX * AlscCellsY]; double luminanceStrength; std::vector<AlscCalibration> calibrationsCr; std::vector<AlscCalibration> calibrationsCb; @@ -61,7 +61,7 @@ private: AlscConfig config_; bool firstTime_; CameraMode cameraMode_; - double luminanceTable_[ALSC_CELLS_X * ALSC_CELLS_Y]; + double luminanceTable_[AlscCellsX * AlscCellsY]; std::thread asyncThread_; void asyncFunc(); /* asynchronous thread function */ std::mutex mutex_; @@ -87,8 +87,8 @@ private: int frameCount_; /* counts up to startupFrames for Process function */ int frameCount2_; - double syncResults_[3][ALSC_CELLS_Y][ALSC_CELLS_X]; - double prevSyncResults_[3][ALSC_CELLS_Y][ALSC_CELLS_X]; + double syncResults_[3][AlscCellsY][AlscCellsX]; + double prevSyncResults_[3][AlscCellsY][AlscCellsX]; void waitForAysncThread(); /* * The following are for the asynchronous thread to use, though the main @@ -98,13 +98,13 @@ private: /* copy out the results from the async thread so that it can be restarted */ void fetchAsyncResults(); double ct_; - bcm2835_isp_stats_region statistics_[ALSC_CELLS_Y * ALSC_CELLS_X]; - double asyncResults_[3][ALSC_CELLS_Y][ALSC_CELLS_X]; - double asyncLambdaR_[ALSC_CELLS_X * ALSC_CELLS_Y]; - double asyncLambdaB_[ALSC_CELLS_X * ALSC_CELLS_Y]; + bcm2835_isp_stats_region statistics_[AlscCellsY * AlscCellsX]; + double asyncResults_[3][AlscCellsY][AlscCellsX]; + double asyncLambdaR_[AlscCellsX * AlscCellsY]; + double asyncLambdaB_[AlscCellsX * AlscCellsY]; void doAlsc(); - double lambdaR_[ALSC_CELLS_X * ALSC_CELLS_Y]; - double lambdaB_[ALSC_CELLS_X * ALSC_CELLS_Y]; + double lambdaR_[AlscCellsX * AlscCellsY]; + double lambdaB_[AlscCellsX * AlscCellsY]; }; } /* namespace RPiController */ |