Blender V4.5
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#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 "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
72int rendersize_to_proxysize(int render_size)
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 }
84 return IMB_PROXY_NONE;
85}
86
87double rendersize_to_scale_factor(int render_size)
88{
89 switch (render_size) {
91 return 0.25;
93 return 0.50;
95 return 0.75;
96 }
97 return 1.0;
98}
99
100bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
101{
102 /* Ideally this would be #PROXY_MAXFILE however BLI_path_abs clamps to #FILE_MAX. */
103 char filepath_temp[FILE_MAX];
104 char suffix[24];
105 StripProxy *proxy = strip->data->proxy;
106
107 if (proxy == nullptr) {
108 return false;
109 }
110
111 BLI_path_join(filepath_temp, sizeof(filepath_temp), proxy->dirpath, proxy->filename);
113
114 if (view_id > 0) {
115 SNPRINTF(suffix, "_%d", view_id);
116 /* TODO(sergey): This will actually append suffix after extension
117 * which is weird but how was originally coded in multi-view branch.
118 */
119 BLI_snprintf(filepath, PROXY_MAXFILE, "%s_%s", filepath_temp, suffix);
120 }
121 else {
122 BLI_strncpy(filepath, filepath_temp, PROXY_MAXFILE);
123 }
124
125 return true;
126}
127
128static bool seq_proxy_get_filepath(Scene *scene,
129 Strip *strip,
130 int timeline_frame,
131 eSpaceSeq_Proxy_RenderSize render_size,
132 char *filepath,
133 const int view_id)
134{
135 char dirpath[PROXY_MAXFILE];
136 char suffix[24] = {'\0'};
137 Editing *ed = editing_get(scene);
138 StripProxy *proxy = strip->data->proxy;
139
140 if (proxy == nullptr) {
141 return false;
142 }
143
144 /* Multi-view suffix. */
145 if (view_id > 0) {
146 SNPRINTF(suffix, "_%d", view_id);
147 }
148
149 /* Per strip with Custom file situation is handled separately. */
151 ed->proxy_storage != SEQ_EDIT_PROXY_DIR_STORAGE)
152 {
153 if (seq_proxy_get_custom_file_filepath(strip, filepath, view_id)) {
154 return true;
155 }
156 }
157
158 if (ed->proxy_storage == SEQ_EDIT_PROXY_DIR_STORAGE) {
159 /* Per project default. */
160 if (ed->proxy_dir[0] == 0) {
161 STRNCPY(dirpath, "//BL_proxy");
162 }
163 else { /* Per project with custom dirpath. */
164 STRNCPY(dirpath, ed->proxy_dir);
165 }
167 }
168 else {
169 /* Pre strip with custom dir. */
171 STRNCPY(dirpath, strip->data->proxy->dirpath);
172 }
173 else { /* Per strip default. */
174 SNPRINTF(dirpath, "%s" SEP_STR "BL_proxy", strip->data->dirpath);
175 }
176 }
177
178 /* Proxy size number to be used in path. */
179 int proxy_size_number = rendersize_to_scale_factor(render_size) * 100;
180
181 BLI_snprintf(filepath,
183 "%s" SEP_STR "images" SEP_STR "%d" SEP_STR "%s_proxy%s.jpg",
184 dirpath,
185 proxy_size_number,
186 render_give_stripelem(scene, strip, timeline_frame)->filename,
187 suffix);
189 return true;
190}
191
192bool can_use_proxy(const RenderData *context, const Strip *strip, int psize)
193{
194 if (strip->data->proxy == nullptr || !context->use_proxies) {
195 return false;
196 }
197
198 short size_flags = strip->data->proxy->build_size_flags;
199 return (strip->flag & SEQ_USE_PROXY) != 0 && psize != IMB_PROXY_NONE &&
200 (size_flags & psize) != 0;
201}
202
203ImBuf *seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
204{
205 char filepath[PROXY_MAXFILE];
206 StripProxy *proxy = strip->data->proxy;
208 context->preview_render_size);
209 StripAnim *sanim;
210
211 /* only use proxies, if they are enabled (even if present!) */
212 if (!can_use_proxy(context, strip, rendersize_to_proxysize(psize))) {
213 return nullptr;
214 }
215
217 int frameno = round_fl_to_int(give_frame_index(context->scene, strip, timeline_frame)) +
218 strip->anim_startofs;
219 if (proxy->anim == nullptr) {
221 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
222 {
223 return nullptr;
224 }
225
226 proxy->anim = openanim(filepath, IB_byte_data, 0, strip->data->colorspace_settings.name);
227 }
228 if (proxy->anim == nullptr) {
229 return nullptr;
230 }
231
232 strip_open_anim_file(context->scene, strip, true);
233 sanim = static_cast<StripAnim *>(strip->anims.first);
234
236 sanim ? sanim->anim : nullptr, IMB_Timecode_Type(strip->data->proxy->tc), frameno);
237
238 return MOV_decode_frame(proxy->anim, frameno, IMB_TC_NONE, IMB_PROXY_NONE);
239 }
240
242 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
243 {
244 return nullptr;
245 }
246
247 if (BLI_exists(filepath)) {
249
250 if (ibuf) {
251 seq_imbuf_assign_spaces(context->scene, ibuf);
252 }
253
254 return ibuf;
255 }
256
257 return nullptr;
258}
259
260static void seq_proxy_build_frame(const RenderData *context,
262 Strip *strip,
263 int timeline_frame,
264 int proxy_render_size,
265 const bool overwrite)
266{
267 char filepath[PROXY_MAXFILE];
268 ImBuf *ibuf_tmp, *ibuf;
269 Scene *scene = context->scene;
270
271 if (!seq_proxy_get_filepath(scene,
272 strip,
273 timeline_frame,
274 eSpaceSeq_Proxy_RenderSize(proxy_render_size),
275 filepath,
276 context->view_id))
277 {
278 return;
279 }
280
281 if (!overwrite && BLI_exists(filepath)) {
282 return;
283 }
284
285 ibuf_tmp = seq_render_strip(context, state, strip, timeline_frame);
286
287 int rectx = (proxy_render_size * ibuf_tmp->x) / 100;
288 int recty = (proxy_render_size * ibuf_tmp->y) / 100;
289
290 if (ibuf_tmp->x != rectx || ibuf_tmp->y != recty) {
291 ibuf = IMB_scale_into_new(ibuf_tmp, rectx, recty, IMBScaleFilter::Nearest, true);
292 IMB_freeImBuf(ibuf_tmp);
293 }
294 else {
295 ibuf = ibuf_tmp;
296 }
297
298 const int quality = strip->data->proxy->quality;
299 const bool save_float = ibuf->float_buffer.data != nullptr;
300 ibuf->foptions.quality = quality;
301 if (save_float) {
302 /* Float image: save as EXR with FP16 data and DWAA compression. */
303 ibuf->ftype = IMB_FTYPE_OPENEXR;
305 }
306 else {
307 /* Byte image: save as JPG. */
308 ibuf->ftype = IMB_FTYPE_JPG;
309 if (ibuf->planes == 32) {
310 ibuf->planes = 24; /* JPGs do not support alpha. */
311 }
312 }
314
315 const bool ok = IMB_save_image(ibuf, filepath, save_float ? IB_float_data : IB_byte_data);
316 if (ok == false) {
317 perror(filepath);
318 }
319
320 IMB_freeImBuf(ibuf);
321}
322
328 const char *ext;
329};
330
342 Scene *scene,
343 const int view_id,
344 MultiViewPrefixVars *prefix_vars)
345{
346 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
347 return false;
348 }
349
350 if ((strip->type == STRIP_TYPE_IMAGE) && (strip->views_format == R_IMF_VIEWS_INDIVIDUAL)) {
351 if (view_id == 0) {
352 /* Clear on first use. */
353 prefix_vars->prefix[0] = '\0';
354 prefix_vars->ext = nullptr;
355
356 char filepath[FILE_MAX];
358 filepath, sizeof(filepath), strip->data->dirpath, strip->data->stripdata->filename);
360 BKE_scene_multiview_view_prefix_get(scene, filepath, prefix_vars->prefix, &prefix_vars->ext);
361 }
362
363 if (prefix_vars->prefix[0] == '\0') {
364 return view_id != 0;
365 }
366
367 char filepath[FILE_MAX];
368 seq_multiview_name(scene, view_id, prefix_vars->prefix, prefix_vars->ext, filepath, FILE_MAX);
369 if (BLI_access(filepath, R_OK) == 0) {
370 return false;
371 }
372
373 return view_id != 0;
374 }
375 return false;
376}
377
381static int seq_proxy_context_count(Strip *strip, Scene *scene)
382{
383 int num_views = 1;
384
385 if ((scene->r.scemode & R_MULTIVIEW) == 0) {
386 return 1;
387 }
388
389 switch (strip->type) {
390 case STRIP_TYPE_MOVIE: {
391 num_views = BLI_listbase_count(&strip->anims);
392 break;
393 }
394 case STRIP_TYPE_IMAGE: {
395 switch (strip->views_format) {
397 num_views = BKE_scene_multiview_num_views_get(&scene->r);
398 break;
400 num_views = 2;
401 break;
403 /* not supported at the moment */
404 /* pass through */
405 default:
406 num_views = 1;
407 }
408 break;
409 }
410 }
411
412 return num_views;
413}
414
415static bool seq_proxy_need_rebuild(Strip *strip, MovieReader *anim)
416{
417 if ((strip->data->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0) {
418 return true;
419 }
420
421 IMB_Proxy_Size required_proxies = IMB_Proxy_Size(strip->data->proxy->build_size_flags);
422 int built_proxies = MOV_get_existing_proxies(anim);
423 return (required_proxies & built_proxies) != required_proxies;
424}
425
427 Depsgraph *depsgraph,
428 Scene *scene,
429 Strip *strip,
430 blender::Set<std::string> *processed_paths,
431 ListBase *queue,
432 bool build_only_on_bad_performance)
433{
434 IndexBuildContext *context;
435 Strip *strip_new;
436 LinkData *link;
437 int num_files;
438 int i;
439
440 if (!strip->data || !strip->data->proxy) {
441 return true;
442 }
443
444 if (!(strip->flag & SEQ_USE_PROXY)) {
445 return true;
446 }
447
448 num_files = seq_proxy_context_count(strip, scene);
449
450 MultiViewPrefixVars prefix_vars; /* Initialized by #seq_proxy_multiview_context_invalid. */
451 for (i = 0; i < num_files; i++) {
452 if (seq_proxy_multiview_context_invalid(strip, scene, i, &prefix_vars)) {
453 continue;
454 }
455
456 /* Check if proxies are already built here, because actually opening anims takes a lot of
457 * time. */
458 strip_open_anim_file(scene, strip, false);
459 StripAnim *sanim = static_cast<StripAnim *>(BLI_findlink(&strip->anims, i));
460 if (sanim->anim && !seq_proxy_need_rebuild(strip, sanim->anim)) {
461 continue;
462 }
463
465
466 context = MEM_callocN<IndexBuildContext>("strip proxy rebuild context");
467
468 strip_new = strip_duplicate_recursive(scene, scene, nullptr, strip, 0);
469
470 context->tc_flags = strip_new->data->proxy->build_tc_flags;
471 context->size_flags = strip_new->data->proxy->build_size_flags;
472 context->quality = strip_new->data->proxy->quality;
473 context->overwrite = (strip_new->data->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) == 0;
474
475 context->bmain = bmain;
476 context->depsgraph = depsgraph;
477 context->scene = scene;
478 context->orig_seq = strip;
479 context->orig_seq_uid = strip->runtime.session_uid;
480 context->strip = strip_new;
481
482 context->view_id = i; /* only for images */
483
484 if (strip_new->type == STRIP_TYPE_MOVIE) {
485 strip_open_anim_file(scene, strip_new, true);
486 sanim = static_cast<StripAnim *>(BLI_findlink(&strip_new->anims, i));
487
488 if (sanim->anim) {
489 context->proxy_builder = MOV_proxy_builder_start(sanim->anim,
490 IMB_Timecode_Type(context->tc_flags),
491 context->size_flags,
492 context->quality,
493 context->overwrite,
494 processed_paths,
495 build_only_on_bad_performance);
496 }
497 if (!context->proxy_builder) {
498 MEM_freeN(context);
499 return false;
500 }
501 }
502
503 link = BLI_genericNodeN(context);
504 BLI_addtail(queue, link);
505 }
506
507 return true;
508}
509
510void proxy_rebuild(IndexBuildContext *context, wmJobWorkerStatus *worker_status)
511{
512 const bool overwrite = context->overwrite;
513 RenderData render_context;
514 Strip *strip = context->strip;
515 Scene *scene = context->scene;
516 Main *bmain = context->bmain;
517 int timeline_frame;
518
519 if (strip->type == STRIP_TYPE_MOVIE) {
520 if (context->proxy_builder) {
521 MOV_proxy_builder_process(context->proxy_builder,
522 &worker_status->stop,
523 &worker_status->do_update,
524 &worker_status->progress);
525 }
526
527 return;
528 }
529
530 if (!(strip->flag & SEQ_USE_PROXY)) {
531 return;
532 }
533
534 /* that's why it is called custom... */
535 if (strip->data->proxy && strip->data->proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_FILE) {
536 return;
537 }
538
539 /* fail safe code */
540 int width, height;
541 BKE_render_resolution(&scene->r, false, &width, &height);
542
544 bmain, context->depsgraph, context->scene, width, height, 100, false, &render_context);
545
546 render_context.skip_cache = true;
547 render_context.is_proxy_render = true;
548 render_context.view_id = context->view_id;
549
551
552 for (timeline_frame = time_left_handle_frame_get(scene, strip);
553 timeline_frame < time_right_handle_frame_get(scene, strip);
554 timeline_frame++)
555 {
557 timeline_frame,
558 render_context.view_id,
559 render_context.rectx,
560 render_context.recty);
561
562 if (context->size_flags & IMB_PROXY_25) {
563 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 25, overwrite);
564 }
565 if (context->size_flags & IMB_PROXY_50) {
566 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 50, overwrite);
567 }
568 if (context->size_flags & IMB_PROXY_75) {
569 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 75, overwrite);
570 }
571 if (context->size_flags & IMB_PROXY_100) {
572 seq_proxy_build_frame(&render_context, &state, strip, timeline_frame, 100, overwrite);
573 }
574
575 worker_status->progress = float(timeline_frame - time_left_handle_frame_get(scene, strip)) /
576 (time_right_handle_frame_get(scene, strip) -
577 time_left_handle_frame_get(scene, strip));
578 worker_status->do_update = true;
579
580 if (worker_status->stop || G.is_break) {
581 break;
582 }
583 }
584}
585
587{
588 if (context->proxy_builder) {
589 LISTBASE_FOREACH (StripAnim *, sanim, &context->strip->anims) {
590 MOV_close_proxies(sanim->anim);
591 }
592
593 MOV_proxy_builder_finish(context->proxy_builder, stop);
594 }
595
596 seq_free_strip_recurse(nullptr, context->strip, true);
597
598 MEM_freeN(context);
599}
600
601void proxy_set(Strip *strip, bool value)
602{
603 if (value) {
604 strip->flag |= SEQ_USE_PROXY;
605 if (strip->data->proxy == nullptr) {
606 strip->data->proxy = seq_strip_proxy_alloc();
607 }
608 }
609 else {
610 strip->flag &= ~SEQ_USE_PROXY;
611 }
612}
613
614void seq_proxy_index_dir_set(MovieReader *anim, const char *base_dir)
615{
616 char dirname[FILE_MAX];
617 char filename[FILE_MAXFILE];
618
619 MOV_get_filename(anim, filename, FILE_MAXFILE);
620 BLI_path_join(dirname, sizeof(dirname), base_dir, filename);
622}
623
625{
626 if (strip->data && strip->data->proxy && strip->data->proxy->anim) {
627 MOV_close(strip->data->proxy->anim);
628 strip->data->proxy->anim = nullptr;
629 }
630}
631
632} // namespace blender::seq
MovieReader * openanim(const char *filepath, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path_from_global()
Definition main.cc:882
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
Definition scene.cc:2927
int BKE_scene_multiview_num_views_get(const RenderData *rd)
Definition scene.cc:2952
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
Definition scene.cc:3176
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition storage.cc:373
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
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:599
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:688
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_IMF_VIEWS_MULTIVIEW
@ R_IMF_VIEWS_STEREO_3D
@ R_IMF_VIEWS_INDIVIDUAL
@ R_IMF_EXR_CODEC_DWAA
@ R_MULTIVIEW
@ SEQ_PROXY_SKIP_EXISTING
@ SEQ_USE_PROXY
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ STRIP_TYPE_IMAGE
@ STRIP_TYPE_MOVIE
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
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:204
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:801
bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags)
Definition writeimage.cc:20
@ 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
bool stop
Definition WM_types.hh:1016
BPy_StructRNA * depsgraph
#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:58
void MOV_get_filename(const MovieReader *anim, char *filename, int filename_maxncpy)
Definition movie_read.cc:73
ImBuf * MOV_decode_frame(MovieReader *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
void relations_strip_free_anim(Strip *strip)
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)
Definition render.cc:205
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
void proxy_rebuild(IndexBuildContext *context, wmJobWorkerStatus *worker_status)
Definition proxy.cc:510
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:97
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:260
static int seq_proxy_context_count(Strip *strip, Scene *scene)
Definition proxy.cc:381
Editing * editing_get(const Scene *scene)
Definition sequencer.cc:272
StripProxy * seq_strip_proxy_alloc()
Definition sequencer.cc:71
double rendersize_to_scale_factor(int render_size)
Definition proxy.cc:87
ImBuf * seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
Definition proxy.cc:203
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:260
int rendersize_to_proxysize(int render_size)
Definition proxy.cc:72
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:426
void proxy_set(Strip *strip, bool value)
Definition proxy.cc:601
Strip * strip_duplicate_recursive(const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Strip *strip, int dupe_flag)
Definition sequencer.cc:645
void seq_proxy_index_dir_set(MovieReader *anim, const char *base_dir)
Definition proxy.cc:614
static bool seq_proxy_multiview_context_invalid(Strip *strip, Scene *scene, const int view_id, MultiViewPrefixVars *prefix_vars)
Definition proxy.cc:341
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:128
bool can_use_proxy(const RenderData *context, const Strip *strip, int psize)
Definition proxy.cc:192
void proxy_rebuild_finish(IndexBuildContext *context, bool stop)
Definition proxy.cc:586
void free_strip_proxy(Strip *strip)
Definition proxy.cc:624
static bool seq_proxy_need_rebuild(Strip *strip, MovieReader *anim)
Definition proxy.cc:415
bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
Definition proxy.cc:100
ImBuf * seq_render_strip(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
Definition render.cc:1748
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
Definition render.cc:233
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