X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=deconvolution_sharpen_effect.cpp;h=c4ad5cd2cd699b65c223d505dc0fd88932b4e3e1;hp=0a13dd642f3d9a3cb5d00ac857f2763cf4904ee5;hb=ddf71f853e64c3912eed4ab98bfe7503826ce8e1;hpb=85f9719bf3519b1f1942738d11601584f5d38725 diff --git a/deconvolution_sharpen_effect.cpp b/deconvolution_sharpen_effect.cpp index 0a13dd6..c4ad5cd 100644 --- a/deconvolution_sharpen_effect.cpp +++ b/deconvolution_sharpen_effect.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include @@ -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