]> git.sesse.net Git - movit/blob - white_balance_effect.h
Set pixel_data[] to NULL in YCbCrInput as well.
[movit] / white_balance_effect.h
1 #ifndef _WHITE_BALANCE_EFFECT_H
2 #define _WHITE_BALANCE_EFFECT_H 1
3
4 // Color correction in LMS color space.
5
6 #include "effect.h"
7
8 class WhiteBalanceEffect : public Effect {
9 public:
10         WhiteBalanceEffect();
11         virtual std::string effect_type_id() const { return "WhiteBalanceEffect"; }
12         virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
13         std::string output_fragment_shader();
14
15         void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
16
17 private:
18         // The neutral color, in linear sRGB.
19         RGBTriplet neutral_color;
20
21         // Output color temperature (in Kelvins).
22         // Choosing 6500 will lead to no color cast (ie., the neutral color becomes perfectly gray).
23         float output_color_temperature;
24 };
25
26 #endif // !defined(_WHITE_BALANCE_EFFECT_H)