]> git.sesse.net Git - nageru/blobdiff - nageru/theme.h
Support auto white balance (ie., not controlled by the theme).
[nageru] / nageru / theme.h
index 37113b2b954d88a607087ca8e691df1aa082a8fd..7fd132544264e8283fbc0bd1d13ec6d6dc05a084 100644 (file)
@@ -39,6 +39,7 @@ enum EffectType {
 
        IDENTITY_EFFECT,
        WHITE_BALANCE_EFFECT,
+       AUTO_WHITE_BALANCE_EFFECT,  // Same as WHITE_BALANCE_EFFECT, but sets its value automatically.
        RESAMPLE_EFFECT,
        PADDING_EFFECT,
        INTEGRAL_PADDING_EFFECT,
@@ -93,6 +94,9 @@ public:
                // for non-interlaced inputs.
                std::vector<RefCountedFrame> input_frames;
        };
+       struct WhiteBalance {
+               float r, g, b;
+       };
 
        Chain get_chain(unsigned num, float t, unsigned width, unsigned height, const InputState &input_state);
 
@@ -102,9 +106,12 @@ public:
        std::string get_channel_name(unsigned channel);
        int get_channel_signal(unsigned channel);
        bool get_supports_set_wb(unsigned channel);
-       void set_wb(unsigned channel, double r, double g, double b);
+       void set_wb(unsigned channel, float r, float g, float b);
+       WhiteBalance get_white_balance_for_signal(int signal);
        std::string get_channel_color(unsigned channel);
 
+       std::unordered_map<int, WhiteBalance> white_balance_for_signal;
+
        std::vector<std::string> get_transition_names(float t);
 
        void transition_clicked(int transition_num, float t);