summaryrefslogtreecommitdiff
path: root/aiq/aiq_input_parameters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aiq/aiq_input_parameters.cpp')
-rw-r--r--aiq/aiq_input_parameters.cpp50
1 files changed, 21 insertions, 29 deletions
diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp
index 56301f6..8a53849 100644
--- a/aiq/aiq_input_parameters.cpp
+++ b/aiq/aiq_input_parameters.cpp
@@ -14,11 +14,6 @@
#include <libcamera/base/log.h>
-/* Macros used by imported code */
-#define STDCOPY(dst, src, size) std::copy((src), ((src) + (size)), (dst))
-#define MEMCPY_S(dest, dmax, src, smax) memcpy((dest), (src), std::min((size_t)(dmax), (size_t)(smax)))
-#define CLEAR(x) memset(&(x), 0, sizeof(x))
-
namespace libcamera {
LOG_DEFINE_CATEGORY(AIQInputParameters)
@@ -27,26 +22,26 @@ namespace ipa::ipu3::aiq {
void AiqInputParameters::init()
{
- CLEAR(aeInputParams);
- CLEAR(afParams);
- CLEAR(afBracketParams);
- CLEAR(awbParams);
- CLEAR(gbceParams);
- CLEAR(paParams);
- CLEAR(saParams);
- CLEAR(sensorDescriptor);
- CLEAR(exposureWindow);
- CLEAR(exposureCoordinate);
- CLEAR(aeFeatures);
- CLEAR(aeManualLimits);
- CLEAR(manualFocusParams);
- CLEAR(focusRect);
- CLEAR(manualCctRange);
- CLEAR(manualWhiteCoordinate);
- CLEAR(awbResults);
- CLEAR(colorGains);
- CLEAR(exposureParams);
- CLEAR(sensorFrameParams);
+ aeInputParams = {};
+ afParams = {};
+ afBracketParams = {};
+ awbParams = {};
+ gbceParams = {};
+ paParams = {};
+ saParams = {};
+ sensorDescriptor = {};
+ exposureWindow = {};
+ exposureCoordinate = {};
+ aeFeatures = {};
+ aeManualLimits = {};
+ manualFocusParams = {};
+ focusRect = {};
+ manualCctRange = {};
+ manualWhiteCoordinate = {};
+ awbResults = {};
+ colorGains = {};
+ exposureParams = {};
+ sensorFrameParams = {};
aeLock = false;
awbLock = false;
blackLevelLock = false;
@@ -102,10 +97,7 @@ AiqInputParameters &AiqInputParameters::operator=(const AiqInputParameters &othe
if (this == &other)
return *this;
- MEMCPY_S(this,
- sizeof(AiqInputParameters),
- &other,
- sizeof(AiqInputParameters));
+ memcpy(this, &other, sizeof(AiqInputParameters));
reset();
/* Exposure coordinate is nullptr in other than SPOT mode. */