ipa: rpi: Define local functions in anonymous namespace
Multiple local functions are defined in the global namespace without the static keyword. This compiles fine for now, but will cause a missing declaration warning when we enable them. To prepare for that, move the function declaration to an anonymous namespace. While at it, for consistency, include an existing static function in the namespace and drop the static keyword. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
@@ -113,8 +113,10 @@ void Ccm::initialise()
|
||||
{
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
template<typename T>
|
||||
static bool getLocked(Metadata *metadata, std::string const &tag, T &value)
|
||||
bool getLocked(Metadata *metadata, std::string const &tag, T &value)
|
||||
{
|
||||
T *ptr = metadata->getLocked<T>(tag);
|
||||
if (ptr == nullptr)
|
||||
@@ -149,6 +151,8 @@ Matrix applySaturation(Matrix const &ccm, double saturation)
|
||||
return Y2RGB * S * RGB2Y * ccm;
|
||||
}
|
||||
|
||||
} /* namespace */
|
||||
|
||||
void Ccm::prepare(Metadata *imageMetadata)
|
||||
{
|
||||
bool awbOk = false, luxOk = false;
|
||||
|
||||
@@ -94,6 +94,8 @@ void Contrast::prepare(Metadata *imageMetadata)
|
||||
imageMetadata->set("contrast.status", status_);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
ipa::Pwl computeStretchCurve(Histogram const &histogram,
|
||||
ContrastConfig const &config)
|
||||
{
|
||||
@@ -153,6 +155,8 @@ ipa::Pwl applyManualContrast(ipa::Pwl const &gammaCurve, double brightness,
|
||||
return newGammaCurve;
|
||||
}
|
||||
|
||||
} /* namespace */
|
||||
|
||||
void Contrast::process(StatisticsPtr &stats,
|
||||
[[maybe_unused]] Metadata *imageMetadata)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user