6 #include "defaults.inc"
7 #include "pluginvclient.h"
8 #include "seltempavgwindow.h"
11 class SelTempAvgConfig
15 void copy_from(SelTempAvgConfig
*src
);
16 int equivalent(SelTempAvgConfig
*src
);
20 float avg_threshold_RY
, avg_threshold_GU
, avg_threshold_BV
;
21 float std_threshold_RY
, std_threshold_GU
, std_threshold_BV
;
22 int mask_RY
, mask_GU
, mask_BV
;
37 OFFSETMODE_RESTARTMARKERSYS
43 int offset_restartmarker_keyframe
;
44 int64_t offset_fixed_value
;
50 class SelTempAvgMain
: public PluginVClient
53 SelTempAvgMain(PluginServer
*server
);
56 // required for all realtime plugins
57 int process_buffer(VFrame
*frame
, int64_t start_position
, double frame_rate
);
62 int load_configuration();
66 void save_data(KeyFrame
*keyframe
);
67 void read_data(KeyFrame
*keyframe
);
68 int nextkeyframeisoffsetrestart(KeyFrame
*keyframe
);
71 void clear_accum(int w
, int h
, int color_model
);
72 void subtract_accum(VFrame
*frame
);
73 void add_accum(VFrame
*frame
);
74 void transfer_accum(VFrame
*frame
);
76 int64_t restartoffset
;
83 // Frame of history in requested framerate
84 int64_t *history_frame
;
86 unsigned char *accumulation
;
87 unsigned char *accumulation_sq
;
88 unsigned char *accumulation_grey
;
90 // a thread for the GUI
91 SelTempAvgThread
*thread
;
92 SelTempAvgConfig config
;
94 // Starting frame of history in requested framerate
95 int64_t history_start
;
96 // When subtraction is disabled, this detects no change for paranoid mode.