43 #include "RNA_prototypes.h"
74 unsigned char **rect1,
75 unsigned char **rect2,
76 unsigned char **rect3,
77 unsigned char **rect_out)
81 *rect1 = (
unsigned char *)ibuf1->
rect +
offset;
82 *rect_out = (
unsigned char *)
out->rect +
offset;
85 *rect2 = (
unsigned char *)ibuf2->
rect +
offset;
89 *rect3 = (
unsigned char *)ibuf3->
rect +
offset;
141 if (!ibuf1 && !ibuf2 && !ibuf3) {
155 if (
out->rect_float) {
171 if (ibuf1 && !ibuf1->
rect) {
175 if (ibuf2 && !ibuf2->
rect) {
179 if (ibuf3 && !ibuf3->
rect) {
185 if (ibuf1 !=
NULL && ibuf1 == ibuf2 && ibuf2 == ibuf3) {
208 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
210 unsigned char *cp1 = rect1;
211 unsigned char *cp2 = rect2;
212 unsigned char *rt =
out;
214 for (
int i = 0; i <
y; i++) {
215 for (
int j = 0; j <
x; j++) {
218 float tempc[4], rt1[4], rt2[4];
222 float mfac = 1.0f - fac * rt1[3];
225 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
227 else if (mfac <= 0.0f) {
228 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
231 tempc[0] = fac * rt1[0] + mfac * rt2[0];
232 tempc[1] = fac * rt1[1] + mfac * rt2[1];
233 tempc[2] = fac * rt1[2] + mfac * rt2[2];
234 tempc[3] = fac * rt1[3] + mfac * rt2[3];
246 float fac,
int x,
int y,
float *rect1,
float *rect2,
float *
out)
252 for (
int i = 0; i <
y; i++) {
253 for (
int j = 0; j <
x; j++) {
256 float mfac = 1.0f - (fac * rt1[3]);
259 memcpy(rt, rt2,
sizeof(
float[4]));
261 else if (mfac <= 0) {
262 memcpy(rt, rt1,
sizeof(
float[4]));
265 rt[0] = fac * rt1[0] + mfac * rt2[0];
266 rt[1] = fac * rt1[1] + mfac * rt2[1];
267 rt[2] = fac * rt1[2] + mfac * rt2[2];
268 rt[3] = fac * rt1[3] + mfac * rt2[3];
279 float UNUSED(timeline_frame),
288 if (
out->rect_float) {
297 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
313 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
315 unsigned char *cp1 = rect1;
316 unsigned char *cp2 = rect2;
317 unsigned char *rt =
out;
319 for (
int i = 0; i <
y; i++) {
320 for (
int j = 0; j <
x; j++) {
323 float tempc[4], rt1[4], rt2[4];
330 if (rt2[3] <= 0.0f && fac >= 1.0f) {
331 *((
unsigned int *)rt) = *((
unsigned int *)cp1);
333 else if (rt2[3] >= 1.0f) {
334 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
337 float temp_fac = (fac * (1.0f - rt2[3]));
340 *((
unsigned int *)rt) = *((
unsigned int *)cp2);
343 tempc[0] = (temp_fac * rt1[0] + rt2[0]);
344 tempc[1] = (temp_fac * rt1[1] + rt2[1]);
345 tempc[2] = (temp_fac * rt1[2] + rt2[2]);
346 tempc[3] = (temp_fac * rt1[3] + rt2[3]);
359 float fac,
int x,
int y,
float *rect1,
float *rect2,
float *
out)
365 for (
int i = 0; i <
y; i++) {
366 for (
int j = 0; j <
x; j++) {
372 if (rt2[3] <= 0 && fac >= 1.0f) {
373 memcpy(rt, rt1,
sizeof(
float[4]));
375 else if (rt2[3] >= 1.0f) {
376 memcpy(rt, rt2,
sizeof(
float[4]));
379 float temp_fac = fac * (1.0f - rt2[3]);
382 memcpy(rt, rt2,
sizeof(
float[4]));
385 rt[0] = temp_fac * rt1[0] + rt2[0];
386 rt[1] = temp_fac * rt1[1] + rt2[1];
387 rt[2] = temp_fac * rt1[2] + rt2[2];
388 rt[3] = temp_fac * rt1[3] + rt2[3];
400 float UNUSED(timeline_frame),
409 if (
out->rect_float) {
418 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
434 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
436 unsigned char *rt1 = rect1;
437 unsigned char *rt2 = rect2;
438 unsigned char *rt =
out;
440 int temp_fac = (int)(256.0f * fac);
441 int temp_mfac = 256 - temp_fac;
443 for (
int i = 0; i <
y; i++) {
444 for (
int j = 0; j <
x; j++) {
445 rt[0] = (temp_mfac * rt1[0] + temp_fac * rt2[0]) >> 8;
446 rt[1] = (temp_mfac * rt1[1] + temp_fac * rt2[1]) >> 8;
447 rt[2] = (temp_mfac * rt1[2] + temp_fac * rt2[2]) >> 8;
448 rt[3] = (temp_mfac * rt1[3] + temp_fac * rt2[3]) >> 8;
463 float mfac = 1.0f - fac;
465 for (
int i = 0; i <
y; i++) {
466 for (
int j = 0; j <
x; j++) {
467 rt[0] = mfac * rt1[0] + fac * rt2[0];
468 rt[1] = mfac * rt1[1] + fac * rt2[1];
469 rt[2] = mfac * rt1[2] + fac * rt2[2];
470 rt[3] = mfac * rt1[3] + fac * rt2[3];
481 float UNUSED(timeline_frame),
490 if (
out->rect_float) {
499 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
519 #define RE_GAMMA_TABLE_SIZE 400
615 float val, igamma = 1.0f / gamma;
619 for (
a = 0;
a < 65536;
a++) {
626 else if (gamma != 1.0f) {
627 val =
powf(val, igamma);
633 for (
a = 1;
a <= 256;
a++) {
637 else if (gamma == 1.0f) {
669 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
671 unsigned char *cp1 = rect1;
672 unsigned char *cp2 = rect2;
673 unsigned char *rt =
out;
675 float mfac = 1.0f - fac;
677 for (
int i = 0; i <
y; i++) {
678 for (
int j = 0; j <
x; j++) {
679 float rt1[4], rt2[4], tempc[4];
698 float fac,
int x,
int y,
float *rect1,
float *rect2,
float *
out)
704 float mfac = 1.0f - fac;
706 for (
int i = 0; i <
y; i++) {
707 for (
int j = 0; j <
x; j++) {
729 float UNUSED(timeline_frame),
738 if (
out->rect_float) {
747 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
763 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
765 unsigned char *cp1 = rect1;
766 unsigned char *cp2 = rect2;
767 unsigned char *rt =
out;
769 int temp_fac = (int)(256.0f * fac);
771 for (
int i = 0; i <
y; i++) {
772 for (
int j = 0; j <
x; j++) {
773 const int temp_fac2 = temp_fac * (int)cp2[3];
774 rt[0] =
min_ii(cp1[0] + ((temp_fac2 * cp2[0]) >> 16), 255);
775 rt[1] =
min_ii(cp1[1] + ((temp_fac2 * cp2[1]) >> 16), 255);
776 rt[2] =
min_ii(cp1[2] + ((temp_fac2 * cp2[2]) >> 16), 255);
792 for (
int i = 0; i <
y; i++) {
793 for (
int j = 0; j <
x; j++) {
794 const float temp_fac = (1.0f - (rt1[3] * (1.0f - fac))) * rt2[3];
795 rt[0] = rt1[0] + temp_fac * rt2[0];
796 rt[1] = rt1[1] + temp_fac * rt2[1];
797 rt[2] = rt1[2] + temp_fac * rt2[2];
809 float UNUSED(timeline_frame),
818 if (
out->rect_float) {
827 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
843 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
845 unsigned char *cp1 = rect1;
846 unsigned char *cp2 = rect2;
847 unsigned char *rt =
out;
849 int temp_fac = (int)(256.0f * fac);
851 for (
int i = 0; i <
y; i++) {
852 for (
int j = 0; j <
x; j++) {
853 const int temp_fac2 = temp_fac * (int)cp2[3];
854 rt[0] =
max_ii(cp1[0] - ((temp_fac2 * cp2[0]) >> 16), 0);
855 rt[1] =
max_ii(cp1[1] - ((temp_fac2 * cp2[1]) >> 16), 0);
856 rt[2] =
max_ii(cp1[2] - ((temp_fac2 * cp2[2]) >> 16), 0);
872 float mfac = 1.0f - fac;
874 for (
int i = 0; i <
y; i++) {
875 for (
int j = 0; j <
x; j++) {
876 const float temp_fac = (1.0f - (rt1[3] * mfac)) * rt2[3];
877 rt[0] =
max_ff(rt1[0] - temp_fac * rt2[0], 0.0f);
878 rt[1] =
max_ff(rt1[1] - temp_fac * rt2[1], 0.0f);
879 rt[2] =
max_ff(rt1[2] - temp_fac * rt2[2], 0.0f);
891 float UNUSED(timeline_frame),
900 if (
out->rect_float) {
909 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
929 float fac,
int x,
int y,
unsigned char *rect2i,
unsigned char *rect1i,
unsigned char *outi)
934 int temp_fac = (int)(70.0f * fac);
936 unsigned char *rt2 = rect2i + yoff * 4 *
x;
937 unsigned char *rt1 = rect1i;
938 unsigned char *
out = outi;
939 for (
int i = 0; i <
y - yoff; i++) {
940 memcpy(
out, rt1,
sizeof(*
out) * xoff * 4);
944 for (
int j = xoff; j <
x; j++) {
945 int temp_fac2 = ((temp_fac * rt2[3]) >> 8);
947 *(
out++) =
MAX2(0, *rt1 - temp_fac2);
949 *(
out++) =
MAX2(0, *rt1 - temp_fac2);
951 *(
out++) =
MAX2(0, *rt1 - temp_fac2);
953 *(
out++) =
MAX2(0, *rt1 - temp_fac2);
959 memcpy(
out, rt1,
sizeof(*
out) * yoff * 4 *
x);
963 float fac,
int x,
int y,
float *rect2i,
float *rect1i,
float *outi)
968 float temp_fac = 70.0f * fac;
970 float *rt2 = rect2i + yoff * 4 *
x;
973 for (
int i = 0; i <
y - yoff; i++) {
974 memcpy(
out, rt1,
sizeof(*
out) * xoff * 4);
978 for (
int j = xoff; j <
x; j++) {
979 float temp_fac2 = temp_fac * rt2[3];
981 *(
out++) =
MAX2(0.0f, *rt1 - temp_fac2);
983 *(
out++) =
MAX2(0.0f, *rt1 - temp_fac2);
985 *(
out++) =
MAX2(0.0f, *rt1 - temp_fac2);
987 *(
out++) =
MAX2(0.0f, *rt1 - temp_fac2);
993 memcpy(
out, rt1,
sizeof(*
out) * yoff * 4 *
x);
1003 float fac,
int x,
int y,
unsigned char *rect1,
unsigned char *rect2,
unsigned char *
out)
1005 unsigned char *rt1 = rect1;
1006 unsigned char *rt2 = rect2;
1007 unsigned char *rt =
out;
1009 int temp_fac = (int)(256.0f * fac);
1015 for (
int i = 0; i <
y; i++) {
1016 for (
int j = 0; j <
x; j++) {
1017 rt[0] = rt1[0] + ((temp_fac * rt1[0] * (rt2[0] - 255)) >> 16);
1018 rt[1] = rt1[1] + ((temp_fac * rt1[1] * (rt2[1] - 255)) >> 16);
1019 rt[2] = rt1[2] + ((temp_fac * rt1[2] * (rt2[2] - 255)) >> 16);
1020 rt[3] = rt1[3] + ((temp_fac * rt1[3] * (rt2[3] - 255)) >> 16);
1038 for (
int i = 0; i <
y; i++) {
1039 for (
int j = 0; j <
x; j++) {
1040 rt[0] = rt1[0] + fac * rt1[0] * (rt2[0] - 1.0f);
1041 rt[1] = rt1[1] + fac * rt1[1] * (rt2[1] - 1.0f);
1042 rt[2] = rt1[2] + fac * rt1[2] * (rt2[2] - 1.0f);
1043 rt[3] = rt1[3] + fac * rt1[3] * (rt2[3] - 1.0f);
1054 float UNUSED(timeline_frame),
1063 if (
out->rect_float) {
1072 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1088 const unsigned char *src1,
1089 const unsigned char *src2);
1095 unsigned char *rect1,
1096 unsigned char *rect2,
1100 unsigned char *rt1 = rect1;
1101 unsigned char *rt2 = rect2;
1102 unsigned char *rt =
out;
1104 for (
int i = 0; i <
y; i++) {
1105 for (
int j = 0; j <
x; j++) {
1106 unsigned int achannel = rt2[3];
1107 rt2[3] = (
unsigned int)achannel * fac;
1108 blend_function(rt, rt1, rt2);
1130 for (
int i = 0; i <
y; i++) {
1131 for (
int j = 0; j <
x; j++) {
1132 float achannel = rt2[3];
1133 rt2[3] = achannel * fac;
1134 blend_function(rt, rt1, rt2);
1145 float fac,
int x,
int y,
float *rect1,
float *rect2,
int btype,
float *
out)
1219 unsigned char *rect1,
1220 unsigned char *rect2,
1295 float UNUSED(timeline_frame),
1304 if (
out->rect_float) {
1312 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1336 data->factor = 1.0f;
1341 float UNUSED(timeline_frame),
1355 if (
out->rect_float) {
1360 fac,
context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1363 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
1367 fac,
context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1426 float posx, posy, hyp, hyp2,
angle, hwidth, b1, b2, b3, pointdist;
1429 float temp1, temp2, temp3, temp4;
1430 int xo = wipezone->
xo;
1431 int yo = wipezone->
yo;
1432 float halfx = xo * 0.5f;
1433 float halfy = yo * 0.5f;
1434 float widthf,
output = 0;
1448 posx = xo - fac * xo;
1449 posy = yo - fac * yo;
1457 if (
angle == 0.0f) {
1463 b1 = posy - (-
angle) * posx;
1498 hwidth =
width * 0.5f;
1501 b3 = yo - posy * 0.5f;
1504 hyp =
fabsf(
y - posy * 0.5f);
1505 hyp2 =
fabsf(
y - (yo - posy * 0.5f));
1508 b1 = posy * 0.5f - (-
angle) * posx * 0.5f;
1509 b3 = (yo - posy * 0.5f) - (-
angle) * (xo - posx * 0.5f);
1513 hyp2 =
fabsf(
angle *
x +
y + (-(yo - posy * 0.5f) -
angle * (xo - posx * 0.5f))) *
1519 if (b2 < b1 && b2 < b3) {
1522 else if (b2 > b1 && b2 > b3) {
1526 if (hyp < hwidth && hyp2 > hwidth) {
1529 else if (hyp > hwidth && hyp2 < hwidth) {
1559 if (x <= 0 && y >= 0) {
1562 else if (
x <= 0 &&
y <= 0) {
1565 else if (
x >= 0 &&
y <= 0) {
1570 temp3 = temp1 - (widthf * 0.5f) * fac;
1571 temp4 = temp1 + (widthf * 0.5f) * (1 - fac);
1574 temp3 = temp1 - (widthf * 0.5f) * (1 - fac);
1575 temp4 = temp1 + (widthf * 0.5f) * fac;
1580 if (temp4 > 2.0f * (
float)
M_PI) {
1584 if (temp2 < temp3) {
1587 else if (temp2 > temp4) {
1591 output = (temp2 - temp3) / (temp4 - temp3);
1593 if (
x == 0 &&
y == 0) {
1616 hwidth =
width * 0.5f;
1618 temp1 = (halfx - (halfx)*fac);
1619 pointdist =
hypotf(temp1, temp1);
1621 temp2 =
hypotf(halfx -
x, halfy -
y);
1622 if (temp2 > pointdist) {
1672 unsigned char *rect1,
1673 unsigned char *rect2,
1680 unsigned char *cp1 = rect1;
1681 unsigned char *cp2 = rect2;
1682 unsigned char *rt =
out;
1684 for (
int i = 0; i <
y; i++) {
1685 for (
int j = 0; j <
x; j++) {
1686 float check =
check_zone(&wipezone, j, i, seq, fac);
1689 float rt1[4], rt2[4], tempc[4];
1694 tempc[0] = rt1[0] * check + rt2[0] * (1 - check);
1695 tempc[1] = rt1[1] * check + rt2[1] * (1 - check);
1696 tempc[2] = rt1[2] * check + rt2[2] * (1 - check);
1697 tempc[3] = rt1[3] * check + rt2[3] * (1 - check);
1735 Sequence *seq,
float fac,
int x,
int y,
float *rect1,
float *rect2,
float *
out)
1745 for (
int i = 0; i <
y; i++) {
1746 for (
int j = 0; j <
x; j++) {
1747 float check =
check_zone(&wipezone, j, i, seq, fac);
1750 rt[0] = rt1[0] * check + rt2[0] * (1 - check);
1751 rt[1] = rt1[1] * check + rt2[1] * (1 - check);
1752 rt[2] = rt1[2] * check + rt2[2] * (1 - check);
1753 rt[3] = rt1[3] * check + rt2[3] * (1 - check);
1790 float UNUSED(timeline_frame),
1798 if (
out->rect_float) {
1812 (
unsigned char *)ibuf1->
rect,
1813 (
unsigned char *)ibuf2->
rect,
1814 (
unsigned char *)
out->rect);
1883 for (
int yi = start_line; yi < start_line + total_lines; yi++) {
1884 for (
int xi = 0; xi <
x; xi++) {
1886 float xt = xi - translate_x;
1887 float yt = yi - translate_y;
1890 float xr =
c * xt + s * yt;
1891 float yr = -s * xt +
c * yt;
1902 switch (interpolation) {
1919 float UNUSED(timeline_frame),
1929 float scale_x, scale_y, translate_x, translate_y, rotate_radians;
1933 scale_x = scale_y =
transform->ScalexIni;
1946 double proxy_size_comp =
context->scene->r.size / 100.0;
1951 translate_x =
transform->xIni * proxy_size_comp + (
x / 2.0f);
1952 translate_y =
transform->yIni * proxy_size_comp + (
y / 2.0f);
1955 translate_x =
x * (
transform->xIni / 100.0f) + (
x / 2.0f);
1956 translate_y =
y * (
transform->yIni / 100.0f) + (
y / 2.0f);
1993 int x,
y, i, fx, fy;
1994 int index, ix, halfWidth;
1995 float fval, k, curColor[4], curColor2[4], weight = 0;
2003 halfWidth = ((quality + 1) * blur);
2004 if (halfWidth == 0) {
2015 filter = (
float *)
MEM_mallocN(
sizeof(
float) * halfWidth * 2,
"blurbitmapfilter");
2026 k = -1.0f / (2.0f * (
float)
M_PI * blur * blur);
2028 for (ix = 0; ix < halfWidth; ix++) {
2029 weight = (
float)
exp(k * (ix * ix));
2030 filter[halfWidth - ix] = weight;
2031 filter[halfWidth + ix] = weight;
2037 for (ix = 0; ix < halfWidth * 2; ix++) {
2041 for (ix = 0; ix < halfWidth * 2; ix++) {
2048 for (
x = 0;
x < halfWidth;
x++) {
2053 for (i =
x - halfWidth; i <
x + halfWidth; i++) {
2054 if ((i >= 0) && (i <
width)) {
2055 index = (i +
y *
width) * 4;
2071 for (
x = halfWidth;
x <
width - halfWidth;
x++) {
2074 for (i =
x - halfWidth; i <
x + halfWidth; i++) {
2075 index = (i +
y *
width) * 4;
2092 for (
y = 0;
y < halfWidth;
y++) {
2096 for (i =
y - halfWidth; i <
y + halfWidth; i++) {
2097 if ((i >= 0) && (i <
height)) {
2099 index = (
x + i *
width) * 4;
2116 for (
y = halfWidth;
y <
height - halfWidth;
y++) {
2119 for (i =
y - halfWidth; i <
y + halfWidth; i++) {
2120 index = (
x + i *
width) * 4;
2165 if (intensity > 0) {
2220 unsigned char *rect1,
2221 unsigned char *
UNUSED(rect2),
2224 float *outbuf, *inbuf;
2227 inbuf =
MEM_mallocN(
sizeof(
float[4]) *
x *
y,
"glow effect input");
2228 outbuf =
MEM_mallocN(
sizeof(
float[4]) *
x *
y,
"glow effect output");
2242 out, outbuf, 4, 0.0f,
IB_PROFILE_SRGB,
IB_PROFILE_SRGB,
false,
x,
y,
x,
x);
2257 float *outbuf =
out;
2258 float *inbuf = rect1;
2271 float UNUSED(timeline_frame),
2281 if (
out->rect_float) {
2297 (
unsigned char *)ibuf1->
rect,
2299 (
unsigned char *)
out->rect);
2322 cv->
col[0] = cv->
col[1] = cv->
col[2] = 0.5;
2347 float UNUSED(timeline_frame),
2361 unsigned char color[4];
2367 unsigned char *rect = (
unsigned char *)
out->rect;
2369 for (
int i = 0; i <
y; i++) {
2370 for (
int j = 0; j <
x; j++) {
2379 else if (
out->rect_float) {
2386 float *rect_float =
out->rect_float;
2388 for (
int i = 0; i <
y; i++) {
2389 for (
int j = 0; j <
x; j++) {
2390 rect_float[0] =
color[0];
2391 rect_float[1] =
color[1];
2392 rect_float[2] =
color[2];
2393 rect_float[3] =
color[3];
2423 float timeline_frame,
2482 timeline_frame =
clamp_i(timeline_frame,
2510 float timeline_frame,
2548 v->speed_fader = 1.0f;
2549 v->speed_fader_length = 0.0f;
2550 v->speed_fader_frame_number = 0.0f;
2596 if ((seq->
seq1 ==
NULL) || (effect_strip_length < 1)) {
2610 v->frameMap =
MEM_mallocN(
sizeof(
float) * effect_strip_length, __func__);
2611 v->frameMap[0] = 0.0f;
2613 float target_frame = 0;
2614 for (
int frame_index = 1; frame_index < effect_strip_length; frame_index++) {
2617 CLAMP(target_frame, 0, target_frame_max);
2618 v->frameMap[frame_index] = target_frame;
2634 float timeline_frame,
2646 float target_frame = 0.0f;
2654 const float ratio = frame_index / speed_effetct_length;
2655 target_frame = target_content_length * ratio;
2662 target_frame = s->
frameMap[frame_index];
2678 target_frame += seq_speed->
start;
2682 return target_frame;
2687 return input == 0 ? target_frame :
ceil(target_frame);
2692 float timeline_frame)
2695 scene, seq_speed, timeline_frame, 0);
2696 return target_frame -
floor(target_frame);
2701 float timeline_frame,
2715 &cross_effect,
context,
NULL, timeline_frame, fac, ibuf1, ibuf2, ibuf3);
2731 float UNUSED(timeline_frame),
2741 int y = total_lines;
2743 if (
out->rect_float) {
2753 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
2804 if (
data->size_x == 0.0f &&
data->size_y == 0) {
2813 float *gausstab,
sum, val;
2819 gausstab = (
float *)
MEM_mallocN(
sizeof(
float) * n, __func__);
2822 fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
2826 gausstab[i +
size] = val;
2830 for (i = 0; i < n; i++) {
2842 int UNUSED(frame_height),
2843 const unsigned char *rect,
2846 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
2848 const int size_x = (int)(
data->size_x + 0.5f);
2855 for (i = 0; i <
y; i++) {
2856 for (j = 0; j <
x; j++) {
2857 int out_index =
INDEX(j, i);
2858 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
2859 float accum_weight = 0.0f;
2861 for (
int current_x = j - size_x; current_x <= j + size_x; current_x++) {
2862 if (current_x < 0 || current_x >= frame_width) {
2866 int index =
INDEX(current_x, i + start_line);
2867 float weight = gausstab_x[current_x - j + size_x];
2868 accum[0] += rect[index] * weight;
2869 accum[1] += rect[index + 1] * weight;
2870 accum[2] += rect[index + 2] * weight;
2871 accum[3] += rect[index + 3] * weight;
2872 accum_weight += weight;
2875 float inv_accum_weight = 1.0f / accum_weight;
2876 out[out_index + 0] = accum[0] * inv_accum_weight;
2877 out[out_index + 1] = accum[1] * inv_accum_weight;
2878 out[out_index + 2] = accum[2] * inv_accum_weight;
2879 out[out_index + 3] = accum[3] * inv_accum_weight;
2893 const unsigned char *rect,
2896 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
2898 const int size_y = (int)(
data->size_y + 0.5f);
2905 for (i = 0; i <
y; i++) {
2906 for (j = 0; j <
x; j++) {
2907 int out_index =
INDEX(j, i);
2908 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
2909 float accum_weight = 0.0f;
2910 for (
int current_y = i - size_y; current_y <= i + size_y; current_y++) {
2911 if (current_y < -start_line || current_y + start_line >= frame_height) {
2915 int index =
INDEX(j, current_y + start_line);
2916 float weight = gausstab_y[current_y - i + size_y];
2917 accum[0] += rect[index] * weight;
2918 accum[1] += rect[index + 1] * weight;
2919 accum[2] += rect[index + 2] * weight;
2920 accum[3] += rect[index + 3] * weight;
2921 accum_weight += weight;
2923 float inv_accum_weight = 1.0f / accum_weight;
2924 out[out_index + 0] = accum[0] * inv_accum_weight;
2925 out[out_index + 1] = accum[1] * inv_accum_weight;
2926 out[out_index + 2] = accum[2] * inv_accum_weight;
2927 out[out_index + 3] = accum[3] * inv_accum_weight;
2940 int UNUSED(frame_height),
2944 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
2946 const int size_x = (int)(
data->size_x + 0.5f);
2953 for (i = 0; i <
y; i++) {
2954 for (j = 0; j <
x; j++) {
2955 int out_index =
INDEX(j, i);
2956 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
2957 float accum_weight = 0.0f;
2958 for (
int current_x = j - size_x; current_x <= j + size_x; current_x++) {
2959 if (current_x < 0 || current_x >= frame_width) {
2963 int index =
INDEX(current_x, i + start_line);
2964 float weight = gausstab_x[current_x - j + size_x];
2966 accum_weight += weight;
2985 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
2987 const int size_y = (int)(
data->size_y + 0.5f);
2994 for (i = 0; i <
y; i++) {
2995 for (j = 0; j <
x; j++) {
2996 int out_index =
INDEX(j, i);
2997 float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
2998 float accum_weight = 0.0f;
2999 for (
int current_y = i - size_y; current_y <= i + size_y; current_y++) {
3000 if (current_y < -start_line || current_y + start_line >= frame_height) {
3004 int index =
INDEX(j, current_y + start_line);
3005 float weight = gausstab_y[current_y - i + size_y];
3007 accum_weight += weight;
3024 if (
out->rect_float) {
3040 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
3051 (
unsigned char *)ibuf->
rect,
3063 if (
out->rect_float) {
3079 unsigned char *rect1 =
NULL, *rect2 =
NULL, *rect_out =
NULL;
3090 (
unsigned char *)ibuf->
rect,
3154 float UNUSED(timeline_frame),
3207 data->text_blf_id = -1;
3208 data->text_size = 60.0f;
3211 data->shadow_color[3] = 0.7f;
3212 data->box_color[0] = 0.2f;
3213 data->box_color[1] = 0.2f;
3214 data->box_color[2] = 0.2f;
3215 data->box_color[3] = 0.7f;
3216 data->box_margin = 0.01f;
3220 data->loc[0] = 0.5f;
3221 data->loc[1] = 0.5f;
3224 data->wrap_width = 1.0f;
3234 if (do_id_user &&
data->text_font !=
NULL) {
3240 if (
data->text_blf_id >= 0) {
3248 if (vfont ==
NULL) {
3297 data->text_blf_id = -1;
3309 if (
data->text[0] == 0 ||
data->text_size < 1.0f ||
3310 ((
data->color[3] == 0.0f) &&
3319 float UNUSED(timeline_frame),
3330 const char *display_device;
3334 double proxy_size_comp;
3337 data->text_blf_id = -1;
3342 if (
data->text_blf_id >= 0) {
3343 font =
data->text_blf_id;
3346 display_device =
context->scene->display_settings.display_device;
3350 proxy_size_comp =
context->scene->r.size / 100.0;
3399 y += (
wrap.info.lines - 1) * line_height;
3402 y += (((
wrap.info.lines - 1) / 2) * line_height) - (line_height / 2);
3408 const int margin =
data->box_margin *
width;
3409 const int minx =
x +
wrap.rect.xmin - margin;
3410 const int maxx =
x +
wrap.rect.xmax + margin;
3411 const int miny =
y +
wrap.rect.ymin - margin;
3412 const int maxy =
y +
wrap.rect.ymax + margin;
3420 fonty = line_height;
3504 float UNUSED(timeline_frame),
3512 float timeline_frame,
3532 int sequence_type = seq_type;
3535 rval.supports_mask =
false;
3542 rval.execute =
NULL;
3544 rval.execute_slice =
NULL;
3547 switch (sequence_type) {
3549 rval.multithreaded =
true;
3555 rval.multithreaded =
true;
3565 rval.multithreaded =
true;
3570 rval.multithreaded =
true;
3575 rval.multithreaded =
true;
3597 rval.multithreaded =
true;
3602 rval.multithreaded =
true;
3610 rval.multithreaded =
true;
3616 rval.multithreaded =
true;
3620 rval.multithreaded =
true;
3641 rval.multithreaded =
true;
3671 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)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const struct ID *id, char separator_char)
void BLF_draw_buffer(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2)
int BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size) ATTR_NONNULL()
int BLF_width_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_boundbox_ex(int fontid, const char *str, size_t str_len, struct rcti *box, struct ResultBLF *r_info) ATTR_NONNULL(2)
void BLF_disable(int fontid, int option)
void BLF_buffer_col(int fontid, const float rgba[4]) ATTR_NONNULL(2)
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_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_size(int fontid, float size, int dpi)
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 copy_v4_v4(float r[4], const float a[4])
MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f)
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 int BLI_rcti_size_x(const struct rcti *rct)
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
int BLI_thread_is_main(void)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
@ SEQ_TEXT_ALIGN_X_CENTER
#define SEQ_FONT_NOT_LOADED
#define SEQ_SPEED_USE_INTERPOLATION
@ 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 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
_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
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(const 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_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)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
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.
ListBase * SEQ_get_channels_by_seq(ListBase *seqbase, ListBase *channels, const Sequence *seq)
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
static ImBuf * do_multicam(const SeqRenderData *context, Sequence *seq, float timeline_frame, float UNUSED(fac), ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
static void do_cross_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void copy_speed_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
struct SeqEffectHandle SEQ_effect_handle_get(Sequence *seq)
static void init_text_effect(Sequence *seq)
#define RE_GAMMA_TABLE_SIZE
static int early_out_gaussian_blur(Sequence *seq, float UNUSED(fac))
static void do_gaussian_blur_effect_x_cb(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, int start_line, int total_lines, ImBuf *out)
static void makeGammaTables(float gamma)
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 do_sub_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void free_noop(Sequence *UNUSED(seq), const bool UNUSED(do_id_user))
static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float fac)
float seq_speed_effect_target_frame_get(Scene *scene, Sequence *seq_speed, float timeline_frame, int input)
static int num_inputs_color(void)
static int early_out_text(Sequence *seq, float UNUSED(fac))
static bool gamma_tabs_init
static void do_colormix_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(fac), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void init_speed_effect(Sequence *seq)
static void get_default_fac_fade(const Scene *scene, Sequence *seq, float timeline_frame, float *fac)
static void build_gammatabs(void)
static void do_alphaover_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
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_drop_effect_byte(float fac, int x, int y, unsigned char *rect2i, unsigned char *rect1i, unsigned char *outi)
static void do_sub_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void free_solid_color(Sequence *seq, const bool UNUSED(do_id_user))
static void do_gammacross_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static void free_gammacross(Sequence *UNUSED(seq), const bool UNUSED(do_id_user))
static void do_add_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void init_colormix_effect(Sequence *seq)
static float gamfactor_table[RE_GAMMA_TABLE_SIZE]
static void copy_solid_color(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void do_mul_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void init_alpha_over_or_under(Sequence *seq)
static int num_inputs_speed(void)
static int early_out_mul_input1(Sequence *UNUSED(seq), float fac)
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 do_blend_effect_float(float fac, int x, int y, float *rect1, float *rect2, int btype, float *out)
static void init_glow_effect(Sequence *seq)
void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user)
BLI_INLINE void apply_blend_function_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out, IMB_blend_func_byte 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 int early_out_color(Sequence *UNUSED(seq), float UNUSED(fac))
static void copy_transform_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void free_effect_default(Sequence *seq, const bool UNUSED(do_id_user))
static void do_mul_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_add_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
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 int early_out_mul_input2(Sequence *UNUSED(seq), float fac)
static ImBuf * do_wipe_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static float invGammaCorrect(float c)
static void do_glow_effect_byte(Sequence *seq, int render_size, float fac, int x, int y, unsigned char *rect1, unsigned char *UNUSED(rect2), unsigned char *out)
static void do_transform_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(fac), ImBuf *ibuf1, ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void free_gaussian_blur_effect(Sequence *seq, const bool UNUSED(do_id_user))
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 void do_blend_mode_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static float inv_color_step
static ImBuf * do_solid_color(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(fac), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
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 do_cross_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static void do_alphaover_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
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 FCurve * seq_effect_speed_speed_factor_curve_get(Scene *scene, Sequence *seq)
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_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 ImBuf * do_glow_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static ImBuf * do_gaussian_blur_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(fac), ImBuf *ibuf1, ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(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 do_gammacross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void load_speed_effect(Sequence *seq)
static void init_noop(Sequence *UNUSED(seq))
static void do_alphaover_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void load_gammacross(Sequence *UNUSED(seq))
static int early_out_adjustment(Sequence *UNUSED(seq), float UNUSED(fac))
static void do_drop_effect_float(float fac, int x, int y, float *rect2i, float *rect1i, float *outi)
static void copy_gaussian_blur_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
static void do_alphaunder_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
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 void free_wipe_effect(Sequence *seq, const bool UNUSED(do_id_user))
static void do_alphaunder_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static float inv_gamma_range_table[RE_GAMMA_TABLE_SIZE+1]
static ImBuf * do_adjustment(const SeqRenderData *context, Sequence *seq, float timeline_frame, float UNUSED(fac), ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
static void seq_effect_speed_frame_map_ensure(Scene *scene, Sequence *seq)
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 int early_out_noop(Sequence *UNUSED(seq), float UNUSED(fac))
static unsigned short gamtab[65536]
static int early_out_speed(Sequence *UNUSED(seq), float UNUSED(fac))
static void free_text_effect(Sequence *seq, const bool do_id_user)
static int early_out_multicam(Sequence *UNUSED(seq), float UNUSED(fac))
static int early_out_fade(Sequence *UNUSED(seq), float fac)
static void do_blend_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, int btype, unsigned char *out)
static void do_alphaunder_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static int num_inputs_wipe(void)
static float valid_inv_gamma
static void do_mul_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static void do_wipe_effect_byte(Sequence *seq, float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void do_gammacross_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static float * make_gaussian_blur_kernel(float rad, int size)
static ImBuf * do_adjustment_impl(const SeqRenderData *context, Sequence *seq, float timeline_frame)
static float speed_effect_interpolation_ratio_get(Scene *scene, Sequence *seq_speed, float timeline_frame)
static void copy_text_effect(Sequence *dst, Sequence *src, const int flag)
static void do_add_effect_byte(float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out)
static void do_wipe_effect_float(Sequence *seq, float fac, int x, int y, float *rect1, float *rect2, float *out)
static int num_inputs_adjustment(void)
static void do_glow_effect_float(Sequence *seq, int render_size, float fac, int x, int y, float *rect1, float *UNUSED(rect2), float *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)
void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq)
static void init_transform_effect(Sequence *seq)
static int num_inputs_gaussian_blur(void)
static void init_gaussian_blur_effect(Sequence *seq)
static ImBuf * do_text_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(timeline_frame), float UNUSED(fac), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void do_overdrop_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
static void do_sub_effect_float(float fac, 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)
BLI_INLINE void apply_blend_function_float(float fac, int x, int y, float *rect1, float *rect2, float *out, IMB_blend_func_float blend_function)
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_cross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(timeline_frame), float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *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 get_default_fac_noop(const Scene *UNUSED(scene), Sequence *UNUSED(seq), float UNUSED(timeline_frame), float *fac)
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 ImBuf * do_speed_effect(const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
static void copy_glow_effect(Sequence *dst, Sequence *src, const int UNUSED(flag))
#define pf(_x, _i)
Prefetch 64.
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
float RE_filter_value(int type, float x)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_global KernelShaderEvalInput * input
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)
ccl_device_inline float3 exp(float3 v)
ccl_device_inline float3 ceil(const float3 &a)
ccl_device_inline float3 pow(float3 v, float e)
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 > asin(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > hypot(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
static struct PartialUpdateUser * wrap(PartialUpdateUserImpl *user)
T clamp(const T &a, const T &min, const T &max)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
SocketIndexByIdentifierMap * map
double SEQ_rendersize_to_scale_factor(int render_size)
ImBuf * seq_render_give_ibuf_seqbase(const SeqRenderData *context, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
void seq_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, bool make_float)
ImBuf * seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
#define EARLY_USE_INPUT_2
#define EARLY_USE_INPUT_1
struct Sequence * SEQ_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq)
int SEQ_time_strip_length_get(const Scene *scene, const Sequence *seq)
int SEQ_time_left_handle_frame_get(const Scene *UNUSED(scene), const Sequence *seq)
float seq_give_frame_index(const Scene *scene, Sequence *seq, float timeline_frame)
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
const SeqRenderData * context
const SeqRenderData * context
ColorManagedColorspaceSettings sequencer_colorspace_settings
void(* load)(struct Sequence *seqconst)
struct ImBuf *(* execute)(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float fac, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3)
void(* execute_slice)(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float fac, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3, int start_line, int total_lines, struct ImBuf *out)
struct ImBuf *(* init_execution)(const struct SeqRenderData *context, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3)
float speed_fader_frame_number
struct PackedFile * packedfile
ListBase * SEQ_get_seqbase_by_seq(const Scene *scene, Sequence *seq)