]> git.sesse.net Git - movit/blobdiff - deconvolution_sharpen_effect.cpp
Fix a bug where we would send too few parameters down to the refocus shader.
[movit] / deconvolution_sharpen_effect.cpp
index 29071c540c32d93170607012d7e59a9588d604ed..d9d54aa0a30d4dcfe1718659a1aecdbab754019e 100644 (file)
@@ -250,12 +250,6 @@ void print_matrix(const MatrixXf &m)
 
 void DeconvolutionSharpenEffect::update_deconvolution_kernel()
 {
-       printf("circular blur radius: %5.3f\n", circle_radius);
-       printf("gaussian blur radius: %5.3f\n", gaussian_radius);
-       printf("correlation:          %5.3f\n", correlation);
-       printf("noise factor:         %5.3f\n", noise);
-       printf("\n");
-
        // Figure out the impulse response for the circular part of the blur.
        MatrixXf circ_h(2 * R + 1, 2 * R + 1);
        for (int y = -R; y <= R; ++y) { 
@@ -326,7 +320,6 @@ void DeconvolutionSharpenEffect::update_deconvolution_kernel()
        assert(r_vv.cols() == 4 * R + 1);
 
        // Similarly, r_uv = u ⊙ v = u ⊙ (h ⊙ u) = h ⊙ r_uu.
-       //MatrixXf r_uv = central_convolve(r_uu, h).block(2 * R, 2 * R, 2 * R + 1, 2 * R + 1);
        MatrixXf r_uu_center = r_uu.block(2 * R, 2 * R, 4 * R + 1, 4 * R + 1);
        MatrixXf r_uv = central_convolve(r_uu_center, h);
        assert(r_uv.rows() == 2 * R + 1);
@@ -457,5 +450,5 @@ void DeconvolutionSharpenEffect::set_gl_state(GLuint glsl_program_num, const std
                }
        }
 
-       set_uniform_vec4_array(glsl_program_num, prefix, "samples", samples, R * R);
+       set_uniform_vec4_array(glsl_program_num, prefix, "samples", samples, (R + 1) * (R + 1));
 }