Added 2 new effects, Changed order of parameters of

all effect that have a color key parameter.
(r = p0, g = p1, b = p2 ). Also some bugs were fixed
and default values have been changed of various effects.



git-svn-id: svn://code.dyne.org/veejay/trunk@274 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2005-04-08 19:47:52 +00:00
parent 4674ec8104
commit 8ccbfa1de7
28 changed files with 1134 additions and 507 deletions

View File

@@ -58,10 +58,11 @@ vj_effect *complexthreshold_init(int w, int h)
ve->limits[1][5] = 255;
ve->limits[0][4] = 0;
ve->limits[1][4] = 4;
ve->description = "Complex Threshold";
ve->description = "Complex Threshold (fixme)";
ve->extra_frame = 1;
ve->sub_format = 1;
ve->has_user = 0;
ve->rgb_conv = 1;
return ve;
}
@@ -131,10 +132,12 @@ void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int width,
uint8_t *Y2 = frame2->data[0];
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int iy,iv,iu;
_rgb2yuv(r,g,b,iy,iu,iv);
_y = (float)iy;
aa = (float)iu;
bb = (float)iv;
_y = ((Y_Redco * r) + (Y_Greenco * g) + (Y_Blueco * b) + 16);
aa = ((Y_Redco * r) - (U_Greenco * g) - (U_Blueco * b) + 128);
bb = (-(Y_Redco * r) - (V_Greenco * g) + (V_Blueco * b) + 128);
tmp = sqrt(((aa * aa) + (bb * bb)));
cb = 127 * (aa / tmp);
cr = 127 * (bb / tmp);
@@ -150,13 +153,13 @@ void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int width,
kg = kg1;
/* intialize pointers */
fg_y = Y;
fg_cb = Cb;
fg_cr = Cr;
fg_y = Y2;
fg_cb = Cb2;
fg_cr = Cr2;
bg_y = Y2;
bg_cb = Cb2;
bg_cr = Cr2;
bg_y = Y;
bg_cb = Cb;
bg_cr = Cr;
for (pos = width + 1; pos < (len) - width - 1; pos++) {
int i = 0;