]> git.sesse.net Git - movit/blobdiff - test_util.h
Add a pkg-config file.
[movit] / test_util.h
index 67e975da50644d483d13a2f08a7bd5970fdb611a..1f48ae1eaffa1061973a2db7ad1287f0bd16c79c 100644 (file)
@@ -1,24 +1,29 @@
 #ifndef _TEST_UTIL_H
 #define _TEST_UTIL_H 1
 
+#include <GL/glew.h>
 #include "effect_chain.h"
+#include "image_format.h"
+
+class Input;
 
 class EffectChainTester {
 public:
        EffectChainTester(const float *data, unsigned width, unsigned height,
                          MovitPixelFormat pixel_format = FORMAT_GRAYSCALE,
                          Colorspace color_space = COLORSPACE_sRGB,
-                         GammaCurve gamma_curve = GAMMA_LINEAR);
+                         GammaCurve gamma_curve = GAMMA_LINEAR,
+                         GLenum framebuffer_format = GL_RGBA16F_ARB);
        ~EffectChainTester();
        
        EffectChain *get_chain() { return &chain; }
        Input *add_input(const float *data, MovitPixelFormat pixel_format, Colorspace color_space, GammaCurve gamma_curve);
        Input *add_input(const unsigned char *data, MovitPixelFormat pixel_format, Colorspace color_space, GammaCurve gamma_curve);
-       void run(float *out_data, GLenum format, Colorspace color_space, GammaCurve gamma_curve);
-       void run(unsigned char *out_data, GLenum format, Colorspace color_space, GammaCurve gamma_curve);
+       void run(float *out_data, GLenum format, Colorspace color_space, GammaCurve gamma_curve, OutputAlphaFormat alpha_format = OUTPUT_ALPHA_FORMAT_POSTMULTIPLIED);
+       void run(unsigned char *out_data, GLenum format, Colorspace color_space, GammaCurve gamma_curve, OutputAlphaFormat alpha_format = OUTPUT_ALPHA_FORMAT_POSTMULTIPLIED);
 
 private:
-       void finalize_chain(Colorspace color_space, GammaCurve gamma_curve);
+       void finalize_chain(Colorspace color_space, GammaCurve gamma_curve, OutputAlphaFormat alpha_format);
 
        EffectChain chain;
        GLuint fbo, texnum;