50#include "RNA_prototypes.hh"
97 if (ibuf->rect !=
nullptr) {
113 const char *to_colorspace = scene->sequencer_colorspace_settings.name;
120 if (!make_float &&
STREQ(from_colorspace, to_colorspace)) {
157 if (from_colorspace ==
nullptr || from_colorspace[0] ==
'\0') {
179 const char *from_colorspace = scene->sequencer_colorspace_settings.name;
187 if (to_colorspace && to_colorspace[0] !=
'\0') {
201 const char *from_colorspace = scene->sequencer_colorspace_settings.name;
205 if (to_colorspace && to_colorspace[0] !=
'\0') {
225 int preview_render_size,
229 r_context->
bmain = bmain;
232 r_context->
rectx = rectx;
233 r_context->
recty = recty;
259 if (frame_index == -1 || se ==
nullptr) {
271 const int timeline_frame,
276 scene, channels, seqbase, timeline_frame, chanshown);
277 const int strip_count = strips.
size();
284 result.reserve(strips.
size());
290 std::sort(result.begin(), result.end(), [](
const Sequence *a,
const Sequence *
b) {
291 return a->machine < b->machine;
298 Scene *scene = context->scene;
299 const int x = context->rectx;
300 const int y = context->recty;
301 float2 offset{x * 0.5f, y * 0.5f};
337 if (
quad.is_empty()) {
352 if (!
quad.is_empty()) {
384 if (transform->xofs != 0 || transform->yofs != 0 || transform->scale_x != 1 ||
385 transform->scale_y != 1 || transform->rotation != 0)
409 if (context && context->is_proxy_render) {
429 if (seq->
sat != 1.0f) {
448 if (is_proxy_image) {
463 const float image_scale_factor,
464 const float preview_scale_factor,
465 float r_transform_matrix[4][4])
468 const float scale_x = transform->
scale_x * image_scale_factor;
469 const float scale_y = transform->scale_y * image_scale_factor;
470 const float image_center_offs_x = (out->x - in->x) / 2;
471 const float image_center_offs_y = (out->y - in->y) / 2;
472 const float translate_x = transform->xofs * preview_scale_factor + image_center_offs_x;
473 const float translate_y = transform->yofs * preview_scale_factor + image_center_offs_y;
474 const float pivot[3] = {in->x * transform->origin[0], in->y * transform->origin[1], 0.0f};
476 float rotation_matrix[3][3];
479 float3{translate_x, translate_y, 0.0f},
481 float3{scale_x, scale_y, 1.0f});
488 float crop_scale_factor,
492 const int left = c->
left * crop_scale_factor;
493 const int right = c->
right * crop_scale_factor;
494 const int top = c->
top * crop_scale_factor;
495 const int bottom = c->
bottom * crop_scale_factor;
497 BLI_rctf_init(r_crop, left, in->x - right, bottom, in->y - top);
507 float x1 =
float(context->rectx);
508 float y1 =
float(context->recty);
509 float x_aspect = context->scene->r.xasp / context->scene->r.yasp;
510 if (x_aspect != 1.0f) {
511 float xmid = (x0 + x1) * 0.5f;
512 x0 = xmid - (xmid - x0) * x_aspect;
513 x1 = xmid + (x1 - xmid) * x_aspect;
528 const float sx =
fabsf(transform->scale_x);
529 const float sy =
fabsf(transform->scale_y);
530 if (sx > 2.0f && sy > 2.0f) {
533 if (sx < 0.5f && sy < 0.5f) {
536 const float px = transform->xofs;
537 const float py = transform->yofs;
538 const float rot = transform->rotation;
539 if (sx == 1.0f && sy == 1.0f && roundf(px) == px && roundf(py) == py &&
rot == 0.0f) {
548 const Scene *scene = context->scene;
550 float(scene->r.size) / 100 :
552 context->preview_render_size);
554 const float image_scale_factor = do_scale_to_render_size ? 1.0f : preview_scale_factor;
556 float transform_matrix[4][4];
558 seq, in, out, image_scale_factor, preview_scale_factor, transform_matrix);
563 const float crop_scale_factor = do_scale_to_render_size ? preview_scale_factor : 1.0f;
568 switch (transform->filter) {
592 out->planes = in->planes;
607 const int imul =
int(256.0f * fmul);
612 if (multiply_alpha) {
627 if (multiply_alpha) {
638 float timeline_frame,
640 const bool is_proxy_image)
642 Scene *scene = context->scene;
643 ImBuf *preprocessed_ibuf =
nullptr;
649 ibuf = preprocessed_ibuf;
655 context->recty != ibuf->
y)
657 const int x = context->rectx;
658 const int y = context->recty;
669 if (preprocessed_ibuf ==
nullptr) {
681 if (seq->
sat != 1.0f) {
709 return preprocessed_ibuf;
715 float timeline_frame,
717 const bool is_proxy_image)
719 if (context->is_proxy_render ==
false &&
720 (ibuf->
x != context->rectx || ibuf->
y != context->recty))
722 use_preprocess =
true;
728 if (!is_proxy_image && !is_effect_with_inputs) {
732 if (use_preprocess) {
733 ibuf =
input_preprocess(context, seq, timeline_frame, ibuf, is_proxy_image);
772 handle->timeline_frame =
init_data->timeline_frame;
778 handle->start_line = start_line;
779 handle->tot_line = tot_line;
802 float timeline_frame,
813 init_data.timeline_frame = timeline_frame;
831 float timeline_frame)
833 Scene *scene = context->scene;
837 const FCurve *fcu =
nullptr;
840 ImBuf *out =
nullptr;
842 ibuf[0] = ibuf[1] =
nullptr;
844 input[0] = seq->
seq1;
845 input[1] = seq->
seq2;
870 out = sh.
execute(context, seq, timeline_frame, fac,
nullptr,
nullptr);
873 for (i = 0; i < 2; i++) {
881 target_frame = std::floor(target_frame);
896 &sh, context, seq, timeline_frame, fac, ibuf[0], ibuf[1]);
899 out = sh.
execute(context, seq, timeline_frame, fac, ibuf[0], ibuf[1]);
915 for (i = 0; i < 2; i++) {
919 if (out ==
nullptr) {
942 ImBuf *ibuf =
nullptr;
949 if (prefix[0] ==
'\0') {
959 if (ibuf ==
nullptr) {
977 const char *filepath,
983 if (r_prefix[0] ==
'\0') {
996 if (context->ignore_missing_media) {
999 if (context->scene ==
nullptr || context->scene->ed ==
nullptr ||
1006 float col[4] = {0.85f, 0.0f, 0.75f, 1.0f};
1014 bool *r_is_proxy_image)
1017 const char *ext =
nullptr;
1019 ImBuf *ibuf =
nullptr;
1022 if (s_elem ==
nullptr) {
1031 if (ibuf !=
nullptr) {
1032 *r_is_proxy_image =
true;
1039 context->scene, seq, totfiles, filepath, prefix, ext);
1041 if (is_multiview_render) {
1046 for (
int view_id = 0; view_id < totfiles; view_id++) {
1048 context, seq, filepath, prefix, ext, view_id);
1051 if (ibufs_arr[0] ==
nullptr) {
1059 for (
int view_id = 0; view_id < totviews; view_id++) {
1061 localcontext.
view_id = view_id;
1063 if (view_id != context->view_id) {
1065 &localcontext, seq, ibufs_arr[view_id], timeline_frame,
true,
false);
1070 ibuf = ibufs_arr[context->view_id];
1073 for (
int view_id = 0; view_id < totviews; view_id++) {
1074 if (ibufs_arr[view_id] != ibuf) {
1086 if (ibuf ==
nullptr) {
1103 if (proxy->
anim ==
nullptr) {
1107 if (proxy->
anim ==
nullptr) {
1120 if (!use_timecodes) {
1132 float timeline_frame,
1134 bool *r_is_proxy_image)
1136 ImBuf *ibuf =
nullptr;
1156 if (ibuf !=
nullptr) {
1157 *r_is_proxy_image =
true;
1162 if (ibuf ==
nullptr) {
1168 if (ibuf ==
nullptr) {
1184 float timeline_frame,
1185 bool *r_is_proxy_image)
1190 ImBuf *ibuf =
nullptr;
1197 if (is_multiview_render) {
1200 ibuf_arr =
static_cast<ImBuf **
>(
1205 sanim = sanim->
next, ibuf_view_id++)
1209 context, seq, timeline_frame, sanim, r_is_proxy_image);
1214 if (ibuf_arr[0] ==
nullptr) {
1223 for (
int view_id = 0; view_id < totviews; view_id++) {
1225 localcontext.
view_id = view_id;
1227 if (view_id != context->view_id && ibuf_arr[view_id]) {
1229 &localcontext, seq, ibuf_arr[view_id], timeline_frame,
true,
false);
1234 ibuf = ibuf_arr[context->view_id];
1237 for (
int view_id = 0; view_id < totviews; view_id++) {
1238 if (ibuf_arr[view_id] != ibuf) {
1250 if (ibuf ==
nullptr) {
1255 if (*r_is_proxy_image ==
false) {
1256 if (sanim && sanim->
anim) {
1271 ImBuf *ibuf =
nullptr;
1272 float tloc[2], tscale, tangle;
1285 bool *r_is_proxy_image)
1287 ImBuf *ibuf =
nullptr;
1325 *r_is_proxy_image =
true;
1329 if (ibuf ==
nullptr) {
1343 ImBuf *ibuf =
nullptr;
1363 context->depsgraph, mask->sfra + frame_index);
1366 maskbuf =
static_cast<float *
>(
1367 MEM_mallocN(
sizeof(
float) * context->rectx * context->recty, __func__));
1372 mr_handle, mask_temp, context->rectx, context->recty,
true,
true,
true);
1382 const float *fp_src;
1390 i = context->rectx * context->recty;
1392 fp_dst[0] = fp_dst[1] = fp_dst[2] = *fp_src;
1401 const float *fp_src;
1408 i = context->rectx * context->recty;
1410 ub_dst[0] = ub_dst[1] = ub_dst[2] =
uchar(*fp_src * 255.0f);
1433 float timeline_frame)
1435 ImBuf *ibuf =
nullptr;
1444#ifdef DURIAN_CAMERA_SWITCH
1480 const bool is_rendering =
G.is_rendering;
1481 bool is_preview = !context->for_render && (context->scene->r.seq_prev_type) !=
OB_RENDER;
1483 bool have_comp =
false;
1484 bool use_gpencil =
true;
1486 bool is_frame_update =
false;
1490 if (seq->
scene ==
nullptr) {
1495 if (seq->
scene == context->scene) {
1503 have_seq = (scene->r.scemode &
R_DOSEQ) && scene->ed && scene->ed->seqbase.first;
1505 have_comp = (scene->r.scemode &
R_DOCOMP) && scene->use_nodes && scene->nodetree;
1512 orig_data.scemode = scene->r.scemode;
1513 orig_data.timeline_frame = scene->r.cfra;
1514 orig_data.subframe = scene->r.subframe;
1515#ifdef DURIAN_CAMERA_SWITCH
1516 orig_data.mode = scene->r.mode;
1526 camera = scene->camera;
1529 if (have_comp ==
false && camera ==
nullptr) {
1534 use_gpencil =
false;
1538 scene->r.scemode &= ~R_DOSEQ;
1540#ifdef DURIAN_CAMERA_SWITCH
1545 is_frame_update = (orig_data.timeline_frame != scene->r.cfra) ||
1546 (orig_data.subframe != scene->r.subframe);
1549 char err_out[256] =
"unknown";
1562 if (context->scene->r.seq_prev_type == 0) {
1563 context->scene->r.seq_prev_type = 3 ;
1574 &context->scene->display.shading,
1575 eDrawType(context->scene->r.seq_prev_type),
1583 context->gpu_offscreen,
1584 context->gpu_viewport,
1586 if (ibuf ==
nullptr) {
1587 fprintf(stderr,
"seq_render_scene_strip failed to get opengl buffer: %s\n", err_out);
1605 if (is_preview && (is_rendering && !
G.background)) {
1609 ibufs_arr =
static_cast<ImBuf **
>(
1612 if (re ==
nullptr) {
1616 const float subframe = frame -
floorf(frame);
1621 have_comp ?
nullptr : view_layer,
1628 G.is_rendering = is_rendering;
1630 for (
int view_id = 0; view_id < totviews; view_id++) {
1634 localcontext.
view_id = view_id;
1642 memcpy(ibufs_arr[view_id]->float_buffer.data,
1651 memcpy(ibufs_arr[view_id]->byte_buffer.data,
1659 if (view_id != context->view_id) {
1667 ibuf = ibufs_arr[context->view_id];
1670 for (
int view_id = 0; view_id < totviews; view_id++) {
1671 if (ibufs_arr[view_id] != ibuf) {
1680 scene->r.scemode = orig_data.scemode;
1681 scene->r.cfra = orig_data.timeline_frame;
1682 scene->r.subframe = orig_data.subframe;
1684 if (is_frame_update && (
depsgraph !=
nullptr)) {
1688#ifdef DURIAN_CAMERA_SWITCH
1690 scene->r.mode &= orig_data.mode | ~R_NO_CAMERA_SWITCH;
1704 ImBuf *ibuf =
nullptr;
1722 frame_index + offset,
1738 float timeline_frame,
1739 bool *r_is_proxy_image)
1741 ImBuf *ibuf =
nullptr;
1752 if (seq->
scene && (context->scene != seq->
scene)) {
1758 scene_parent.
next =
state->scene_parents;
1760 state->scene_parents = &scene_parent;
1772 state->scene_parents =
state->scene_parents->next;
1833 float timeline_frame)
1835 ImBuf *ibuf =
nullptr;
1836 bool use_preprocess =
false;
1837 bool is_proxy_image =
false;
1840 if (ibuf !=
nullptr) {
1850 if (ibuf ==
nullptr) {
1857 context, seq, ibuf, timeline_frame, use_preprocess, is_proxy_image);
1860 if (ibuf ==
nullptr) {
1870 bool swap_input =
false;
1914 &sh, context, seq, timeline_frame, fac, ibuf2, ibuf1);
1917 out = sh.
execute(context, seq, timeline_frame, fac, ibuf2, ibuf1);
1923 &sh, context, seq, timeline_frame, fac, ibuf1, ibuf2);
1926 out = sh.
execute(context, seq, timeline_frame, fac, ibuf1, ibuf2);
1957 float timeline_frame,
1961 context->scene, channels, seqbasep, timeline_frame, chanshown);
1969 ImBuf *out =
nullptr;
1970 for (i = strips.
size() - 1; i >= 0; i--) {
2008 if (ibuf_raw !=
nullptr) {
2016 switch (early_out) {
2055 for (; i < strips.
size(); i++) {
2080 Scene *scene = context->scene;
2085 if (ed ==
nullptr) {
2101 ImBuf *out =
nullptr;
2104 scene, channels, seqbasep, timeline_frame, chanshown);
2118 if (context->is_prefetch_render) {
2134 float timeline_frame,
2145 float timeline_frame,
AnimData * BKE_animdata_from_id(const ID *id)
void BKE_animsys_evaluate_all_animation(struct Main *main, struct Depsgraph *depsgraph, float ctime)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
void BKE_animsys_evaluate_animdata(struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, bool flush_to_original)
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)
ImBufAnim * openanim(const char *filepath, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
@ LIB_ID_COPY_NO_ANIMDATA
void BKE_id_free(Main *bmain, void *idv)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
void BKE_maskrasterize_handle_free(MaskRasterHandle *mr_handle)
MaskRasterHandle * BKE_maskrasterize_handle_new(void)
void BKE_mask_evaluate(struct Mask *mask, float ctime, bool do_newframe)
void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mask, int width, int height, bool do_aspect_correct, bool do_mask_aa, bool do_feather)
void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle, unsigned int width, unsigned int height, float *buffer)
Rasterize a buffer from a single mask (threaded execution).
struct ImBuf * BKE_movieclip_get_stable_ibuf(struct MovieClip *clip, const struct MovieClipUser *user, int postprocess_flag, float r_loc[2], float *r_scale, float *r_angle)
bool BKE_movieclip_proxy_enabled(struct MovieClip *clip)
#define MOVIECLIP_CACHE_SKIP
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr)
struct ImBuf * BKE_movieclip_get_ibuf_flag(struct MovieClip *clip, const struct MovieClipUser *user, int flag, int cache_flag)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
int BKE_scene_multiview_num_views_get(const RenderData *rd)
void BKE_scene_frame_set(Scene *scene, float frame)
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
bool BKE_scene_camera_switch_update(Scene *scene)
Depsgraph * BKE_scene_ensure_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer)
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
const char * BKE_scene_multiview_render_view_name_get(const RenderData *rd, int view_id)
struct ImBuf *(* SequencerDrawView)(struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, struct Object *camera, int width, int height, enum eImBufFlags flag, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, struct GPUOffScreen *ofs, struct GPUViewport *viewport, char err_out[256])
#define BLI_assert_msg(a, msg)
int BLI_linklist_index(const LinkNode *list, const void *ptr) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_count_is_equal_to(const struct ListBase *listbase, const int count_cmp)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
int isect_point_quad_v2(const float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2])
void loc_rot_size_to_mat4(float R[4][4], const float loc[3], const float rot[3][3], const float size[3])
void transform_pivot_set_m4(float mat[4][4], const float pivot[3])
bool invert_m4(float mat[4][4])
void axis_angle_to_mat3_single(float R[3][3], char axis, float angle)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
#define BLI_path_join(...)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
#define BLI_MUTEX_INITIALIZER
int BLI_thread_is_main(void)
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_t ThreadMutex
typedef double(DMatrix)[4][4]
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define DNA_struct_default_get(struct_name)
@ MCLIP_PROXY_RENDER_SIZE_75
@ MCLIP_PROXY_RENDER_SIZE_100
@ MCLIP_PROXY_RENDER_SIZE_50
@ MCLIP_PROXY_RENDER_SIZE_FULL
@ MCLIP_PROXY_RENDER_SIZE_25
@ MCLIP_PROXY_RENDER_USE_FALLBACK_RENDER
@ MCLIP_PROXY_RENDER_UNDISTORT
@ R_SEQ_OVERRIDE_SCENE_SETTINGS
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_MOVIECLIP_RENDER_UNDISTORTED
@ SEQ_MOVIECLIP_RENDER_STABILIZED
@ SEQ_CACHE_STORE_PREPROCESSED
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_STORE_COMPOSITE
@ SEQ_EDIT_SHOW_MISSING_MEDIA
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_SCENE_NO_ANNOTATION
@ SEQ_TRANSFORM_FILTER_CUBIC_BSPLINE
@ SEQ_TRANSFORM_FILTER_AUTO
@ SEQ_TRANSFORM_FILTER_CUBIC_MITCHELL
@ SEQ_TRANSFORM_FILTER_BILINEAR
@ SEQ_TRANSFORM_FILTER_BOX
@ SEQ_TRANSFORM_FILTER_NEAREST
@ SEQ_SPEED_USE_INTERPOLATION
@ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS
@ V3D_OFSDRAW_SHOW_ANNOTATION
void IMB_colormanagement_assign_byte_colorspace(ImBuf *ibuf, const char *name)
void IMB_colormanagement_assign_float_colorspace(ImBuf *ibuf, 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)
void IMB_colormanagement_transform_threaded(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
void IMB_colormanagement_transform_byte_threaded(unsigned char *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
const char * IMB_colormanagement_role_colorspace_name_get(int role)
@ COLOR_ROLE_SCENE_LINEAR
const char * IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf)
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace)
const char * IMB_colormanagement_get_float_colorspace(ImBuf *ibuf)
void IMB_flipy(ImBuf *ibuf)
void imb_freerectImBuf(ImBuf *ibuf)
size_t IMB_get_rect_len(const ImBuf *ibuf)
Get the length of the rect of the given image buffer in terms of pixels.
void IMB_flipx(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
ImBuf * IMB_anim_absolute(ImBufAnim *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
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 *))
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
bool IMB_anim_get_fps(const ImBufAnim *anim, bool no_av_base, short *r_frs_sec, float *r_frs_sec_base)
void IMB_ImBufFromStereo3d(const Stereo3dFormat *s3d, ImBuf *ibuf_stereo3d, ImBuf **r_ibuf_left, ImBuf **r_ibuf_right)
@ IMB_TRANSFORM_MODE_CROP_SRC
Crop the source buffer.
ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
void IMB_saturation(ImBuf *ibuf, float sat)
void IMB_filtery(ImBuf *ibuf)
void IMB_rectfill(ImBuf *drect, const float col[4])
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const float transform_matrix[4][4], const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
eIMBInterpolationFilterMode
@ IMB_FILTER_CUBIC_BSPLINE
@ IMB_FILTER_CUBIC_MITCHELL
bool imb_addrectfloatImBuf(ImBuf *ibuf, const unsigned int channels, bool initialize_pixels=true)
Contains defines and structs used throughout the imbuf module.
@ IB_uninitialized_pixels
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
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
constexpr int SEQ_MAX_CHANNELS
static void mul(btAlignedObjectArray< T > &items, const Q &value)
SeqTimelineChannel * SEQ_channel_get_by_index(const ListBase *channels, const int channel_index)
bool SEQ_channel_is_muted(const SeqTimelineChannel *channel)
void append(const T &value)
const T & last(const int64_t n=0) const
local_group_size(16, 16) .push_constant(Type b
const Depsgraph * depsgraph
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
float seq_speed_effect_target_frame_get(Scene *scene, Sequence *seq_speed, float timeline_frame, int input)
SeqEffectHandle SEQ_effect_handle_get(Sequence *seq)
int SEQ_effect_get_num_inputs(int seq_type)
SeqEffectHandle seq_effect_get_sequence_blend(Sequence *seq)
blender::gpu::Batch * quad
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
void IMB_freeImBuf(ImBuf *)
ImBuf * seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type)
bool seq_cache_put_if_possible(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *ibuf)
void seq_cache_put(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *i)
void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame)
VectorSet< Sequence * > SEQ_query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
int seq_num_files(Scene *scene, char views_format, const bool is_multiview)
void seq_multiview_name(Scene *scene, const int view_id, const char *prefix, const char *ext, char *r_path, size_t r_size)
void media_presence_set_missing(Scene *scene, const Sequence *seq, bool missing)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
static void init_data(ModifierData *md)
VecBase< float, 2 > float2
void seq_prefetch_start(const SeqRenderData *context, float timeline_frame)
bool seq_proxy_get_custom_file_filepath(Sequence *seq, char *filepath, const int view_id)
ImBuf * seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int timeline_frame)
int SEQ_rendersize_to_proxysize(int render_size)
bool SEQ_can_use_proxy(const SeqRenderData *context, const Sequence *seq, int psize)
double SEQ_rendersize_to_scale_factor(int render_size)
static ImBuf * seq_render_preprocess_ibuf(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, float timeline_frame, bool use_preprocess, const bool is_proxy_image)
static void multiply_ibuf(ImBuf *ibuf, const float fmul, const bool multiply_alpha)
static bool is_opaque_alpha_over(const Sequence *seq)
static ImBuf * seq_render_scene_strip(const SeqRenderData *context, Sequence *seq, float frame_index, float timeline_frame)
static ImBuf * input_preprocess(const SeqRenderData *context, Sequence *seq, float timeline_frame, ImBuf *ibuf, const bool is_proxy_image)
ImBuf * SEQ_render_give_ibuf_direct(const SeqRenderData *context, float timeline_frame, Sequence *seq)
static ImBuf * seq_render_image_strip(const SeqRenderData *context, Sequence *seq, int timeline_frame, bool *r_is_proxy_image)
static ImBuf * seq_render_mask_strip(const SeqRenderData *context, Sequence *seq, float frame_index)
static ImBuf * seq_render_strip_stack_apply_effect(const SeqRenderData *context, Sequence *seq, float timeline_frame, ImBuf *ibuf1, ImBuf *ibuf2)
void seq_imbuf_to_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float)
SequencerDrawView sequencer_view3d_fn
static ThreadMutex seq_render_mutex
StripScreenQuad get_strip_screen_quad(const SeqRenderData *context, const Sequence *seq)
static bool is_quad_a_inside_b(const StripScreenQuad &a, const StripScreenQuad &b)
void SEQ_render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, int preview_render_size, int for_render, SeqRenderData *r_context)
static eIMBInterpolationFilterMode get_auto_filter(const StripTransform *transform)
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf)
static void sequencer_image_crop_init(const Sequence *seq, const ImBuf *in, float crop_scale_factor, rctf *r_crop)
static ImBuf * seq_render_movie_strip(const SeqRenderData *context, Sequence *seq, float timeline_frame, bool *r_is_proxy_image)
static void sequencer_preprocess_transform_crop(ImBuf *in, ImBuf *out, const SeqRenderData *context, Sequence *seq, const bool is_proxy_image)
static ImBuf * seq_render_movie_strip_custom_file_proxy(const SeqRenderData *context, Sequence *seq, int timeline_frame)
ImBuf * SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown)
static ImBuf * seq_get_movieclip_ibuf(Sequence *seq, MovieClipUser user)
static ImBuf * seq_render_strip_stack(const SeqRenderData *context, SeqRenderState *state, ListBase *channels, ListBase *seqbasep, float timeline_frame, int chanshown)
static StripEarlyOut seq_get_early_out_for_blend_mode(Sequence *seq)
bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
static bool seq_need_scale_to_render_size(const Sequence *seq, bool is_proxy_image)
ImBuf * seq_render_mask(const SeqRenderData *context, Mask *mask, float frame_index, bool make_float)
static ImBuf * do_render_strip_seqbase(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float frame_index)
static ImBuf * create_missing_media_image(const SeqRenderData *context, int width, int height)
static void * render_effect_execute_do_thread(void *thread_data_v)
static bool seq_must_swap_input_in_blend_mode(Sequence *seq)
StripElem * SEQ_render_give_stripelem(const Scene *scene, const Sequence *seq, int timeline_frame)
static bool seq_input_have_to_preprocess(const SeqRenderData *context, Sequence *seq, float)
void SEQ_render_pixel_from_sequencer_space_v4(Scene *scene, float pixel[4])
static ImBuf * seq_render_movie_strip_view(const SeqRenderData *context, Sequence *seq, float timeline_frame, StripAnim *sanim, bool *r_is_proxy_image)
static void sequencer_image_crop_transform_matrix(const Sequence *seq, const ImBuf *in, const ImBuf *out, const float image_scale_factor, const float preview_scale_factor, float r_transform_matrix[4][4])
static ImBuf * seq_render_image_strip_view(const SeqRenderData *context, Sequence *seq, char *filepath, char *prefix, const char *ext, int view_id)
static ImBuf * seq_render_effect_strip_impl(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float timeline_frame)
static IMB_Timecode_Type seq_render_movie_strip_timecode_get(Sequence *seq)
static ImBuf * do_render_strip_uncached(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float timeline_frame, bool *r_is_proxy_image)
static bool sequencer_use_crop(const Sequence *seq)
static bool seq_image_strip_is_multiview_render(Scene *scene, Sequence *seq, int totfiles, const char *filepath, char *r_prefix, const char *r_ext)
ImBuf * seq_render_give_ibuf_seqbase(const SeqRenderData *context, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
ImBuf * seq_render_strip(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float timeline_frame)
static bool is_strip_covering_screen(const SeqRenderData *context, const Sequence *seq)
ImBuf * seq_render_effect_execute_threaded(SeqEffectHandle *sh, const SeqRenderData *context, Sequence *seq, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
static bool sequencer_use_transform(const Sequence *seq)
static ImBuf * seq_render_movieclip_strip(const SeqRenderData *context, Sequence *seq, float frame_index, bool *r_is_proxy_image)
void SEQ_render_imbuf_from_sequencer_space(Scene *scene, ImBuf *ibuf)
static void render_effect_execute_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
Vector< Sequence * > seq_get_shown_sequences(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int chanshown)
void SEQ_modifier_apply_stack(const SeqRenderData *context, const Sequence *seq, ImBuf *ibuf, int timeline_frame)
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
ListBase * SEQ_get_seqbase_from_sequence(Sequence *seq, ListBase **r_channels, int *r_offset)
Editing * SEQ_editing_get(const Scene *scene)
void RE_ReleaseResultImage(Render *re)
void RE_AcquireResultImage(Render *re, RenderResult *rr, const int view_id)
void RE_RenderFrame(Render *re, Main *bmain, Scene *scene, ViewLayer *single_layer, Object *camera_override, const int frame, const float subframe, const bool write_still)
Render * RE_NewSceneRender(const Scene *scene)
Render * RE_GetSceneRender(const Scene *scene)
void SEQ_relations_free_all_anim_ibufs(Scene *scene, int timeline_frame)
float SEQ_give_frame_index(const Scene *scene, const Sequence *seq, float timeline_frame)
ListBase * displayed_channels
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
bool is_occluded(const SeqRenderData *context, const Sequence *seq, int order_index) const
void add_occluder(const SeqRenderData *context, const Sequence *seq, int order_index)
Vector< OpaqueQuad, 4 > opaques
const SeqRenderData * context
const SeqRenderData * context
void(* get_default_fac)(const Scene *scene, const Sequence *seq, float timeline_frame, float *fac)
ImBuf *(* init_execution)(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2)
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)
GPUOffScreen * gpu_offscreen
GPUViewport * gpu_viewport
float motion_blur_shutter
bool ignore_missing_media
struct Object * scene_camera
struct Stereo3dFormat * stereo3d_format
ColorManagedColorspaceSettings colorspace_settings
StripTransform * transform