X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Ftimeavg%2Ftimeavg.C;h=2061c81c3a590bf2138fd98f0cb2ac936b974761;hb=83c3c4b8005ee632f93844f2a81c9bbded1b69ad;hp=fa055c3fb24d0a19daf7d05e45fb0c1411bf7421;hpb=9d832a1fff11b11aaa1108c460690ed05e2bdc05;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/timeavg/timeavg.C b/cinelerra-5.1/plugins/timeavg/timeavg.C index fa055c3f..2061c81c 100644 --- a/cinelerra-5.1/plugins/timeavg/timeavg.C +++ b/cinelerra-5.1/plugins/timeavg/timeavg.C @@ -19,8 +19,9 @@ * */ -#include "clip.h" +#include "bccolors.h" #include "bchash.h" +#include "clip.h" #include "filexml.h" #include "keyframe.h" #include "language.h" @@ -115,7 +116,7 @@ TimeAvgMain::~TimeAvgMain() if(history_valid) delete [] history_valid; } -const char* TimeAvgMain::plugin_title() { return _("Time Average"); } +const char* TimeAvgMain::plugin_title() { return N_("Time Average"); } int TimeAvgMain::is_realtime() { return 1; } @@ -214,7 +215,7 @@ int TimeAvgMain::process_buffer(VFrame *frame, // Create new frames for( ; i < config.frames; i++) { - history2[i] = new VFrame(w, h, color_model); + history2[i] = new VFrame(w, h, color_model, 0); history_frame2[i] = -0x7fffffff; history_valid2[i] = 0; } @@ -231,7 +232,7 @@ int TimeAvgMain::process_buffer(VFrame *frame, { history = new VFrame*[config.frames]; for(int i = 0; i < config.frames; i++) - history[i] = new VFrame(w, h, color_model); + history[i] = new VFrame(w, h, color_model, 0); history_size = config.frames; history_frame = new int64_t[config.frames]; bzero(history_frame, sizeof(int64_t) * config.frames); @@ -498,8 +499,7 @@ void TimeAvgMain::reset_accum(int w, int h, int color_model) } } -#define RGB_TO_VALUE(r, g, b) \ -((r) * R_TO_Y + (g) * G_TO_Y + (b) * B_TO_Y) +#define RGB_TO_VALUE(r, g, b) YUV::yuv.rgb_to_y_f((r),(g),(b)) // Only AVERAGE and ACCUMULATE use this #define SUBTRACT_ACCUM(type, \