diff --git a/src/aliceVision/hdr/rgbCurve.cpp b/src/aliceVision/hdr/rgbCurve.cpp index f16de1caaf..6c9dddb7de 100644 --- a/src/aliceVision/hdr/rgbCurve.cpp +++ b/src/aliceVision/hdr/rgbCurve.cpp @@ -268,53 +268,6 @@ void rgbCurve::setAllAbsolute() } } -inline float gammaFunction(float value, float gamma) -{ - // 1/0.45 = 2.22 - if (value < 0.018) - { - return 4.5 * value; - } - else - { - return 1.099 * std::pow(value, 0.45) - 0.099; - } -} - -inline float inverseGammaFunction(float value, float gamma) -{ - if (value <= 0.0812f) - { - return value / 4.5f; - } - else - { - return pow((value + 0.099f) / 1.099f, gamma); - } -} - -void rgbCurve::applyGamma(float gamma) -{ - for (auto &curve : _data) - { - for (auto &value : curve) - { - value = gammaFunction(value, gamma); - } - } -} - -void rgbCurve::applyGammaInv(float gamma) -{ - for (auto &curve : _data) - { - for (auto &value : curve) - { - value = inverseGammaFunction(value, gamma); - } - } -} - void rgbCurve::normalize() { for(auto &curve : _data) diff --git a/src/aliceVision/hdr/rgbCurve.hpp b/src/aliceVision/hdr/rgbCurve.hpp index 29edf235bb..b3aa8ae8ca 100644 --- a/src/aliceVision/hdr/rgbCurve.hpp +++ b/src/aliceVision/hdr/rgbCurve.hpp @@ -207,10 +207,6 @@ class rgbCurve */ void setAllAbsolute(); - void applyGamma(float gamma = 2.2); - - void applyGammaInv(float gamma = 2.2); - /** * @brief normalize the curve */