From: Good Guy Date: Sun, 13 Jan 2019 00:36:24 +0000 (-0700) Subject: labels follow edits fix, group only ungrouped edits, add reset to 7 plugins, add... X-Git-Tag: 2019-08~121 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=e375434717622cc3198a6bf9f7b7fb9fde555c21;p=goodguy%2Fcinelerra.git labels follow edits fix, group only ungrouped edits, add reset to 7 plugins, add 10bit fmt for h264, rotate your tips, mjpeg without v4l --- diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index 67f4402c..787ca44c 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -1880,18 +1880,16 @@ int MWindow::paste_edls(ArrayList *new_edls, int load_mode, if( load_mode != LOADMODE_RESOURCESONLY && load_mode != LOADMODE_ASSETSONLY ) { // Insert labels + if( edl->session->labels_follow_edits ) { //printf("MWindow::paste_edls %f %f\n", current_position, edl_length); - if( load_mode == LOADMODE_PASTE || - load_mode == LOADMODE_NESTED ) - edl->labels->insert_labels(new_edl->labels, - destination_tracks.total ? paste_position[0] : 0.0, - edl_length, - edit_labels); - else - edl->labels->insert_labels(new_edl->labels, - current_position, - edl_length, - edit_labels); + if( load_mode == LOADMODE_PASTE || load_mode == LOADMODE_NESTED ) + edl->labels->insert_labels(new_edl->labels, + destination_tracks.total ? paste_position[0] : 0.0, + edl_length, edit_labels); + else + edl->labels->insert_labels(new_edl->labels, current_position, + edl_length, edit_labels); + } //PRINT_TRACE double total_length = new_edl->tracks->total_length(); for( Track *new_track=new_edl->tracks->first; diff --git a/cinelerra-5.1/cinelerra/tipwindow.C b/cinelerra-5.1/cinelerra/tipwindow.C index 5ad90927..e367964f 100644 --- a/cinelerra-5.1/cinelerra/tipwindow.C +++ b/cinelerra-5.1/cinelerra/tipwindow.C @@ -127,7 +127,7 @@ void TipWindowGUI::create_objects() { lock_window("TipWindowGUI::create_objects"); int x = 10, y = 10; - add_subwindow(tip_text = new BC_Title(x, y, thread->get_current_tip(0))); + add_subwindow(tip_text = new BC_Title(x, y, thread->get_current_tip(1))); y = get_h() - 30; BC_CheckBox *checkbox; add_subwindow(checkbox = new TipDisable(mwindow, this, x, y)); diff --git a/cinelerra-5.1/cinelerra/tracks.C b/cinelerra-5.1/cinelerra/tracks.C index b0305edf..4873fac0 100644 --- a/cinelerra-5.1/cinelerra/tracks.C +++ b/cinelerra-5.1/cinelerra/tracks.C @@ -660,6 +660,7 @@ int Tracks::new_group(int id) for( Track *track=first; track; track=track->next ) { if( !track->record ) continue; for( Edit *edit=track->edits->first; edit; edit=edit->next ) { + if( edit->group_id > 0 ) continue; if( !edit->is_selected ) continue; edit->group_id = id; ++count; diff --git a/cinelerra-5.1/ffmpeg/video/h264-10bit.mp4 b/cinelerra-5.1/ffmpeg/video/h264-10bit.mp4 new file mode 100644 index 00000000..8f7e7010 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/h264-10bit.mp4 @@ -0,0 +1,6 @@ +mp4 libx264 +cin_pix_fmt=yuv420p10le +# use framerate for 1 keyframe/sec, needed for seeks +keyint_min=25 +profile=high10 +x264opts keyint=25 diff --git a/cinelerra-5.1/plugins/blur/blur.C b/cinelerra-5.1/plugins/blur/blur.C index bb9e6dbc..bc404397 100644 --- a/cinelerra-5.1/plugins/blur/blur.C +++ b/cinelerra-5.1/plugins/blur/blur.C @@ -39,6 +39,11 @@ BlurConfig::BlurConfig() +{ + reset(); +} + +void BlurConfig::reset() { vertical = 1; horizontal = 1; diff --git a/cinelerra-5.1/plugins/blur/blur.h b/cinelerra-5.1/plugins/blur/blur.h index 6846ca00..b85e2bbe 100644 --- a/cinelerra-5.1/plugins/blur/blur.h +++ b/cinelerra-5.1/plugins/blur/blur.h @@ -47,6 +47,7 @@ class BlurConfig { public: BlurConfig(); + void reset(); int equivalent(BlurConfig &that); void copy_from(BlurConfig &that); diff --git a/cinelerra-5.1/plugins/blur/blurwindow.C b/cinelerra-5.1/plugins/blur/blurwindow.C index 342d115a..b8c4b5db 100644 --- a/cinelerra-5.1/plugins/blur/blurwindow.C +++ b/cinelerra-5.1/plugins/blur/blurwindow.C @@ -32,9 +32,9 @@ BlurWindow::BlurWindow(BlurMain *client) : PluginClientWindow(client, 200, - 330, + 360, 200, - 330, + 360, 0) { this->client = client; @@ -70,11 +70,28 @@ void BlurWindow::create_objects() add_subwindow(g = new BlurG(client, x, y)); y += 30; add_subwindow(b = new BlurB(client, x, y)); + y += 40; + add_subwindow(reset = new BlurReset(client, this, x, y)); show_window(); flush(); } +// for Reset button +void BlurWindow::update() +{ + horizontal->update(client->config.horizontal); + vertical->update(client->config.vertical); + radius->update(client->config.radius); + radius_text->update((int64_t)client->config.radius); + a_key->update(client->config.a_key); + a->update(client->config.a); + r->update(client->config.r); + g->update(client->config.g); + b->update(client->config.b); +} + + BlurRadius::BlurRadius(BlurMain *client, BlurWindow *gui, int x, int y) : BC_IPot(x, y, @@ -225,4 +242,19 @@ int BlurB::handle_event() return 1; } - +BlurReset::BlurReset(BlurMain *client, BlurWindow *window, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->client = client; + this->window = window; +} +BlurReset::~BlurReset() +{ +} +int BlurReset::handle_event() +{ + client->config.reset(); + window->update(); + client->send_configure_change(); + return 1; +} diff --git a/cinelerra-5.1/plugins/blur/blurwindow.h b/cinelerra-5.1/plugins/blur/blurwindow.h index 03dc14d9..d5d900cd 100644 --- a/cinelerra-5.1/plugins/blur/blurwindow.h +++ b/cinelerra-5.1/plugins/blur/blurwindow.h @@ -42,6 +42,7 @@ class BlurR; class BlurG; class BlurB; class BlurAKey; +class BlurReset; class BlurWindow : public PluginClientWindow { @@ -50,6 +51,7 @@ public: ~BlurWindow(); void create_objects(); + void update(); BlurMain *client; BlurVertical *vertical; @@ -61,6 +63,7 @@ public: BlurG *g; BlurB *b; BlurAKey *a_key; + BlurReset *reset; }; class BlurAKey : public BC_CheckBox @@ -142,5 +145,15 @@ public: BlurWindow *window; }; +class BlurReset : public BC_GenericButton +{ +public: + BlurReset(BlurMain *client, BlurWindow *window, int x, int y); + ~BlurReset(); + int handle_event(); + BlurMain *client; + BlurWindow *window; +}; + #endif diff --git a/cinelerra-5.1/plugins/linearblur/linearblur.C b/cinelerra-5.1/plugins/linearblur/linearblur.C index af6cb826..e389b082 100644 --- a/cinelerra-5.1/plugins/linearblur/linearblur.C +++ b/cinelerra-5.1/plugins/linearblur/linearblur.C @@ -19,6 +19,7 @@ * */ + #include #include #include @@ -27,6 +28,7 @@ #include "clip.h" #include "bchash.h" #include "filexml.h" +#include "linearblur.h" #include "keyframe.h" #include "language.h" #include "loadbalance.h" @@ -35,170 +37,20 @@ -class LinearBlurMain; -class LinearBlurEngine; - - - - - -class LinearBlurConfig -{ -public: - LinearBlurConfig(); - - int equivalent(LinearBlurConfig &that); - void copy_from(LinearBlurConfig &that); - void interpolate(LinearBlurConfig &prev, - LinearBlurConfig &next, - long prev_frame, - long next_frame, - long current_frame); - - int radius; - int steps; - int angle; - int r; - int g; - int b; - int a; -}; - - - -class LinearBlurSize : public BC_ISlider -{ -public: - LinearBlurSize(LinearBlurMain *plugin, - int x, - int y, - int *output, - int min, - int max); - int handle_event(); - LinearBlurMain *plugin; - int *output; -}; - -class LinearBlurToggle : public BC_CheckBox -{ -public: - LinearBlurToggle(LinearBlurMain *plugin, - int x, - int y, - int *output, - char *string); - int handle_event(); - LinearBlurMain *plugin; - int *output; -}; - -class LinearBlurWindow : public PluginClientWindow -{ -public: - LinearBlurWindow(LinearBlurMain *plugin); - ~LinearBlurWindow(); - - void create_objects(); - - LinearBlurSize *angle, *steps, *radius; - LinearBlurToggle *r, *g, *b, *a; - LinearBlurMain *plugin; -}; - - - -// Output coords for a layer of blurring -// Used for OpenGL only -class LinearBlurLayer -{ -public: - LinearBlurLayer() {}; - int x, y; -}; - -class LinearBlurMain : public PluginVClient -{ -public: - LinearBlurMain(PluginServer *server); - ~LinearBlurMain(); - - int process_buffer(VFrame *frame, - int64_t start_position, - double frame_rate); - int is_realtime(); - void save_data(KeyFrame *keyframe); - void read_data(KeyFrame *keyframe); - void update_gui(); - int handle_opengl(); - PLUGIN_CLASS_MEMBERS(LinearBlurConfig) +REGISTER_PLUGIN(LinearBlurMain) - void delete_tables(); - VFrame *input, *output, *temp; - LinearBlurEngine *engine; - int **scale_y_table; - int **scale_x_table; - LinearBlurLayer *layer_table; - int table_entries; - int need_reconfigure; -// The accumulation buffer is needed because 8 bits isn't precise enough - unsigned char *accum; -}; -class LinearBlurPackage : public LoadPackage -{ -public: - LinearBlurPackage(); - int y1, y2; -}; -class LinearBlurUnit : public LoadClient -{ -public: - LinearBlurUnit(LinearBlurEngine *server, LinearBlurMain *plugin); - void process_package(LoadPackage *package); - LinearBlurEngine *server; - LinearBlurMain *plugin; -}; -class LinearBlurEngine : public LoadServer +LinearBlurConfig::LinearBlurConfig() { -public: - LinearBlurEngine(LinearBlurMain *plugin, - int total_clients, - int total_packages); - void init_packages(); - LoadClient* new_client(); - LoadPackage* new_package(); - LinearBlurMain *plugin; -}; - - - - - - - - - - - - - - - - - - - -REGISTER_PLUGIN(LinearBlurMain) - - + reset(); +} -LinearBlurConfig::LinearBlurConfig() +void LinearBlurConfig::reset() { radius = 10; angle = 0; @@ -263,9 +115,9 @@ void LinearBlurConfig::interpolate(LinearBlurConfig &prev, LinearBlurWindow::LinearBlurWindow(LinearBlurMain *plugin) : PluginClientWindow(plugin, 230, - 290, + 320, 230, - 290, + 320, 0) { this->plugin = plugin; @@ -298,13 +150,26 @@ void LinearBlurWindow::create_objects() add_subwindow(b = new LinearBlurToggle(plugin, x, y, &plugin->config.b, _("Blue"))); y += 30; add_subwindow(a = new LinearBlurToggle(plugin, x, y, &plugin->config.a, _("Alpha"))); - y += 30; + y += 40; + add_subwindow(reset = new LinearBlurReset(plugin, this, x, y)); show_window(); flush(); } +// for Reset button +void LinearBlurWindow::update() +{ + radius->update(plugin->config.radius); + angle->update(plugin->config.angle); + steps->update(plugin->config.steps); + r->update(plugin->config.r); + g->update(plugin->config.g); + b->update(plugin->config.b); + a->update(plugin->config.a); +} + @@ -357,6 +222,22 @@ int LinearBlurSize::handle_event() } +LinearBlurReset::LinearBlurReset(LinearBlurMain *plugin, LinearBlurWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} +LinearBlurReset::~LinearBlurReset() +{ +} +int LinearBlurReset::handle_event() +{ + plugin->config.reset(); + gui->update(); + plugin->send_configure_change(); + return 1; +} diff --git a/cinelerra-5.1/plugins/linearblur/linearblur.h b/cinelerra-5.1/plugins/linearblur/linearblur.h new file mode 100644 index 00000000..b0dfc7ed --- /dev/null +++ b/cinelerra-5.1/plugins/linearblur/linearblur.h @@ -0,0 +1,197 @@ + +/* + * 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 + * + */ + +#ifndef LINEARBLUR_H +#define LINEARBLUR_H + + +#include +#include +#include + +#include "bcdisplayinfo.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "keyframe.h" +#include "language.h" +#include "loadbalance.h" +#include "pluginvclient.h" +#include "vframe.h" + + + +class LinearBlurMain; +class LinearBlurWindow; +class LinearBlurEngine; +class LinearBlurReset; + + + + +class LinearBlurConfig +{ +public: + LinearBlurConfig(); + + void reset(); + int equivalent(LinearBlurConfig &that); + void copy_from(LinearBlurConfig &that); + void interpolate(LinearBlurConfig &prev, + LinearBlurConfig &next, + long prev_frame, + long next_frame, + long current_frame); + + int radius; + int steps; + int angle; + int r; + int g; + int b; + int a; +}; + + + +class LinearBlurSize : public BC_ISlider +{ +public: + LinearBlurSize(LinearBlurMain *plugin, + int x, + int y, + int *output, + int min, + int max); + int handle_event(); + LinearBlurMain *plugin; + int *output; +}; + +class LinearBlurToggle : public BC_CheckBox +{ +public: + LinearBlurToggle(LinearBlurMain *plugin, + int x, + int y, + int *output, + char *string); + int handle_event(); + LinearBlurMain *plugin; + int *output; +}; + +class LinearBlurReset : public BC_GenericButton +{ +public: + LinearBlurReset(LinearBlurMain *plugin, LinearBlurWindow *gui, int x, int y); + ~LinearBlurReset(); + int handle_event(); + LinearBlurMain *plugin; + LinearBlurWindow *gui; +}; + +class LinearBlurWindow : public PluginClientWindow +{ +public: + LinearBlurWindow(LinearBlurMain *plugin); + ~LinearBlurWindow(); + + void create_objects(); + void update(); + + LinearBlurSize *angle, *steps, *radius; + LinearBlurToggle *r, *g, *b, *a; + LinearBlurMain *plugin; + LinearBlurReset *reset; +}; + + + + + +// Output coords for a layer of blurring +// Used for OpenGL only +class LinearBlurLayer +{ +public: + LinearBlurLayer() {}; + int x, y; +}; + +class LinearBlurMain : public PluginVClient +{ +public: + LinearBlurMain(PluginServer *server); + ~LinearBlurMain(); + + int process_buffer(VFrame *frame, + int64_t start_position, + double frame_rate); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); + int handle_opengl(); + + PLUGIN_CLASS_MEMBERS(LinearBlurConfig) + + void delete_tables(); + VFrame *input, *output, *temp; + LinearBlurEngine *engine; + int **scale_y_table; + int **scale_x_table; + LinearBlurLayer *layer_table; + int table_entries; + int need_reconfigure; +// The accumulation buffer is needed because 8 bits isn't precise enough + unsigned char *accum; +}; + +class LinearBlurPackage : public LoadPackage +{ +public: + LinearBlurPackage(); + int y1, y2; +}; + +class LinearBlurUnit : public LoadClient +{ +public: + LinearBlurUnit(LinearBlurEngine *server, LinearBlurMain *plugin); + void process_package(LoadPackage *package); + LinearBlurEngine *server; + LinearBlurMain *plugin; +}; + +class LinearBlurEngine : public LoadServer +{ +public: + LinearBlurEngine(LinearBlurMain *plugin, + int total_clients, + int total_packages); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + LinearBlurMain *plugin; +}; + +#endif diff --git a/cinelerra-5.1/plugins/polar/polar.C b/cinelerra-5.1/plugins/polar/polar.C index 08933b59..cfae601a 100644 --- a/cinelerra-5.1/plugins/polar/polar.C +++ b/cinelerra-5.1/plugins/polar/polar.C @@ -42,6 +42,7 @@ class PolarEffect; class PolarEngine; class PolarWindow; +class PolarReset; class PolarConfig @@ -49,6 +50,7 @@ class PolarConfig public: PolarConfig(); + void reset(); void copy_from(PolarConfig &src); int equivalent(PolarConfig &src); void interpolate(PolarConfig &prev, @@ -82,14 +84,26 @@ public: PolarEffect *plugin; }; +class PolarReset : public BC_GenericButton +{ +public: + PolarReset(PolarEffect *plugin, PolarWindow *window, int x, int y); + ~PolarReset(); + int handle_event(); + PolarEffect *plugin; + PolarWindow *window; +}; + class PolarWindow : public PluginClientWindow { public: PolarWindow(PolarEffect *plugin); void create_objects(); + void update(); PolarEffect *plugin; PolarDepth *depth; PolarAngle *angle; + PolarReset *reset; }; @@ -148,14 +162,18 @@ REGISTER_PLUGIN(PolarEffect) PolarConfig::PolarConfig() { - angle = 0.0; - depth = 0.0; + reset(); +} + +void PolarConfig::reset() +{ + angle = 1.0; // 0.0; + depth = 1.0; // 0.0; backwards = 0; invert = 0; polar_to_rectangular = 1; } - void PolarConfig::copy_from(PolarConfig &src) { this->angle = src.angle; @@ -191,9 +209,9 @@ void PolarConfig::interpolate(PolarConfig &prev, PolarWindow::PolarWindow(PolarEffect *plugin) : PluginClientWindow(plugin, 270, - 100, + 122, 270, - 100, + 122, 0) { this->plugin = plugin; @@ -207,12 +225,19 @@ void PolarWindow::create_objects() y += 40; add_subwindow(new BC_Title(x, y, _("Angle:"))); add_subwindow(angle = new PolarAngle(plugin, x + 50, y)); + y += 40; + add_subwindow(reset = new PolarReset(plugin, this, x, y)); show_window(); flush(); } - +// for Reset button +void PolarWindow::update() +{ + depth->update(plugin->config.depth); + angle->update(plugin->config.angle); +} @@ -262,6 +287,24 @@ int PolarAngle::handle_event() +PolarReset::PolarReset(PolarEffect *plugin, PolarWindow *window, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->window = window; +} +PolarReset::~PolarReset() +{ +} +int PolarReset::handle_event() +{ + plugin->config.reset(); + window->update(); + plugin->send_configure_change(); + return 1; +} + + PolarEffect::PolarEffect(PluginServer *server) diff --git a/cinelerra-5.1/plugins/radialblur/radialblur.C b/cinelerra-5.1/plugins/radialblur/radialblur.C index 1847a200..035ab0af 100644 --- a/cinelerra-5.1/plugins/radialblur/radialblur.C +++ b/cinelerra-5.1/plugins/radialblur/radialblur.C @@ -19,175 +19,22 @@ * */ -#include -#include -#include - - -#include "affine.h" -#include "bcdisplayinfo.h" -#include "clip.h" -#include "bchash.h" -#include "filexml.h" -#include "keyframe.h" -#include "language.h" -#include "loadbalance.h" -#include "pluginvclient.h" -#include "vframe.h" - - -class RadialBlurMain; -class RadialBlurEngine; - - - - - -class RadialBlurConfig -{ -public: - RadialBlurConfig(); - - int equivalent(RadialBlurConfig &that); - void copy_from(RadialBlurConfig &that); - void interpolate(RadialBlurConfig &prev, - RadialBlurConfig &next, - long prev_frame, - long next_frame, - long current_frame); - - int x; - int y; - int steps; - int angle; - int r; - int g; - int b; - int a; -}; - - - -class RadialBlurSize : public BC_ISlider -{ -public: - RadialBlurSize(RadialBlurMain *plugin, - int x, - int y, - int *output, - int min, - int max); - int handle_event(); - RadialBlurMain *plugin; - int *output; -}; - -class RadialBlurToggle : public BC_CheckBox -{ -public: - RadialBlurToggle(RadialBlurMain *plugin, - int x, - int y, - int *output, - char *string); - int handle_event(); - RadialBlurMain *plugin; - int *output; -}; - -class RadialBlurWindow : public PluginClientWindow -{ -public: - RadialBlurWindow(RadialBlurMain *plugin); - ~RadialBlurWindow(); - - void create_objects(); - - - RadialBlurSize *x, *y, *steps, *angle; - RadialBlurToggle *r, *g, *b, *a; - RadialBlurMain *plugin; -}; +#include "radialblur.h" +REGISTER_PLUGIN(RadialBlurMain) -class RadialBlurMain : public PluginVClient -{ -public: - RadialBlurMain(PluginServer *server); - ~RadialBlurMain(); - - int process_buffer(VFrame *frame, - int64_t start_position, - double frame_rate); - int is_realtime(); - void save_data(KeyFrame *keyframe); - void read_data(KeyFrame *keyframe); - void update_gui(); - int handle_opengl(); - - PLUGIN_CLASS_MEMBERS(RadialBlurConfig) - - VFrame *input, *output, *temp; - RadialBlurEngine *engine; -// Rotate engine only used for OpenGL - AffineEngine *rotate; -}; - -class RadialBlurPackage : public LoadPackage -{ -public: - RadialBlurPackage(); - int y1, y2; -}; -class RadialBlurUnit : public LoadClient -{ -public: - RadialBlurUnit(RadialBlurEngine *server, RadialBlurMain *plugin); - void process_package(LoadPackage *package); - RadialBlurEngine *server; - RadialBlurMain *plugin; -}; - -class RadialBlurEngine : public LoadServer +RadialBlurConfig::RadialBlurConfig() { -public: - RadialBlurEngine(RadialBlurMain *plugin, - int total_clients, - int total_packages); - void init_packages(); - LoadClient* new_client(); - LoadPackage* new_package(); - RadialBlurMain *plugin; -}; - - - - - - - - - - - - - - - - - - - -REGISTER_PLUGIN(RadialBlurMain) - + reset(); +} -RadialBlurConfig::RadialBlurConfig() +void RadialBlurConfig::reset() { x = 50; y = 50; @@ -257,9 +104,9 @@ void RadialBlurConfig::interpolate(RadialBlurConfig &prev, RadialBlurWindow::RadialBlurWindow(RadialBlurMain *plugin) : PluginClientWindow(plugin, 230, - 340, + 370, 230, - 340, + 370, 0) { this->plugin = plugin; @@ -296,13 +143,25 @@ void RadialBlurWindow::create_objects() add_subwindow(b = new RadialBlurToggle(plugin, x, y, &plugin->config.b, _("Blue"))); y += 30; add_subwindow(a = new RadialBlurToggle(plugin, x, y, &plugin->config.a, _("Alpha"))); - y += 30; + y += 40; + add_subwindow(reset = new RadialBlurReset(plugin, this, x, y)); show_window(); flush(); } - +// for Reset button +void RadialBlurWindow::update() +{ + this->x->update(plugin->config.x); + this->y->update(plugin->config.y); + angle->update(plugin->config.angle); + steps->update(plugin->config.steps); + r->update(plugin->config.r); + g->update(plugin->config.g); + b->update(plugin->config.b); + a->update(plugin->config.a); +} @@ -360,6 +219,26 @@ int RadialBlurSize::handle_event() +RadialBlurReset::RadialBlurReset(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} +RadialBlurReset::~RadialBlurReset() +{ +} +int RadialBlurReset::handle_event() +{ + plugin->config.reset(); + gui->update(); + plugin->send_configure_change(); + return 1; +} + + + + diff --git a/cinelerra-5.1/plugins/radialblur/radialblur.h b/cinelerra-5.1/plugins/radialblur/radialblur.h new file mode 100644 index 00000000..d16facf8 --- /dev/null +++ b/cinelerra-5.1/plugins/radialblur/radialblur.h @@ -0,0 +1,185 @@ + +/* + * 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 + * + */ + +#ifndef RADIALBLUR_H +#define RADIALBLUR_H + + +#include +#include +#include + + +#include "affine.h" +#include "bcdisplayinfo.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "keyframe.h" +#include "language.h" +#include "loadbalance.h" +#include "pluginvclient.h" +#include "vframe.h" + + +class RadialBlurMain; +class RadialBlurWindow; +class RadialBlurEngine; +class RadialBlurReset; + + + + +class RadialBlurConfig +{ +public: + RadialBlurConfig(); + + void reset(); + int equivalent(RadialBlurConfig &that); + void copy_from(RadialBlurConfig &that); + void interpolate(RadialBlurConfig &prev, + RadialBlurConfig &next, + long prev_frame, + long next_frame, + long current_frame); + + int x; + int y; + int steps; + int angle; + int r; + int g; + int b; + int a; +}; + + + +class RadialBlurSize : public BC_ISlider +{ +public: + RadialBlurSize(RadialBlurMain *plugin, + int x, + int y, + int *output, + int min, + int max); + int handle_event(); + RadialBlurMain *plugin; + int *output; +}; + +class RadialBlurToggle : public BC_CheckBox +{ +public: + RadialBlurToggle(RadialBlurMain *plugin, + int x, + int y, + int *output, + char *string); + int handle_event(); + RadialBlurMain *plugin; + int *output; +}; + +class RadialBlurReset : public BC_GenericButton +{ +public: + RadialBlurReset(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y); + ~RadialBlurReset(); + int handle_event(); + RadialBlurMain *plugin; + RadialBlurWindow *gui; +}; + +class RadialBlurWindow : public PluginClientWindow +{ +public: + RadialBlurWindow(RadialBlurMain *plugin); + ~RadialBlurWindow(); + + void create_objects(); + void update(); + + RadialBlurSize *x, *y, *steps, *angle; + RadialBlurToggle *r, *g, *b, *a; + RadialBlurMain *plugin; + RadialBlurReset *reset; +}; + + + + + + +class RadialBlurMain : public PluginVClient +{ +public: + RadialBlurMain(PluginServer *server); + ~RadialBlurMain(); + + int process_buffer(VFrame *frame, + int64_t start_position, + double frame_rate); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); + int handle_opengl(); + + PLUGIN_CLASS_MEMBERS(RadialBlurConfig) + + VFrame *input, *output, *temp; + RadialBlurEngine *engine; +// Rotate engine only used for OpenGL + AffineEngine *rotate; +}; + +class RadialBlurPackage : public LoadPackage +{ +public: + RadialBlurPackage(); + int y1, y2; +}; + +class RadialBlurUnit : public LoadClient +{ +public: + RadialBlurUnit(RadialBlurEngine *server, RadialBlurMain *plugin); + void process_package(LoadPackage *package); + RadialBlurEngine *server; + RadialBlurMain *plugin; +}; + +class RadialBlurEngine : public LoadServer +{ +public: + RadialBlurEngine(RadialBlurMain *plugin, + int total_clients, + int total_packages); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + RadialBlurMain *plugin; +}; + +#endif diff --git a/cinelerra-5.1/plugins/wave/wave.C b/cinelerra-5.1/plugins/wave/wave.C index 03f537f0..99e6dc43 100644 --- a/cinelerra-5.1/plugins/wave/wave.C +++ b/cinelerra-5.1/plugins/wave/wave.C @@ -19,196 +19,22 @@ * */ -#include "bcdisplayinfo.h" -#include "clip.h" -#include "bchash.h" -#include "filexml.h" -#include "guicast.h" -#include "keyframe.h" -#include "language.h" -#include "loadbalance.h" -#include "pluginvclient.h" -#include "vframe.h" +#include "wave.h" -#include -#include -#include -#define SMEAR 0 -#define BLACKEN 1 -class WaveEffect; -class WaveWindow; - - -class WaveConfig -{ -public: - WaveConfig(); - void copy_from(WaveConfig &src); - int equivalent(WaveConfig &src); - void interpolate(WaveConfig &prev, - WaveConfig &next, - long prev_frame, - long next_frame, - long current_frame); - int mode; - int reflective; - float amplitude; - float phase; - float wavelength; -}; - -class WaveSmear : public BC_Radial -{ -public: - WaveSmear(WaveEffect *plugin, WaveWindow *window, int x, int y); - int handle_event(); - WaveEffect *plugin; - WaveWindow *window; -}; - -class WaveBlacken : public BC_Radial -{ -public: - WaveBlacken(WaveEffect *plugin, WaveWindow *window, int x, int y); - int handle_event(); - WaveEffect *plugin; - WaveWindow *window; -}; - - -class WaveReflective : public BC_CheckBox -{ -public: - WaveReflective(WaveEffect *plugin, int x, int y); - int handle_event(); - WaveEffect *plugin; -}; - -class WaveAmplitude : public BC_FSlider -{ -public: - WaveAmplitude(WaveEffect *plugin, int x, int y); - int handle_event(); - WaveEffect *plugin; -}; - -class WavePhase : public BC_FSlider -{ -public: - WavePhase(WaveEffect *plugin, int x, int y); - int handle_event(); - WaveEffect *plugin; -}; - -class WaveLength : public BC_FSlider -{ -public: - WaveLength(WaveEffect *plugin, int x, int y); - int handle_event(); - WaveEffect *plugin; -}; - - - - - - - - - -class WaveWindow : public PluginClientWindow -{ -public: - WaveWindow(WaveEffect *plugin); - ~WaveWindow(); - void create_objects(); - void update_mode(); - WaveEffect *plugin; -// WaveSmear *smear; -// WaveBlacken *blacken; -// WaveReflective *reflective; - WaveAmplitude *amplitude; - WavePhase *phase; - WaveLength *wavelength; -}; - - - - - - - -class WaveServer : public LoadServer -{ -public: - WaveServer(WaveEffect *plugin, int cpus); - void init_packages(); - LoadClient* new_client(); - LoadPackage* new_package(); - WaveEffect *plugin; -}; - -class WavePackage : public LoadPackage -{ -public: - WavePackage(); - int row1, row2; -}; - -class WaveUnit : public LoadClient -{ -public: - WaveUnit(WaveEffect *plugin, WaveServer *server); - void process_package(LoadPackage *package); - WaveEffect *plugin; -}; - - - - - - - - - -class WaveEffect : public PluginVClient +WaveConfig::WaveConfig() { -public: - WaveEffect(PluginServer *server); - ~WaveEffect(); - - PLUGIN_CLASS_MEMBERS(WaveConfig) - int process_realtime(VFrame *input, VFrame *output); - int is_realtime(); - void save_data(KeyFrame *keyframe); - void read_data(KeyFrame *keyframe); - void update_gui(); - - VFrame *temp_frame; - VFrame *input, *output; - WaveServer *engine; -}; - - - - - - - - - - - + reset(); +} -WaveConfig::WaveConfig() +void WaveConfig::reset() { mode = SMEAR; reflective = 0; @@ -367,7 +193,22 @@ int WaveLength::handle_event() return 1; } - +WaveReset::WaveReset(WaveEffect *plugin, WaveWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} +WaveReset::~WaveReset() +{ +} +int WaveReset::handle_event() +{ + plugin->config.reset(); + gui->update(); + plugin->send_configure_change(); + return 1; +} @@ -376,7 +217,7 @@ int WaveLength::handle_event() WaveWindow::WaveWindow(WaveEffect *plugin) - : PluginClientWindow(plugin, 335, 150, 335, 150, 0) + : PluginClientWindow(plugin, 335, 140, 335, 140, 0) { this->plugin = plugin; } @@ -404,6 +245,8 @@ void WaveWindow::create_objects() y += 30; add_subwindow(new BC_Title(x, y, _("Wavelength:"))); add_subwindow(wavelength = new WaveLength(plugin, x1, y)); + y += 40; + add_subwindow(reset = new WaveReset(plugin, this, x, y)); show_window(); flush(); @@ -415,6 +258,16 @@ void WaveWindow::update_mode() // blacken->update(plugin->config.mode == BLACKEN); } +// for Reset button +void WaveWindow::update() +{ + amplitude->update(plugin->config.amplitude); + phase->update(plugin->config.phase); + wavelength->update(plugin->config.wavelength); +} + + + diff --git a/cinelerra-5.1/plugins/wave/wave.h b/cinelerra-5.1/plugins/wave/wave.h new file mode 100644 index 00000000..99d11d34 --- /dev/null +++ b/cinelerra-5.1/plugins/wave/wave.h @@ -0,0 +1,217 @@ + +/* + * 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 + * + */ + +#ifndef WAVE_H +#define WAVE_H + + +#include "bcdisplayinfo.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "guicast.h" +#include "keyframe.h" +#include "language.h" +#include "loadbalance.h" +#include "pluginvclient.h" +#include "vframe.h" + +#include +#include +#include + + + + +#define SMEAR 0 +#define BLACKEN 1 + + + +class WaveEffect; +class WaveWindow; +class WaveReset; + +class WaveConfig +{ +public: + WaveConfig(); + + void reset(); + void copy_from(WaveConfig &src); + int equivalent(WaveConfig &src); + void interpolate(WaveConfig &prev, + WaveConfig &next, + long prev_frame, + long next_frame, + long current_frame); + int mode; + int reflective; + float amplitude; + float phase; + float wavelength; +}; + +class WaveSmear : public BC_Radial +{ +public: + WaveSmear(WaveEffect *plugin, WaveWindow *window, int x, int y); + int handle_event(); + WaveEffect *plugin; + WaveWindow *window; +}; + +class WaveBlacken : public BC_Radial +{ +public: + WaveBlacken(WaveEffect *plugin, WaveWindow *window, int x, int y); + int handle_event(); + WaveEffect *plugin; + WaveWindow *window; +}; + + +class WaveReflective : public BC_CheckBox +{ +public: + WaveReflective(WaveEffect *plugin, int x, int y); + int handle_event(); + WaveEffect *plugin; +}; + +class WaveAmplitude : public BC_FSlider +{ +public: + WaveAmplitude(WaveEffect *plugin, int x, int y); + int handle_event(); + WaveEffect *plugin; +}; + +class WavePhase : public BC_FSlider +{ +public: + WavePhase(WaveEffect *plugin, int x, int y); + int handle_event(); + WaveEffect *plugin; +}; + +class WaveLength : public BC_FSlider +{ +public: + WaveLength(WaveEffect *plugin, int x, int y); + int handle_event(); + WaveEffect *plugin; +}; + +class WaveReset : public BC_GenericButton +{ +public: + WaveReset(WaveEffect *plugin, WaveWindow *gui, int x, int y); + ~WaveReset(); + int handle_event(); + WaveEffect *plugin; + WaveWindow *gui; +}; + + + + + + + +class WaveWindow : public PluginClientWindow +{ +public: + WaveWindow(WaveEffect *plugin); + ~WaveWindow(); + void create_objects(); + void update_mode(); + void update(); + + WaveEffect *plugin; +// WaveSmear *smear; +// WaveBlacken *blacken; +// WaveReflective *reflective; + WaveAmplitude *amplitude; + WavePhase *phase; + WaveLength *wavelength; + WaveReset *reset; +}; + + + + + + + +class WaveServer : public LoadServer +{ +public: + WaveServer(WaveEffect *plugin, int cpus); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + WaveEffect *plugin; +}; + +class WavePackage : public LoadPackage +{ +public: + WavePackage(); + int row1, row2; +}; + +class WaveUnit : public LoadClient +{ +public: + WaveUnit(WaveEffect *plugin, WaveServer *server); + void process_package(LoadPackage *package); + WaveEffect *plugin; +}; + + + + + + + + + +class WaveEffect : public PluginVClient +{ +public: + WaveEffect(PluginServer *server); + ~WaveEffect(); + + PLUGIN_CLASS_MEMBERS(WaveConfig) + int process_realtime(VFrame *input, VFrame *output); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); + + VFrame *temp_frame; + VFrame *input, *output; + WaveServer *engine; +}; + +#endif + diff --git a/cinelerra-5.1/plugins/whirl/whirl.C b/cinelerra-5.1/plugins/whirl/whirl.C index af514fe7..01d5ee04 100644 --- a/cinelerra-5.1/plugins/whirl/whirl.C +++ b/cinelerra-5.1/plugins/whirl/whirl.C @@ -38,6 +38,7 @@ class WhirlEffect; class WhirlWindow; class WhirlEngine; +class WhirlReset; #define MAXRADIUS 100 #define MAXPINCH 100 @@ -51,6 +52,7 @@ class WhirlConfig { public: WhirlConfig(); + void reset(); void copy_from(WhirlConfig &src); int equivalent(WhirlConfig &src); @@ -94,15 +96,29 @@ public: WhirlEffect *plugin; }; + +class WhirlReset : public BC_GenericButton +{ +public: + WhirlReset(WhirlEffect *plugin, WhirlWindow *window, int x, int y); + ~WhirlReset(); + int handle_event(); + WhirlEffect *plugin; + WhirlWindow *window; +}; + + class WhirlWindow : public PluginClientWindow { public: WhirlWindow(WhirlEffect *plugin); void create_objects(); + void update(); WhirlEffect *plugin; WhirlRadius *radius; WhirlPinch *pinch; WhirlAngle *angle; + WhirlReset *reset; }; @@ -178,13 +194,16 @@ REGISTER_PLUGIN(WhirlEffect) - - WhirlConfig::WhirlConfig() { - angle = 0.0; - pinch = 0.0; - radius = 0.0; + reset(); +} + +void WhirlConfig::reset() +{ + angle = 180.0; // 0.0; + pinch = 10.0; // 0.0; + radius = 50.0; // 0.0; } void WhirlConfig::copy_from(WhirlConfig &src) @@ -227,9 +246,9 @@ void WhirlConfig::interpolate(WhirlConfig &prev, WhirlWindow::WhirlWindow(WhirlEffect *plugin) : PluginClientWindow(plugin, 220, - 200, + 195, 220, - 200, + 195, 0) { this->plugin = plugin; @@ -243,21 +262,29 @@ void WhirlWindow::create_objects() add_subwindow(new BC_Title(x, y, _("Radius"))); y += 20; add_subwindow(radius = new WhirlRadius(plugin, x, y)); - y += 40; + y += 30; add_subwindow(new BC_Title(x, y, _("Pinch"))); y += 20; add_subwindow(pinch = new WhirlPinch(plugin, x, y)); - y += 40; + y += 30; add_subwindow(new BC_Title(x, y, _("Angle"))); y += 20; add_subwindow(angle = new WhirlAngle(plugin, x, y)); + y += 35; + add_subwindow(reset = new WhirlReset(plugin, this, x, y)); show_window(); flush(); } - +// for Reset button +void WhirlWindow::update() +{ + radius->update(plugin->config.radius); + pinch->update(plugin->config.pinch); + angle->update(plugin->config.angle); +} @@ -334,6 +361,23 @@ int WhirlRadius::handle_event() +WhirlReset::WhirlReset(WhirlEffect *plugin, WhirlWindow *window, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->window = window; +} +WhirlReset::~WhirlReset() +{ +} +int WhirlReset::handle_event() +{ + plugin->config.reset(); + window->update(); + plugin->send_configure_change(); + return 1; +} + diff --git a/cinelerra-5.1/plugins/zoomblur/zoomblur.C b/cinelerra-5.1/plugins/zoomblur/zoomblur.C index 83367087..ad67e540 100644 --- a/cinelerra-5.1/plugins/zoomblur/zoomblur.C +++ b/cinelerra-5.1/plugins/zoomblur/zoomblur.C @@ -19,180 +19,8 @@ * */ -#include -#include -#include - -#include "bcdisplayinfo.h" -#include "bcsignals.h" -#include "clip.h" -#include "bchash.h" -#include "filexml.h" -#include "keyframe.h" -#include "language.h" -#include "loadbalance.h" -#include "pluginvclient.h" -#include "vframe.h" - - - -class ZoomBlurMain; -class ZoomBlurEngine; - - - - - -class ZoomBlurConfig -{ -public: - ZoomBlurConfig(); - - int equivalent(ZoomBlurConfig &that); - void copy_from(ZoomBlurConfig &that); - void interpolate(ZoomBlurConfig &prev, - ZoomBlurConfig &next, - long prev_frame, - long next_frame, - long current_frame); - - int x; - int y; - int radius; - int steps; - int r; - int g; - int b; - int a; -}; - - - -class ZoomBlurSize : public BC_ISlider -{ -public: - ZoomBlurSize(ZoomBlurMain *plugin, - int x, - int y, - int *output, - int min, - int max); - int handle_event(); - ZoomBlurMain *plugin; - int *output; -}; - -class ZoomBlurToggle : public BC_CheckBox -{ -public: - ZoomBlurToggle(ZoomBlurMain *plugin, - int x, - int y, - int *output, - char *string); - int handle_event(); - ZoomBlurMain *plugin; - int *output; -}; - -class ZoomBlurWindow : public PluginClientWindow -{ -public: - ZoomBlurWindow(ZoomBlurMain *plugin); - ~ZoomBlurWindow(); - - void create_objects(); - - ZoomBlurSize *x, *y, *radius, *steps; - ZoomBlurToggle *r, *g, *b, *a; - ZoomBlurMain *plugin; -}; - - - - - -// Output coords for a layer of blurring -// Used for OpenGL only -class ZoomBlurLayer -{ -public: - ZoomBlurLayer() {}; - float x1, y1, x2, y2; -}; - -class ZoomBlurMain : public PluginVClient -{ -public: - ZoomBlurMain(PluginServer *server); - ~ZoomBlurMain(); - - int process_buffer(VFrame *frame, - int64_t start_position, - double frame_rate); - int is_realtime(); - void save_data(KeyFrame *keyframe); - void read_data(KeyFrame *keyframe); - void update_gui(); - int handle_opengl(); - - PLUGIN_CLASS_MEMBERS(ZoomBlurConfig) - - void delete_tables(); - VFrame *input, *output, *temp; - ZoomBlurEngine *engine; - int **scale_y_table; - int **scale_x_table; - ZoomBlurLayer *layer_table; - int table_entries; - int need_reconfigure; -// The accumulation buffer is needed because 8 bits isn't precise enough - unsigned char *accum; -}; - -class ZoomBlurPackage : public LoadPackage -{ -public: - ZoomBlurPackage(); - int y1, y2; -}; - -class ZoomBlurUnit : public LoadClient -{ -public: - ZoomBlurUnit(ZoomBlurEngine *server, ZoomBlurMain *plugin); - void process_package(LoadPackage *package); - ZoomBlurEngine *server; - ZoomBlurMain *plugin; -}; - -class ZoomBlurEngine : public LoadServer -{ -public: - ZoomBlurEngine(ZoomBlurMain *plugin, - int total_clients, - int total_packages); - void init_packages(); - LoadClient* new_client(); - LoadPackage* new_package(); - ZoomBlurMain *plugin; -}; - - - - - - - - - - - - - - - +#include "zoomblur.h" @@ -201,6 +29,11 @@ REGISTER_PLUGIN(ZoomBlurMain) ZoomBlurConfig::ZoomBlurConfig() +{ + reset(); +} + +void ZoomBlurConfig::reset() { x = 50; y = 50; @@ -269,9 +102,9 @@ void ZoomBlurConfig::interpolate(ZoomBlurConfig &prev, ZoomBlurWindow::ZoomBlurWindow(ZoomBlurMain *plugin) : PluginClientWindow(plugin, 230, - 340, + 370, 230, - 340, + 370, 0) { this->plugin = plugin; @@ -308,13 +141,25 @@ void ZoomBlurWindow::create_objects() add_subwindow(b = new ZoomBlurToggle(plugin, x, y, &plugin->config.b, _("Blue"))); y += 30; add_subwindow(a = new ZoomBlurToggle(plugin, x, y, &plugin->config.a, _("Alpha"))); - y += 30; + y += 40; + add_subwindow(reset = new ZoomBlurReset(plugin, this, x, y)); show_window(); flush(); } - +// for Reset button +void ZoomBlurWindow::update() +{ + this->x->update(plugin->config.x); + this->y->update(plugin->config.x); + radius->update(plugin->config.radius); + steps->update(plugin->config.steps); + r->update(plugin->config.r); + g->update(plugin->config.g); + b->update(plugin->config.b); + a->update(plugin->config.a); +} @@ -368,8 +213,22 @@ int ZoomBlurSize::handle_event() } - - +ZoomBlurReset::ZoomBlurReset(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->window = window; +} +ZoomBlurReset::~ZoomBlurReset() +{ +} +int ZoomBlurReset::handle_event() +{ + plugin->config.reset(); + window->update(); + plugin->send_configure_change(); + return 1; +} diff --git a/cinelerra-5.1/plugins/zoomblur/zoomblur.h b/cinelerra-5.1/plugins/zoomblur/zoomblur.h new file mode 100644 index 00000000..32a00f1c --- /dev/null +++ b/cinelerra-5.1/plugins/zoomblur/zoomblur.h @@ -0,0 +1,195 @@ + +/* + * 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 + * + */ + +#ifndef ZOOMBLUR_H +#define ZOOMBLUR_H + + +#include "bcdisplayinfo.h" +#include "bcsignals.h" +#include "clip.h" +#include "bchash.h" +#include "filexml.h" +#include "keyframe.h" +#include "language.h" +#include "loadbalance.h" +#include "pluginvclient.h" +#include "vframe.h" + + + +class ZoomBlurMain; +class ZoomBlurWindow; +class ZoomBlurEngine; +class ZoomBlurReset; + + + + +class ZoomBlurConfig +{ +public: + ZoomBlurConfig(); + + void reset(); + int equivalent(ZoomBlurConfig &that); + void copy_from(ZoomBlurConfig &that); + void interpolate(ZoomBlurConfig &prev, + ZoomBlurConfig &next, + long prev_frame, + long next_frame, + long current_frame); + + int x; + int y; + int radius; + int steps; + int r; + int g; + int b; + int a; +}; + + + +class ZoomBlurSize : public BC_ISlider +{ +public: + ZoomBlurSize(ZoomBlurMain *plugin, + int x, + int y, + int *output, + int min, + int max); + int handle_event(); + ZoomBlurMain *plugin; + int *output; +}; + +class ZoomBlurToggle : public BC_CheckBox +{ +public: + ZoomBlurToggle(ZoomBlurMain *plugin, + int x, + int y, + int *output, + char *string); + int handle_event(); + ZoomBlurMain *plugin; + int *output; +}; + +class ZoomBlurWindow : public PluginClientWindow +{ +public: + ZoomBlurWindow(ZoomBlurMain *plugin); + ~ZoomBlurWindow(); + + void create_objects(); + void update(); + + ZoomBlurSize *x, *y, *radius, *steps; + ZoomBlurToggle *r, *g, *b, *a; + ZoomBlurMain *plugin; + ZoomBlurReset *reset; +}; + +class ZoomBlurReset : public BC_GenericButton +{ +public: + ZoomBlurReset(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y); + ~ZoomBlurReset(); + int handle_event(); + ZoomBlurMain *plugin; + ZoomBlurWindow *window; +}; + + + + +// Output coords for a layer of blurring +// Used for OpenGL only +class ZoomBlurLayer +{ +public: + ZoomBlurLayer() {}; + float x1, y1, x2, y2; +}; + +class ZoomBlurMain : public PluginVClient +{ +public: + ZoomBlurMain(PluginServer *server); + ~ZoomBlurMain(); + + int process_buffer(VFrame *frame, + int64_t start_position, + double frame_rate); + int is_realtime(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); + void update_gui(); + int handle_opengl(); + + PLUGIN_CLASS_MEMBERS(ZoomBlurConfig) + + void delete_tables(); + VFrame *input, *output, *temp; + ZoomBlurEngine *engine; + int **scale_y_table; + int **scale_x_table; + ZoomBlurLayer *layer_table; + int table_entries; + int need_reconfigure; +// The accumulation buffer is needed because 8 bits isn't precise enough + unsigned char *accum; +}; + +class ZoomBlurPackage : public LoadPackage +{ +public: + ZoomBlurPackage(); + int y1, y2; +}; + +class ZoomBlurUnit : public LoadClient +{ +public: + ZoomBlurUnit(ZoomBlurEngine *server, ZoomBlurMain *plugin); + void process_package(LoadPackage *package); + ZoomBlurEngine *server; + ZoomBlurMain *plugin; +}; + +class ZoomBlurEngine : public LoadServer +{ +public: + ZoomBlurEngine(ZoomBlurMain *plugin, + int total_clients, + int total_packages); + void init_packages(); + LoadClient* new_client(); + LoadPackage* new_package(); + ZoomBlurMain *plugin; +}; + + +#endif diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 2da7d7ee..36101b97 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -168,7 +168,7 @@ lame.cfg_params?=--enable-shared=no lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame mjpegtools.cflags?="$(call inc_path,libjpeg) $(call ld_path,libjpeg,.libs)" mjpegtools.mak_params?=; ln -s . $(call bld_path,mjpegtools,utils)/mjpegtools -mjpegtools.cfg_params?= --enable-shared=no --without-libsdl +mjpegtools.cfg_params?= --enable-shared=no --without-libsdl --without-v4l ladspa.cfg_vars?= CFLAGS+=' -Dinline="" ' ladspa.mak_params?=; $(MAKE) -C ladspa* install DESTDIR=$(call bld_path,ladspa) libavc1394.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394)