]> git.sesse.net Git - movit/blobdiff - fft_pass_effect.h
Use the F16C instruction set when available.
[movit] / fft_pass_effect.h
index 1fd4ea2c1886ed0bd6fb1f358954989770e0e5da..fbf4511e222cd6a725a5ffa2e597ae5c5927f292 100644 (file)
@@ -50,7 +50,7 @@
 // scaling), and as fp16 has quite limited range at times, this can be relevant
 // on some GPUs for larger sizes.
 
-#include <GL/glew.h>
+#include <epoxy/gl.h>
 #include <assert.h>
 #include <stdio.h>
 #include <string>
@@ -98,16 +98,28 @@ 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