52#include "RNA_prototypes.hh"
102 if (ibuf->rect !=
nullptr) {
125 if (!make_float &&
STREQ(from_colorspace, to_colorspace)) {
143 if (from_colorspace ==
nullptr || from_colorspace[0] ==
'\0') {
173 if (to_colorspace && to_colorspace[0] !=
'\0') {
191 if (to_colorspace && to_colorspace[0] !=
'\0') {
211 int preview_render_size,
215 r_context->
bmain = bmain;
217 r_context->
scene = scene;
218 r_context->
rectx = rectx;
219 r_context->
recty = recty;
245 if (frame_index == -1 || se ==
nullptr) {
257 const int timeline_frame,
261 const int strip_count = strips.
size();
271 return a->channel < b->channel;
278 Scene *scene = context->scene;
279 const int x = context->rectx;
280 const int y = context->recty;
281 const float2 offset{
x * 0.5f,
y * 0.5f};
285 float(scene->
r.size) / 100.0f :
322 if (
quad.is_empty()) {
337 if (!
quad.is_empty()) {
395 if (context && context->is_proxy_render) {
415 if (strip->
sat != 1.0f) {
434 if (is_proxy_image) {
449 const float image_scale_factor,
450 const float preview_scale_factor)
457 const int3 image_center_offs((
out->x -
in->x) / 2, (
out->y -
in->y) / 2, 0);
461 const float rotation =
transform->rotation;
463 transform->scale_y * image_scale_factor);
467 translation +
float2(image_center_offs), rotation, scale);
474 float crop_scale_factor,
478 const int left = c->
left * crop_scale_factor;
479 const int right = c->
right * crop_scale_factor;
480 const int top = c->
top * crop_scale_factor;
481 const int bottom = c->
bottom * crop_scale_factor;
493 float x1 = float(context->rectx);
494 float y1 = float(context->recty);
495 float x_aspect = context->scene->r.xasp / context->scene->r.yasp;
496 if (x_aspect != 1.0f) {
497 float xmid = (x0 + x1) * 0.5f;
498 x0 = xmid - (xmid - x0) * x_aspect;
499 x1 = xmid + (x1 - xmid) * x_aspect;
502 if (
quad.is_empty()) {
519 if (sx > 2.0f && sy > 2.0f) {
522 if (sx < 0.5f && sy < 0.5f) {
528 if (sx == 1.0f && sy == 1.0f && roundf(px) == px && roundf(py) == py &&
rot == 0.0f) {
537 const Scene *scene = context->scene;
539 float(scene->
r.size) / 100 :
542 const float image_scale_factor = do_scale_to_render_size ? 1.0f : preview_scale_factor;
545 strip,
in,
out, image_scale_factor, preview_scale_factor);
550 const float crop_scale_factor = do_scale_to_render_size ? preview_scale_factor : 1.0f;
579 out->planes =
in->planes;
591 "Sequencer only supports 4 channel images");
596 const int imul = int(256.0f * fmul);
597 for ([[maybe_unused]]
const int64_t i : range) {
601 if (multiply_alpha) {
612 for ([[maybe_unused]]
const int64_t i : range) {
616 if (multiply_alpha) {
627 float timeline_frame,
629 const bool is_proxy_image)
631 Scene *scene = context->scene;
632 ImBuf *preprocessed_ibuf =
nullptr;
638 ibuf = preprocessed_ibuf;
644 context->recty != ibuf->
y)
646 const int x = context->rectx;
647 const int y = context->recty;
659 if (preprocessed_ibuf ==
nullptr) {
671 if (strip->
sat != 1.0f) {
699 return preprocessed_ibuf;
705 float timeline_frame,
707 const bool is_proxy_image)
709 if (context->is_proxy_render ==
false &&
710 (ibuf->
x != context->rectx || ibuf->
y != context->recty))
712 use_preprocess =
true;
719 if (!is_proxy_image && !is_effect_with_inputs) {
726 if (use_preprocess) {
727 ibuf =
input_preprocess(context, strip, timeline_frame, ibuf, is_proxy_image);
736 float timeline_frame)
738 Scene *scene = context->scene;
742 const FCurve *fcu =
nullptr;
747 ibuf[0] = ibuf[1] =
nullptr;
775 out = sh.
execute(context, strip, timeline_frame, fac,
nullptr,
nullptr);
778 for (
i = 0;
i < 2;
i++) {
782 scene, strip, timeline_frame,
i);
787 target_frame = std::floor(target_frame);
800 out = sh.
execute(context, strip, timeline_frame, fac, ibuf[0], ibuf[1]);
815 for (
i = 0;
i < 2;
i++) {
819 if (
out ==
nullptr) {
866 ImBuf *ibuf =
nullptr;
873 if (prefix[0] ==
'\0') {
884 if (ibuf ==
nullptr) {
903 const char *filepath,
909 if (r_prefix[0] ==
'\0') {
922 if (context->ignore_missing_media) {
925 if (context->scene ==
nullptr || context->scene->ed ==
nullptr ||
932 float col[4] = {0.85f, 0.0f, 0.75f, 1.0f};
940 bool *r_is_proxy_image)
943 const char *ext =
nullptr;
945 ImBuf *ibuf =
nullptr;
948 if (s_elem ==
nullptr) {
957 if (ibuf !=
nullptr) {
958 *r_is_proxy_image =
true;
965 context->scene, strip, totfiles, filepath, prefix, ext);
967 if (is_multiview_render) {
971 for (
int view_id = 0; view_id < totfiles; view_id++) {
973 context, strip, filepath, prefix, ext, view_id);
976 if (ibufs_arr[0] ==
nullptr) {
984 for (
int view_id = 0; view_id < totviews; view_id++) {
986 localcontext.
view_id = view_id;
988 if (view_id != context->view_id) {
990 &localcontext, strip, ibufs_arr[view_id], timeline_frame,
true,
false);
995 ibuf = ibufs_arr[context->view_id];
998 for (
int view_id = 0; view_id < totviews; view_id++) {
999 if (ibufs_arr[view_id] != ibuf) {
1011 if (ibuf ==
nullptr) {
1028 if (proxy->
anim ==
nullptr) {
1032 if (proxy->
anim ==
nullptr) {
1045 if (!use_timecodes) {
1057 float timeline_frame,
1059 bool *r_is_proxy_image)
1061 ImBuf *ibuf =
nullptr;
1080 if (ibuf !=
nullptr) {
1081 *r_is_proxy_image =
true;
1086 if (ibuf ==
nullptr) {
1092 if (ibuf ==
nullptr) {
1108 float timeline_frame,
1109 bool *r_is_proxy_image)
1114 ImBuf *ibuf =
nullptr;
1121 if (is_multiview_render) {
1128 sanim = sanim->
next, ibuf_view_id++)
1132 context, strip, timeline_frame, sanim, r_is_proxy_image);
1137 if (ibuf_arr[0] ==
nullptr) {
1146 for (
int view_id = 0; view_id < totviews; view_id++) {
1148 localcontext.
view_id = view_id;
1150 if (view_id != context->view_id && ibuf_arr[view_id]) {
1152 &localcontext, strip, ibuf_arr[view_id], timeline_frame,
true,
false);
1157 ibuf = ibuf_arr[context->view_id];
1160 for (
int view_id = 0; view_id < totviews; view_id++) {
1161 if (ibuf_arr[view_id] != ibuf) {
1173 if (ibuf ==
nullptr) {
1178 if (*r_is_proxy_image ==
false) {
1179 if (sanim && sanim->
anim) {
1191 ImBuf *ibuf =
nullptr;
1192 float tloc[2], tscale, tangle;
1206 bool *r_is_proxy_image)
1208 ImBuf *ibuf =
nullptr;
1247 *r_is_proxy_image =
true;
1251 if (ibuf ==
nullptr) {
1262 ImBuf *ibuf =
nullptr;
1282 context->depsgraph,
mask->sfra + frame_index);
1290 mr_handle, mask_temp, context->rectx, context->recty,
true,
true,
true);
1300 const float *fp_src;
1308 i = context->rectx * context->recty;
1310 fp_dst[0] = fp_dst[1] = fp_dst[2] = *fp_src;
1319 const float *fp_src;
1327 i = context->rectx * context->recty;
1329 ub_dst[0] = ub_dst[1] = ub_dst[2] =
uchar(*fp_src * 255.0f);
1352 float timeline_frame)
1354 ImBuf *ibuf =
nullptr;
1396 const bool is_rendering =
G.is_rendering;
1397 bool is_preview = !context->for_render && (context->scene->r.seq_prev_type) !=
OB_RENDER;
1399 bool have_comp =
false;
1400 bool use_gpencil =
true;
1402 bool is_frame_update =
false;
1406 if (strip->
scene ==
nullptr) {
1411 if (strip->
scene == context->scene) {
1415 scene = strip->
scene;
1416 frame = double(scene->
r.sfra) + double(frame_index) + double(strip->
anim_startofs);
1428 orig_data.scemode = scene->
r.scemode;
1429 orig_data.timeline_frame = scene->
r.cfra;
1430 orig_data.subframe = scene->
r.subframe;
1431 orig_data.mode = scene->
r.mode;
1443 if (have_comp ==
false && camera ==
nullptr) {
1448 use_gpencil =
false;
1457 is_frame_update = (orig_data.timeline_frame != scene->
r.cfra) ||
1458 (orig_data.subframe != scene->
r.subframe);
1460 if (
view3d_fn && is_preview && camera) {
1461 char err_out[256] =
"unknown";
1474 if (context->scene->r.seq_prev_type == 0) {
1475 context->scene->r.seq_prev_type = 3 ;
1487 &context->scene->display.shading,
1488 eDrawType(context->scene->r.seq_prev_type),
1496 context->gpu_offscreen,
1497 context->gpu_viewport,
1499 if (ibuf ==
nullptr) {
1500 fprintf(stderr,
"seq_render_scene_strip failed to get opengl buffer: %s\n", err_out);
1518 if (is_preview && (is_rendering && !
G.background)) {
1524 if (re ==
nullptr) {
1528 const float subframe = frame -
floorf(frame);
1533 have_comp ?
nullptr : view_layer,
1540 G.is_rendering = is_rendering;
1542 for (
int view_id = 0; view_id < totviews; view_id++) {
1546 localcontext.
view_id = view_id;
1554 memcpy(ibufs_arr[view_id]->float_buffer.data,
1563 memcpy(ibufs_arr[view_id]->byte_buffer.data,
1571 if (view_id != context->view_id) {
1582 ibuf = ibufs_arr[context->view_id];
1585 for (
int view_id = 0; view_id < totviews; view_id++) {
1586 if (ibufs_arr[view_id] != ibuf) {
1595 scene->
r.scemode = orig_data.scemode;
1596 scene->
r.cfra = orig_data.timeline_frame;
1597 scene->
r.subframe = orig_data.subframe;
1599 if (is_frame_update && (
depsgraph !=
nullptr)) {
1617 ImBuf *ibuf =
nullptr;
1626 frame_index += offset;
1633 context->scene, frame_index, context->view_id, context->rectx, context->recty);
1655 float timeline_frame,
1656 bool *r_is_proxy_image)
1658 ImBuf *ibuf =
nullptr;
1659 float frame_index =
give_frame_index(context->scene, strip, timeline_frame);
1669 if (strip->
scene && (context->scene != strip->
scene)) {
1675 scene_parent.
next =
state->scene_parents;
1677 state->scene_parents = &scene_parent;
1689 state->scene_parents =
state->scene_parents->next;
1750 float timeline_frame)
1752 bool use_preprocess =
false;
1753 bool is_proxy_image =
false;
1756 if (ibuf !=
nullptr) {
1765 if (ibuf ==
nullptr) {
1772 context, strip, ibuf, timeline_frame, use_preprocess, is_proxy_image);
1776 if (ibuf ==
nullptr) {
1820 out = sh.
execute(context, strip, timeline_frame, fac, ibuf2, ibuf1);
1823 out = sh.
execute(context, strip, timeline_frame, fac, ibuf1, ibuf2);
1853 float timeline_frame,
1857 context->scene, channels, seqbasep, timeline_frame, chanshown);
1866 for (
i = strips.
size() - 1;
i >= 0;
i--) {
1867 Strip *strip = strips[
i];
1903 if (ibuf_raw !=
nullptr) {
1911 switch (early_out) {
1950 for (;
i < strips.
size();
i++) {
1951 Strip *strip = strips[
i];
1986 const size_t source_per_final = std::max<size_t>(
1987 divide_ceil_ul(count_source, std::max<size_t>(count_final, 1)), 1);
1991 bool evicted_source =
false;
1992 for (
size_t i = 0;
i < source_per_final;
i++) {
1995 if (!evicted_final && !evicted_source) {
2003 Scene *scene = context->scene;
2008 if (
ed ==
nullptr) {
2020 seqbasep =
ed->seqbasep;
2021 channels =
ed->displayed_channels;
2025 scene, timeline_frame, context->view_id, context->rectx, context->recty);
2029 if (!context->skip_cache && !context->is_proxy_render) {
2034 scene, channels, seqbasep, timeline_frame, chanshown);
2048 !context->is_proxy_render)
2051 orig_scene, seqbasep, timeline_frame, context->view_id, chanshown,
out);
2061 float timeline_frame,
2076 context->scene, timeline_frame, context->view_id, context->rectx, context->recty);
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)
MovieReader * openanim(const char *filepath, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
void BKE_id_free(Main *bmain, void *idv)
@ LIB_ID_COPY_NO_ANIMDATA
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)
void BKE_movieclip_convert_multilayer_ibuf(struct ImBuf *ibuf)
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)
#define BLI_assert_msg(a, msg)
int BLI_linklist_index(const LinkNode *list, const void *ptr) ATTR_WARN_UNUSED_RESULT
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
BLI_INLINE bool BLI_listbase_count_is_equal_to(const ListBase *listbase, const int count_cmp)
int BLI_listbase_count(const 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 uint64_t divide_ceil_ul(uint64_t a, uint64_t 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])
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)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *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_EDIT_PROXY_DIR_STORAGE
@ SEQ_MOVIECLIP_RENDER_UNDISTORTED
@ SEQ_MOVIECLIP_RENDER_STABILIZED
@ 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_EDIT_SHOW_MISSING_MEDIA
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_SPEED_USE_INTERPOLATION
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_SCENE_NO_ANNOTATION
@ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS
@ V3D_OFSDRAW_SHOW_ANNOTATION
void IMB_colormanagement_transform_byte_to_float(float *float_buffer, unsigned char *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
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_float(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
@ COLOR_ROLE_SCENE_LINEAR
const char * IMB_colormanagement_role_colorspace_name_get(int role)
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)
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
void IMB_flipx(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const blender::float3x3 &transform_matrix, const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership)
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.
void IMB_buffer_float_from_float_threaded(float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_freeImBuf(ImBuf *ibuf)
void IMB_saturation(ImBuf *ibuf, float sat)
size_t IMB_get_pixel_count(const ImBuf *ibuf)
Get the length of the data of the given image buffer in pixels.
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_free_byte_pixels(ImBuf *ibuf)
void IMB_filtery(ImBuf *ibuf)
void IMB_rectfill(ImBuf *drect, const float col[4])
bool IMB_alloc_float_pixels(ImBuf *ibuf, const unsigned int channels, bool initialize_pixels=true)
eIMBInterpolationFilterMode
@ IMB_FILTER_CUBIC_BSPLINE
@ IMB_FILTER_CUBIC_MITCHELL
#define IB_PROFILE_LINEAR_RGB
@ IB_uninitialized_pixels
Read Guarded memory(de)allocation.
BPy_StructRNA * depsgraph
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
static void mul(btAlignedObjectArray< T > &items, const Q &value)
constexpr int64_t first() const
blender::gpu::Batch * quad
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
float MOV_get_fps(const MovieReader *anim)
ImBuf * MOV_decode_frame(MovieReader *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
CartesianBasis invert(const CartesianBasis &basis)
MatT from_origin_transform(const MatT &transform, const VectorT origin)
MatT from_loc_rot_scale(const typename MatT::loc_type &location, const RotationT &rotation, const VecBase< typename MatT::base_type, ScaleDim > &scale)
bool render_is_muted(const ListBase *channels, const Strip *strip)
static ImBuf * seq_render_image_strip_view(const RenderData *context, Strip *strip, char *filepath, char *prefix, const char *ext, int view_id)
static ImBuf * seq_render_movie_strip(const RenderData *context, Strip *strip, float timeline_frame, bool *r_is_proxy_image)
void source_image_cache_put(const RenderData *context, const Strip *strip, float timeline_frame, ImBuf *image)
void render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, int preview_render_size, int for_render, RenderData *r_context)
static IMB_Timecode_Type seq_render_movie_strip_timecode_get(Strip *strip)
void intra_frame_cache_set_cur_frame(Scene *scene, float frame, int view_id, int width, int height)
Array< float2 > image_transform_final_quad_get(const Scene *scene, const Strip *strip)
static ImBuf * do_render_strip_seqbase(const RenderData *context, SeqRenderState *state, Strip *strip, float frame_index)
void seq_imbuf_to_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float)
EffectHandle strip_effect_handle_get(Strip *strip)
ImBuf * render_give_ibuf(const RenderData *context, float timeline_frame, int chanshown)
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf)
static ImBuf * input_preprocess(const RenderData *context, Strip *strip, float timeline_frame, ImBuf *ibuf, const bool is_proxy_image)
SeqTimelineChannel * channel_get_by_index(const ListBase *channels, const int channel_index)
static ImBuf * do_render_strip_uncached(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, bool *r_is_proxy_image)
static ImBuf * seq_render_scene_strip(const RenderData *context, Strip *strip, float frame_index, float timeline_frame)
static ImBuf * seq_render_movie_strip_view(const RenderData *context, Strip *strip, float timeline_frame, StripAnim *sanim, bool *r_is_proxy_image)
void relations_free_all_anim_ibufs(Scene *scene, int timeline_frame)
static ImBuf * seq_render_effect_strip_impl(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
ImBuf * seq_render_give_ibuf_seqbase(const RenderData *context, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
static bool is_opaque_alpha_over(const Strip *strip)
bool source_image_cache_evict(Scene *scene)
static bool seq_must_swap_input_in_blend_mode(Strip *strip)
Editing * editing_get(const Scene *scene)
static ImBuf * seq_render_image_strip(const RenderData *context, Strip *strip, int timeline_frame, bool *r_is_proxy_image)
double rendersize_to_scale_factor(int render_size)
static ImBuf * seq_render_strip_stack_apply_effect(const RenderData *context, Strip *strip, float timeline_frame, ImBuf *ibuf1, ImBuf *ibuf2)
ImBuf * seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
static ImBuf * seq_get_movieclip_ibuf(Strip *strip, MovieClipUser user)
static void multiply_ibuf(ImBuf *ibuf, const float fmul, const bool multiply_alpha)
ImBuf * intra_frame_cache_get_composite(Scene *scene, const Strip *strip)
static bool is_quad_a_inside_b(const StripScreenQuad &a, const StripScreenQuad &b)
int rendersize_to_proxysize(int render_size)
void strip_open_anim_file(Scene *scene, Strip *strip, bool openfile)
static ImBuf * seq_render_preprocess_ibuf(const RenderData *context, Strip *strip, ImBuf *ibuf, float timeline_frame, bool use_preprocess, const bool is_proxy_image)
size_t source_image_cache_get_image_count(const Scene *scene)
void seq_prefetch_start(const RenderData *context, float timeline_frame)
ImBuf * intra_frame_cache_get_preprocessed(Scene *scene, const Strip *strip)
static bool seq_image_strip_is_multiview_render(Scene *scene, Strip *strip, int totfiles, const char *filepath, char *r_prefix, const char *r_ext)
static ImBuf * create_missing_media_image(const RenderData *context, int width, int height)
constexpr int MAX_CHANNELS
struct ImBuf *(*)(struct Depsgraph *, struct Scene *, struct View3DShading *, eDrawType, struct Object *, int, int, enum eImBufFlags, eV3DOffscreenDrawFlag, int, const char *, struct GPUOffScreen *, struct GPUViewport *, char *) DrawViewFn
static ImBuf * seq_render_movie_strip_custom_file_proxy(const RenderData *context, Strip *strip, int timeline_frame)
static ImBuf * seq_render_mask_strip(const RenderData *context, Strip *strip, float frame_index)
static bool is_strip_covering_screen(const RenderData *context, const Strip *strip)
static blender::Mutex seq_render_mutex
float strip_speed_effect_target_frame_get(Scene *scene, Strip *strip_speed, float timeline_frame, int input)
StripScreenQuad get_strip_screen_quad(const RenderData *context, const Strip *strip)
static StripEarlyOut strip_get_early_out_for_blend_mode(Strip *strip)
static ImBuf * seq_render_strip_stack(const RenderData *context, SeqRenderState *state, ListBase *channels, ListBase *seqbasep, float timeline_frame, int chanshown)
bool can_use_proxy(const RenderData *context, const Strip *strip, int psize)
ImBuf * source_image_cache_get(const RenderData *context, const Strip *strip, float timeline_frame)
void final_image_cache_put(Scene *scene, const ListBase *seqbasep, const float timeline_frame, const int view_id, const int display_channel, ImBuf *image)
bool final_image_cache_evict(Scene *scene)
ImBuf * seq_render_mask(const RenderData *context, Mask *mask, float frame_index, bool make_float)
void render_pixel_from_sequencer_space_v4(const Scene *scene, float pixel[4])
ImBuf * final_image_cache_get(Scene *scene, const ListBase *seqbasep, const float timeline_frame, const int view_id, const int display_channel)
bool is_cache_full(const Scene *scene)
void intra_frame_cache_put_composite(Scene *scene, const Strip *strip, ImBuf *image)
static void evict_caches_if_full(Scene *scene)
static float3x3 sequencer_image_crop_transform_matrix(const Strip *strip, const ImBuf *in, const ImBuf *out, const float image_scale_factor, const float preview_scale_factor)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
void render_imbuf_from_sequencer_space(const Scene *scene, ImBuf *ibuf)
size_t final_image_cache_get_image_count(const Scene *scene)
static bool seq_input_have_to_preprocess(const RenderData *context, Strip *strip, float)
bool channel_is_muted(const SeqTimelineChannel *channel)
void media_presence_set_missing(Scene *scene, const Strip *strip, bool missing)
Vector< Strip * > seq_shown_strips_get(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int chanshown)
static eIMBInterpolationFilterMode get_auto_filter(const StripTransform *transform)
static bool sequencer_use_crop(const Strip *strip)
static void sequencer_preprocess_transform_crop(ImBuf *in, ImBuf *out, const RenderData *context, Strip *strip, const bool is_proxy_image)
static void sequencer_image_crop_init(const Strip *strip, const ImBuf *in, float crop_scale_factor, rctf *r_crop)
static void convert_multilayer_ibuf(ImBuf *ibuf)
ListBase * get_seqbase_from_strip(Strip *strip, ListBase **r_channels, int *r_offset)
bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
int seq_num_files(Scene *scene, char views_format, const bool is_multiview)
void modifier_apply_stack(const RenderData *context, const Strip *strip, ImBuf *ibuf, int timeline_frame)
static bool sequencer_use_transform(const Strip *strip)
EffectHandle strip_effect_get_sequence_blend(Strip *strip)
static ImBuf * seq_render_movieclip_strip(const RenderData *context, Strip *strip, float frame_index, bool *r_is_proxy_image)
Scene * prefetch_get_original_scene(const RenderData *context)
ImBuf * seq_render_strip(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
static bool seq_need_scale_to_render_size(const Strip *strip, bool is_proxy_image)
ImBuf * render_give_ibuf_direct(const RenderData *context, float timeline_frame, Strip *strip)
int effect_get_num_inputs(int strip_type)
void intra_frame_cache_put_preprocessed(Scene *scene, const Strip *strip, ImBuf *image)
void seq_multiview_name(Scene *scene, const int view_id, const char *prefix, const char *ext, char *r_path, size_t r_size)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
VecBase< float, 2 > float2
VecBase< int32_t, 3 > int3
MatBase< float, 3, 3 > float3x3
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)
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
struct bNodeTree * nodetree
ColorManagedColorspaceSettings sequencer_colorspace_settings
struct MovieReader * anim
StripTransform * transform
ColorManagedColorspaceSettings colorspace_settings
struct MovieReader * anim
struct Object * scene_camera
struct Stereo3dFormat * stereo3d_format
ImBuf *(* execute)(const RenderData *context, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
void(* get_default_fac)(const Scene *scene, const Strip *strip, float timeline_frame, float *fac)
StripEarlyOut(* early_out)(const Strip *strip, float fac)
bool is_occluded(const RenderData *context, const Strip *strip, int order_index) const
void add_occluder(const RenderData *context, const Strip *strip, int order_index)
Vector< OpaqueQuad, 4 > opaques
GPUOffScreen * gpu_offscreen
float motion_blur_shutter
bool ignore_missing_media
GPUViewport * gpu_viewport