@@ -109,7 +109,7 @@ const float kDefaultGamma = 2.2f;
* @return 0 on success, a negative error code otherwise
*/
int GammaAlgorithmBase::init(ControlInfoMap::Map &controls, const ValueNode &tuningData,
- std::span<unsigned int> segments)
+ std::span<const unsigned int> segments)
{
/*
* If the caller doesn't pass in a segment list we simply construct the
@@ -47,7 +47,7 @@ public:
}
int init(ControlInfoMap::Map &controls, const ValueNode &tuningData,
- std::span<unsigned int> segments = {});
+ std::span<const unsigned int> segments = {});
void configure(gamma::ActiveState &state);
void queueRequest(gamma::ActiveState &state, const uint32_t frame,
@@ -50,7 +50,7 @@ int GammaOutCorrection::init(IPAContext &context, const ValueNode &tuningData)
return -EINVAL;
}
- std::array<unsigned int, kNumLutSegments> segments = {
+ static constexpr std::array<unsigned int, kNumLutSegments> segments = {
64, 64, 64, 64, 128, 128, 128, 128,
256, 256, 256, 512, 512, 512, 512, 512
};
The segment lengths are not modified, so accept `const` qualified arrays, etc. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/ipa/libipa/gamma.cpp | 2 +- src/ipa/libipa/gamma.h | 2 +- src/ipa/rkisp1/algorithms/goc.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)