4 class ColorBalanceMain
;
6 #include "colorbalancewindow.h"
8 #include "plugincolors.h"
10 #include "pluginvclient.h"
17 class ColorBalanceConfig
22 int equivalent(ColorBalanceConfig
&that
);
23 void copy_from(ColorBalanceConfig
&that
);
24 void interpolate(ColorBalanceConfig
&prev
,
25 ColorBalanceConfig
&next
,
28 int64_t current_frame
);
38 class ColorBalanceEngine
: public Thread
41 ColorBalanceEngine(ColorBalanceMain
*plugin
);
42 ~ColorBalanceEngine();
44 int start_process_frame(VFrame
*output
, VFrame
*input
, int row_start
, int row_end
);
45 int wait_process_frame();
48 ColorBalanceMain
*plugin
;
49 int row_start
, row_end
;
51 Condition input_lock
, output_lock
;
52 VFrame
*input
, *output
;
54 float cyan_f
, magenta_f
, yellow_f
;
57 class ColorBalanceMain
: public PluginVClient
60 ColorBalanceMain(PluginServer
*server
);
63 // required for all realtime plugins
64 int process_buffer(VFrame
*frame
,
65 int64_t start_position
,
73 int load_configuration();
74 void save_data(KeyFrame
*keyframe
);
75 void read_data(KeyFrame
*keyframe
);
81 void get_aggregation(int *aggregate_interpolate
,
82 int *aggregate_gamma
);
85 int64_t calculate_slider(float in
);
86 float calculate_transfer(float in
);
88 // parameters needed for processor
90 int synchronize_params(ColorBalanceSlider
*slider
, float difference
);
91 int test_boundary(float &value
);
93 ColorBalanceConfig config
;
94 // a thread for the GUI
95 ColorBalanceThread
*thread
;
96 ColorBalanceEngine
**engine
;
101 int r_lookup_8
[0x100];
102 int g_lookup_8
[0x100];
103 int b_lookup_8
[0x100];
104 int r_lookup_16
[0x10000];
105 int g_lookup_16
[0x10000];
106 int b_lookup_16
[0x10000];
108 int need_reconfigure
;