Blender V5.0
proxy.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 * SPDX-FileCopyrightText: 2003-2009 Blender Authors
3 * SPDX-FileCopyrightText: 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later */
6
10
11#include "MEM_guardedalloc.h"
12
13#include "DNA_scene_types.h"
14#include "DNA_sequence_types.h"
15
16#include "BLI_fileops.h"
17#include "BLI_listbase.h"
18#include "BLI_math_base.h"
19#include "BLI_path_utils.hh"
20#include "BLI_string.h"
21
22#ifdef WIN32
23# include "BLI_winstuff.h"
24#else
25# include <unistd.h>
26#endif
27
28#include "BKE_global.hh"
29#include "BKE_image.hh"
30#include "BKE_main.hh"
31#include "BKE_scene.hh"
32
33#include "WM_types.hh"
34
35#include "IMB_imbuf.hh"
36#include "IMB_imbuf_types.hh"
37#include "IMB_metadata.hh"
38
39#include "MOV_read.hh"
40
41#include "SEQ_proxy.hh"
42#include "SEQ_relations.hh"
43#include "SEQ_render.hh"
44#include "SEQ_sequencer.hh"
45#include "SEQ_time.hh"
46
48#include "multiview.hh"
49#include "proxy.hh"
50#include "render.hh"
51#include "sequencer.hh"
52#include "utils.hh"
53
54namespace blender::seq {
55
71
73{
74 switch (render_size) {
76 return IMB_PROXY_25;
78 return IMB_PROXY_50;
80 return IMB_PROXY_75;
82 return IMB_PROXY_100;
83 default:
84 return IMB_PROXY_NONE;
85 }
86}
87
89{
90 switch (render_size) {
92 return 0.25f;
94 return 0.5f;
96 return 0.75f;
97 default:
98 return 1.0f;
99 }
100}
101
102bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
103{
104 /* Ideally this would be #PROXY_MAXFILE however BLI_path_abs clamps to #FILE_MAX. */
105 char filepath_temp[FILE_MAX];
106 char suffix[24];
107 StripProxy *proxy = strip->data->proxy;
108
109 if (proxy == nullptr) {
110 return false;
111 }
112
113 BLI_path_join(filepath_temp, sizeof(filepath_temp), proxy->dirpath, proxy->filename);
115
116 if (view_id > 0) {
117 SNPRINTF(suffix, "_%d", view_id);
118 /* TODO(sergey): This will actually append suffix after extension
119 * which is weird but how was originally coded in multi-view branch.
120 */
121 BLI_snprintf(filepath, PROXY_MAXFILE, "%s_%s", filepath_temp, suffix);
122 }
123 else {
124 BLI_strncpy(filepath, filepath_temp, PROXY_MAXFILE);
125 }
126
127 return true;
128}
129
130static bool seq_proxy_get_filepath(Scene *scene,
131 Strip *strip,
132 int timeline_frame,
133 eSpaceSeq_Proxy_RenderSize render_size,
134 char *filepath,
135 const int view_id)
136{
137 char dirpath[PROXY_MAXFILE];
138 char suffix[24] = {'\0'};
139 Editing *ed = editing_get(scene);
140 StripProxy *proxy = strip->data->proxy;
141
142 if (proxy == nullptr) {
143 return false;
144 }
145
146 /* Multi-view suffix. */
147 if (view_id > 0) {
148 SNPRINTF(suffix, "_%d", view_id);
149 }
150
151 /* Per strip with Custom file situation is handled separately. */
153 ed->proxy_storage != SEQ_EDIT_PROXY_DIR_STORAGE)
154 {
155 if (seq_proxy_get_custom_file_filepath(strip, filepath, view_id)) {
156 return true;
157 }
158 }
159
160 if (ed->proxy_storage == SEQ_EDIT_PROXY_DIR_STORAGE) {
161 /* Per project default. */
162 if (ed->proxy_dir[0] == 0) {
163 STRNCPY(dirpath, "//BL_proxy");
164 }
165 else { /* Per project with custom dirpath. */
166 STRNCPY(dirpath, ed->proxy_dir);
167 }
169 }
170 else {
171 /* Pre strip with custom dir. */
173 STRNCPY(dirpath, strip->data->proxy->dirpath);
174 }
175 else { /* Per strip default. */
176 SNPRINTF(dirpath, "%s" SEP_STR "BL_proxy", strip->data->dirpath);
177 }
178 }
179
180 /* Proxy size number to be used in path. */
181 int proxy_size_number = rendersize_to_scale_factor(render_size) * 100;
182
183 BLI_snprintf(filepath,
185 "%s" SEP_STR "images" SEP_STR "%d" SEP_STR "%s_proxy%s.jpg",
186 dirpath,
187 proxy_size_number,
188 render_give_stripelem(scene, strip, timeline_frame)->filename,
189 suffix);
191 return true;
192}
193
194bool can_use_proxy(const RenderData *context, const Strip *strip, IMB_Proxy_Size psize)
195{
196 if (strip->data->proxy == nullptr || !context->use_proxies) {
197 return false;
198 }
199
200 short size_flags = strip->data->proxy->build_size_flags;
201 return (strip->flag & SEQ_USE_PROXY) != 0 && psize != IMB_PROXY_NONE &&
202 (size_flags & psize) != 0;
203}
204
205ImBuf *seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
206{
207 char filepath[PROXY_MAXFILE];
208 StripProxy *proxy = strip->data->proxy;
210 context->preview_render_size);
211 StripAnim *sanim;
212
213 /* only use proxies, if they are enabled (even if present!) */
214 if (!can_use_proxy(context, strip, rendersize_to_proxysize(psize))) {
215 return nullptr;
216 }
217
219 int frameno = round_fl_to_int(give_frame_index(context->scene, strip, timeline_frame)) +
220 strip->anim_startofs;
221 if (proxy->anim == nullptr) {
223 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
224 {
225 return nullptr;
226 }
227
228 /* Sequencer takes care of colorspace conversion of the result. The input is the best to be
229 * kept unchanged for the performance reasons. */
230 proxy->anim = openanim(
231 filepath, IB_byte_data, 0, true, strip->data->colorspace_settings.name);
232 }
233 if (proxy->anim == nullptr) {
234 return nullptr;
235 }
236
237 strip_open_anim_file(context->scene, strip, true);
238 sanim = static_cast<StripAnim *>(strip->anims.first);
239
241 sanim ? sanim->anim : nullptr, IMB_Timecode_Type(strip->data->proxy->tc), frameno);
242
243 return MOV_decode_frame(proxy->anim, frameno, IMB_TC_NONE, IMB_PROXY_NONE);
244 }
245
247 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
248 {
249 return nullptr;
250 }
251
252 if (BLI_exists(filepath)) {
254
255 if (ibuf) {
256 seq_imbuf_assign_spaces(context->scene, ibuf);
257 }
258
259 return ibuf;
260 }
261
262 return nullptr;
263}
264
265static void seq_proxy_build_frame(const RenderData *context,
267 Strip *strip,
268 int timeline_frame,
269 int proxy_render_size,
270 const bool overwrite)
271{
272 char filepath[PROXY_MAXFILE];
273 ImBuf *ibuf_tmp, *ibuf;
274 Scene *scene = context->scene;
275
276 if (!seq_proxy_get_filepath(scene,
277 strip,
278 timeline_frame,
279 eSpaceSeq_Proxy_RenderSize(proxy_render_size),
280 filepath,
281 context->view_id))
282 {
283 return;
284 }
285
286 if (!overwrite && BLI_exists(filepath)) {
287 return;
288 }
289
290 ibuf_tmp = seq_render_strip(context, state, strip, timeline_frame);
291
292 int rectx = (proxy_render_size * ibuf_tmp->x) / 100;
293 int recty = (proxy_render_size * ibuf_tmp->y) / 100;
294
295 if (ibuf_tmp->x != rectx || ibuf_tmp->y != recty) {
296 ibuf = IMB_scale_into_new(ibuf_tmp, rectx, recty, IMBScaleFilter::Nearest, true);
297 IMB_freeImBuf(ibuf_tmp);
298 }
299 else {
300 ibuf = ibuf_tmp;
301 }
302
303 const int quality = strip->data->proxy->quality;
304 const bool save_float = ibuf->float_buffer.data != nullptr;
305 ibuf->foptions.quality = quality;
306 if (save_float) {
307 /* Float image: save as EXR with FP16 data and DWAA compression. */
308 ibuf->ftype = IMB_FTYPE_OPENEXR;
310 }
311 else {
312 /* Byte image: save as JPG. */
313 ibuf->ftype = IMB_FTYPE_JPG;
314 if (ibuf->planes == 32) {
315 ibuf->planes = 24; /* JPGs do not support alpha. */
316 }
317 }
319
320 const bool ok = IMB_save_image(ibuf, filepath, save_float ? IB_float_data : IB_byte_data);
321 if (ok == false) {
322 perror(filepath);
323 }
324
325 IMB_freeImBuf(ibuf);
326}
327
333 const char *ext;
334};
335
347 Scene *scene,
348 const int view_id,
349 MultiViewPrefixVars *prefix_vars)
350{
351 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
352 return false;
353 }
354
355 if ((strip->type == STRIP_TYPE_IMAGE) && (strip->views_format == R_IMF_VIEWS_INDIVIDUAL)) {
356 if (view_id == 0) {
357 /* Clear on first use. */
358 prefix_vars->prefix[0] = '\0';
359 prefix_vars->ext = nullptr;
360
361 char filepath[FILE_MAX];
363 filepath, sizeof(filepath), strip->data->dirpath, strip->data->stripdata->filename);
364 BLI_path_abs(filepath, ID_BLEND_PATH_FROM_GLOBAL(&scene->id));
365 BKE_scene_multiview_view_prefix_get(scene, filepath, prefix_vars->prefix, &prefix_vars->ext);
366 }
367
368 if (prefix_vars->prefix[0] == '\0') {
369 return view_id != 0;
370 }
371
372 char filepath[FILE_MAX];
373 seq_multiview_name(scene, view_id, prefix_vars->prefix, prefix_vars->ext, filepath, FILE_MAX);
374 if (BLI_access(filepath, R_OK) == 0) {
375 return false;
376 }
377
378 return view_id != 0;
379 }
380 return false;
381}
382
386static int seq_proxy_context_count(Strip *strip, Scene *scene)
387{
388 int num_views = 1;
389
390 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
391 return 1;
392 }
393
394 switch (strip->type) {
395 case STRIP_TYPE_MOVIE: {
396 num_views = BLI_listbase_count(&strip->anims);
397 break;
398 }
399 case STRIP_TYPE_IMAGE: {
400 switch (strip->views_format) {
402 num_views = BKE_scene_multiview_num_views_get(&scene->r);
403 break;
405 num_views = 2;
406 break;
408 /* not supported at the moment */
409 /* pass through */
410 default:
411 num_views = 1;
412 }
413 break;
414 }
415 }
416
417 return num_views;
418}
419
420static bool seq_proxy_need_rebuild(Strip *strip, MovieReader *anim)
421{
422 if ((strip->data->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0) {
423 return true;
424 }
425
426 IMB_Proxy_Size required_proxies = IMB_Proxy_Size(strip->data->proxy->build_size_flags);
427 int built_proxies = MOV_get_existing_proxies(anim);
428 return (required_proxies & built_proxies) != required_proxies;
429}
430
432 Depsgraph *depsgraph,
433 Scene *scene,
434 Strip *strip,
435 blender::Set<std::string> *processed_paths,
436 ListBase *queue,
437 bool build_only_on_bad_performance)
438{
439 IndexBuildContext *context;
440 Strip *strip_new;
441 LinkData *link;
442 int num_files;
443 int i;
444
445 if (!strip->data || !strip->data->proxy) {
446 return true;
447 }
448
449 if (!(strip->flag & SEQ_USE_PROXY)) {
450 return true;
451 }
452
453 num_files = seq_proxy_context_count(strip, scene);
454
455 MultiViewPrefixVars prefix_vars; /* Initialized by #seq_proxy_multiview_context_invalid. */
456 for (i = 0; i < num_files; i++) {
457 if (seq_proxy_multiview_context_invalid(strip, scene, i, &prefix_vars)) {
458 continue;
459 }
460
461 /* Check if proxies are already built here, because actually opening anims takes a lot of
462 * time. */
463 strip_open_anim_file(scene, strip, false);
464 StripAnim *sanim = static_cast<StripAnim *>(BLI_findlink(&strip->anims, i));
465 if (sanim->anim && !seq_proxy_need_rebuild(strip, sanim->anim)) {
466 continue;
467 }
468
470
471 context = MEM_callocN<IndexBuildContext>("strip proxy rebuild context");
472
473 strip_new = strip_duplicate_recursive(
474 bmain, scene, scene, nullptr, strip, StripDuplicate::Selected);
475
476 context->tc_flags = strip_new->data->proxy->build_tc_flags;
477 context->size_flags = strip_new->data->proxy->build_size_flags;
478 context->quality = strip_new->data->proxy->quality;
479 context->overwrite = (strip_new->data->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0;
480
481 context->bmain = bmain;
482 context->depsgraph = depsgraph;
483 context->scene = scene;
484 context->orig_seq = strip;
485 context->orig_seq_uid = strip->runtime.session_uid;
486 context->strip = strip_new;
487
488 context->view_id = i; /* only for images */
489
490 if (strip_new->type == STRIP_TYPE_MOVIE) {
491 strip_open_anim_file(scene, strip_new, true);
492 sanim = static_cast<StripAnim *>(BLI_findlink(&strip_new->anims, i));
493
494 if (sanim->anim) {
495 context->proxy_builder = MOV_proxy_builder_start(sanim->anim,
496 IMB_Timecode_Type(context->tc_flags),
497 context->size_flags,
498 context->quality,
499 context->overwrite,
500 processed_paths,
501 build_only_on_bad_performance);
502 }
503 if (!context->proxy_builder) {
504 MEM_freeN(context);
505 return false;
506 }
507 }
508
509 link = BLI_genericNodeN(context);
510 BLI_addtail(queue, link);
511 }
512
513 return true;
514}
515
517{
518 const bool overwrite = context->overwrite;
519 RenderData render_context;
520 Strip *strip = context->strip;
521 Scene *scene = context->scene;
522 Main *bmain = context->bmain;
523 int timeline_frame;
524
525 if (strip->type == STRIP_TYPE_MOVIE) {
526 if (context->proxy_builder) {
527 MOV_proxy_builder_process(context->proxy_builder,
528 &worker_status->stop,
529 &worker_status->do_update,
530 &worker_status->progress);
531 }
532
533 return;
534 }
535
536 if (!(strip->flag & SEQ_USE_PROXY)) {
537 return;
538 }
539
540 /* that's why it is called custom... */
541 if (strip->data->proxy && strip->data->proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_FILE) {
542 return;
543 }
544
545 /* fail safe code */
546 int width, height;
547 BKE_render_resolution(&scene->r, false, &width, &height);
548
550 context->depsgraph,
551 context->scene,
552 width,
553 height,
555 nullptr,
556 &render_context);
557
558 render_context.skip_cache = true;
559 render_context.is_proxy_render = true;
560 render_context.view_id = context->view_id;
561
563
564 for (timeline_frame = time_left_handle_frame_get(scene, strip);
565 timeline_frame < time_right_handle_frame_get(scene, strip);
566 timeline_frame++)
567 {
569 timeline_frame,
570 render_context.view_id,
571 render_context.rectx,
572 render_context.recty);
573
574 if (context->size_flags & IMB_PROXY_25) {
575 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 25, overwrite);
576 }
577 if (context->size_flags & IMB_PROXY_50) {
578 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 50, overwrite);
579 }
580 if (context->size_flags & IMB_PROXY_75) {
581 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 75, overwrite);
582 }
583 if (context->size_flags & IMB_PROXY_100) {
584 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 100, overwrite);
585 }
586
587 worker_status->progress = float(timeline_frame - time_left_handle_frame_get(scene, strip)) /
588 (time_right_handle_frame_get(scene, strip) -
589 time_left_handle_frame_get(scene, strip));
590 worker_status->do_update = true;
591
592 if (worker_status->stop || G.is_break) {
593 break;
594 }
595 }
596}
597
599{
600 if (context->proxy_builder) {
601 LISTBASE_FOREACH (StripAnim *, sanim, &context->strip->anims) {
602 MOV_close_proxies(sanim->anim);
603 }
604
605 MOV_proxy_builder_finish(context->proxy_builder, stop);
606 }
607
608 seq_free_strip_recurse(nullptr, context->strip, true);
609
610 MEM_freeN(context);
611}
612
613void proxy_set(Strip *strip, bool value)
614{
615 if (value) {
616 strip->flag |= SEQ_USE_PROXY;
617 if (strip->data->proxy == nullptr) {
618 strip->data->proxy = seq_strip_proxy_alloc();
619 }
620 }
621 else {
622 strip->flag &= ~SEQ_USE_PROXY;
623 }
624}
625
626void seq_proxy_index_dir_set(MovieReader *anim, const char *base_dir)
627{
628 char dirname[FILE_MAX];
629 char filename[FILE_MAXFILE];
630
631 MOV_get_filename(anim, filename, FILE_MAXFILE);
632 BLI_path_join(dirname, sizeof(dirname), base_dir, filename);
634}
635
637{
638 if (strip->data && strip->data->proxy && strip->data->proxy->anim) {
639 MOV_close(strip->data->proxy->anim);
640 strip->data->proxy->anim = nullptr;
641 }
642}
643
644} // namespace blender::seq
MovieReader * openanim(const char *filepath, int ibuf_flags, int streamindex, bool keep_original_colorspace, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path_from_global()
Definition main.cc:892
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
Definition scene.cc:2915
int BKE_scene_multiview_num_views_get(const RenderData *rd)
Definition scene.cc:2940
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
Definition scene.cc:3164
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition storage.cc:360
int BLI_access(const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_ensure_parent_dir_exists(const char *filepath) ATTR_NONNULL(1)
Definition fileops_c.cc:452
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:534
LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:922
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:524
MINLINE int round_fl_to_int(float a)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
#define FILE_MAXFILE
#define FILE_MAX
#define BLI_path_join(...)
#define SNPRINTF(dst, format,...)
Definition BLI_string.h:604
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
Compatibility-like things for windows.
const char * dirname(char *path)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
Definition DNA_ID.h:688
@ R_IMF_EXR_CODEC_DWAA
@ R_IMF_VIEWS_MULTIVIEW
@ R_IMF_VIEWS_STEREO_3D
@ R_IMF_VIEWS_INDIVIDUAL
@ R_MULTIVIEW
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
@ STRIP_TYPE_IMAGE
@ STRIP_TYPE_MOVIE
@ SEQ_USE_PROXY
@ SEQ_PROXY_SKIP_EXISTING
eSpaceSeq_Proxy_RenderSize
@ SEQ_RENDER_SIZE_PROXY_25
@ SEQ_RENDER_SIZE_PROXY_75
@ SEQ_RENDER_SIZE_PROXY_50
@ SEQ_RENDER_SIZE_PROXY_100
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
Definition readimage.cc:189
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_scale_into_new(const ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Definition scaling.cc:489
bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags)
Definition writeimage.cc:23
@ IMB_FTYPE_JPG
@ IMB_FTYPE_OPENEXR
IMB_Proxy_Size
@ IMB_PROXY_100
@ IMB_PROXY_75
@ IMB_PROXY_50
@ IMB_PROXY_25
@ IMB_PROXY_NONE
@ IB_float_data
@ IB_byte_data
@ IB_metadata
Read Guarded memory(de)allocation.
IMB_Timecode_Type
Definition MOV_enums.hh:44
@ IMB_TC_NONE
Definition MOV_enums.hh:46
BPy_StructRNA * depsgraph
nullptr float
#define OPENEXR_HALF
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
static ulong state[N]
#define G(x, y, z)
void MOV_set_custom_proxy_dir(MovieReader *anim, const char *dir)
MovieProxyBuilder * MOV_proxy_builder_start(MovieReader *anim, IMB_Timecode_Type tcs_in_use, int proxy_sizes_in_use, int quality, const bool overwrite, blender::Set< std::string > *processed_paths, bool build_only_on_bad_performance)
void MOV_proxy_builder_process(MovieProxyBuilder *context, bool *stop, bool *do_update, float *progress)
void MOV_close_proxies(MovieReader *anim)
int MOV_get_existing_proxies(const MovieReader *anim)
int MOV_calc_frame_index_with_timecode(MovieReader *anim, IMB_Timecode_Type tc, int position)
void MOV_proxy_builder_finish(MovieProxyBuilder *context, const bool stop)
void MOV_close(MovieReader *anim)
Definition movie_read.cc:66
void MOV_get_filename(const MovieReader *anim, char *filename, int filename_maxncpy)
Definition movie_read.cc:81
ImBuf * MOV_decode_frame(MovieReader *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
void relations_strip_free_anim(Strip *strip)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
void proxy_rebuild(IndexBuildContext *context, wmJobWorkerStatus *worker_status)
Definition proxy.cc:516
void intra_frame_cache_set_cur_frame(Scene *scene, float frame, int view_id, int width, int height)
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf)
Definition render.cc:102
IMB_Proxy_Size rendersize_to_proxysize(eSpaceSeq_Proxy_RenderSize render_size)
Definition proxy.cc:72
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
Definition strip_time.cc:52
static void seq_proxy_build_frame(const RenderData *context, SeqRenderState *state, Strip *strip, int timeline_frame, int proxy_render_size, const bool overwrite)
Definition proxy.cc:265
static int seq_proxy_context_count(Strip *strip, Scene *scene)
Definition proxy.cc:386
Editing * editing_get(const Scene *scene)
Definition sequencer.cc:286
StripProxy * seq_strip_proxy_alloc()
Definition sequencer.cc:77
ImBuf * seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
Definition proxy.cc:205
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void seq_free_strip_recurse(Scene *scene, Strip *strip, const bool do_id_user)
Definition sequencer.cc:274
void strip_open_anim_file(Scene *scene, Strip *strip, bool openfile)
bool proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Strip *strip, blender::Set< std::string > *processed_paths, ListBase *queue, bool build_only_on_bad_performance)
Definition proxy.cc:431
void proxy_set(Strip *strip, bool value)
Definition proxy.cc:613
void seq_proxy_index_dir_set(MovieReader *anim, const char *base_dir)
Definition proxy.cc:626
static bool seq_proxy_multiview_context_invalid(Strip *strip, Scene *scene, const int view_id, MultiViewPrefixVars *prefix_vars)
Definition proxy.cc:346
void render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, eSpaceSeq_Proxy_RenderSize preview_render_size, Render *render, RenderData *r_context)
Definition render.cc:210
static bool seq_proxy_get_filepath(Scene *scene, Strip *strip, int timeline_frame, eSpaceSeq_Proxy_RenderSize render_size, char *filepath, const int view_id)
Definition proxy.cc:130
void proxy_rebuild_finish(IndexBuildContext *context, bool stop)
Definition proxy.cc:598
void free_strip_proxy(Strip *strip)
Definition proxy.cc:636
static bool seq_proxy_need_rebuild(Strip *strip, MovieReader *anim)
Definition proxy.cc:420
float rendersize_to_scale_factor(eSpaceSeq_Proxy_RenderSize render_size)
Definition proxy.cc:88
Strip * strip_duplicate_recursive(Main *bmain, const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Strip *strip, const StripDuplicate dupe_flag)
Definition sequencer.cc:766
bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
Definition proxy.cc:102
bool can_use_proxy(const RenderData *context, const Strip *strip, IMB_Proxy_Size psize)
Definition proxy.cc:194
ImBuf * seq_render_strip(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
Definition render.cc:1791
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
Definition render.cc:238
void seq_multiview_name(Scene *scene, const int view_id, const char *prefix, const char *ext, char *r_path, size_t r_size)
Definition multiview.cc:42
#define PROXY_MAXFILE
Definition proxy.hh:19
ImBufFloatBuffer float_buffer
ImbFormatOptions foptions
unsigned char planes
enum eImbFileType ftype
void * first
struct RenderData r
struct MovieReader * anim
StripProxy * proxy
StripElem * stripdata
char dirpath[768]
ColorManagedColorspaceSettings colorspace_settings
char filename[256]
struct MovieReader * anim
SessionUID session_uid
StripData * data
StripRuntime runtime
ListBase anims
MovieProxyBuilder * proxy_builder
Definition proxy.cc:57
i
Definition text_draw.cc:230
#define SEP_STR
Definition unit.cc:39