]> git.sesse.net Git - movit/blob - gamma_expansion_effect.h
Split inputs into a separate class (descending from Effect) instead of handling them...
[movit] / gamma_expansion_effect.h
1 #ifndef _GAMMA_EXPANSION_EFFECT_H 
2 #define _GAMMA_EXPANSION_EFFECT_H 1
3
4 // An effect to convert the given gamma curve into linear light,
5 // typically inserted by the framework automatically at the beginning
6 // of the processing chain.
7 //
8 // Currently supports sRGB and Rec. 601/709.
9
10 #include "effect.h"
11 #include "effect_chain.h"
12
13 #define EXPANSION_CURVE_SIZE 256
14
15 class GammaExpansionEffect : public Effect {
16 public:
17         GammaExpansionEffect();
18         std::string output_fragment_shader();
19
20         virtual bool needs_linear_light() const { return false; }
21         virtual bool needs_srgb_primaries() const { return false; }
22
23 private:
24         GammaCurve source_curve;
25         float expansion_curve[EXPANSION_CURVE_SIZE];
26 };
27
28 #endif // !defined(_GAMMA_EXPANSION_EFFECT_H)