projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bg/clr color tweaks, clear borders rework, fc31 depends
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
plugins
/
yuv411
/
yuv411win.C
diff --git
a/cinelerra-5.1/plugins/yuv411/yuv411win.C
b/cinelerra-5.1/plugins/yuv411/yuv411win.C
index 6b72929189db2749b87a5d4a078d2e1498a90bf9..e80f1439fa6ecc4f5c3b755b9c7032d019c503dc 100644
(file)
--- a/
cinelerra-5.1/plugins/yuv411/yuv411win.C
+++ b/
cinelerra-5.1/plugins/yuv411/yuv411win.C
@@
-1,11
+1,14
@@
#include "bcdisplayinfo.h"
#include "bcdisplayinfo.h"
+#include "edl.h"
+#include "edlsession.h"
#include "yuv411win.h"
#include "language.h"
yuv411Window::yuv411Window(yuv411Main *client)
#include "yuv411win.h"
#include "language.h"
yuv411Window::yuv411Window(yuv411Main *client)
- : PluginClientWindow(client,
250, 255, 250, 255
, 0)
+ : PluginClientWindow(client,
xS(260), yS(250), xS(260), yS(250)
, 0)
{
this->client = client;
{
this->client = client;
+ colormodel = -1;
}
yuv411Window::~yuv411Window()
}
yuv411Window::~yuv411Window()
@@
-14,41
+17,51
@@
yuv411Window::~yuv411Window()
void yuv411Window::create_objects()
{
void yuv411Window::create_objects()
{
- int x = 10, y = 10, x1=90;
+ int xs10 = xS(10), xs90 = xS(90);
+ int ys10 = yS(10), ys30 = yS(30);
+ int x = xs10, y = ys10, x1=xs90;
add_tool(avg_vertical = new yuv411Toggle(client,
&(client->config.avg_vertical),
_("Vertical average"),
x,
y));
add_tool(avg_vertical = new yuv411Toggle(client,
&(client->config.avg_vertical),
_("Vertical average"),
x,
y));
- y += 30;
+ y +=
ys
30;
add_tool(int_horizontal = new yuv411Toggle(client,
&(client->config.int_horizontal),
_("Horizontal interpolate"),
x,
y));
add_tool(int_horizontal = new yuv411Toggle(client,
&(client->config.int_horizontal),
_("Horizontal interpolate"),
x,
y));
- y += 30;
+ y +=
ys
30;
add_tool(inpainting = new yuv411Toggle(client,
&(client->config.inpainting),
_("Inpainting method"),
x,
y));
add_tool(inpainting = new yuv411Toggle(client,
&(client->config.inpainting),
_("Inpainting method"),
x,
y));
- y += 30;
+ y +=
ys
30;
add_subwindow(new BC_Title(x, y, _("Offset:")));
add_subwindow(offset=new yuv411Offset(client,x1,y));
add_subwindow(new BC_Title(x, y, _("Offset:")));
add_subwindow(offset=new yuv411Offset(client,x1,y));
- y += 30;
+ y +=
ys
30;
add_subwindow(new BC_Title(x, y, _("Threshold:")));
add_subwindow(thresh=new yuv411Thresh(client,x1,y));
add_subwindow(new BC_Title(x, y, _("Threshold:")));
add_subwindow(thresh=new yuv411Thresh(client,x1,y));
- y += 30;
+ y +=
ys
30;
add_subwindow(new BC_Title(x, y, _("Bias:")));
add_subwindow(bias=new yuv411Bias(client,x1,y));
add_subwindow(new BC_Title(x, y, _("Bias:")));
add_subwindow(bias=new yuv411Bias(client,x1,y));
- y += 30;
- add_subwindow(reset = new yuv411Reset(client, this, x, y+35));
+ y += ys30;
+ int y1 = get_h() - yuv411Reset::calculate_h() - yS(20);
+ add_subwindow(reset = new yuv411Reset(client, this, x, y1+ys10));
show_window();
flush();
yuv_warning = new BC_Title(x, y, _("Warning: colormodel not YUV"),MEDIUMFONT,RED);
add_subwindow(yuv_warning);
show_window();
flush();
yuv_warning = new BC_Title(x, y, _("Warning: colormodel not YUV"),MEDIUMFONT,RED);
add_subwindow(yuv_warning);
- yuv_warning->hide_window();
+ EDL *edl = client->get_edl();
+ colormodel = edl->session->color_model;
+ switch( colormodel ) {
+ case BC_YUV888:
+ case BC_YUVA8888:
+ yuv_warning->hide_window();
+ break;
+ }
}
void yuv411Window::update()
}
void yuv411Window::update()
@@
-85,7
+98,7
@@
int yuv411Toggle::handle_event()
}
yuv411Offset::yuv411Offset(yuv411Main *client, int x, int y)
}
yuv411Offset::yuv411Offset(yuv411Main *client, int x, int y)
- : BC_FSlider(x
, y, 0, 100, 100
, (float)0, (float)2,
+ : BC_FSlider(x
+xS(60), y, 0, xS(100), yS(100)
, (float)0, (float)2,
(float)client->config.offset)
{
this->client = client;
(float)client->config.offset)
{
this->client = client;
@@
-99,7
+112,7
@@
int yuv411Offset::handle_event()
}
yuv411Thresh::yuv411Thresh(yuv411Main *client, int x, int y)
}
yuv411Thresh::yuv411Thresh(yuv411Main *client, int x, int y)
- : BC_FSlider(x
, y, 0, 100, 100
, (float)1, (float)100,
+ : BC_FSlider(x
+xS(60), y, 0, xS(100), yS(100)
, (float)1, (float)100,
(float)client->config.thresh)
{
this->client = client;
(float)client->config.thresh)
{
this->client = client;
@@
-113,7
+126,7
@@
int yuv411Thresh::handle_event()
}
yuv411Bias::yuv411Bias(yuv411Main *client, int x, int y)
}
yuv411Bias::yuv411Bias(yuv411Main *client, int x, int y)
- : BC_FSlider(x
, y, 0, 100, 100
, (float)0, (float)25,
+ : BC_FSlider(x
+xS(60), y, 0, xS(100), yS(100)
, (float)0, (float)25,
(float)client->config.bias)
{
this->client = client;
(float)client->config.bias)
{
this->client = client;
@@
-179,4
+192,3
@@
void yuv411Window::show_warning(int warn)
yuv_warning->hide_window();
}
yuv_warning->hide_window();
}
-