/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* 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 "bcsignals.h"
int GammaConfig::equivalent(GammaConfig &that)
{
- return (EQUIV(max, that.max) &&
+ return (EQUIV(max, that.max) &&
EQUIV(gamma, that.gamma) &&
automatic == that.automatic) &&
plot == that.plot;
plot = that.plot;
}
-void GammaConfig::interpolate(GammaConfig &prev,
- GammaConfig &next,
- int64_t prev_frame,
- int64_t next_frame,
+void GammaConfig::interpolate(GammaConfig &prev,
+ GammaConfig &next,
+ int64_t prev_frame,
+ int64_t next_frame,
int64_t current_frame)
{
double next_scale = (double)(current_frame - prev_frame) / (next_frame - prev_frame);
this->plugin = plugin;
}
-
+
void GammaUnit::process_package(LoadPackage *package)
{
GammaPackage *pkg = (GammaPackage*)package;
GammaEngine::GammaEngine(GammaMain *plugin)
- : LoadServer(plugin->get_project_smp() + 1,
+ : LoadServer(plugin->get_project_smp() + 1,
plugin->get_project_smp() + 1)
{
this->plugin = plugin;
: PluginVClient(server)
{
engine = 0;
-
+
}
GammaMain::~GammaMain()
{
-
+
delete engine;
}
frame->get_params()->update("GAMMA_MAX", config.max);
int use_opengl = get_use_opengl() &&
- !config.automatic &&
+ !config.automatic &&
(!config.plot || !gui_open());
- read_frame(frame,
- 0,
- start_position,
+ read_frame(frame,
+ 0,
+ start_position,
frame_rate,
use_opengl);
if(next_effect_is(_("Color Balance")))
return 0;
-
+
return run_opengl();
}
else
send_render_gui(this);
}
else
- if(config.plot)
+ if(config.plot)
{
send_render_gui(this);
}
if(!engine) engine = new GammaEngine(this);
if(ptr->engine && ptr->config.automatic)
{
- memcpy(engine->accum,
- ptr->engine->accum,
+ memcpy(engine->accum,
+ ptr->engine->accum,
sizeof(int) * HISTOGRAM_SIZE);
thread->window->lock_window("GammaMain::render_gui");
((GammaWindow*)thread->window)->update();
}
else
{
- engine->process_packages(GammaEngine::HISTOGRAM,
+ engine->process_packages(GammaEngine::HISTOGRAM,
ptr->frame);
thread->window->lock_window("GammaMain::render_gui");
((GammaWindow*)thread->window)->update_histogram();
0);
- if(shader > 0)
+ if(shader > 0)
{
glUseProgram(shader);
glUniform1i(glGetUniformLocation(shader, "tex"), 0);