Add YCbCr input. Required a bit of reworking of the sRGB extension stuff, but seems...
[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 "effect.h"
12 #include "effect_chain.h"
13
14 class ColorSpaceConversionEffect : public Effect {
15 public:
16         ColorSpaceConversionEffect();
17         std::string output_fragment_shader();
18
19         virtual bool needs_srgb_primaries() const { return false; }
20
21 private:
22         ColorSpace source_space, destination_space;
23 };
24
25 #endif // !defined(_COLORSPACE_CONVERSION_EFFECT_H)