Blender V4.3
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
11#include "MEM_guardedalloc.h"
12
13#include "DNA_scene_types.h"
14#include "DNA_sequence_types.h"
15#include "DNA_space_types.h"
16
17#include "BLI_fileops.h"
18#include "BLI_listbase.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 "SEQ_proxy.hh"
40#include "SEQ_relations.hh"
41#include "SEQ_render.hh"
42#include "SEQ_sequencer.hh"
43#include "SEQ_time.hh"
44
45#include "multiview.hh"
46#include "proxy.hh"
47#include "render.hh"
48#include "sequencer.hh"
49#include "utils.hh"
50
66
67int SEQ_rendersize_to_proxysize(int render_size)
68{
69 switch (render_size) {
71 return IMB_PROXY_25;
73 return IMB_PROXY_50;
75 return IMB_PROXY_75;
77 return IMB_PROXY_100;
78 }
79 return IMB_PROXY_NONE;
80}
81
82double SEQ_rendersize_to_scale_factor(int render_size)
83{
84 switch (render_size) {
86 return 0.25;
88 return 0.50;
90 return 0.75;
91 }
92 return 1.0;
93}
94
95bool seq_proxy_get_custom_file_filepath(Sequence *seq, char *filepath, const int view_id)
96{
97 /* Ideally this would be #PROXY_MAXFILE however BLI_path_abs clamps to #FILE_MAX. */
98 char filepath_temp[FILE_MAX];
99 char suffix[24];
100 StripProxy *proxy = seq->strip->proxy;
101
102 if (proxy == nullptr) {
103 return false;
104 }
105
106 BLI_path_join(filepath_temp, sizeof(filepath_temp), proxy->dirpath, proxy->filename);
108
109 if (view_id > 0) {
110 SNPRINTF(suffix, "_%d", view_id);
111 /* TODO(sergey): This will actually append suffix after extension
112 * which is weird but how was originally coded in multi-view branch.
113 */
114 BLI_snprintf(filepath, PROXY_MAXFILE, "%s_%s", filepath_temp, suffix);
115 }
116 else {
117 BLI_strncpy(filepath, filepath_temp, PROXY_MAXFILE);
118 }
119
120 return true;
121}
122
123static bool seq_proxy_get_filepath(Scene *scene,
124 Sequence *seq,
125 int timeline_frame,
126 eSpaceSeq_Proxy_RenderSize render_size,
127 char *filepath,
128 const int view_id)
129{
130 char dirpath[PROXY_MAXFILE];
131 char suffix[24] = {'\0'};
132 Editing *ed = SEQ_editing_get(scene);
133 StripProxy *proxy = seq->strip->proxy;
134
135 if (proxy == nullptr) {
136 return false;
137 }
138
139 /* Multi-view suffix. */
140 if (view_id > 0) {
141 SNPRINTF(suffix, "_%d", view_id);
142 }
143
144 /* Per strip with Custom file situation is handled separately. */
147 {
148 if (seq_proxy_get_custom_file_filepath(seq, filepath, view_id)) {
149 return true;
150 }
151 }
152
154 /* Per project default. */
155 if (ed->proxy_dir[0] == 0) {
156 STRNCPY(dirpath, "//BL_proxy");
157 }
158 else { /* Per project with custom dirpath. */
159 STRNCPY(dirpath, ed->proxy_dir);
160 }
162 }
163 else {
164 /* Pre strip with custom dir. */
166 STRNCPY(dirpath, seq->strip->proxy->dirpath);
167 }
168 else { /* Per strip default. */
169 SNPRINTF(dirpath, "%s" SEP_STR "BL_proxy", seq->strip->dirpath);
170 }
171 }
172
173 /* Proxy size number to be used in path. */
174 int proxy_size_number = SEQ_rendersize_to_scale_factor(render_size) * 100;
175
176 BLI_snprintf(filepath,
178 "%s" SEP_STR "images" SEP_STR "%d" SEP_STR "%s_proxy%s.jpg",
179 dirpath,
180 proxy_size_number,
181 SEQ_render_give_stripelem(scene, seq, timeline_frame)->filename,
182 suffix);
184 return true;
185}
186
187bool SEQ_can_use_proxy(const SeqRenderData *context, const Sequence *seq, int psize)
188{
189 if (seq->strip->proxy == nullptr || !context->use_proxies) {
190 return false;
191 }
192
193 short size_flags = seq->strip->proxy->build_size_flags;
194 return (seq->flag & SEQ_USE_PROXY) != 0 && psize != IMB_PROXY_NONE && (size_flags & psize) != 0;
195}
196
197ImBuf *seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int timeline_frame)
198{
199 char filepath[PROXY_MAXFILE];
200 StripProxy *proxy = seq->strip->proxy;
202 context->preview_render_size);
203 StripAnim *sanim;
204
205 /* only use proxies, if they are enabled (even if present!) */
206 if (!SEQ_can_use_proxy(context, seq, SEQ_rendersize_to_proxysize(psize))) {
207 return nullptr;
208 }
209
211 int frameno = round_fl_to_int(SEQ_give_frame_index(context->scene, seq, timeline_frame)) +
212 seq->anim_startofs;
213 if (proxy->anim == nullptr) {
215 context->scene, seq, timeline_frame, psize, filepath, context->view_id) == 0)
216 {
217 return nullptr;
218 }
219
220 proxy->anim = openanim(filepath, IB_rect, 0, seq->strip->colorspace_settings.name);
221 }
222 if (proxy->anim == nullptr) {
223 return nullptr;
224 }
225
226 seq_open_anim_file(context->scene, seq, true);
227 sanim = static_cast<StripAnim *>(seq->anims.first);
228
230 sanim ? sanim->anim : nullptr, IMB_Timecode_Type(seq->strip->proxy->tc), frameno);
231
232 return IMB_anim_absolute(proxy->anim, frameno, IMB_TC_NONE, IMB_PROXY_NONE);
233 }
234
236 context->scene, seq, timeline_frame, psize, filepath, context->view_id) == 0)
237 {
238 return nullptr;
239 }
240
241 if (BLI_exists(filepath)) {
242 ImBuf *ibuf = IMB_loadiffname(filepath, IB_rect, nullptr);
243
244 if (ibuf) {
245 seq_imbuf_assign_spaces(context->scene, ibuf);
246 }
247
248 return ibuf;
249 }
250
251 return nullptr;
252}
253
254static void seq_proxy_build_frame(const SeqRenderData *context,
256 Sequence *seq,
257 int timeline_frame,
258 int proxy_render_size,
259 const bool overwrite)
260{
261 char filepath[PROXY_MAXFILE];
262 int quality;
263 int rectx, recty;
264 ImBuf *ibuf_tmp, *ibuf;
265 Scene *scene = context->scene;
266
267 if (!seq_proxy_get_filepath(scene,
268 seq,
269 timeline_frame,
270 eSpaceSeq_Proxy_RenderSize(proxy_render_size),
271 filepath,
272 context->view_id))
273 {
274 return;
275 }
276
277 if (!overwrite && BLI_exists(filepath)) {
278 return;
279 }
280
281 ibuf_tmp = seq_render_strip(context, state, seq, timeline_frame);
282
283 rectx = (proxy_render_size * ibuf_tmp->x) / 100;
284 recty = (proxy_render_size * ibuf_tmp->y) / 100;
285
286 if (ibuf_tmp->x != rectx || ibuf_tmp->y != recty) {
287 ibuf = IMB_dupImBuf(ibuf_tmp);
288 IMB_metadata_copy(ibuf, ibuf_tmp);
289 IMB_freeImBuf(ibuf_tmp);
290 IMB_scale(ibuf, rectx, recty, IMBScaleFilter::Nearest, false);
291 }
292 else {
293 ibuf = ibuf_tmp;
294 }
295
296 /* depth = 32 is intentionally left in, otherwise ALPHA channels
297 * won't work... */
298 quality = seq->strip->proxy->quality;
299 ibuf->ftype = IMB_FTYPE_JPG;
300 ibuf->foptions.quality = quality;
301
302 /* unsupported feature only confuses other s/w */
303 if (ibuf->planes == 32) {
304 ibuf->planes = 24;
305 }
306
308
309 const bool ok = IMB_saveiff(ibuf, filepath, IB_rect);
310 if (ok == false) {
311 perror(filepath);
312 }
313
314 IMB_freeImBuf(ibuf);
315}
316
322 const char *ext;
323};
324
336 Scene *scene,
337 const int view_id,
338 MultiViewPrefixVars *prefix_vars)
339{
340 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
341 return false;
342 }
343
344 if ((seq->type == SEQ_TYPE_IMAGE) && (seq->views_format == R_IMF_VIEWS_INDIVIDUAL)) {
345 if (view_id == 0) {
346 /* Clear on first use. */
347 prefix_vars->prefix[0] = '\0';
348 prefix_vars->ext = nullptr;
349
350 char filepath[FILE_MAX];
352 filepath, sizeof(filepath), seq->strip->dirpath, seq->strip->stripdata->filename);
354 BKE_scene_multiview_view_prefix_get(scene, filepath, prefix_vars->prefix, &prefix_vars->ext);
355 }
356
357 if (prefix_vars->prefix[0] == '\0') {
358 return view_id != 0;
359 }
360
361 char filepath[FILE_MAX];
362 seq_multiview_name(scene, view_id, prefix_vars->prefix, prefix_vars->ext, filepath, FILE_MAX);
363 if (BLI_access(filepath, R_OK) == 0) {
364 return false;
365 }
366
367 return view_id != 0;
368 }
369 return false;
370}
371
375static int seq_proxy_context_count(Sequence *seq, Scene *scene)
376{
377 int num_views = 1;
378
379 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
380 return 1;
381 }
382
383 switch (seq->type) {
384 case SEQ_TYPE_MOVIE: {
385 num_views = BLI_listbase_count(&seq->anims);
386 break;
387 }
388 case SEQ_TYPE_IMAGE: {
389 switch (seq->views_format) {
391 num_views = BKE_scene_multiview_num_views_get(&scene->r);
392 break;
394 num_views = 2;
395 break;
397 /* not supported at the moment */
398 /* pass through */
399 default:
400 num_views = 1;
401 }
402 break;
403 }
404 }
405
406 return num_views;
407}
408
410{
411 if ((seq->strip->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0) {
412 return true;
413 }
414
415 IMB_Proxy_Size required_proxies = IMB_Proxy_Size(seq->strip->proxy->build_size_flags);
416 int built_proxies = IMB_anim_proxy_get_existing(anim);
417 return (required_proxies & built_proxies) != required_proxies;
418}
419
421 Depsgraph *depsgraph,
422 Scene *scene,
423 Sequence *seq,
424 GSet *file_list,
425 ListBase *queue,
426 bool build_only_on_bad_performance)
427{
428 SeqIndexBuildContext *context;
429 Sequence *nseq;
430 LinkData *link;
431 int num_files;
432 int i;
433
434 if (!seq->strip || !seq->strip->proxy) {
435 return true;
436 }
437
438 if (!(seq->flag & SEQ_USE_PROXY)) {
439 return true;
440 }
441
442 num_files = seq_proxy_context_count(seq, scene);
443
444 MultiViewPrefixVars prefix_vars; /* Initialized by #seq_proxy_multiview_context_invalid. */
445 for (i = 0; i < num_files; i++) {
446 if (seq_proxy_multiview_context_invalid(seq, scene, i, &prefix_vars)) {
447 continue;
448 }
449
450 /* Check if proxies are already built here, because actually opening anims takes a lot of
451 * time. */
452 seq_open_anim_file(scene, seq, false);
453 StripAnim *sanim = static_cast<StripAnim *>(BLI_findlink(&seq->anims, i));
454 if (sanim->anim && !seq_proxy_need_rebuild(seq, sanim->anim)) {
455 continue;
456 }
457
459
460 context = static_cast<SeqIndexBuildContext *>(
461 MEM_callocN(sizeof(SeqIndexBuildContext), "seq proxy rebuild context"));
462
463 nseq = SEQ_sequence_dupli_recursive(scene, scene, nullptr, seq, 0);
464
465 context->tc_flags = nseq->strip->proxy->build_tc_flags;
466 context->size_flags = nseq->strip->proxy->build_size_flags;
467 context->quality = nseq->strip->proxy->quality;
468 context->overwrite = (nseq->strip->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0;
469
470 context->bmain = bmain;
471 context->depsgraph = depsgraph;
472 context->scene = scene;
473 context->orig_seq = seq;
474 context->orig_seq_uid = seq->runtime.session_uid;
475 context->seq = nseq;
476
477 context->view_id = i; /* only for images */
478
479 if (nseq->type == SEQ_TYPE_MOVIE) {
480 seq_open_anim_file(scene, nseq, true);
481 sanim = static_cast<StripAnim *>(BLI_findlink(&nseq->anims, i));
482
483 if (sanim->anim) {
484 context->index_context = IMB_anim_index_rebuild_context(
485 sanim->anim,
486 IMB_Timecode_Type(context->tc_flags),
487 context->size_flags,
488 context->quality,
489 context->overwrite,
490 file_list,
491 build_only_on_bad_performance);
492 }
493 if (!context->index_context) {
494 MEM_freeN(context);
495 return false;
496 }
497 }
498
499 link = BLI_genericNodeN(context);
500 BLI_addtail(queue, link);
501 }
502
503 return true;
504}
505
507{
508 const bool overwrite = context->overwrite;
509 SeqRenderData render_context;
510 Sequence *seq = context->seq;
511 Scene *scene = context->scene;
512 Main *bmain = context->bmain;
513 int timeline_frame;
514
515 if (seq->type == SEQ_TYPE_MOVIE) {
516 if (context->index_context) {
517 IMB_anim_index_rebuild(context->index_context,
518 &worker_status->stop,
519 &worker_status->do_update,
520 &worker_status->progress);
521 }
522
523 return;
524 }
525
526 if (!(seq->flag & SEQ_USE_PROXY)) {
527 return;
528 }
529
530 /* that's why it is called custom... */
532 return;
533 }
534
535 /* fail safe code */
536 int width, height;
537 BKE_render_resolution(&scene->r, false, &width, &height);
538
540 bmain, context->depsgraph, context->scene, width, height, 100, false, &render_context);
541
542 render_context.skip_cache = true;
543 render_context.is_proxy_render = true;
544 render_context.view_id = context->view_id;
545
547
548 for (timeline_frame = SEQ_time_left_handle_frame_get(scene, seq);
549 timeline_frame < SEQ_time_right_handle_frame_get(scene, seq);
550 timeline_frame++)
551 {
552 if (context->size_flags & IMB_PROXY_25) {
553 seq_proxy_build_frame(&render_context, &state, seq, timeline_frame, 25, overwrite);
554 }
555 if (context->size_flags & IMB_PROXY_50) {
556 seq_proxy_build_frame(&render_context, &state, seq, timeline_frame, 50, overwrite);
557 }
558 if (context->size_flags & IMB_PROXY_75) {
559 seq_proxy_build_frame(&render_context, &state, seq, timeline_frame, 75, overwrite);
560 }
561 if (context->size_flags & IMB_PROXY_100) {
562 seq_proxy_build_frame(&render_context, &state, seq, timeline_frame, 100, overwrite);
563 }
564
565 worker_status->progress = float(timeline_frame - SEQ_time_left_handle_frame_get(scene, seq)) /
568 worker_status->do_update = true;
569
570 if (worker_status->stop || G.is_break) {
571 break;
572 }
573 }
574}
575
577{
578 if (context->index_context) {
579 LISTBASE_FOREACH (StripAnim *, sanim, &context->seq->anims) {
580 IMB_close_anim_proxies(sanim->anim);
581 }
582
583 IMB_anim_index_rebuild_finish(context->index_context, stop);
584 }
585
586 seq_free_sequence_recurse(nullptr, context->seq, true);
587
588 MEM_freeN(context);
589}
590
591void SEQ_proxy_set(Sequence *seq, bool value)
592{
593 if (value) {
594 seq->flag |= SEQ_USE_PROXY;
595 if (seq->strip->proxy == nullptr) {
597 }
598 }
599 else {
600 seq->flag &= ~SEQ_USE_PROXY;
601 }
602}
603
604void seq_proxy_index_dir_set(ImBufAnim *anim, const char *base_dir)
605{
606 char dirname[FILE_MAX];
607 char filename[FILE_MAXFILE];
608
609 IMB_anim_get_filename(anim, filename, FILE_MAXFILE);
610 BLI_path_join(dirname, sizeof(dirname), base_dir, filename);
612}
613
615{
616 if (seq->strip && seq->strip->proxy && seq->strip->proxy->anim) {
618 seq->strip->proxy->anim = nullptr;
619 }
620}
ImBufAnim * openanim(const char *filepath, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path_from_global()
Definition main.cc:837
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
Definition scene.cc:2877
int BKE_scene_multiview_num_views_get(const RenderData *rd)
Definition scene.cc:2928
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
Definition scene.cc:3152
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition storage.cc:350
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:429
struct GSet GSet
Definition BLI_ghash.h:341
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:110
struct LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:909
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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 STRNCPY(dst, src)
Definition BLI_string.h:593
#define SNPRINTF(dst, format,...)
Definition BLI_string.h:597
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)
@ R_MULTIVIEW
@ R_IMF_VIEWS_MULTIVIEW
@ R_IMF_VIEWS_STEREO_3D
@ R_IMF_VIEWS_INDIVIDUAL
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_MOVIE
@ SEQ_PROXY_SKIP_EXISTING
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_USE_PROXY
eSpaceSeq_Proxy_RenderSize
@ SEQ_RENDER_SIZE_PROXY_25
@ SEQ_RENDER_SIZE_PROXY_75
@ SEQ_RENDER_SIZE_PROXY_50
@ SEQ_RENDER_SIZE_PROXY_100
void IMB_anim_index_rebuild(IndexBuildContext *context, bool *stop, bool *do_update, float *progress)
Definition indexer.cc:1283
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_anim_set_index_dir(ImBufAnim *anim, const char *dir)
Definition indexer.cc:1336
int IMB_anim_index_get_frame_index(ImBufAnim *anim, IMB_Timecode_Type tc, int position)
Definition indexer.cc:1402
ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
Definition readimage.cc:146
int IMB_anim_proxy_get_existing(ImBufAnim *anim)
Definition indexer.cc:1413
void IMB_anim_index_rebuild_finish(IndexBuildContext *context, bool stop)
Definition indexer.cc:1301
void IMB_free_anim(ImBufAnim *anim)
Definition anim_movie.cc:60
IndexBuildContext * IMB_anim_index_rebuild_context(ImBufAnim *anim, IMB_Timecode_Type tcs_in_use, int proxy_sizes_in_use, int quality, const bool overwrite, GSet *file_list, bool build_only_on_bad_performance)
Definition indexer.cc:1212
void IMB_close_anim_proxies(ImBufAnim *anim)
Definition anim_movie.cc:85
void IMB_anim_get_filename(ImBufAnim *anim, char *filename, int filename_maxncpy)
Definition indexer.cc:381
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Definition scaling.cc:779
@ IMB_FTYPE_JPG
IMB_Proxy_Size
@ IMB_PROXY_100
@ IMB_PROXY_75
@ IMB_PROXY_50
@ IMB_PROXY_25
@ IMB_PROXY_NONE
IMB_Timecode_Type
@ IMB_TC_NONE
Contains defines and structs used throughout the imbuf module.
@ IB_rect
void IMB_metadata_copy(ImBuf *ibuf_dst, const ImBuf *ibuf_src)
Definition metadata.cc:60
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
draw_view in_light_buf[] float
bool IMB_saveiff(struct ImBuf *, const char *, int)
void IMB_freeImBuf(ImBuf *)
void MEM_freeN(void *vmemh)
Definition mallocn.cc:105
void *(* MEM_callocN)(size_t len, const char *str)
Definition mallocn.cc:42
static ulong state[N]
#define G(x, y, z)
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:40
static bool seq_proxy_multiview_context_invalid(Sequence *seq, Scene *scene, const int view_id, MultiViewPrefixVars *prefix_vars)
Definition proxy.cc:335
void free_proxy_seq(Sequence *seq)
Definition proxy.cc:614
bool seq_proxy_get_custom_file_filepath(Sequence *seq, char *filepath, const int view_id)
Definition proxy.cc:95
void seq_proxy_index_dir_set(ImBufAnim *anim, const char *base_dir)
Definition proxy.cc:604
static bool seq_proxy_get_filepath(Scene *scene, Sequence *seq, int timeline_frame, eSpaceSeq_Proxy_RenderSize render_size, char *filepath, const int view_id)
Definition proxy.cc:123
static void seq_proxy_build_frame(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, int timeline_frame, int proxy_render_size, const bool overwrite)
Definition proxy.cc:254
bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, GSet *file_list, ListBase *queue, bool build_only_on_bad_performance)
Definition proxy.cc:420
ImBuf * seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int timeline_frame)
Definition proxy.cc:197
void SEQ_proxy_set(Sequence *seq, bool value)
Definition proxy.cc:591
static int seq_proxy_context_count(Sequence *seq, Scene *scene)
Definition proxy.cc:375
int SEQ_rendersize_to_proxysize(int render_size)
Definition proxy.cc:67
bool SEQ_can_use_proxy(const SeqRenderData *context, const Sequence *seq, int psize)
Definition proxy.cc:187
void SEQ_proxy_rebuild_finish(SeqIndexBuildContext *context, bool stop)
Definition proxy.cc:576
static bool seq_proxy_need_rebuild(Sequence *seq, ImBufAnim *anim)
Definition proxy.cc:409
double SEQ_rendersize_to_scale_factor(int render_size)
Definition proxy.cc:82
void SEQ_proxy_rebuild(SeqIndexBuildContext *context, wmJobWorkerStatus *worker_status)
Definition proxy.cc:506
#define PROXY_MAXFILE
Definition proxy.hh:16
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)
Definition render.cc:220
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf)
Definition render.cc:93
StripElem * SEQ_render_give_stripelem(const Scene *scene, const Sequence *seq, int timeline_frame)
Definition render.cc:248
ImBuf * seq_render_strip(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float timeline_frame)
Definition render.cc:1830
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
Sequence * SEQ_sequence_dupli_recursive(const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, int dupe_flag)
Definition sequencer.cc:639
StripProxy * seq_strip_proxy_alloc()
Definition sequencer.cc:62
void seq_free_sequence_recurse(Scene *scene, Sequence *seq, const bool do_id_user)
Definition sequencer.cc:250
Editing * SEQ_editing_get(const Scene *scene)
Definition sequencer.cc:262
void SEQ_relations_sequence_free_anim(Sequence *seq)
float SEQ_give_frame_index(const Scene *scene, const Sequence *seq, float timeline_frame)
Definition strip_time.cc:60
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)
char proxy_dir[1024]
ImbFormatOptions foptions
unsigned char planes
enum eImbFileType ftype
void * first
char prefix[FILE_MAX]
Definition proxy.cc:321
const char * ext
Definition proxy.cc:322
Sequence * seq
Definition proxy.cc:63
SessionUID orig_seq_uid
Definition proxy.cc:64
Depsgraph * depsgraph
Definition proxy.cc:61
IndexBuildContext * index_context
Definition proxy.cc:52
Sequence * orig_seq
Definition proxy.cc:63
bool is_proxy_render
Definition SEQ_render.hh:39
SequenceRuntime runtime
struct ImBufAnim * anim
char filename[256]
struct ImBufAnim * anim
char dirpath[768]
char filename[256]
ColorManagedColorspaceSettings colorspace_settings
char dirpath[768]
StripProxy * proxy
StripElem * stripdata
#define SEP_STR
Definition unit.cc:39