/*
* 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 "clip.h"
#include "effecttv.h"
#include "filexml.h"
#include "language.h"
-#include "cicolors.h"
+#include "bccolors.h"
#include "burn.h"
#include "burnwindow.h"
burn_server = 0;
buffer = 0;
effecttv = 0;
- yuv = new YUV;
-
}
BurnMain::~BurnMain()
{
-
+
if(buffer) delete [] buffer;
if(burn_server) delete burn_server;
if(effecttv) delete effecttv;
- if(yuv) delete yuv;
}
-const char* BurnMain::plugin_title() { return _("BurningTV"); }
+const char* BurnMain::plugin_title() { return N_("BurningTV"); }
int BurnMain::is_realtime() { return 1; }
#define MAXCOLOR 120
-void BurnMain::HSItoRGB(double H,
- double S,
- double I,
- int *r,
- int *g,
+void BurnMain::HSItoRGB(double H,
+ double S,
+ double I,
+ int *r,
+ int *g,
int *b,
int color_model)
{
for(i = 0; i < MAXCOLOR; i++)
{
- HSItoRGB(4.6 - 1.5 * i / MAXCOLOR,
- (double)i / MAXCOLOR,
- (double)i / MAXCOLOR,
- &r,
- &g,
- &b,
+ HSItoRGB(4.6 - 1.5 * i / MAXCOLOR,
+ (double)i / MAXCOLOR,
+ (double)i / MAXCOLOR,
+ &r,
+ &g,
+ &b,
color_model);
palette[0][i] = r;
palette[1][i] = g;
}
-LoadClient* BurnServer::new_client()
+LoadClient* BurnServer::new_client()
{
return new BurnClient(this);
}
-LoadPackage* BurnServer::new_package()
-{
- return new BurnPackage;
+LoadPackage* BurnServer::new_package()
+{
+ return new BurnPackage;
}
b1 = plugin->palette[0][plugin->buffer[i]]; \
b2 = plugin->palette[1][plugin->buffer[i]]; \
b3 = plugin->palette[2][plugin->buffer[i]]; \
- if(is_yuv) plugin->yuv->yuv_to_rgb_8(a1, a2, a3); \
+ if(is_yuv) YUV::yuv.yuv_to_rgb_8(a1, a2, a3); \
a1 += b1; \
a2 += b2; \
a3 += b3; \
CLAMP(a1, 0, 0xff); \
CLAMP(a2, 0, 0xff); \
CLAMP(a3, 0, 0xff); \
- plugin->yuv->rgb_to_yuv_8(a1, a2, a3); \
+ YUV::yuv.rgb_to_yuv_8(a1, a2, a3); \
} \
rows[0][i * components + 0] = a1 | (a1 << 8); \
rows[0][i * components + 1] = a2 | (a2 << 8); \
b1 = plugin->palette[0][plugin->buffer[i]]; \
b2 = plugin->palette[1][plugin->buffer[i]]; \
b3 = plugin->palette[2][plugin->buffer[i]]; \
- if(is_yuv) plugin->yuv->yuv_to_rgb_8(a1, a2, a3); \
+ if(is_yuv) YUV::yuv.yuv_to_rgb_8(a1, a2, a3); \
a1 += b1; \
a2 += b2; \
a3 += b3; \
CLAMP(a1, 0, 0xff); \
CLAMP(a2, 0, 0xff); \
CLAMP(a3, 0, 0xff); \
- plugin->yuv->rgb_to_yuv_8(a1, a2, a3); \
+ YUV::yuv.rgb_to_yuv_8(a1, a2, a3); \
} \
rows[0][i * components + 0] = a1; \
rows[0][i * components + 1] = a2; \
int a1, a2, a3;
int b1, b2, b3;
- diff = plugin->effecttv->image_bgsubtract_y(input_rows,
+ diff = plugin->effecttv->image_bgsubtract_y(input_rows,
plugin->input_ptr->get_color_model());
for(x = 1; x < width - 1; x++)
}
}
- for(x = 1; x < width - 1; x++)
+ for(x = 1; x < width - 1; x++)
{
i = width + x;
- for(y = 1; y < height; y++)
+ for(y = 1; y < height; y++)
{
int v = plugin->buffer[i];
if(v < plugin->config.decay)
plugin->buffer[i - width] = 0;
else
- plugin->buffer[i - width + EffectTV::fastrand() % 3 - 1] =
+ plugin->buffer[i - width + EffectTV::fastrand() % 3 - 1] =
v - (EffectTV::fastrand() & plugin->config.decay);
i += width;