]> git.sesse.net Git - movit/blobdiff - gamma_expansion_effect.cpp
Add accuracy unit tests for GammaExpansionEffect.
[movit] / gamma_expansion_effect.cpp
index 5f9423f7c749081f965d57bbb8ba06901381ca08..bfccaa04b925a3aacd6d359a8b9680a2d1899373 100644 (file)
@@ -74,6 +74,9 @@ void GammaExpansionEffect::set_gl_state(GLuint glsl_program_num, const std::stri
                // maxerror      = 0.000094
                // error at beta = 0.000012
                // error at 1.0  = 0.000012
+               //
+               // Note that the worst _relative_ error by far is just at the beginning
+               // of the exponential curve, ie., just around β.
                set_uniform_float(glsl_program_num, prefix, "linear_scale", 1.0 / 12.92);
                set_uniform_float(glsl_program_num, prefix, "c0", 0.001324469581);
                set_uniform_float(glsl_program_num, prefix, "c1", 0.02227416690);