X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=deconvolution_sharpen_effect.h;h=293916fd52da9433d7843ff9ca26c3526a8fdc06;hb=2322070a3dbeb6b46b39cca07a0fbf20e95f5468;hp=bc0bbd48ee8e07e896624d08b7deb1a41ce0ea69;hpb=42c35394ef92bb5179fc4879cb55b866fd422d28;p=movit diff --git a/deconvolution_sharpen_effect.h b/deconvolution_sharpen_effect.h index bc0bbd4..293916f 100644 --- a/deconvolution_sharpen_effect.h +++ b/deconvolution_sharpen_effect.h @@ -21,12 +21,17 @@ #include "effect.h" +#include + class DeconvolutionSharpenEffect : public Effect { public: DeconvolutionSharpenEffect(); virtual std::string effect_type_id() const { return "DeconvolutionSharpenEffect"; } std::string output_fragment_shader(); + // Samples a lot of times from its input. + virtual bool needs_texture_bounce() const { return true; } + virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height) { this->width = width; @@ -51,6 +56,13 @@ private: // (ie., blur is assumed to be a 2px circle), correlation = 0.95, and noise = 0.01. // Note that once the radius starts going too far past R, you will get nonsensical results. float circle_radius, gaussian_radius, correlation, noise; + + // The deconvolution kernel, and the parameters last time we did an update. + Eigen::MatrixXf g; + int last_R; + float last_circle_radius, last_gaussian_radius, last_correlation, last_noise; + + void update_deconvolution_kernel(); }; #endif // !defined(_DECONVOLUTION_SHARPEN_EFFECT_H)