46#include "RNA_prototypes.hh"
80 int offset = 4 * start_line * context->rectx;
99 int offset = 4 * start_line * context->rectx;
128 *
reinterpret_cast<float4 *
>(dst) = pix;
156 bool uninitialized_pixels =
true)
159 Scene *scene = context->scene;
160 int x = context->rectx;
161 int y = context->recty;
164 if (!ibuf1 && !ibuf2) {
198 if (ibuf1 !=
nullptr && ibuf1 == ibuf2) {
227 return alpha >= 1.0f;
233 float fac,
int width,
int height,
const T *src1,
const T *src2,
T *dst)
236 memcpy(dst, src2,
sizeof(
T) * 4 * width * height);
240 for (
int pixel_idx = 0; pixel_idx < width * height; pixel_idx++) {
241 if (src1[3] <= 0.0f) {
243 memcpy(dst, src2,
sizeof(
T) * 4);
247 memcpy(dst, src1,
sizeof(
T) * 4);
251 float mfac = 1.0f - fac * col1.w;
273 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
280 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
297 float fac,
int width,
int height,
const T *src1,
const T *src2,
T *dst)
300 memcpy(dst, src2,
sizeof(
T) * 4 * width * height);
304 for (
int pixel_idx = 0; pixel_idx < width * height; pixel_idx++) {
305 if (src2[3] <= 0.0f && fac >= 1.0f) {
306 memcpy(dst, src1,
sizeof(
T) * 4);
309 memcpy(dst, src2,
sizeof(
T) * 4);
313 float mfac = fac * (1.0f - col2.w);
335 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
342 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
362 int temp_fac =
int(256.0f * fac);
363 int temp_mfac = 256 - temp_fac;
365 for (
int i = 0; i <
y; i++) {
366 for (
int j = 0; j <
x; j++) {
367 rt[0] = (temp_mfac * rt1[0] + temp_fac * rt2[0]) >> 8;
368 rt[1] = (temp_mfac * rt1[1] + temp_fac * rt2[1]) >> 8;
369 rt[2] = (temp_mfac * rt1[2] + temp_fac * rt2[2]) >> 8;
370 rt[3] = (temp_mfac * rt1[3] + temp_fac * rt2[3]) >> 8;
385 float mfac = 1.0f - fac;
387 for (
int i = 0; i <
y; i++) {
388 for (
int j = 0; j <
x; j++) {
389 rt[0] = mfac * rt1[0] + fac * rt2[0];
390 rt[1] = mfac * rt1[1] + fac * rt2[1];
391 rt[2] = mfac * rt1[2] + fac * rt2[2];
392 rt[3] = mfac * rt1[3] + fac * rt2[3];
412 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
419 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
453 float fac,
int width,
int height,
const T *src1,
const T *src2,
T *dst)
455 float mfac = 1.0f - fac;
457 for (
int y = 0;
y < height;
y++) {
458 for (
int x = 0;
x < width;
x++) {
462 for (
int c = 0; c < 4; ++c) {
484 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
491 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
511 int temp_fac =
int(256.0f * fac);
513 for (
int i = 0; i <
y; i++) {
514 for (
int j = 0; j <
x; j++) {
515 const int temp_fac2 = temp_fac *
int(cp2[3]);
516 rt[0] =
min_ii(cp1[0] + ((temp_fac2 * cp2[0]) >> 16), 255);
517 rt[1] =
min_ii(cp1[1] + ((temp_fac2 * cp2[1]) >> 16), 255);
518 rt[2] =
min_ii(cp1[2] + ((temp_fac2 * cp2[2]) >> 16), 255);
534 for (
int i = 0; i <
y; i++) {
535 for (
int j = 0; j <
x; j++) {
536 const float temp_fac = (1.0f - (rt1[3] * (1.0f - fac))) * rt2[3];
537 rt[0] = rt1[0] + temp_fac * rt2[0];
538 rt[1] = rt1[1] + temp_fac * rt2[1];
539 rt[2] = rt1[2] + temp_fac * rt2[2];
560 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
567 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
587 int temp_fac =
int(256.0f * fac);
589 for (
int i = 0; i <
y; i++) {
590 for (
int j = 0; j <
x; j++) {
591 const int temp_fac2 = temp_fac *
int(cp2[3]);
592 rt[0] =
max_ii(cp1[0] - ((temp_fac2 * cp2[0]) >> 16), 0);
593 rt[1] =
max_ii(cp1[1] - ((temp_fac2 * cp2[1]) >> 16), 0);
594 rt[2] =
max_ii(cp1[2] - ((temp_fac2 * cp2[2]) >> 16), 0);
610 float mfac = 1.0f - fac;
612 for (
int i = 0; i <
y; i++) {
613 for (
int j = 0; j <
x; j++) {
614 const float temp_fac = (1.0f - (rt1[3] * mfac)) * rt2[3];
615 rt[0] =
max_ff(rt1[0] - temp_fac * rt2[0], 0.0f);
616 rt[1] =
max_ff(rt1[1] - temp_fac * rt2[1], 0.0f);
617 rt[2] =
max_ff(rt1[2] - temp_fac * rt2[2], 0.0f);
638 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
645 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
668 int temp_fac =
int(70.0f * fac);
670 uchar *rt2 = rect2i + yoff * 4 *
x;
673 for (
int i = 0; i <
y - yoff; i++) {
674 memcpy(out, rt1,
sizeof(*out) * xoff * 4);
678 for (
int j = xoff; j <
x; j++) {
679 int temp_fac2 = ((temp_fac * rt2[3]) >> 8);
681 *(out++) = std::max(0, *rt1 - temp_fac2);
683 *(out++) = std::max(0, *rt1 - temp_fac2);
685 *(out++) = std::max(0, *rt1 - temp_fac2);
687 *(out++) = std::max(0, *rt1 - temp_fac2);
693 memcpy(out, rt1,
sizeof(*out) * yoff * 4 *
x);
697 float fac,
int x,
int y,
float *rect2i,
float *rect1i,
float *outi)
702 float temp_fac = 70.0f * fac;
704 float *rt2 = rect2i + yoff * 4 *
x;
707 for (
int i = 0; i <
y - yoff; i++) {
708 memcpy(out, rt1,
sizeof(*out) * xoff * 4);
712 for (
int j = xoff; j <
x; j++) {
713 float temp_fac2 = temp_fac * rt2[3];
715 *(out++) = std::max(0.0f, *rt1 - temp_fac2);
717 *(out++) = std::max(0.0f, *rt1 - temp_fac2);
719 *(out++) = std::max(0.0f, *rt1 - temp_fac2);
721 *(out++) = std::max(0.0f, *rt1 - temp_fac2);
727 memcpy(out, rt1,
sizeof(*out) * yoff * 4 *
x);
742 int temp_fac =
int(256.0f * fac);
748 for (
int i = 0; i <
y; i++) {
749 for (
int j = 0; j <
x; j++) {
750 rt[0] = rt1[0] + ((temp_fac * rt1[0] * (rt2[0] - 255)) >> 16);
751 rt[1] = rt1[1] + ((temp_fac * rt1[1] * (rt2[1] - 255)) >> 16);
752 rt[2] = rt1[2] + ((temp_fac * rt1[2] * (rt2[2] - 255)) >> 16);
753 rt[3] = rt1[3] + ((temp_fac * rt1[3] * (rt2[3] - 255)) >> 16);
771 for (
int i = 0; i <
y; i++) {
772 for (
int j = 0; j <
x; j++) {
773 rt[0] = rt1[0] + fac * rt1[0] * (rt2[0] - 1.0f);
774 rt[1] = rt1[1] + fac * rt1[1] * (rt2[1] - 1.0f);
775 rt[2] = rt1[2] + fac * rt1[2] * (rt2[2] - 1.0f);
776 rt[3] = rt1[3] + fac * rt1[3] * (rt2[3] - 1.0f);
796 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
803 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
818template<
typename T,
typename Func>
820 float fac,
int width,
int height,
const T *src1,
T *src2,
T *dst, Func blend_function)
822 for (
int y = 0;
y < height;
y++) {
823 for (
int x = 0;
x < width;
x++) {
824 T achannel = src2[3];
825 src2[3] =
T(achannel * fac);
826 blend_function(dst, src1, src2);
837 float fac,
int x,
int y,
const float *rect1,
float *rect2,
int btype,
float *out)
909 float fac,
int x,
int y,
const uchar *rect1,
uchar *rect2,
int btype,
uchar *out)
991 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
994 fac, context->rectx, total_lines, rect1, rect2,
seq->blend_mode, rect_out);
997 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
1000 fac, context->rectx, total_lines, rect1, rect2,
seq->blend_mode, rect_out);
1014 if (
seq->effectdata) {
1020 data->factor = 1.0f;
1039 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
1042 fac, context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1045 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
1048 fac, context->rectx, total_lines, rect1, rect2,
data->blend_effect, rect_out);
1087static float in_band(
float width,
float dist,
int side,
int dir)
1100 alpha = (dist + 0.5f * width) / (width);
1103 alpha = (0.5f * width - dist) / (width);
1115 float posx, posy, hyp, hyp2,
angle, hwidth, b1, b2, b3, pointdist;
1116 float temp1, temp2, temp3, temp4;
1117 int xo = wipezone->
xo;
1118 int yo = wipezone->
yo;
1119 float halfx = xo * 0.5f;
1120 float halfy = yo * 0.5f;
1121 float widthf,
output = 0;
1124 if (wipezone->
flip) {
1134 posx = xo - fac * xo;
1135 posy = yo - fac * yo;
1138 switch (wipezone->
type) {
1141 width =
min_ii(width, yo - fac * yo);
1143 if (
angle == 0.0f) {
1149 b1 = posy - (-
angle) * posx;
1183 width = wipezone->
width;
1184 hwidth = width * 0.5f;
1187 b3 = yo - posy * 0.5f;
1190 hyp =
fabsf(
y - posy * 0.5f);
1191 hyp2 =
fabsf(
y - (yo - posy * 0.5f));
1194 b1 = posy * 0.5f - (-
angle) * posx * 0.5f;
1195 b3 = (yo - posy * 0.5f) - (-
angle) * (xo - posx * 0.5f);
1199 hyp2 =
fabsf(
angle *
x +
y + (-(yo - posy * 0.5f) -
angle * (xo - posx * 0.5f))) *
1205 if (b2 < b1 && b2 < b3) {
1208 else if (b2 > b1 && b2 > b3) {
1212 if (hyp < hwidth && hyp2 > hwidth) {
1215 else if (hyp > hwidth && hyp2 < hwidth) {
1250 temp3 = temp1 - widthf * fac;
1251 temp4 = temp1 + widthf * (1 - fac);
1254 temp3 = temp1 - widthf * (1 - fac);
1255 temp4 = temp1 + widthf * fac;
1260 if (temp4 > 2.0f *
float(
M_PI)) {
1264 if (temp2 < temp3) {
1267 else if (temp2 > temp4) {
1271 output = (temp2 - temp3) / (temp4 - temp3);
1273 if (
x == 0 &&
y == 0) {
1295 width = wipezone->
width;
1296 hwidth = width * 0.5f;
1298 temp1 = (halfx - (halfx)*fac);
1299 pointdist =
hypotf(temp1, temp1);
1301 temp2 =
hypotf(halfx -
x, halfy -
y);
1302 if (temp2 > pointdist) {
1326 if (
seq->effectdata) {
1350 const Sequence *
seq,
float fac,
int width,
int height,
const T *rect1,
const T *rect2,
T *out)
1357 const T *cp1 = rect1 ? rect1 + y_range.
first() * width * 4 :
nullptr;
1358 const T *cp2 = rect2 ? rect2 + y_range.
first() * width * 4 :
nullptr;
1359 T *rt = out + y_range.
first() * width * 4;
1360 for (
const int y : y_range) {
1361 for (
int x = 0;
x < width;
x++) {
1367 float4 col = col1 * check + col2 * (1.0f - check);
1376 memcpy(rt, cp2,
sizeof(
T) * 4);
1384 if (cp1 !=
nullptr) {
1387 if (cp2 !=
nullptr) {
1436 if (
seq->effectdata) {
1492 size_t offset = size_t(
x) * start_line;
1493 for (
int yi = start_line; yi < start_line + total_lines; yi++) {
1494 for (
int xi = 0; xi <
x; xi++) {
1496 float xt = xi - translate_x;
1497 float yt = yi - translate_y;
1500 float xr = c * xt + s * yt;
1501 float yr = -s * xt + c * yt;
1512 switch (interpolation) {
1554 float scale_x, scale_y, translate_x, translate_y, rotate_radians;
1558 scale_x = scale_y =
transform->ScalexIni;
1565 int x = context->rectx;
1566 int y = context->recty;
1571 double proxy_size_comp = context->scene->r.size / 100.0;
1576 translate_x =
transform->xIni * proxy_size_comp + (
x / 2.0f);
1577 translate_y =
transform->yIni * proxy_size_comp + (
y / 2.0f);
1580 translate_x =
x * (
transform->xIni / 100.0f) + (
x / 2.0f);
1581 translate_y =
y * (
transform->yIni / 100.0f) + (
y / 2.0f);
1608 const float4 *src,
float4 *map,
int width,
int height,
float blur,
int quality)
1618 const int halfWidth = ((quality + 1) * blur);
1619 if (halfWidth == 0) {
1627 const float k = -1.0f / (2.0f *
float(
M_PI) * blur * blur);
1629 for (
int ix = 0; ix < halfWidth; ix++) {
1630 weight =
float(
exp(k * (ix * ix)));
1631 filter[halfWidth - ix] = weight;
1632 filter[halfWidth + ix] = weight;
1637 for (
int ix = 0; ix < halfWidth * 2; ix++) {
1640 for (
int ix = 0; ix < halfWidth * 2; ix++) {
1646 for (
const int y : y_range) {
1647 for (
int x = 0;
x < width;
x++) {
1651 for (
int nx = xmin, index = (xmin -
x) + halfWidth; nx < xmax; nx++, index++) {
1652 curColor += map[nx +
y * width] *
filter[index];
1654 temp[
x +
y * width] = curColor;
1662 for (
const int x : x_range) {
1663 for (
int y = 0;
y < height;
y++) {
1667 for (
int ny = ymin, index = (ymin -
y) + halfWidth; ny < ymax; ny++, index++) {
1668 curColor += temp[
x + ny * width] *
filter[index];
1670 if (src !=
nullptr) {
1671 curColor =
math::min(one, src[
x +
y * width] + curColor);
1673 map[
x +
y * width] = curColor;
1690 for (
const int y : y_range) {
1691 int index =
y * width;
1692 for (
int x = 0;
x < width;
x++, index++) {
1695 float intensity = (in[index].x + in[index].y + in[index].z - threshold);
1697 if (intensity > 0) {
1698 val =
math::min(clampv, in[index] * (boost * intensity));
1713 if (
seq->effectdata) {
1767 glow->
dDist * (render_size / 100.0f),
1771 size_t offset = y_range.
first() *
x;
1773 *(outbuf.
data() + offset),
1806 glow->
dDist * (render_size / 100.0f),
1819 int render_size = 100 * context->rectx / context->scene->r.xsch;
1855 if (
seq->effectdata) {
1862 cv->
col[0] = cv->
col[1] = cv->
col[2] = 0.5;
1898 if (out->byte_buffer.data) {
1901 rgb_float_to_uchar(color, cv->col);
1904 uchar *dst = out->byte_buffer.data + y_range.first() * out->x * 4;
1905 uchar *dst_end = dst + y_range.size() * out->x * 4;
1906 while (dst < dst_end) {
1907 memcpy(dst, color, sizeof(color));
1914 color[0] = cv->col[0];
1915 color[1] = cv->col[1];
1916 color[2] = cv->col[2];
1919 float *dst = out->float_buffer.data + y_range.first() * out->x * 4;
1920 float *dst_end = dst + y_range.size() * out->x * 4;
1921 while (dst < dst_end) {
1922 memcpy(dst, color, sizeof(color));
1952 float timeline_frame,
1960 if (
seq->multicam_source == 0 ||
seq->multicam_source >=
seq->machine) {
1964 ed = context->scene->ed;
1975 context, timeline_frame,
seq->multicam_source,
channels, seqbasep);
2002 ed = context->scene->ed;
2010 timeline_frame =
clamp_i(timeline_frame,
2014 if (
seq->machine > 1) {
2016 context, timeline_frame,
seq->machine - 1,
channels, seqbasep);
2038 float timeline_frame,
2046 ed = context->scene->ed;
2067 if (
seq->effectdata) {
2075 v->speed_fader = 1.0f;
2076 v->speed_fader_length = 0.0f;
2077 v->speed_fader_frame_number = 0.0f;
2083 v->frameMap =
nullptr;
2105 v->frameMap =
nullptr;
2123 if ((
seq->seq1 ==
nullptr) || (effect_strip_length < 1)) {
2128 if (fcu ==
nullptr) {
2137 v->frameMap =
static_cast<float *
>(
MEM_mallocN(
sizeof(
float) * effect_strip_length, __func__));
2138 v->frameMap[0] = 0.0f;
2140 float target_frame = 0;
2141 for (
int frame_index = 1; frame_index < effect_strip_length; frame_index++) {
2144 CLAMP(target_frame, 0, target_frame_max);
2145 v->frameMap[frame_index] = target_frame;
2152 if (
v->frameMap !=
nullptr) {
2161 float timeline_frame,
2164 if (seq_speed->
seq1 ==
nullptr) {
2173 float target_frame = 0.0f;
2181 const float ratio = frame_index / speed_effetct_length;
2182 target_frame = target_content_length * ratio;
2187 if (fcu !=
nullptr) {
2189 target_frame = s->
frameMap[frame_index];
2205 target_frame += seq_speed->
start;
2209 return target_frame;
2214 return input == 0 ? target_frame :
ceil(target_frame);
2219 float timeline_frame)
2222 scene, seq_speed, timeline_frame, 0);
2223 return target_frame -
floor(target_frame);
2228 float timeline_frame,
2241 &cross_effect, context,
nullptr, timeline_frame, fac, ibuf1, ibuf2);
2265 int x = context->rectx;
2266 int y = total_lines;
2269 float *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
2277 uchar *rect1 =
nullptr, *rect2 =
nullptr, *rect_out =
nullptr;
2294 if (
seq->effectdata) {
2319 if (
data->size_x == 0.0f &&
data->size_y == 0) {
2327 int n = 2 *
size + 1;
2331 float fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
2332 for (
int i = -
size; i <=
size; i++) {
2335 gaussian[i +
size] = val;
2338 float inv_sum = 1.0f /
sum;
2339 for (
int i = 0; i < n; i++) {
2340 gaussian[i] *= inv_sum;
2356 dst +=
int64_t(start_line) * width * 4;
2357 for (
int y = start_line;
y < start_line + height;
y++) {
2358 for (
int x = 0;
x < width;
x++) {
2360 float accum_weight = 0.0f;
2363 int xmax =
math::min(
x + half_size, width - 1);
2364 for (
int nx = xmin, index = (xmin -
x) + half_size; nx <= xmax; nx++, index++) {
2365 float weight = gaussian[index];
2366 int offset = (
y * width + nx) * 4;
2367 accum +=
float4(rect + offset) * weight;
2368 accum_weight += weight;
2370 accum *= (1.0f / accum_weight);
2390 dst +=
int64_t(start_line) * width * 4;
2391 for (
int y = start_line;
y < start_line + height;
y++) {
2392 for (
int x = 0;
x < width;
x++) {
2394 float accum_weight = 0.0f;
2396 int ymax =
math::min(
y + half_size, frame_height - 1);
2397 for (
int ny = ymin, index = (ymin -
y) + half_size; ny <= ymax; ny++, index++) {
2398 float weight = gaussian[index];
2399 int offset = (ny * width +
x) * 4;
2400 accum +=
float4(rect + offset) * weight;
2401 accum_weight += weight;
2403 accum *= (1.0f / accum_weight);
2424 const int half_size_x =
int(
data->size_x + 0.5f);
2425 const int half_size_y =
int(
data->size_y + 0.5f);
2429 const int width = context->rectx;
2430 const int height = context->recty;
2436 const int y_first = y_range.first();
2437 const int y_size = y_range.size();
2439 gaussian_blur_x(gaussian_x,
2445 ibuf1->float_buffer.data,
2446 out->float_buffer.data);
2449 gaussian_blur_x(gaussian_x,
2455 ibuf1->byte_buffer.data,
2456 out->byte_buffer.data);
2464 const int y_first = y_range.first();
2465 const int y_size = y_range.size();
2467 gaussian_blur_y(gaussian_y,
2473 ibuf1->float_buffer.data,
2474 out->float_buffer.data);
2477 gaussian_blur_y(gaussian_y,
2483 ibuf1->byte_buffer.data,
2484 out->byte_buffer.data);
2504 if (
seq->effectdata) {
2509 data->text_font =
nullptr;
2510 data->text_blf_id = -1;
2511 data->text_size = 60.0f;
2514 data->shadow_color[3] = 0.7f;
2516 data->shadow_offset = 0.04f;
2517 data->shadow_blur = 0.0f;
2518 data->box_color[0] = 0.2f;
2519 data->box_color[1] = 0.2f;
2520 data->box_color[2] = 0.2f;
2521 data->box_color[3] = 0.7f;
2522 data->box_margin = 0.01f;
2523 data->outline_color[3] = 0.7f;
2524 data->outline_width = 0.05f;
2528 data->loc[0] = 0.5f;
2529 data->loc[1] = 0.5f;
2532 data->wrap_width = 1.0f;
2537 if (
data ==
nullptr) {
2542 if (do_id_user &&
data->text_font !=
nullptr) {
2544 data->text_font =
nullptr;
2548 if (
data->text_blf_id >= 0) {
2556 if (vfont ==
nullptr) {
2604 seq->effectdata =
nullptr;
2619 data->text_blf_id = -1;
2631 if (
data->text[0] == 0 ||
data->text_size < 1.0f ||
2632 ((
data->color[3] == 0.0f) &&
2634 (
data->outline_color[3] == 0.0f ||
data->outline_width <= 0.0f ||
2652 const rcti &shadow_rect)
2654 dst +=
int64_t(start_line) * width;
2655 for (
int y = start_line;
y < start_line + height;
y++) {
2656 for (
int x = 0;
x < width;
x++) {
2658 if (
x >= shadow_rect.
xmin &&
x <= shadow_rect.
xmax) {
2659 float accum_weight = 0.0f;
2662 for (
int nx = xmin, index = (xmin -
x) + half_size; nx <= xmax; nx++, index++) {
2663 float weight = gaussian[index];
2664 int offset =
y * width + nx;
2665 accum += rect[offset] * weight;
2666 accum_weight += weight;
2668 accum *= (1.0f / accum_weight);
2684 const rcti &shadow_rect)
2686 dst +=
int64_t(start_line) * width;
2687 for (
int y = start_line;
y < start_line + height;
y++) {
2688 for (
int x = 0;
x < width;
x++) {
2690 if (
x >= shadow_rect.
xmin &&
x <= shadow_rect.
xmax) {
2691 float accum_weight = 0.0f;
2694 for (
int ny = ymin, index = (ymin -
y) + half_size; ny <= ymax; ny++, index++) {
2695 float weight = gaussian[index];
2696 int offset = ny * width +
x;
2697 accum += rect[offset] * weight;
2698 accum_weight += weight;
2700 accum *= (1.0f / accum_weight);
2719 const rcti &shadow_rect,
2727 for (
int x = shadow_rect.
xmin;
x <= shadow_rect.
xmax;
x++) {
2729 size_t src_offset = width * src_y + src_x;
2730 size_t dst_offset = width *
y +
x;
2731 r_shadow_mask[dst_offset] = input[src_offset * 4 + 3];
2738 const rcti &shadow_rect,
2739 const float4 &shadow_color,
2746 size_t offset =
y * width + shadow_rect.
xmin;
2748 for (
int x = shadow_rect.
xmin;
x <= shadow_rect.
xmax;
x++, offset++, dst += 4) {
2749 uchar a = shadow_mask[offset];
2755 float4 col2 = shadow_color * (a * (1.0f / 255.0f));
2757 float fac = 1.0f - col1.w;
2771 const int width = context->rectx;
2772 const int height = context->recty;
2774 const float blur_amount = line_height * 0.5f *
data->shadow_blur;
2775 bool do_blur = blur_amount >= 1.0f;
2780 sinf(
data->shadow_angle) * line_height *
data->shadow_offset);
2782 rcti shadow_rect = rect;
2792 const int half_size =
int(blur_amount + 0.5f);
2795 BLI_rcti_pad(&shadow_rect, half_size + 1, half_size + 1);
2802 const int y_first = y_range.
first();
2803 const int y_size = y_range.
size();
2816 const int y_first = y_range.
first();
2817 const int y_size = y_range.
size();
2857 for (
const int64_t y : sub_y_range) {
2858 size_t index =
y *
size.x;
2865 float minimum_squared_distance = std::numeric_limits<float>::max();
2866 for (
int dy = -step_size; dy <= step_size; dy += step_size) {
2868 if (yy < 0 || yy >=
size.y) {
2871 for (
int dx = -step_size; dx <= step_size; dx += step_size) {
2873 if (xx < 0 || xx >=
size.x) {
2882 if (squared_distance < minimum_squared_distance) {
2883 minimum_squared_distance = squared_distance;
2884 closest_texel = val;
2889 output[index +
x] = closest_texel;
2906 const int outline_width =
int(line_height * 0.5f *
data->outline_width);
2907 if (outline_width < 1 || data->outline_color[3] <= 0.0f) {
2911 const int2 size =
int2(context->rectx, context->recty);
2914 const size_t pixel_count = size_t(
size.x) *
size.y;
2921 rcti outline_rect = rect;
2922 BLI_rcti_pad(&outline_rect, outline_width + 1, outline_width + 1);
2934 for (const int y : y_range) {
2935 size_t index = size_t(y) * size.x;
2936 for (int x = 0; x < size.x; x++, index++) {
2937 bool is_opaque = tmp_buf[index].w >= 128;
2939 coord.x = is_opaque ? x : JFA_INVALID;
2940 coord.y = is_opaque ? y : JFA_INVALID;
2941 boundary[index] = coord;
2957 while (step_size != 0) {
2959 *result_to_flood, *result_after_flooding,
size, rect_x_range, rect_y_range, step_size);
2960 std::swap(result_to_flood, result_after_flooding);
2970 const float text_color_alpha =
data->color[3];
2976 for (
const int y : y_range) {
2977 size_t index = size_t(
y) *
size.x + rect_x_range.start();
2978 uchar *dst = out->byte_buffer.data +
index * 4;
2979 for (
int x = rect_x_range.start();
x < rect_x_range.one_after_last();
x++, index++, dst += 4)
3000 float text_alpha = tmp_buf[
index].w * (1.0f / 255.0f);
3001 float mul_opaque_text = text_alpha >= 1.0f ? 0.0f : 1.0f;
3002 float mul_transparent_text = 1.0f - text_alpha;
3010 float mfac = 1.0f - col1.w;
3019 return outline_rect;
3025 const ImBuf *ibuf,
const float col[4],
int x1,
int y1,
int x2,
int y2)
3027 const int width = ibuf->
x;
3028 const int height = ibuf->
y;
3039 if (x1 == x2 || y1 == y2) {
3046 for (
int y = y1;
y < y2;
y++) {
3048 for (
int x = x1;
x < x2;
x++) {
3050 float fac = 1.0f - pix.w;
3051 float4 dst_fl = fac * premul_col + pix;
3069 const int width = out->
x;
3070 const int height = out->
y;
3073 double proxy_size_comp;
3076 data->text_blf_id = -1;
3081 if (
data->text_blf_id >= 0) {
3082 font =
data->text_blf_id;
3085 const char *display_device = context->scene->display_settings.display_device;
3089 proxy_size_comp = context->scene->r.size / 100.0;
3111 x = (
data->loc[0] * width);
3112 y = (
data->loc[1] * height) + y_ofs;
3134 y += (wrap_info.
lines - 1) * line_height;
3137 y += (((wrap_info.
lines - 1) / 2) * line_height) - (line_height / 2);
3143 rcti outline_rect = rect;
3153 BLF_buffer(font,
nullptr,
nullptr, 0, 0,
nullptr);
3164 const int margin =
data->box_margin * width;
3165 const int minx = rect.
xmin - margin;
3166 const int maxx = rect.
xmax + margin;
3167 const int miny = rect.
ymin - margin;
3168 const int maxy = rect.
ymax + margin;
3245 float timeline_frame,
3262 int sequence_type = seq_type;
3275 rval.
copy =
nullptr;
3277 switch (sequence_type) {
3449 if (
seq->blend_mode != 0) {
float evaluate_fcurve(const FCurve *fcu, float evaltime)
FCurve * id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *prop_name, int index, bool *r_driven)
void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const ID *id, char separator_char)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void BLF_size(int fontid, float size)
int BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_draw_buffer(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
void BLF_boundbox(int fontid, const char *str, size_t str_len, rcti *r_box, ResultBLF *r_info=nullptr) 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_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, ColorManagedDisplay *display)
void BLF_unload_id(int fontid)
int BLF_load(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLF_enable(int fontid, int option)
int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
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 int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE int power_of_2_max_i(int n)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE float sqrtf_signed(float f)
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 straight_to_premul_v4(float 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_fl(float r[4], float f)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
void BLI_rcti_pad(struct rcti *rect, int pad_x, int pad_y)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define STRNCPY(dst, src)
int BLI_thread_is_main(void)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define SEQ_FONT_NOT_LOADED
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_CENTER
@ SEQ_SPEED_USE_INTERPOLATION
@ SEQ_TEXT_ALIGN_X_CENTER
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
void IMB_colormanagement_assign_float_colorspace(ImBuf *ibuf, const char *name)
ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, unsigned char *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
void IMB_rect_from_float(ImBuf *ibuf)
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)
Contains defines and structs used throughout the imbuf module.
@ IB_uninitialized_pixels
Read Guarded memory(de)allocation.
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
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 void mul(btAlignedObjectArray< T > &items, const Q &value)
static T sum(const btAlignedObjectArray< T > &items)
ListBase * SEQ_get_channels_by_seq(ListBase *seqbase, ListBase *channels, const Sequence *seq)
constexpr int64_t first() const
constexpr int64_t size() const
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
static void do_blend_effect_byte(float fac, int x, int y, const uchar *rect1, uchar *rect2, int btype, uchar *out)
static StripEarlyOut early_out_fade(const Sequence *, float fac)
static void gaussian_blur_y(const Span< float > gaussian, int half_size, int start_line, int width, int height, int frame_height, const T *rect, T *dst)
constexpr uint16_t JFA_INVALID
static void do_cross_effect_byte(float fac, int x, int y, uchar *rect1, uchar *rect2, uchar *out)
static FCurve * seq_effect_speed_speed_factor_curve_get(Scene *scene, Sequence *seq)
static void init_text_effect(Sequence *seq)
static WipeZone precalc_wipe_zone(const WipeVars *wipe, int xo, int yo)
static void do_mul_effect(const SeqRenderData *context, Sequence *, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static int num_inputs_default()
static ImBuf * do_text_effect(const SeqRenderData *context, Sequence *seq, float, float, ImBuf *, ImBuf *)
static int num_inputs_text()
static void free_transform_effect(Sequence *seq, const bool)
static float in_band(float width, float dist, int side, int dir)
static void do_overdrop_effect(const SeqRenderData *context, Sequence *, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static bool alpha_opaque(uchar alpha)
static void free_effect_default(Sequence *seq, const bool)
static void text_gaussian_blur_x(const Span< float > gaussian, int half_size, int start_line, int width, int height, const uchar *rect, uchar *dst, const rcti &shadow_rect)
static StripEarlyOut early_out_gaussian_blur(const Sequence *seq, float)
static void copy_gaussian_blur_effect(Sequence *dst, const Sequence *src, const int)
static void free_speed_effect(Sequence *seq, const bool)
static void get_default_fac_fade(const Scene *scene, const Sequence *seq, float timeline_frame, float *fac)
float seq_speed_effect_target_frame_get(Scene *scene, Sequence *seq_speed, float timeline_frame, int input)
static void copy_glow_effect(Sequence *dst, const Sequence *src, const int)
static void do_mul_effect_byte(float fac, int x, int y, uchar *rect1, uchar *rect2, uchar *out)
static void init_speed_effect(Sequence *seq)
static ImBuf * prepare_effect_imbufs(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, bool uninitialized_pixels=true)
static StripEarlyOut early_out_text(const Sequence *seq, float)
static SeqEffectHandle get_sequence_effect_impl(int seq_type)
static void do_alphaunder_effect(float fac, int width, int height, const T *src1, const T *src2, T *dst)
static void composite_shadow(int width, const rcti &shadow_rect, const float4 &shadow_color, const Array< uchar > &shadow_mask, uchar *output)
static void fill_rect_alpha_under(const ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2)
static void text_gaussian_blur_y(const Span< float > gaussian, int half_size, int start_line, int width, int height, const uchar *rect, uchar *dst, const rcti &shadow_rect)
static void init_colormix_effect(Sequence *seq)
static void free_glow_effect(Sequence *seq, const bool)
static void glow_blur_bitmap(const float4 *src, float4 *map, int width, int height, float blur, int quality)
static void init_alpha_over_or_under(Sequence *seq)
static void draw_text_shadow(const SeqRenderData *context, const TextVars *data, int line_height, const rcti &rect, ImBuf *out)
static void init_glow_effect(Sequence *seq)
void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user)
static rcti draw_text_outline(const SeqRenderData *context, const TextVars *data, int font, ColorManagedDisplay *display, int x, int y, int line_height, const rcti &rect, ImBuf *out)
static void initialize_shadow_alpha(int width, int height, int2 offset, const rcti &shadow_rect, const uchar *input, Array< uchar > &r_shadow_mask)
static void load_text_effect(Sequence *seq)
SeqEffectHandle SEQ_effect_handle_get(Sequence *seq)
int SEQ_effect_get_num_inputs(int seq_type)
static void free_gaussian_blur_effect(Sequence *seq, const bool)
static ImBuf * init_execution(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2)
static void get_default_fac_noop(const Scene *, const Sequence *, float, float *fac)
static StripEarlyOut early_out_multicam(const Sequence *, float)
static void do_add_effect_byte(float fac, int x, int y, uchar *rect1, uchar *rect2, uchar *out)
static void do_add_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static void slice_get_float_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2, const ImBuf *out, int start_line, float **rect1, float **rect2, float **rect_out)
static StripEarlyOut early_out_mul_input2(const Sequence *, float fac)
static void do_sub_effect(const SeqRenderData *context, Sequence *, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static void init_wipe_effect(Sequence *seq)
static StripEarlyOut early_out_speed(const Sequence *, float)
static float invGammaCorrect(float c)
static StripEarlyOut early_out_mul_input1(const Sequence *, float fac)
static void free_solid_color(Sequence *seq, const bool)
static int num_inputs_gaussian_blur()
static void do_glow_effect_float(Sequence *seq, int render_size, float fac, int x, int y, float *rect1, float *, float *out)
static void apply_blend_function(float fac, int width, int height, const T *src1, T *src2, T *dst, Func blend_function)
static float gammaCorrect(float c)
static void slice_get_byte_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2, const ImBuf *out, int start_line, uchar **rect1, uchar **rect2, uchar **rect_out)
static void copy_speed_effect(Sequence *dst, const Sequence *src, const int)
static void do_gammacross_effect(float fac, int width, int height, const T *src1, const T *src2, T *dst)
static void do_cross_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static void copy_transform_effect(Sequence *dst, const Sequence *src, const int)
static ImBuf * do_glow_effect(const SeqRenderData *context, Sequence *seq, float, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
static void clamp_rect(int width, int height, rcti &r_rect)
static void do_transform_effect(const SeqRenderData *context, Sequence *seq, float, float, const ImBuf *ibuf1, const ImBuf *, int start_line, int total_lines, ImBuf *out)
static StripEarlyOut early_out_noop(const Sequence *, float)
static void copy_text_effect(Sequence *dst, const Sequence *src, const int flag)
static ImBuf * do_adjustment_impl(const SeqRenderData *context, Sequence *seq, float timeline_frame)
static int num_inputs_glow()
static void load_speed_effect(Sequence *seq)
static void transform_image(int x, int y, int start_line, int total_lines, const ImBuf *ibuf, ImBuf *out, float scale_x, float scale_y, float translate_x, float translate_y, float rotate, int interpolation)
static void do_colormix_effect(const SeqRenderData *context, Sequence *seq, float, float, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static void do_drop_effect_float(float fac, int x, int y, float *rect2i, float *rect1i, float *outi)
static int num_inputs_wipe()
static ImBuf * do_speed_effect(const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
static int num_inputs_speed()
static void blur_isolate_highlights(const float4 *in, float4 *out, int width, int height, float threshold, float boost, float clamp)
static float4 load_premul_pixel(const uchar *ptr)
static ImBuf * do_adjustment(const SeqRenderData *context, Sequence *seq, float timeline_frame, float, ImBuf *, ImBuf *)
static void free_noop(Sequence *, const bool)
static ImBuf * do_multicam(const SeqRenderData *context, Sequence *seq, float timeline_frame, float, ImBuf *, ImBuf *)
static void seq_effect_speed_frame_map_ensure(Scene *scene, Sequence *seq)
static void do_drop_effect_byte(float fac, int x, int y, uchar *rect2i, uchar *rect1i, uchar *outi)
static void init_solid_color(Sequence *seq)
static void copy_wipe_effect(Sequence *dst, const Sequence *src, const int)
static void copy_solid_color(Sequence *dst, const Sequence *src, const int)
static int num_inputs_transform()
static void do_cross_effect(const SeqRenderData *context, Sequence *, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static void free_text_effect(Sequence *seq, const bool do_id_user)
static void copy_effect_default(Sequence *dst, const Sequence *src, const int)
static void load_noop(Sequence *)
static StripEarlyOut early_out_adjustment(const Sequence *, float)
static void do_sub_effect_byte(float fac, int x, int y, uchar *rect1, uchar *rect2, uchar *out)
static void do_blend_effect_float(float fac, int x, int y, const float *rect1, float *rect2, int btype, float *out)
static void do_mul_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static ImBuf * do_solid_color(const SeqRenderData *context, Sequence *seq, float, float, ImBuf *ibuf1, ImBuf *ibuf2)
static float speed_effect_interpolation_ratio_get(Scene *scene, Sequence *seq_speed, float timeline_frame)
static void do_add_effect(const SeqRenderData *context, Sequence *, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static void store_opaque_black_pixel(uchar *dst)
static void do_wipe_effect(const Sequence *seq, float fac, int width, int height, const T *rect1, const T *rect2, T *out)
static void do_blend_mode_effect(const SeqRenderData *context, Sequence *seq, float, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
static void init_noop(Sequence *)
void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq)
static int num_inputs_color()
static void gaussian_blur_x(const Span< float > gaussian, int half_size, int start_line, int width, int height, int, const T *rect, T *dst)
static void jump_flooding_pass(Span< JFACoord > input, MutableSpan< JFACoord > output, int2 size, IndexRange x_range, IndexRange y_range, int step_size)
static void store_premul_pixel(const float4 &pix, uchar *dst)
static void init_transform_effect(Sequence *seq)
static void init_gaussian_blur_effect(Sequence *seq)
static int num_inputs_multicam()
static float check_zone(const WipeZone *wipezone, int x, int y, float fac)
static void do_alphaover_effect(float fac, int width, int height, const T *src1, const T *src2, T *dst)
static void do_sub_effect_float(float fac, int x, int y, float *rect1, float *rect2, float *out)
static ImBuf * do_gaussian_blur_effect(const SeqRenderData *context, Sequence *seq, float, float, ImBuf *ibuf1, ImBuf *)
static Array< float > make_gaussian_blur_kernel(float rad, int size)
static void free_wipe_effect(Sequence *seq, const bool)
static void do_glow_effect_byte(Sequence *seq, int render_size, float fac, int x, int y, uchar *rect1, uchar *, uchar *out)
void SEQ_effect_text_font_load(TextVars *data, const bool do_id_user)
static int num_inputs_adjustment()
static StripEarlyOut early_out_color(const Sequence *, float)
SeqEffectHandle seq_effect_get_sequence_blend(Sequence *seq)
#define pf(_x, _i)
Prefetch 64.
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
void IMB_freeImBuf(ImBuf *)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
float RE_filter_value(int type, float x)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_dupallocN)(const void *vmemh)
ccl_device_inline float2 floor(const float2 a)
ccl_device_inline float3 exp(float3 v)
ccl_device_inline float3 ceil(const float3 a)
int context(const bContext *C, const char *member, bContextDataResult *result)
float4 interpolate_nearest_border_fl(const ImBuf *in, float u, float v)
uchar4 interpolate_nearest_border_byte(const ImBuf *in, float u, float v)
uchar4 interpolate_cubic_bspline_byte(const ImBuf *in, float u, float v)
float4 interpolate_cubic_bspline_fl(const ImBuf *in, float u, float v)
uchar4 interpolate_bilinear_border_byte(const ImBuf *in, float u, float v)
float4 interpolate_bilinear_border_fl(const ImBuf *in, float u, float v)
T clamp(const T &a, const T &min, const T &max)
T distance(const T &a, const T &b)
T min(const T &a, const T &b)
T interpolate(const T &a, const T &b, const FactorT &t)
T distance_squared(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
T max(const T &a, const T &b)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
blender::VecBase< uint8_t, 4 > uchar4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
static void rotate(float new_co[3], float a, const float ax[3], const float co[3])
float distance(float a, float b)
double SEQ_rendersize_to_scale_factor(int render_size)
void seq_imbuf_to_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float)
ImBuf * seq_render_give_ibuf_seqbase(const SeqRenderData *context, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
ImBuf * seq_render_effect_execute_threaded(SeqEffectHandle *sh, const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
ListBase * SEQ_get_seqbase_by_seq(const Scene *scene, Sequence *seq)
Sequence * SEQ_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq)
float SEQ_give_frame_index(const Scene *scene, const Sequence *seq, float timeline_frame)
int SEQ_time_strip_length_get(const Scene *scene, const Sequence *seq)
int SEQ_time_left_handle_frame_get(const Scene *, const Sequence *seq)
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
ColorManagedColorspaceSettings sequencer_colorspace_settings
void(* free)(Sequence *seq, bool do_id_user)
void(* get_default_fac)(const Scene *scene, const Sequence *seq, float timeline_frame, float *fac)
void(* copy)(Sequence *dst, const Sequence *src, int flag)
void(* init)(Sequence *seq)
ImBuf *(* init_execution)(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2)
void(* load)(Sequence *seqconst)
ImBuf *(* execute)(const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
StripEarlyOut(* early_out)(const Sequence *seq, float fac)
void(* execute_slice)(const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, const ImBuf *ibuf1, const ImBuf *ibuf2, int start_line, int total_lines, ImBuf *out)
float speed_fader_frame_number
struct PackedFile * packedfile
ccl_device_inline int clamp(int a, int mn, int mx)