]> git.sesse.net Git - movit/blobdiff - white_balance_effect.h
Convert a loop to range-based for.
[movit] / white_balance_effect.h
index 80416cba39340df11b0464a173e5ca07da5be3a5..01dcc7e24d18a902eec255fb7f056dfbb43d303d 100644 (file)
@@ -1,17 +1,25 @@
-#ifndef _WHITE_BALANCE_EFFECT_H
-#define _WHITE_BALANCE_EFFECT_H 1
+#ifndef _MOVIT_WHITE_BALANCE_EFFECT_H
+#define _MOVIT_WHITE_BALANCE_EFFECT_H 1
 
 // Color correction in LMS color space.
 
+#include <epoxy/gl.h>
+#include <string>
+#include <Eigen/Core>
+
 #include "effect.h"
 
+namespace movit {
+
 class WhiteBalanceEffect : public Effect {
 public:
        WhiteBalanceEffect();
-       virtual std::string effect_type_id() const { return "WhiteBalanceEffect"; }
-       std::string output_fragment_shader();
+       std::string effect_type_id() const override { return "WhiteBalanceEffect"; }
+       AlphaHandling alpha_handling() const override { return DONT_CARE_ALPHA_TYPE; }
+       bool strong_one_to_one_sampling() const override { return true; }
+       std::string output_fragment_shader() override;
 
-       void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
+       void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) override;
 
 private:
        // The neutral color, in linear sRGB.
@@ -20,6 +28,10 @@ private:
        // Output color temperature (in Kelvins).
        // Choosing 6500 will lead to no color cast (ie., the neutral color becomes perfectly gray).
        float output_color_temperature;
+
+       Eigen::Matrix3d uniform_correction_matrix;
 };
 
-#endif // !defined(_WHITE_BALANCE_EFFECT_H)
+}  // namespace movit
+
+#endif // !defined(_MOVIT_WHITE_BALANCE_EFFECT_H)