X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Finvertvideo%2Finvert.C;h=66fd88bb88849174acbb589a78064d5439deaec3;hb=723142d62d61cde588e961426440f839ca9dcda9;hp=d24b10f8925a00375ab61b73fc6f5691785e9279;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/invertvideo/invert.C b/cinelerra-5.1/plugins/invertvideo/invert.C index d24b10f8..66fd88bb 100644 --- a/cinelerra-5.1/plugins/invertvideo/invert.C +++ b/cinelerra-5.1/plugins/invertvideo/invert.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" @@ -25,7 +25,7 @@ #include "filexml.h" #include "guicast.h" #include "language.h" -#include "cicolors.h" +#include "bccolors.h" #include "pluginvclient.h" #include "vframe.h" @@ -44,10 +44,10 @@ public: void copy_from(InvertVideoConfig &src); int equivalent(InvertVideoConfig &src); - void interpolate(InvertVideoConfig &prev, - InvertVideoConfig &next, - long prev_frame, - long next_frame, + void interpolate(InvertVideoConfig &prev, + InvertVideoConfig &next, + long prev_frame, + long next_frame, long current_frame); int r, g, b, a; @@ -118,16 +118,16 @@ void InvertVideoConfig::copy_from(InvertVideoConfig &src) int InvertVideoConfig::equivalent(InvertVideoConfig &src) { - return r == src.r && - g == src.g && - b == src.b && + return r == src.r && + g == src.g && + b == src.b && a == src.a; } -void InvertVideoConfig::interpolate(InvertVideoConfig &prev, - InvertVideoConfig &next, - long prev_frame, - long next_frame, +void InvertVideoConfig::interpolate(InvertVideoConfig &prev, + InvertVideoConfig &next, + long prev_frame, + long next_frame, long current_frame) { r = prev.r; @@ -157,11 +157,11 @@ int InvertVideoEnable::handle_event() InvertVideoWindow::InvertVideoWindow(InvertVideoEffect *plugin) - : PluginClientWindow(plugin, - 260, - 130, - 260, - 130, + : PluginClientWindow(plugin, + 260, + 130, + 260, + 130, 0) { this->plugin = plugin; @@ -194,14 +194,14 @@ void InvertVideoWindow::create_objects() InvertVideoEffect::InvertVideoEffect(PluginServer *server) : PluginVClient(server) { - + } InvertVideoEffect::~InvertVideoEffect() { - + } -const char* InvertVideoEffect::plugin_title() { return _("Invert Video"); } +const char* InvertVideoEffect::plugin_title() { return N_("Invert Video"); } int InvertVideoEffect::is_realtime() { return 1; } NEW_WINDOW_MACRO(InvertVideoEffect, InvertVideoWindow) @@ -282,9 +282,9 @@ int InvertVideoEffect::process_buffer(VFrame *frame, { load_configuration(); - read_frame(frame, - 0, - start_position, + read_frame(frame, + 0, + start_position, frame_rate, get_use_opengl()); @@ -331,7 +331,7 @@ int InvertVideoEffect::process_buffer(VFrame *frame, int InvertVideoEffect::handle_opengl() { #ifdef HAVE_GL - static const char *invert_frag = + static const char *invert_frag = "uniform sampler2D tex;\n" "uniform bool do_r;\n" "uniform bool do_g;\n" @@ -349,10 +349,7 @@ int InvertVideoEffect::handle_opengl() get_output()->to_texture(); get_output()->enable_opengl(); - unsigned int frag_shader = 0; - frag_shader = VFrame::make_shader(0, - invert_frag, - 0); + unsigned int frag_shader = VFrame::make_shader(0, invert_frag, 0); glUseProgram(frag_shader); glUniform1i(glGetUniformLocation(frag_shader, "tex"), 0); glUniform1i(glGetUniformLocation(frag_shader, "do_r"), config.r);