82 unsigned char **rect1,
83 unsigned char **rect2,
84 unsigned char **rect3,
85 unsigned char **rect_out)
87 int offset = 4 * start_line *
context->rectx;
89 *rect1 = (
unsigned char *)ibuf1->
rect + offset;
90 *rect_out = (
unsigned char *)out->
rect + offset;
93 *rect2 = (
unsigned char *)ibuf2->
rect + offset;
97 *rect3 = (
unsigned char *)ibuf3->
rect + offset;
112 int offset = 4 * start_line *
context->rectx;
145 if (!ibuf1 && !ibuf2 && !ibuf3) {
175 if (ibuf1 && !ibuf1->
rect) {
179 if (ibuf2 && !ibuf2->
rect) {
183 if (ibuf3 && !ibuf3->
rect) {
189 if (ibuf1 !=
NULL && ibuf1 == ibuf2 && ibuf2 == ibuf3) {
211 unsigned char *rect1,
212 unsigned char *rect2,
215 float fac2, mfac, fac, fac4;
217 unsigned char *cp1, *cp2, *rt;
218 float tempc[4], rt1[4], rt2[4];
237 mfac = 1.0f - fac2 * rt1[3];
240 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
242 else if (mfac <= 0.0f) {
243 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
246 tempc[0] = fac * rt1[0] + mfac * rt2[0];
247 tempc[1] = fac * rt1[1] + mfac * rt2[1];
248 tempc[2] = fac * rt1[2] + mfac * rt2[2];
249 tempc[3] = fac * rt1[3] + mfac * rt2[3];
269 mfac = 1.0f - (fac4 * rt1[3]);
272 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
274 else if (mfac <= 0.0f) {
275 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
278 tempc[0] = fac * rt1[0] + mfac * rt2[0];
279 tempc[1] = fac * rt1[1] + mfac * rt2[1];
280 tempc[2] = fac * rt1[2] + mfac * rt2[2];
281 tempc[3] = fac * rt1[3] + mfac * rt2[3];
293 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
295 float fac2, mfac, fac, fac4;
297 float *rt1, *rt2, *rt;
313 mfac = 1.0f - (fac2 * rt1[3]);
316 memcpy(rt, rt2,
sizeof(
float[4]));
318 else if (mfac <= 0) {
319 memcpy(rt, rt1,
sizeof(
float[4]));
322 rt[0] = fac * rt1[0] + mfac * rt2[0];
323 rt[1] = fac * rt1[1] + mfac * rt2[1];
324 rt[2] = fac * rt1[2] + mfac * rt2[2];
325 rt[3] = fac * rt1[3] + mfac * rt2[3];
340 mfac = 1.0f - (fac4 * rt1[3]);
343 memcpy(rt, rt2,
sizeof(
float[4]));
345 else if (mfac <= 0.0f) {
346 memcpy(rt, rt1,
sizeof(
float[4]));
349 rt[0] = fac * rt1[0] + mfac * rt2[0];
350 rt[1] = fac * rt1[1] + mfac * rt2[1];
351 rt[2] = fac * rt1[2] + mfac * rt2[2];
352 rt[3] = fac * rt1[3] + mfac * rt2[3];
363 float UNUSED(timeline_frame),
377 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
382 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
385 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
397 unsigned char *rect1,
398 unsigned char *rect2,
401 float fac2, fac, fac4;
403 unsigned char *cp1, *cp2, *rt;
404 float tempc[4], rt1[4], rt2[4];
424 if (rt2[3] <= 0.0f && fac2 >= 1.0f) {
425 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
427 else if (rt2[3] >= 1.0f) {
428 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
431 fac = (fac2 * (1.0f - rt2[3]));
434 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
437 tempc[0] = (fac * rt1[0] + rt2[0]);
438 tempc[1] = (fac * rt1[1] + rt2[1]);
439 tempc[2] = (fac * rt1[2] + rt2[2]);
440 tempc[3] = (fac * rt1[3] + rt2[3]);
460 if (rt2[3] <= 0.0f && fac4 >= 1.0f) {
461 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
463 else if (rt2[3] >= 1.0f) {
464 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
467 fac = (fac4 * (1.0f - rt2[3]));
470 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
473 tempc[0] = (fac * rt1[0] + rt2[0]);
474 tempc[1] = (fac * rt1[1] + rt2[1]);
475 tempc[2] = (fac * rt1[2] + rt2[2]);
476 tempc[3] = (fac * rt1[3] + rt2[3]);
489 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
491 float fac2, fac, fac4;
493 float *rt1, *rt2, *rt;
511 if (rt2[3] <= 0 && fac2 >= 1.0f) {
512 memcpy(rt, rt1,
sizeof(
float[4]));
514 else if (rt2[3] >= 1.0f) {
515 memcpy(rt, rt2,
sizeof(
float[4]));
518 fac = fac2 * (1.0f - rt2[3]);
521 memcpy(rt, rt2,
sizeof(
float[4]));
524 rt[0] = fac * rt1[0] + rt2[0];
525 rt[1] = fac * rt1[1] + rt2[1];
526 rt[2] = fac * rt1[2] + rt2[2];
527 rt[3] = fac * rt1[3] + rt2[3];
542 if (rt2[3] <= 0 && fac4 >= 1.0f) {
543 memcpy(rt, rt1,
sizeof(
float[4]));
545 else if (rt2[3] >= 1.0f) {
546 memcpy(rt, rt2,
sizeof(
float[4]));
549 fac = fac4 * (1.0f - rt2[3]);
552 memcpy(rt, rt2,
sizeof(
float[4]));
555 rt[0] = fac * rt1[0] + rt2[0];
556 rt[1] = fac * rt1[1] + rt2[1];
557 rt[2] = fac * rt1[2] + rt2[2];
558 rt[3] = fac * rt1[3] + rt2[3];
570 float UNUSED(timeline_frame),
584 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
589 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
592 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
604 unsigned char *rect1,
605 unsigned char *rect2,
608 int fac1, fac2, fac3, fac4;
610 unsigned char *rt1, *rt2, *rt;
617 fac2 = (int)(256.0f * facf0);
619 fac4 = (int)(256.0f * facf1);
625 rt[0] = (fac1 * rt1[0] + fac2 * rt2[0]) >> 8;
626 rt[1] = (fac1 * rt1[1] + fac2 * rt2[1]) >> 8;
627 rt[2] = (fac1 * rt1[2] + fac2 * rt2[2]) >> 8;
628 rt[3] = (fac1 * rt1[3] + fac2 * rt2[3]) >> 8;
642 rt[0] = (fac3 * rt1[0] + fac4 * rt2[0]) >> 8;
643 rt[1] = (fac3 * rt1[1] + fac4 * rt2[1]) >> 8;
644 rt[2] = (fac3 * rt1[2] + fac4 * rt2[2]) >> 8;
645 rt[3] = (fac3 * rt1[3] + fac4 * rt2[3]) >> 8;
655 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
657 float fac1, fac2, fac3, fac4;
659 float *rt1, *rt2, *rt;
674 rt[0] = fac1 * rt1[0] + fac2 * rt2[0];
675 rt[1] = fac1 * rt1[1] + fac2 * rt2[1];
676 rt[2] = fac1 * rt1[2] + fac2 * rt2[2];
677 rt[3] = fac1 * rt1[3] + fac2 * rt2[3];
691 rt[0] = fac3 * rt1[0] + fac4 * rt2[0];
692 rt[1] = fac3 * rt1[1] + fac4 * rt2[1];
693 rt[2] = fac3 * rt1[2] + fac4 * rt2[2];
694 rt[3] = fac3 * rt1[3] + fac4 * rt2[3];
705 float UNUSED(timeline_frame),
719 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
724 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
727 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
740 #define RE_GAMMA_TABLE_SIZE 400
836 float val, igamma = 1.0f / gamma;
840 for (
a = 0;
a < 65536;
a++) {
847 else if (gamma != 1.0f) {
848 val =
powf(val, igamma);
854 for (
a = 1;
a <= 256;
a++) {
858 else if (gamma == 1.0f) {
893 unsigned char *rect1,
894 unsigned char *rect2,
899 unsigned char *cp1, *cp2, *rt;
900 float rt1[4], rt2[4], tempc[4];
951 float facf0,
float UNUSED(facf1),
int x,
int y,
float *rect1,
float *rect2,
float *out)
955 float *rt1, *rt2, *rt;
1003 float UNUSED(timeline_frame),
1017 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1022 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1025 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1037 unsigned char *rect1,
1038 unsigned char *rect2,
1042 unsigned char *cp1, *cp2, *rt;
1049 fac1 = (int)(256.0f * facf0);
1050 fac3 = (int)(256.0f * facf1);
1056 const int m = fac1 * (int)cp2[3];
1057 rt[0] =
min_ii(cp1[0] + ((m * cp2[0]) >> 16), 255);
1058 rt[1] =
min_ii(cp1[1] + ((m * cp2[1]) >> 16), 255);
1059 rt[2] =
min_ii(cp1[2] + ((m * cp2[2]) >> 16), 255);
1074 const int m = fac3 * (int)cp2[3];
1075 rt[0] =
min_ii(cp1[0] + ((m * cp2[0]) >> 16), 255);
1076 rt[1] =
min_ii(cp1[1] + ((m * cp2[1]) >> 16), 255);
1077 rt[2] =
min_ii(cp1[2] + ((m * cp2[2]) >> 16), 255);
1088 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
1092 float *rt1, *rt2, *rt;
1105 const float m = (1.0f - (rt1[3] * (1.0f - fac1))) * rt2[3];
1106 rt[0] = rt1[0] + m * rt2[0];
1107 rt[1] = rt1[1] + m * rt2[1];
1108 rt[2] = rt1[2] + m * rt2[2];
1123 const float m = (1.0f - (rt1[3] * (1.0f - fac3))) * rt2[3];
1124 rt[0] = rt1[0] + m * rt2[0];
1125 rt[1] = rt1[1] + m * rt2[1];
1126 rt[2] = rt1[2] + m * rt2[2];
1138 float UNUSED(timeline_frame),
1152 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1157 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1160 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1172 unsigned char *rect1,
1173 unsigned char *rect2,
1177 unsigned char *cp1, *cp2, *rt;
1184 fac1 = (int)(256.0f * facf0);
1185 fac3 = (int)(256.0f * facf1);
1190 const int m = fac1 * (int)cp2[3];
1191 rt[0] =
max_ii(cp1[0] - ((m * cp2[0]) >> 16), 0);
1192 rt[1] =
max_ii(cp1[1] - ((m * cp2[1]) >> 16), 0);
1193 rt[2] =
max_ii(cp1[2] - ((m * cp2[2]) >> 16), 0);
1208 const int m = fac3 * (int)cp2[3];
1209 rt[0] =
max_ii(cp1[0] - ((m * cp2[0]) >> 16), 0);
1210 rt[1] =
max_ii(cp1[1] - ((m * cp2[1]) >> 16), 0);
1211 rt[2] =
max_ii(cp1[2] - ((m * cp2[2]) >> 16), 0);
1222 float UNUSED(facf0),
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
1226 float *rt1, *rt2, *rt;
1235 fac3_inv = 1.0f - facf1;
1240 const float m = (1.0f - (rt1[3] * fac3_inv)) * rt2[3];
1241 rt[0] =
max_ff(rt1[0] - m * rt2[0], 0.0f);
1242 rt[1] =
max_ff(rt1[1] - m * rt2[1], 0.0f);
1243 rt[2] =
max_ff(rt1[2] - m * rt2[2], 0.0f);
1258 const float m = (1.0f - (rt1[3] * fac3_inv)) * rt2[3];
1259 rt[0] =
max_ff(rt1[0] - m * rt2[0], 0.0f);
1260 rt[1] =
max_ff(rt1[1] - m * rt2[1], 0.0f);
1261 rt[2] =
max_ff(rt1[2] - m * rt2[2], 0.0f);
1273 float UNUSED(timeline_frame),
1287 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1292 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1295 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1311 unsigned char *rect2i,
1312 unsigned char *rect1i,
1313 unsigned char *outi)
1315 int temp, fac, fac1, fac2;
1316 unsigned char *rt1, *rt2, *out;
1324 fac1 = (int)(70.0f * facf0);
1325 fac2 = (int)(70.0f * facf1);
1327 rt2 = rect2i + yoff * 4 *
width;
1339 memcpy(out, rt1,
sizeof(*out) * xoff * 4);
1344 temp = ((fac * rt2[3]) >> 8);
1346 *(out++) =
MAX2(0, *rt1 - temp);
1348 *(out++) =
MAX2(0, *rt1 - temp);
1350 *(out++) =
MAX2(0, *rt1 - temp);
1352 *(out++) =
MAX2(0, *rt1 - temp);
1358 memcpy(out, rt1,
sizeof(*out) * yoff * 4 *
width);
1362 float facf0,
float facf1,
int x,
int y,
float *rect2i,
float *rect1i,
float *outi)
1364 float temp, fac, fac1, fac2;
1365 float *rt1, *rt2, *out;
1373 fac1 = 70.0f * facf0;
1374 fac2 = 70.0f * facf1;
1376 rt2 = rect2i + yoff * 4 *
width;
1388 memcpy(out, rt1,
sizeof(*out) * xoff * 4);
1393 temp = fac * rt2[3];
1395 *(out++) =
MAX2(0.0f, *rt1 - temp);
1397 *(out++) =
MAX2(0.0f, *rt1 - temp);
1399 *(out++) =
MAX2(0.0f, *rt1 - temp);
1401 *(out++) =
MAX2(0.0f, *rt1 - temp);
1407 memcpy(out, rt1,
sizeof(*out) * yoff * 4 *
width);
1416 unsigned char *rect1,
1417 unsigned char *rect2,
1421 unsigned char *rt1, *rt2, *rt;
1428 fac1 = (int)(256.0f * facf0);
1429 fac3 = (int)(256.0f * facf1);
1441 rt[0] = rt1[0] + ((fac1 * rt1[0] * (rt2[0] - 255)) >> 16);
1442 rt[1] = rt1[1] + ((fac1 * rt1[1] * (rt2[1] - 255)) >> 16);
1443 rt[2] = rt1[2] + ((fac1 * rt1[2] * (rt2[2] - 255)) >> 16);
1444 rt[3] = rt1[3] + ((fac1 * rt1[3] * (rt2[3] - 255)) >> 16);
1459 rt[0] = rt1[0] + ((fac3 * rt1[0] * (rt2[0] - 255)) >> 16);
1460 rt[1] = rt1[1] + ((fac3 * rt1[1] * (rt2[1] - 255)) >> 16);
1461 rt[2] = rt1[2] + ((fac3 * rt1[2] * (rt2[2] - 255)) >> 16);
1462 rt[3] = rt1[3] + ((fac3 * rt1[3] * (rt2[3] - 255)) >> 16);
1472 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
float *out)
1476 float *rt1, *rt2, *rt;
1493 rt[0] = rt1[0] + fac1 * rt1[0] * (rt2[0] - 1.0f);
1494 rt[1] = rt1[1] + fac1 * rt1[1] * (rt2[1] - 1.0f);
1495 rt[2] = rt1[2] + fac1 * rt1[2] * (rt2[2] - 1.0f);
1496 rt[3] = rt1[3] + fac1 * rt1[3] * (rt2[3] - 1.0f);
1510 rt[0] = rt1[0] + fac3 * rt1[0] * (rt2[0] - 1.0f);
1511 rt[1] = rt1[1] + fac3 * rt1[1] * (rt2[1] - 1.0f);
1512 rt[2] = rt1[2] + fac3 * rt1[2] * (rt2[2] - 1.0f);
1513 rt[3] = rt1[3] + fac3 * rt1[3] * (rt2[3] - 1.0f);
1524 float UNUSED(timeline_frame),
1538 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1543 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1546 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1554 const unsigned char *src1,
1555 const unsigned char *src2);
1562 unsigned char *rect1,
1563 unsigned char *rect2,
1568 unsigned char *rt1, *rt2, *rt;
1569 unsigned int achannel;
1575 for (
x = xo;
x > 0;
x--) {
1577 rt1[3] = (
unsigned int)achannel * facf0;
1578 blend_function(rt, rt1, rt2);
1589 for (
x = xo;
x > 0;
x--) {
1591 rt1[3] = (
unsigned int)achannel * facf1;
1592 blend_function(rt, rt1, rt2);
1612 float *rt1, *rt2, *rt;
1619 for (
x = xo;
x > 0;
x--) {
1621 rt1[3] = achannel * facf0;
1622 blend_function(rt, rt1, rt2);
1633 for (
x = xo;
x > 0;
x--) {
1635 rt1[3] = achannel * facf1;
1636 blend_function(rt, rt1, rt2);
1647 float facf0,
float facf1,
int x,
int y,
float *rect1,
float *rect2,
int btype,
float *out)
1732 unsigned char *rect1,
1733 unsigned char *rect2,
1814 float UNUSED(timeline_frame),
1827 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1829 facf0, facf1,
context->rectx, total_lines, rect1, rect2, seq->
blend_mode, rect_out);
1832 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1834 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1836 facf0, facf1,
context->rectx, total_lines, rect1, rect2, seq->
blend_mode, rect_out);
1850 data->factor = 1.0f;
1855 float UNUSED(timeline_frame),
1868 facf =
data->factor;
1873 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1875 facf, facf,
context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1878 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1880 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
1882 facf, facf,
context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1935 float posx, posy, hyp, hyp2,
angle, hwidth, b1, b2, b3, pointdist;
1938 float temp1, temp2, temp3, temp4;
1939 int xo = wipezone->
xo;
1940 int yo = wipezone->
yo;
1941 float halfx = xo * 0.5f;
1942 float halfy = yo * 0.5f;
1943 float widthf,
output = 0;
1957 posx = xo - facf0 * xo;
1958 posy = yo - facf0 * yo;
1966 if (
angle == 0.0f) {
1972 b1 = posy - (-
angle) * posx;
2003 facf0 = 1.0f - facf0;
2007 hwidth =
width * 0.5f;
2010 b3 = yo - posy * 0.5f;
2013 hyp =
fabsf(
y - posy * 0.5f);
2014 hyp2 =
fabsf(
y - (yo - posy * 0.5f));
2017 b1 = posy * 0.5f - (-
angle) * posx * 0.5f;
2018 b3 = (yo - posy * 0.5f) - (-
angle) * (xo - posx * 0.5f);
2022 hyp2 =
fabsf(
angle *
x +
y + (-(yo - posy * 0.5f) -
angle * (xo - posx * 0.5f))) *
2028 if (b2 < b1 && b2 < b3) {
2031 else if (b2 > b1 && b2 > b3) {
2035 if (hyp < hwidth && hyp2 > hwidth) {
2038 else if (hyp > hwidth && hyp2 < hwidth) {
2068 if (x <= 0 && y >= 0) {
2071 else if (
x <= 0 &&
y <= 0) {
2074 else if (
x >= 0 &&
y <= 0) {
2079 temp3 = temp1 - (widthf * 0.5f) * facf0;
2080 temp4 = temp1 + (widthf * 0.5f) * (1 - facf0);
2083 temp3 = temp1 - (widthf * 0.5f) * (1 - facf0);
2084 temp4 = temp1 + (widthf * 0.5f) * facf0;
2089 if (temp4 > 2.0f * (
float)
M_PI) {
2093 if (temp2 < temp3) {
2096 else if (temp2 > temp4) {
2100 output = (temp2 - temp3) / (temp4 - temp3);
2102 if (
x == 0 &&
y == 0) {
2125 hwidth =
width * 0.5f;
2127 temp1 = (halfx - (halfx)*facf0);
2128 pointdist =
hypotf(temp1, temp1);
2130 temp2 =
hypotf(halfx -
x, halfy -
y);
2131 if (temp2 > pointdist) {
2186 unsigned char *rect1,
2187 unsigned char *rect2,
2193 unsigned char *cp1, *cp2, *rt;
2203 for (
y = 0;
y < yo;
y++) {
2204 for (
x = 0;
x < xo;
x++) {
2208 float rt1[4], rt2[4], tempc[4];
2213 tempc[0] = rt1[0] * check + rt2[0] * (1 - check);
2214 tempc[1] = rt1[1] * check + rt2[1] * (1 - check);
2215 tempc[2] = rt1[2] * check + rt2[2] * (1 - check);
2216 tempc[3] = rt1[3] * check + rt2[3] * (1 - check);
2265 float *rt1, *rt2, *rt;
2275 for (
y = 0;
y < yo;
y++) {
2276 for (
x = 0;
x < xo;
x++) {
2280 rt[0] = rt1[0] * check + rt2[0] * (1 - check);
2281 rt[1] = rt1[1] * check + rt2[1] * (1 - check);
2282 rt[2] = rt1[2] * check + rt2[2] * (1 - check);
2283 rt[3] = rt1[3] * check + rt2[3] * (1 - check);
2320 float UNUSED(timeline_frame),
2345 (
unsigned char *)ibuf1->
rect,
2346 (
unsigned char *)ibuf2->
rect,
2347 (
unsigned char *)out->
rect);
2415 for (
int yi = start_line; yi < start_line + total_lines; yi++) {
2416 for (
int xi = 0; xi <
x; xi++) {
2418 float xt = xi - translate_x;
2419 float yt = yi - translate_y;
2422 float xr =
c * xt + s * yt;
2423 float yr = -s * xt +
c * yt;
2434 switch (interpolation) {
2451 float UNUSED(timeline_frame),
2463 float scale_x, scale_y, translate_x, translate_y, rotate_radians;
2467 scale_x = scale_y =
transform->ScalexIni;
2481 translate_x =
transform->xIni * rd_s + (
x / 2.0f);
2482 translate_y =
transform->yIni * rd_s + (
y / 2.0f);
2485 translate_x =
x * (
transform->xIni / 100.0f) + (
x / 2.0f);
2486 translate_y =
y * (
transform->yIni / 100.0f) + (
y / 2.0f);
2519 int x,
y, i, fx, fy;
2520 int index, ix, halfWidth;
2521 float fval, k, curColor[4], curColor2[4], weight = 0;
2535 halfWidth = ((quality + 1) * blur);
2536 filter = (
float *)
MEM_mallocN(
sizeof(
float) * halfWidth * 2,
"blurbitmapfilter");
2547 k = -1.0f / (2.0f * (
float)
M_PI * blur * blur);
2549 for (ix = 0; ix < halfWidth; ix++) {
2550 weight = (
float)
exp(k * (ix * ix));
2551 filter[halfWidth - ix] = weight;
2552 filter[halfWidth + ix] = weight;
2558 for (ix = 0; ix < halfWidth * 2; ix++) {
2562 for (ix = 0; ix < halfWidth * 2; ix++) {
2569 for (
x = 0;
x < halfWidth;
x++) {
2574 for (i =
x - halfWidth; i <
x + halfWidth; i++) {
2575 if ((i >= 0) && (i <
width)) {
2576 index = (i +
y *
width) * 4;
2592 for (
x = halfWidth;
x <
width - halfWidth;
x++) {
2595 for (i =
x - halfWidth; i <
x + halfWidth; i++) {
2596 index = (i +
y *
width) * 4;
2613 for (
y = 0;
y < halfWidth;
y++) {
2617 for (i =
y - halfWidth; i <
y + halfWidth; i++) {
2618 if ((i >= 0) && (i <
height)) {
2620 index = (
x + i *
width) * 4;
2637 for (
y = halfWidth;
y <
height - halfWidth;
y++) {
2640 for (i =
y - halfWidth; i <
y + halfWidth; i++) {
2641 index = (
x + i *
width) * 4;
2675 const float *in,
float *out,
int width,
int height,
float threshold,
float boost,
float clamp)
2685 intensity = (in[index +
GlowR] + in[index +
GlowG] + in[index +
GlowB] - threshold);
2686 if (intensity > 0) {
2693 out[index +
GlowR] = 0;
2694 out[index +
GlowG] = 0;
2695 out[index +
GlowB] = 0;
2696 out[index +
GlowA] = 0;
2746 unsigned char *rect1,
2747 unsigned char *
UNUSED(rect2),
2750 float *outbuf, *inbuf;
2753 inbuf =
MEM_mallocN(
sizeof(
float[4]) *
x *
y,
"glow effect input");
2754 outbuf =
MEM_mallocN(
sizeof(
float[4]) *
x *
y,
"glow effect output");
2768 out, outbuf, 4, 0.0f,
IB_PROFILE_SRGB,
IB_PROFILE_SRGB,
false,
x,
y,
x,
x);
2784 float *outbuf = out;
2785 float *inbuf = rect1;
2798 float UNUSED(timeline_frame),
2827 (
unsigned char *)ibuf1->
rect,
2829 (
unsigned char *)out->
rect);
2848 cv->
col[0] = cv->
col[1] = cv->
col[2] = 0.5;
2877 float UNUSED(timeline_frame),
2888 unsigned char *rect;
2894 unsigned char col0[3];
2895 unsigned char col1[3];
2897 col0[0] = facf0 * cv->
col[0] * 255;
2898 col0[1] = facf0 * cv->
col[1] * 255;
2899 col0[2] = facf0 * cv->
col[2] * 255;
2901 col1[0] = facf1 * cv->
col[0] * 255;
2902 col1[1] = facf1 * cv->
col[1] * 255;
2903 col1[2] = facf1 * cv->
col[2] * 255;
2905 rect = (
unsigned char *)out->
rect;
2907 for (
y = 0;
y < out->
y;
y++) {
2908 for (
x = 0;
x < out->
x;
x++, rect += 4) {
2916 for (
x = 0;
x < out->
x;
x++, rect += 4) {
2929 col0[0] = facf0 * cv->
col[0];
2930 col0[1] = facf0 * cv->
col[1];
2931 col0[2] = facf0 * cv->
col[2];
2933 col1[0] = facf1 * cv->
col[0];
2934 col1[1] = facf1 * cv->
col[1];
2935 col1[2] = facf1 * cv->
col[2];
2939 for (
y = 0;
y < out->
y;
y++) {
2940 for (
x = 0;
x < out->
x;
x++, rect_float += 4) {
2941 rect_float[0] = col0[0];
2942 rect_float[1] = col0[1];
2943 rect_float[2] = col0[2];
2944 rect_float[3] = 1.0;
2948 for (
x = 0;
x < out->
x;
x++, rect_float += 4) {
2949 rect_float[0] = col1[0];
2950 rect_float[1] = col1[1];
2951 rect_float[2] = col1[2];
2952 rect_float[3] = 1.0;
2975 float timeline_frame,
3056 float timeline_frame,
3090 v->globalSpeed = 1.0;
3175 float fallback_fac = 1.0f;
3178 int flags =
v->flags;
3183 if ((force ==
false) && (seq->
len ==
v->length) && (
v->frameMap !=
NULL)) {
3194 if (!
v->frameMap ||
v->length != seq->
len) {
3199 v->length = seq->
len;
3201 v->frameMap =
MEM_callocN(
sizeof(
float) *
v->length,
"speedcontrol frameMap");
3227 v->lastValidFrame = 0;
3229 for (timeline_frame = 1; timeline_frame <
v->length; timeline_frame++) {
3234 facf = fallback_fac;
3236 facf *=
v->globalSpeed;
3240 if (cursor >= target_strip_length) {
3241 v->frameMap[timeline_frame] = target_strip_length - 1;
3244 v->frameMap[timeline_frame] = cursor;
3245 v->lastValidFrame = timeline_frame;
3252 v->lastValidFrame = 0;
3253 for (timeline_frame = 0; timeline_frame <
v->length; timeline_frame++) {
3259 facf = fallback_fac;
3263 facf *= target_strip_length;
3265 facf *=
v->globalSpeed;
3267 if (facf >= target_strip_length) {
3268 facf = target_strip_length - 1;
3271 v->lastValidFrame = timeline_frame;
3273 v->frameMap[timeline_frame] = facf;
3281 float timeline_frame,
3303 float timeline_frame)
3311 float timeline_frame,
3327 &cross_effect,
context,
NULL, timeline_frame, facf0, facf1, ibuf1, ibuf2, ibuf3);
3339 float UNUSED(timeline_frame),
3350 int y = total_lines;
3356 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
3362 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
3365 context, ibuf1, ibuf2,
NULL, out, start_line, &rect1, &rect2,
NULL, &rect_out);
3413 if (
data->size_x == 0.0f &&
data->size_y == 0) {
3422 float *gausstab,
sum, val;
3428 gausstab = (
float *)
MEM_mallocN(
sizeof(
float) * n, __func__);
3431 fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
3435 gausstab[i +
size] = val;
3439 for (i = 0; i < n; i++) {
3451 int UNUSED(frame_height),
3452 const unsigned char *rect,
3455 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
3457 const int size_x = (int)(
data->size_x + 0.5f);
3464 for (i = 0; i <
y; i++) {
3465 for (j = 0; j <
x; j++) {
3466 int out_index =
INDEX(j, i);
3467 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
3468 float accum_weight = 0.0f;
3470 for (
int current_x = j - size_x; current_x <= j + size_x; current_x++) {
3471 if (current_x < 0 || current_x >= frame_width) {
3475 int index =
INDEX(current_x, i + start_line);
3476 float weight = gausstab_x[current_x - j + size_x];
3477 accum[0] += rect[index] * weight;
3478 accum[1] += rect[index + 1] * weight;
3479 accum[2] += rect[index + 2] * weight;
3480 accum[3] += rect[index + 3] * weight;
3481 accum_weight += weight;
3484 float inv_accum_weight = 1.0f / accum_weight;
3485 out[out_index + 0] = accum[0] * inv_accum_weight;
3486 out[out_index + 1] = accum[1] * inv_accum_weight;
3487 out[out_index + 2] = accum[2] * inv_accum_weight;
3488 out[out_index + 3] = accum[3] * inv_accum_weight;
3502 const unsigned char *rect,
3505 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
3507 const int size_y = (int)(
data->size_y + 0.5f);
3514 for (i = 0; i <
y; i++) {
3515 for (j = 0; j <
x; j++) {
3516 int out_index =
INDEX(j, i);
3517 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
3518 float accum_weight = 0.0f;
3519 for (
int current_y = i - size_y; current_y <= i + size_y; current_y++) {
3520 if (current_y < -start_line || current_y + start_line >= frame_height) {
3524 int index =
INDEX(j, current_y + start_line);
3525 float weight = gausstab_y[current_y - i + size_y];
3526 accum[0] += rect[index] * weight;
3527 accum[1] += rect[index + 1] * weight;
3528 accum[2] += rect[index + 2] * weight;
3529 accum[3] += rect[index + 3] * weight;
3530 accum_weight += weight;
3532 float inv_accum_weight = 1.0f / accum_weight;
3533 out[out_index + 0] = accum[0] * inv_accum_weight;
3534 out[out_index + 1] = accum[1] * inv_accum_weight;
3535 out[out_index + 2] = accum[2] * inv_accum_weight;
3536 out[out_index + 3] = accum[3] * inv_accum_weight;
3549 int UNUSED(frame_height),
3553 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
3555 const int size_x = (int)(
data->size_x + 0.5f);
3562 for (i = 0; i <
y; i++) {
3563 for (j = 0; j <
x; j++) {
3564 int out_index =
INDEX(j, i);
3565 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
3566 float accum_weight = 0.0f;
3567 for (
int current_x = j - size_x; current_x <= j + size_x; current_x++) {
3568 if (current_x < 0 || current_x >= frame_width) {
3572 int index =
INDEX(current_x, i + start_line);
3573 float weight = gausstab_x[current_x - j + size_x];
3575 accum_weight += weight;
3577 mul_v4_v4fl(&out[out_index], accum, 1.0f / accum_weight);
3594 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
3596 const int size_y = (int)(
data->size_y + 0.5f);
3603 for (i = 0; i <
y; i++) {
3604 for (j = 0; j <
x; j++) {
3605 int out_index =
INDEX(j, i);
3606 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
3607 float accum_weight = 0.0f;
3608 for (
int current_y = i - size_y; current_y <= i + size_y; current_y++) {
3609 if (current_y < -start_line || current_y + start_line >= frame_height) {
3613 int index =
INDEX(j, current_y + start_line);
3614 float weight = gausstab_y[current_y - i + size_y];
3616 accum_weight += weight;
3618 mul_v4_v4fl(&out[out_index], accum, 1.0f / accum_weight);
3649 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
3660 (
unsigned char *)ibuf->
rect,
3688 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
3699 (
unsigned char *)ibuf->
rect,
3763 float UNUSED(timeline_frame),
3813 data->text_blf_id = -1;
3814 data->text_size = 60;
3817 data->shadow_color[3] = 0.7f;
3818 data->box_color[0] = 0.2f;
3819 data->box_color[1] = 0.2f;
3820 data->box_color[2] = 0.2f;
3821 data->box_color[3] = 0.7f;
3822 data->box_margin = 0.01f;
3826 data->loc[0] = 0.5f;
3827 data->loc[1] = 0.5f;
3830 data->wrap_width = 1.0f;
3837 if (do_id_user &&
data->text_font !=
NULL) {
3843 if (
data->text_blf_id >= 0) {
3887 data->text_blf_id = -1;
3899 if (
data->text[0] == 0 ||
data->text_size < 1 ||
3900 ((
data->color[3] == 0.0f) &&
3909 float UNUSED(timeline_frame),
3921 const char *display_device;
3925 double proxy_size_comp;
3928 data->text_blf_id = -1;
3930 if (
data->text_font) {
3935 if (
data->text_blf_id >= 0) {
3936 font =
data->text_blf_id;
3939 display_device =
context->scene->display_settings.display_device;
3943 proxy_size_comp =
context->scene->r.size / 100.0;
3992 y += (
wrap.info.lines - 1) * line_height;
3995 y += (((
wrap.info.lines - 1) / 2) * line_height) - (line_height / 2);
4001 const int margin =
data->box_margin *
width;
4002 const int minx =
x +
wrap.rect.xmin - margin;
4003 const int maxx =
x +
wrap.rect.xmax + margin;
4004 const int miny =
y +
wrap.rect.ymin - margin;
4005 const int maxy =
y +
wrap.rect.ymax + margin;
4013 fonty = line_height;
4070 if (facf0 == 0.0f && facf1 == 0.0f) {
4073 if (facf0 == 1.0f && facf1 == 1.0f) {
4081 if (facf0 == 0.0f && facf1 == 0.0f) {
4096 float UNUSED(timeline_frame),
4100 *facf0 = *facf1 = 1.0;
4106 *facf1 = (
float)(*facf0 + 0.5f);
4124 int sequence_type = seq_type;
4127 rval.supports_mask =
false;
4135 rval.execute =
NULL;
4137 rval.execute_slice =
NULL;
4140 switch (sequence_type) {
4142 rval.multithreaded =
true;
4148 rval.multithreaded =
true;
4158 rval.multithreaded =
true;
4163 rval.multithreaded =
true;
4168 rval.multithreaded =
true;
4190 rval.multithreaded =
true;
4195 rval.multithreaded =
true;
4203 rval.multithreaded =
true;
4208 rval.multithreaded =
true;
4212 rval.multithreaded =
true;
4233 rval.multithreaded =
true;
4264 rval.supports_mask =
true;
typedef float(TangentPoint)[2]
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
struct FCurve * id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven)
void id_us_min(struct ID *id)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void id_us_plus(struct ID *id)
float BLF_width_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_draw_buffer(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_disable(int fontid, int option)
void BLF_buffer_col(int fontid, const float rgba[4]) ATTR_NONNULL(2)
float BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_unload_id(int fontid)
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display)
void BLF_boundbox_ex(int fontid, const char *str, size_t len, struct rctf *box, struct ResultBLF *r_info) ATTR_NONNULL(2)
void BLF_size(int fontid, int size, int dpi)
void BLF_enable(int fontid, int option)
int BLF_load(const char *name) ATTR_NONNULL()
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_wordwrap(int fontid, int wrap_width)
void BLF_position(int fontid, float x, float y, float z)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE int clamp_i(int value, int min, int max)
MINLINE void straight_uchar_to_premul_float(float result[4], const unsigned char color[4])
MINLINE void premul_float_to_straight_uchar(unsigned char *result, const float color[4])
MINLINE void blend_color_add_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_exclusion_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_linearburn_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_overlay_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_saturation_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_burn_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_color_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_linearlight_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_sub_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_saturation_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_hue_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_difference_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_dodge_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_luminosity_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_pinlight_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_mul_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_pinlight_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_screen_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_screen_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_vividlight_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_linearburn_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_mul_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_vividlight_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_darken_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_luminosity_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_difference_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_burn_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_color_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_overlay_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_dodge_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_hardlight_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_sub_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_darken_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_softlight_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_add_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_hue_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_lighten_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_exclusion_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_hardlight_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_linearlight_byte(unsigned char dst[4], const uchar src1[4], const uchar src2[4])
MINLINE void blend_color_lighten_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_softlight_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void mul_v4_v4fl(float r[3], const float a[4], float f)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void zero_v4(float r[4])
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
MINLINE void copy_v4_fl(float r[4], float f)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
int BLI_thread_is_main(void)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define SEQ_SPEED_INTEGRATE
@ SEQ_USE_EFFECT_DEFAULT_FADE
#define SEQ_FONT_NOT_LOADED
#define SEQ_SPEED_COMPRESS_IPO_Y
#define SEQ_SPEED_USE_INTERPOLATION
@ SEQ_TEXT_ALIGN_X_CENTER
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_CENTER
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void IMB_colormanagement_assign_float_colorspace(struct ImBuf *ibuf, const char *name)
struct ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
void nearest_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout)
void IMB_rectfill_area_replace(const struct ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2)
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_rect_from_float(struct ImBuf *ibuf)
void IMB_freeImBuf(struct ImBuf *ibuf)
void IMB_processor_apply_threaded(int buffer_lines, int handle_size, void *init_customdata, void(init_handle)(void *handle, int start_line, int tot_line, void *customdata), void *(do_thread)(void *))
void IMB_buffer_float_from_byte(float *rect_to, const unsigned char *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_premultiply(float *buf, int width, int height)
void IMB_buffer_byte_from_float(unsigned char *rect_to, const float *rect_from, int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_unpremultiply(float *buf, int width, int height)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static T sum(const btAlignedObjectArray< T > &items)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
SIMD_FORCE_INLINE btVector3 rotate(const btVector3 &wAxis, const btScalar angle) const
Return a rotated version of this vector.
static CCL_NAMESPACE_BEGIN const double alpha
static void copy_speed_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
struct SeqEffectHandle SEQ_effect_handle_get(Sequence *seq)
static int early_out_text(Sequence *seq, float UNUSED(facf0), float UNUSED(facf1))
static int early_out_noop(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
static void init_text_effect(Sequence *seq)
static void do_drop_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect2i, unsigned char *rect1i, unsigned char *outi)
#define RE_GAMMA_TABLE_SIZE
static void do_drop_effect_float(float facf0, float facf1, int x, int y, float *rect2i, float *rect1i, float *outi)
static void do_colormix_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(facf0), float UNUSED(facf1), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_gaussian_blur_effect_x_cb(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, int start_line, int total_lines, ImBuf *out)
static ImBuf * do_multicam(const SeqRenderData *context, Sequence *seq, float timeline_frame, float UNUSED(facf0), float UNUSED(facf1), ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
static void do_blend_mode_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void makeGammaTables(float gamma)
static void do_gammacross_effect_float(float facf0, float UNUSED(facf1), int x, int y, float *rect1, float *rect2, float *out)
static void do_gammacross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static struct ImBuf * init_execution(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static float in_band(float width, float dist, int side, int dir)
static void free_noop(Sequence *UNUSED(seq), const bool UNUSED(do_id_user))
static ImBuf * do_gaussian_blur_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(facf0), float UNUSED(facf1), ImBuf *ibuf1, ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
static int early_out_speed(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
static int num_inputs_color(void)
static void do_blend_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, int btype, unsigned char *out)
static bool gamma_tabs_init
static void init_speed_effect(Sequence *seq)
static void build_gammatabs(void)
static float inv_gamfactor_table[RE_GAMMA_TABLE_SIZE]
static void copy_wipe_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void do_sub_effect_float(float UNUSED(facf0), float facf1, int x, int y, float *rect1, float *rect2, float *out)
static void free_solid_color(Sequence *seq, const bool UNUSED(do_id_user))
static void free_gammacross(Sequence *UNUSED(seq), const bool UNUSED(do_id_user))
static int seq_effect_speed_get_strip_content_length(const Sequence *seq)
static void init_colormix_effect(Sequence *seq)
static float gamfactor_table[RE_GAMMA_TABLE_SIZE]
static void do_glow_effect_byte(Sequence *seq, int render_size, float facf0, float UNUSED(facf1), int x, int y, unsigned char *rect1, unsigned char *UNUSED(rect2), unsigned char *out)
static void copy_solid_color(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void init_alpha_over_or_under(Sequence *seq)
static int num_inputs_speed(void)
static void RVAddBitmaps_float(float *a, float *b, float *c, int width, int height)
static void free_glow_effect(Sequence *seq, const bool UNUSED(do_id_user))
struct RenderGaussianBlurEffectInitData RenderGaussianBlurEffectInitData
static void init_glow_effect(Sequence *seq)
void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user)
void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool force)
static float speed_effect_interpolation_ratio_get(SpeedControlVars *s, Sequence *seq, float timeline_frame)
BLI_INLINE void apply_blend_function_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out, IMB_blend_func_float blend_function)
static int num_inputs_glow(void)
static void load_text_effect(Sequence *seq)
static int num_inputs_text(void)
int SEQ_effect_get_num_inputs(int seq_type)
static float gamma_range_table[RE_GAMMA_TABLE_SIZE+1]
static void gamtabs(float gamma)
static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out)
static void copy_transform_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void do_blend_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, int btype, float *out)
static void free_effect_default(Sequence *seq, const bool UNUSED(do_id_user))
static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
static void init_gammacross(Sequence *UNUSED(seq))
static void free_transform_effect(Sequence *seq, const bool UNUSED(do_id_user))
static void init_wipe_effect(Sequence *seq)
static void do_alphaunder_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static float invGammaCorrect(float c)
static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float facf0)
static void free_gaussian_blur_effect(Sequence *seq, const bool UNUSED(do_id_user))
static void get_default_fac_fade(Sequence *seq, float timeline_frame, float *facf0, float *facf1)
static float gammaCorrect(float c)
static void precalc_wipe_zone(WipeZone *wipezone, WipeVars *wipe, int xo, int yo)
static ImBuf * prepare_effect_imbufs(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static float inv_color_step
static void do_cross_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
void(* IMB_blend_func_byte)(unsigned char *dst, const unsigned char *src1, const unsigned char *src2)
static float color_domain_table[RE_GAMMA_TABLE_SIZE+1]
static int num_inputs_transform(void)
static void * render_effect_execute_do_y_thread(void *thread_data_v)
static void slice_get_byte_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2, const ImBuf *ibuf3, const ImBuf *out, int start_line, unsigned char **rect1, unsigned char **rect2, unsigned char **rect3, unsigned char **rect_out)
static void copy_effect_default(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void RVIsolateHighlights_float(const float *in, float *out, int width, int height, float threshold, float boost, float clamp)
static void do_alphaunder_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_gaussian_blur_effect_byte_y(Sequence *seq, int start_line, int x, int y, int UNUSED(frame_width), int frame_height, const unsigned char *rect, unsigned char *out)
static void transform_image(int x, int y, int start_line, int total_lines, ImBuf *ibuf1, ImBuf *out, float scale_x, float scale_y, float translate_x, float translate_y, float rotate, int interpolation)
static void do_transform_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(facf0), float UNUSED(facf1), ImBuf *ibuf1, ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_alphaover_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out)
static void do_mul_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out)
static void do_sub_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static ImBuf * do_speed_effect(const SeqRenderData *context, Sequence *seq, float timeline_frame, float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void do_gaussian_blur_effect_float_y(Sequence *seq, int start_line, int x, int y, int UNUSED(frame_width), int frame_height, float *rect, float *out)
static void RVBlurBitmap2_float(float *map, int width, int height, float blur, int quality)
static void load_speed_effect(Sequence *seq)
static void init_noop(Sequence *UNUSED(seq))
static void do_cross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void load_gammacross(Sequence *UNUSED(seq))
static void copy_gaussian_blur_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
static int early_out_fade(Sequence *UNUSED(seq), float facf0, float facf1)
static void load_noop(Sequence *UNUSED(seq))
struct SeqEffectHandle seq_effect_get_sequence_blend(Sequence *seq)
void(* IMB_blend_func_float)(float *dst, const float *src1, const float *src2)
static ImBuf * do_adjustment(const SeqRenderData *context, Sequence *seq, float timeline_frame, float UNUSED(facf0), float UNUSED(facf1), ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
static void free_wipe_effect(Sequence *seq, const bool UNUSED(do_id_user))
static int early_out_adjustment(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
static float inv_gamma_range_table[RE_GAMMA_TABLE_SIZE+1]
static void do_add_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_gaussian_blur_effect_y_cb(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, int start_line, int total_lines, ImBuf *out)
static void init_solid_color(Sequence *seq)
static void do_add_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void do_alphaover_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static unsigned short gamtab[65536]
static int early_out_multicam(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
static void free_text_effect(Sequence *seq, const bool do_id_user)
static int early_out_color(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
static void store_icu_yrange_noop(Sequence *UNUSED(seq), short UNUSED(adrcode), float *UNUSED(ymin), float *UNUSED(ymax))
static int num_inputs_wipe(void)
static ImBuf * do_solid_color(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void do_mul_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_wipe_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1), int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
BLI_INLINE void apply_blend_function_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out, IMB_blend_func_byte blend_function)
static ImBuf * do_text_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(facf0), float UNUSED(facf1), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static float valid_inv_gamma
static int early_out_mul_input2(Sequence *UNUSED(seq), float facf0, float facf1)
static float * make_gaussian_blur_kernel(float rad, int size)
static ImBuf * do_adjustment_impl(const SeqRenderData *context, Sequence *seq, float timeline_frame)
static ImBuf * do_glow_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void store_icu_yrange_speed(Sequence *seq, short UNUSED(adrcode), float *ymin, float *ymax)
static void copy_text_effect(Sequence *dst, Sequence *src, const int flag)
static int num_inputs_adjustment(void)
static void do_sub_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void slice_get_float_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2, const ImBuf *ibuf3, const ImBuf *out, int start_line, float **rect1, float **rect2, float **rect3, float **rect_out)
static void do_glow_effect_float(Sequence *seq, int render_size, float facf0, float UNUSED(facf1), int x, int y, float *rect1, float *UNUSED(rect2), float *out)
static void do_gammacross_effect_byte(float facf0, float UNUSED(facf1), int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void init_transform_effect(Sequence *seq)
static int num_inputs_gaussian_blur(void)
static void init_gaussian_blur_effect(Sequence *seq)
static int early_out_gaussian_blur(Sequence *seq, float UNUSED(facf0), float UNUSED(facf1))
static void do_cross_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out)
static void do_wipe_effect_float(Sequence *seq, float facf0, float UNUSED(facf1), int x, int y, float *rect1, float *rect2, float *out)
static ImBuf * do_wipe_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
float seq_speed_effect_target_frame_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int input)
static void do_add_effect_float(float facf0, float facf1, int x, int y, float *rect1, float *rect2, float *out)
static struct ImBuf * gammacross_init_execution(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void do_alphaover_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void free_speed_effect(Sequence *seq, const bool UNUSED(do_id_user))
static void do_gaussian_blur_effect_byte_x(Sequence *seq, int start_line, int x, int y, int frame_width, int UNUSED(frame_height), const unsigned char *rect, unsigned char *out)
static void do_overdrop_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_mul_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void do_gaussian_blur_effect_float_x(Sequence *seq, int start_line, int x, int y, int frame_width, int UNUSED(frame_height), float *rect, float *out)
static void render_effect_execute_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
static void * render_effect_execute_do_x_thread(void *thread_data_v)
void SEQ_effect_text_font_load(TextVars *data, const bool do_id_user)
static unsigned short igamtab1[256]
static int num_inputs_multicam(void)
static int num_inputs_default(void)
struct RenderGaussianBlurEffectThread RenderGaussianBlurEffectThread
static void get_default_fac_noop(Sequence *UNUSED(seq), float UNUSED(timeline_frame), float *facf0, float *facf1)
static void copy_glow_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
float RE_filter_value(int type, float x)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const float *float_buffer, unsigned char *byte_output, float *float_output, int width, int height, int components, float u, float v, bool wrap_x, bool wrap_y)
BLI_INLINE void bicubic_interpolation(const unsigned char *byte_buffer, const float *float_buffer, unsigned char *byte_output, float *float_output, int width, int height, int components, float u, float v)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > hypot(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
static GPUContext * wrap(Context *ctx)
double SEQ_rendersize_to_scale_factor(int render_size)
ImBuf * seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, const SeqRenderData *context, Sequence *seq, float timeline_frame, float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
ImBuf * seq_render_give_ibuf_seqbase(const SeqRenderData *context, float timeline_frame, int chan_shown, ListBase *seqbasep)
void seq_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, bool make_float)
#define EARLY_USE_INPUT_2
#define EARLY_USE_INPUT_1
struct SELECTID_Context context
float seq_give_frame_index(Sequence *seq, float timeline_frame)
const SeqRenderData * context
const SeqRenderData * context
ColorManagedColorspaceSettings sequencer_colorspace_settings
void(* execute_slice)(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float facf0, float facf1, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3, int start_line, int total_lines, struct ImBuf *out)
void(* load)(struct Sequence *seqconst)
struct ImBuf *(* execute)(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float facf0, float facf1, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3)
struct ImBuf *(* init_execution)(const struct SeqRenderData *context, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline int clamp(int a, int mn, int mx)
ccl_device_inline float2 floor(const float2 &a)
ccl_device_inline float3 ceil(const float3 &a)
ListBase * SEQ_get_seqbase_by_seq(ListBase *seqbase, Sequence *seq)
Sequence * seq_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq)