]> git.sesse.net Git - movit/blobdiff - gamma_expansion_effect.h
Implement GammaExpansionEffect using ALU ops instead of texture lookups.
[movit] / gamma_expansion_effect.h
index 07d94bea60a6f7784b94b5328ac86cb063d59a9f..679c16d24d92c2adb28ebe1eac708048e2d9029c 100644 (file)
@@ -5,15 +5,13 @@
 // typically inserted by the framework automatically at the beginning
 // of the processing chain.
 //
-// Currently supports sRGB and Rec. 601/709.
+// Currently supports sRGB, Rec. 601/709 and Rec. 2020 (10- and 12-bit).
 
 #include <string>
 
 #include "effect.h"
 #include "image_format.h"
 
-#define EXPANSION_CURVE_SIZE 256
-
 class GammaExpansionEffect : public Effect {
 private:
        // Should not be instantiated by end users.
@@ -23,6 +21,7 @@ private:
 public:
        virtual std::string effect_type_id() const { return "GammaExpansionEffect"; }
        std::string output_fragment_shader();
+       virtual void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
 
        virtual bool needs_linear_light() const { return false; }
        virtual bool needs_srgb_primaries() const { return false; }
@@ -33,7 +32,6 @@ public:
 
 private:
        GammaCurve source_curve;
-       float expansion_curve[EXPANSION_CURVE_SIZE];
 };
 
 #endif // !defined(_MOVIT_GAMMA_EXPANSION_EFFECT_H)