]> git.sesse.net Git - movit/blob - colorspace_conversion_effect.h
Remove obsolete files header.vert and footer.vert.
[movit] / colorspace_conversion_effect.h
1 #ifndef _COLORSPACE_CONVERSION_EFFECT_H
2 #define _COLORSPACE_CONVERSION_EFFECT_H 1
3
4 // An effect to convert between different color spaces.
5 // Can convert freely between sRGB/Rec. 709 and the two different Rec. 601
6 // color spaces (which thankfully have the same white point).
7 //
8 // We don't do any fancy gamut mapping or similar; colors that are out-of-gamut
9 // will simply stay out-of-gamut, and probably clip in the output stage.
10
11 #include <string>
12
13 #include "effect.h"
14 #include "image_format.h"
15
16 class ColorspaceConversionEffect : public Effect {
17 private:
18         // Should not be instantiated by end users.
19         ColorspaceConversionEffect();
20         friend class EffectChain;
21
22 public:
23         virtual std::string effect_type_id() const { return "ColorspaceConversionEffect"; }
24         std::string output_fragment_shader();
25
26         virtual bool needs_srgb_primaries() const { return false; }
27         virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
28
29 private:
30         Colorspace source_space, destination_space;
31 };
32
33 #endif // !defined(_COLORSPACE_CONVERSION_EFFECT_H)