X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Frgbshift%2Frgbshift.C;h=6cfb38b23f94c790b3ea50946fe624832c8a254a;hb=f02c3f7d36eb475d1371f8e4b2814bea99e8b478;hp=e192f25fb0cde96b6df6001a9e2cdab26ef69692;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/rgbshift/rgbshift.C b/cinelerra-5.1/plugins/rgbshift/rgbshift.C index e192f25f..6cfb38b2 100644 --- a/cinelerra-5.1/plugins/rgbshift/rgbshift.C +++ b/cinelerra-5.1/plugins/rgbshift/rgbshift.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "bcdisplayinfo.h" @@ -43,10 +43,10 @@ public: void copy_from(RGBShiftConfig &src); int equivalent(RGBShiftConfig &src); - void interpolate(RGBShiftConfig &prev, - RGBShiftConfig &next, - long prev_frame, - long next_frame, + void interpolate(RGBShiftConfig &prev, + RGBShiftConfig &next, + long prev_frame, + long next_frame, long current_frame); int r_dx, r_dy, g_dx, g_dy, b_dx, b_dy; @@ -120,10 +120,10 @@ int RGBShiftConfig::equivalent(RGBShiftConfig &src) EQUIV(r_dy, src.r_dy) && EQUIV(g_dy, src.g_dy) && EQUIV(b_dy, src.b_dy); } -void RGBShiftConfig::interpolate(RGBShiftConfig &prev, - RGBShiftConfig &next, - long prev_frame, - long next_frame, +void RGBShiftConfig::interpolate(RGBShiftConfig &prev, + RGBShiftConfig &next, + long prev_frame, + long next_frame, long current_frame) { double next_scale = (double)(current_frame - prev_frame) / (next_frame - prev_frame); @@ -209,7 +209,7 @@ RGBShiftEffect::~RGBShiftEffect() } const char* RGBShiftEffect::plugin_title() { return _("RGBShift"); } -int RGBShiftEffect::is_realtime() { return 1; } +int RGBShiftEffect::is_realtime() { return 1; } NEW_WINDOW_MACRO(RGBShiftEffect, RGBShiftWindow) @@ -268,9 +268,6 @@ void RGBShiftEffect::read_data(KeyFrame *keyframe) } } - -static YUV yuv_static; - #define RGB_MACRO(type, temp_type, components) \ { \ for(int i = 0; i < h; i++) { \ @@ -310,11 +307,11 @@ static YUV yuv_static; temp_type g = gp ? gp[1] : 0; \ temp_type b = bp ? bp[2] : 0; \ if( sizeof(type) == 4 ) \ - yuv_static.rgb_to_yuv_f(r, g, b, y, u, v); \ + YUV::yuv.rgb_to_yuv_f(r, g, b, y, u, v); \ else if( sizeof(type) == 2 ) \ - yuv_static.rgb_to_yuv_16(r, g, b, y, u, v); \ + YUV::yuv.rgb_to_yuv_16(r, g, b, y, u, v); \ else \ - yuv_static.rgb_to_yuv_8(r, g, b, y, u, v); \ + YUV::yuv.rgb_to_yuv_8(r, g, b, y, u, v); \ out_row[0] = y; \ out_row[1] = u; \ out_row[2] = v; \