| Message ID | 20260918120949.191668-9-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Barnabás Pőcze (2026-09-18 13:09:36) > The segment lengths are not modified, so accept `const` qualified > arrays, etc. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@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(-) > > diff --git a/src/ipa/libipa/gamma.cpp b/src/ipa/libipa/gamma.cpp > index ce66f15d6a..20807ac601 100644 > --- a/src/ipa/libipa/gamma.cpp > +++ b/src/ipa/libipa/gamma.cpp > @@ -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 > diff --git a/src/ipa/libipa/gamma.h b/src/ipa/libipa/gamma.h > index e5ac3f96f5..a8872a6c75 100644 > --- a/src/ipa/libipa/gamma.h > +++ b/src/ipa/libipa/gamma.h > @@ -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, > diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp > index 269ae1ea03..f6961ce17f 100644 > --- a/src/ipa/rkisp1/algorithms/goc.cpp > +++ b/src/ipa/rkisp1/algorithms/goc.cpp > @@ -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 > }; > -- > 2.55.0 >
diff --git a/src/ipa/libipa/gamma.cpp b/src/ipa/libipa/gamma.cpp index ce66f15d6a..20807ac601 100644 --- a/src/ipa/libipa/gamma.cpp +++ b/src/ipa/libipa/gamma.cpp @@ -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 diff --git a/src/ipa/libipa/gamma.h b/src/ipa/libipa/gamma.h index e5ac3f96f5..a8872a6c75 100644 --- a/src/ipa/libipa/gamma.h +++ b/src/ipa/libipa/gamma.h @@ -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, diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp index 269ae1ea03..f6961ce17f 100644 --- a/src/ipa/rkisp1/algorithms/goc.cpp +++ b/src/ipa/rkisp1/algorithms/goc.cpp @@ -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(-)