]> git.sesse.net Git - movit/blobdiff - deconvolution_sharpen_effect.cpp
Stop using BGR, BGRA and grayscale formats.
[movit] / deconvolution_sharpen_effect.cpp
index 0a13dd642f3d9a3cb5d00ac857f2763cf4904ee5..c4ad5cd2cd699b65c223d505dc0fd88932b4e3e1 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <Eigen/Dense>
 #include <Eigen/Cholesky>
-#include <GL/glew.h>
+#include <epoxy/gl.h>
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -19,6 +19,8 @@
 using namespace Eigen;
 using namespace std;
 
+namespace movit {
+
 DeconvolutionSharpenEffect::DeconvolutionSharpenEffect()
        : R(5),
          circle_radius(2.0f),
@@ -301,7 +303,7 @@ void DeconvolutionSharpenEffect::update_deconvolution_kernel()
        MatrixXf r_uu(8 * R + 1, 8 * R + 1);
        for (int y = -4 * R; y <= 4 * R; ++y) { 
                for (int x = -4 * R; x <= 4 * R; ++x) {
-                       r_uu(x + 4 * R, y + 4 * R) = pow(correlation, hypot(x, y));
+                       r_uu(x + 4 * R, y + 4 * R) = pow(double(correlation), hypot(x, y));
                }
        }
 
@@ -444,3 +446,5 @@ void DeconvolutionSharpenEffect::set_gl_state(GLuint glsl_program_num, const str
 
        set_uniform_vec4_array(glsl_program_num, prefix, "samples", samples, (R + 1) * (R + 1));
 }
+
+}  // namespace movit