]> git.sesse.net Git - movit/blobdiff - gamma_expansion_effect.cpp
Make combine_two_samples() into a template instead of having manual rounding checks.
[movit] / gamma_expansion_effect.cpp
index 696815ed40273ea9fb8daab2e2a1d29bff30684b..95437906f4c63134232e7775ba630016b2b6748f 100644 (file)
@@ -6,6 +6,8 @@
 
 using namespace std;
 
+namespace movit {
+
 GammaExpansionEffect::GammaExpansionEffect()
        : source_curve(GAMMA_LINEAR)
 {
@@ -38,7 +40,7 @@ void GammaExpansionEffect::set_gl_state(GLuint glsl_program_num, const string &p
        // However, pow() is relatively slow in GLSL, so we approximate this
        // part by a minimax polynomial, whose coefficients are precalculated
        // in Maple. (It is very hard to accurately model the curve as a whole
-       // using minimax polynomials; both Maple and Mathematically generally
+       // using minimax polynomials; both Maple and Mathematica generally
        // just error out if you ask them to optimize over 0..1 with a higher-degree
        // polynomial.)
        //
@@ -121,3 +123,5 @@ void GammaExpansionEffect::set_gl_state(GLuint glsl_program_num, const string &p
                set_uniform_float(glsl_program_num, prefix, "beta", 0.0181 * 4.5);
        }
 }
+
+}  // namespace movit