X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=fft_pass_effect.h;h=7689cf1e60688fb60d1c620baffb6ba1fac1dab9;hp=f12bda7e416ce3eeefe0f02e55ea4f0bbefa59a9;hb=60e4852ff1b04c525a9e3f1c98a1017db28b27bd;hpb=9651a4eaae012cdc49c1aa38197861e04f62e91e diff --git a/fft_pass_effect.h b/fft_pass_effect.h index f12bda7..7689cf1 100644 --- a/fft_pass_effect.h +++ b/fft_pass_effect.h @@ -57,6 +57,8 @@ #include "effect.h" +namespace movit { + class FFTPassEffect : public Effect { public: FFTPassEffect(); @@ -96,16 +98,30 @@ public: *width = *virtual_width = input_width; *height = *virtual_height = input_height; } + + virtual void inform_added(EffectChain *chain) { this->chain = chain; } - enum Direction { HORIZONTAL = 0, VERTICAL = 1 }; + enum Direction { INVALID = -1, HORIZONTAL = 0, VERTICAL = 1 }; private: + void generate_support_texture(); + + EffectChain *chain; int input_width, input_height; GLuint tex; + int fft_size; Direction direction; int pass_number; // From 1..n. int inverse; // 0 = forward (FFT), 1 = reverse (IFFT). + + int last_fft_size; + Direction last_direction; + int last_pass_number; + int last_inverse; + int last_input_size; }; +} // namespace movit + #endif // !defined(_MOVIT_FFT_PASS_EFFECT_H)