Blender  V2.93
prefetch.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #include <stddef.h>
25 #include <stdlib.h>
26 #include <string.h>
27 
28 #include "MEM_guardedalloc.h"
29 
30 #include "DNA_anim_types.h"
31 #include "DNA_scene_types.h"
32 #include "DNA_screen_types.h"
33 #include "DNA_sequence_types.h"
35 
36 #include "BLI_listbase.h"
37 #include "BLI_threads.h"
38 
39 #include "IMB_imbuf.h"
40 #include "IMB_imbuf_types.h"
41 
42 #include "BKE_anim_data.h"
43 #include "BKE_animsys.h"
44 #include "BKE_context.h"
45 #include "BKE_global.h"
46 #include "BKE_layer.h"
47 #include "BKE_lib_id.h"
48 #include "BKE_main.h"
49 #include "BKE_scene.h"
50 
51 #include "DEG_depsgraph.h"
52 #include "DEG_depsgraph_build.h"
53 #include "DEG_depsgraph_debug.h"
54 #include "DEG_depsgraph_query.h"
55 
56 #include "SEQ_prefetch.h"
57 #include "SEQ_render.h"
58 #include "SEQ_sequencer.h"
59 
60 #include "image_cache.h"
61 #include "prefetch.h"
62 #include "render.h"
63 
64 typedef struct PrefetchJob {
65  struct PrefetchJob *next, *prev;
66 
67  struct Main *bmain;
68  struct Main *bmain_eval;
69  struct Scene *scene;
70  struct Scene *scene_eval;
72 
75 
77 
78  /* context */
79  struct SeqRenderData context;
81  struct ListBase *seqbasep;
83 
84  /* prefetch area */
85  float cfra;
87 
88  /* control */
89  bool running;
90  bool waiting;
91  bool stop;
93 
94 static bool seq_prefetch_is_playing(Main *bmain)
95 {
96  for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
97  if (screen->animtimer) {
98  return true;
99  }
100  }
101  return false;
102 }
103 
104 static bool seq_prefetch_is_scrubbing(Main *bmain)
105 {
106 
107  for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
108  if (screen->scrubbing) {
109  return true;
110  }
111  }
112  return false;
113 }
114 
116 {
117  if (scene && scene->ed) {
118  return scene->ed->prefetch_job;
119  }
120  return NULL;
121 }
122 
124 {
126 
127  if (!pfjob) {
128  return false;
129  }
130 
131  return pfjob->running;
132 }
133 
135 {
137 
138  if (!pfjob) {
139  return false;
140  }
141 
142  return pfjob->waiting;
143 }
144 
146 {
147  LISTBASE_FOREACH (Sequence *, seq_orig, seqbase) {
148  if (STREQ(seq->name, seq_orig->name)) {
149  return seq_orig;
150  }
151 
152  if (seq_orig->type == SEQ_TYPE_META) {
154  if (match != NULL) {
155  return match;
156  }
157  }
158  }
159 
160  return NULL;
161 }
162 
163 /* for cache context swapping */
165 {
166  Editing *ed = scene->ed;
168 }
169 
170 /* for cache context swapping */
172 {
173  PrefetchJob *pfjob = seq_prefetch_job_get(context->scene);
174 
175  return &pfjob->context;
176 }
177 
179 {
181 
182  if (!seq_cache_is_full()) {
183  return false;
184  }
185 
186  return seq_cache_recycle_item(pfjob->scene) == false;
187 }
188 
189 static float seq_prefetch_cfra(PrefetchJob *pfjob)
190 {
191  return pfjob->cfra + pfjob->num_frames_prefetched;
192 }
194 {
196 }
197 
198 void seq_prefetch_get_time_range(Scene *scene, int *start, int *end)
199 {
201 
202  *start = pfjob->cfra;
203  *end = seq_prefetch_cfra(pfjob);
204 }
205 
207 {
208  if (pfjob->depsgraph != NULL) {
209  DEG_graph_free(pfjob->depsgraph);
210  }
211  pfjob->depsgraph = NULL;
212  pfjob->scene_eval = NULL;
213 }
214 
216 {
218 }
219 
221 {
222  Main *bmain = pfjob->bmain_eval;
223  Scene *scene = pfjob->scene;
225 
226  pfjob->depsgraph = DEG_graph_new(bmain, scene, view_layer, DAG_EVAL_RENDER);
227  DEG_debug_name_set(pfjob->depsgraph, "SEQUENCER PREFETCH");
228 
229  /* Make sure there is a correct evaluated scene pointer. */
231 
232  /* Update immediately so we have proper evaluated scene. */
234 
236  pfjob->scene_eval->ed->cache_flag = 0;
237 }
238 
240 {
241  int cfra = pfjob->scene->r.cfra;
242 
243  /* rebase */
244  if (cfra > pfjob->cfra) {
245  int delta = cfra - pfjob->cfra;
246  pfjob->cfra = cfra;
247  pfjob->num_frames_prefetched -= delta;
248 
249  if (pfjob->num_frames_prefetched <= 1) {
250  pfjob->num_frames_prefetched = 1;
251  }
252  }
253 
254  /* reset */
255  if (cfra < pfjob->cfra) {
256  pfjob->cfra = cfra;
257  pfjob->num_frames_prefetched = 1;
258  }
259 }
260 
262 {
263  /*TODO(Richard): Use wm_jobs for prefetch, or pass main. */
264  for (Scene *scene = G.main->scenes.first; scene; scene = scene->id.next) {
266  }
267 }
268 
269 /* Use also to update scene and context changes
270  * This function should almost always be called by cache invalidation, not directly.
271  */
273 {
274  PrefetchJob *pfjob;
275  pfjob = seq_prefetch_job_get(scene);
276 
277  if (!pfjob) {
278  return;
279  }
280 
281  pfjob->stop = true;
282 
283  while (pfjob->running) {
285  }
286 }
287 
289 {
290  PrefetchJob *pfjob;
291  pfjob = seq_prefetch_job_get(context->scene);
292 
294  pfjob->depsgraph,
295  pfjob->scene_eval,
296  context->rectx,
297  context->recty,
298  context->preview_render_size,
299  false,
300  &pfjob->context_cpy);
301  pfjob->context_cpy.is_prefetch_render = true;
303 
305  pfjob->depsgraph,
306  pfjob->scene,
307  context->rectx,
308  context->recty,
309  context->preview_render_size,
310  false,
311  &pfjob->context);
312  pfjob->context.is_prefetch_render = false;
313 
314  /* Same ID as prefetch context, because context will be swapped, but we still
315  * want to assign this ID to cache entries created in this thread.
316  * This is to allow "temp cache" work correctly for both threads.
317  */
319 }
320 
322 {
324 
325  if (!pfjob) {
326  return;
327  }
328 
329  pfjob->scene = scene;
332 }
333 
335 {
337 
338  if (pfjob && pfjob->waiting) {
340  }
341 }
342 
344 {
346  if (!pfjob) {
347  return;
348  }
349 
351 
352  BLI_threadpool_remove(&pfjob->threads, pfjob);
353  BLI_threadpool_end(&pfjob->threads);
357  BKE_main_free(pfjob->bmain_eval);
358  MEM_freeN(pfjob);
360 }
361 
362 /* Skip frame if we need to render 3D scene strip. Rendering 3D scene requires main lock or setting
363  * up render job that doesn't have API to do openGL renders which can be used for sequencer. */
364 static bool seq_prefetch_do_skip_frame(PrefetchJob *pfjob, ListBase *seqbase)
365 {
366  float cfra = seq_prefetch_cfra(pfjob);
367  Sequence *seq_arr[MAXSEQ + 1];
368  int count = seq_get_shown_sequences(seqbase, cfra, 0, seq_arr);
369  SeqRenderData *ctx = &pfjob->context_cpy;
370  ImBuf *ibuf = NULL;
371 
372  /* Disable prefetching 3D scene strips, but check for disk cache. */
373  for (int i = 0; i < count; i++) {
374  if (seq_arr[i]->type == SEQ_TYPE_META &&
375  seq_prefetch_do_skip_frame(pfjob, &seq_arr[i]->seqbase)) {
376  return true;
377  }
378 
379  if (seq_arr[i]->type == SEQ_TYPE_SCENE && (seq_arr[i]->flag & SEQ_SCENE_STRIPS) == 0) {
380  int cached_types = 0;
381 
382  ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT);
383  if (ibuf != NULL) {
384  cached_types |= SEQ_CACHE_STORE_FINAL_OUT;
385  IMB_freeImBuf(ibuf);
386  ibuf = NULL;
387  }
388 
389  ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_COMPOSITE);
390  if (ibuf != NULL) {
391  cached_types |= SEQ_CACHE_STORE_COMPOSITE;
392  IMB_freeImBuf(ibuf);
393  ibuf = NULL;
394  }
395 
396  ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_PREPROCESSED);
397  if (ibuf != NULL) {
398  cached_types |= SEQ_CACHE_STORE_PREPROCESSED;
399  IMB_freeImBuf(ibuf);
400  ibuf = NULL;
401  }
402 
403  ibuf = seq_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_RAW);
404  if (ibuf != NULL) {
405  cached_types |= SEQ_CACHE_STORE_RAW;
406  IMB_freeImBuf(ibuf);
407  ibuf = NULL;
408  }
409 
410  if ((cached_types & (SEQ_CACHE_STORE_RAW | SEQ_CACHE_STORE_PREPROCESSED)) != 0) {
411  continue;
412  }
413 
414  /* It is only safe to use these cache types if strip is last in stack. */
415  if (i == count - 1 && (cached_types & SEQ_CACHE_STORE_FINAL_OUT) != 0) {
416  continue;
417  }
418 
419  return true;
420  }
421  }
422 
423  return false;
424 }
425 
427 {
429  (seq_prefetch_cfra(pfjob) >= pfjob->scene->r.efra);
430 }
431 
433 {
435  while (seq_prefetch_need_suspend(pfjob) &&
436  (pfjob->scene->ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE) && !pfjob->stop) {
437  pfjob->waiting = true;
440  }
441  pfjob->waiting = false;
443 }
444 
445 static void *seq_prefetch_frames(void *job)
446 {
447  PrefetchJob *pfjob = (PrefetchJob *)job;
448 
449  while (seq_prefetch_cfra(pfjob) <= pfjob->scene->r.efra) {
450  pfjob->scene_eval->ed->prefetch_job = NULL;
451 
454  AnimationEvalContext anim_eval_context = seq_prefetch_anim_eval_context(pfjob);
456  &pfjob->context_cpy.scene->id, adt, &anim_eval_context, ADT_RECALC_ALL, false);
457 
458  /* This is quite hacky solution:
459  * We need cross-reference original scene with copy for cache.
460  * However depsgraph must not have this data, because it will try to kill this job.
461  * Scene copy don't reference original scene. Perhaps, this could be done by depsgraph.
462  * Set to NULL before return!
463  */
464  pfjob->scene_eval->ed->prefetch_job = pfjob;
465 
466  ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene_eval, false));
467  if (seq_prefetch_do_skip_frame(pfjob, seqbase)) {
468  pfjob->num_frames_prefetched++;
469  continue;
470  }
471 
472  ImBuf *ibuf = SEQ_render_give_ibuf(&pfjob->context_cpy, seq_prefetch_cfra(pfjob), 0);
474  IMB_freeImBuf(ibuf);
475 
476  /* Suspend thread if there is nothing to be prefetched. */
478 
479  /* Avoid "collision" with main thread, but make sure to fetch at least few frames */
480  if (pfjob->num_frames_prefetched > 5 &&
481  (seq_prefetch_cfra(pfjob) - pfjob->scene->r.cfra) < 2) {
482  break;
483  }
484 
485  if (!(pfjob->scene->ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE) || pfjob->stop) {
486  break;
487  }
488 
490  pfjob->num_frames_prefetched++;
491  }
492 
494  pfjob->running = false;
495  pfjob->scene_eval->ed->prefetch_job = NULL;
496 
497  return NULL;
498 }
499 
501 {
502  PrefetchJob *pfjob = seq_prefetch_job_get(context->scene);
503 
504  if (!pfjob) {
505  if (context->scene->ed) {
506  pfjob = (PrefetchJob *)MEM_callocN(sizeof(PrefetchJob), "PrefetchJob");
507  context->scene->ed->prefetch_job = pfjob;
508 
512 
513  pfjob->bmain_eval = BKE_main_new();
514  pfjob->scene = context->scene;
516  }
517  }
518  pfjob->bmain = context->bmain;
519 
520  pfjob->cfra = cfra;
521  pfjob->num_frames_prefetched = 1;
522 
523  pfjob->waiting = false;
524  pfjob->stop = false;
525  pfjob->running = true;
526 
529 
530  BLI_threadpool_remove(&pfjob->threads, pfjob);
531  BLI_threadpool_insert(&pfjob->threads, pfjob);
532 
533  return pfjob;
534 }
535 
536 /* Start or resume prefetching*/
537 void seq_prefetch_start(const SeqRenderData *context, float timeline_frame)
538 {
539  Scene *scene = context->scene;
540  Editing *ed = scene->ed;
541  bool has_strips = (bool)ed->seqbasep->first;
542 
543  if (!context->is_prefetch_render && !context->is_proxy_render) {
544  bool playing = seq_prefetch_is_playing(context->bmain);
545  bool scrubbing = seq_prefetch_is_scrubbing(context->bmain);
546  bool running = seq_prefetch_job_is_running(scene);
548  /* conditions to start:
549  * prefetch enabled, prefetch not running, not scrubbing, not playing,
550  * cache storage enabled, has strips to render, not rendering, not doing modal transform -
551  * important, see D7820.
552  */
553  if ((ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE) && !running && !scrubbing && !playing &&
554  ed->cache_flag & SEQ_CACHE_ALL_TYPES && has_strips && !G.is_rendering && !G.moving) {
555 
556  seq_prefetch_start_ex(context, timeline_frame);
557  }
558  }
559 }
560 
562 {
563  bool playing = seq_prefetch_is_playing(bmain);
564  bool scrubbing = seq_prefetch_is_scrubbing(bmain);
565  bool running = seq_prefetch_job_is_running(scene);
566  bool suspended = seq_prefetch_job_is_waiting(scene);
567 
568  /* force redraw, when prefetching and using cache view. */
569  if (running && !playing && !suspended && scene->ed->cache_flag & SEQ_CACHE_VIEW_ENABLE) {
570  return true;
571  }
572  /* Sometimes scrubbing flag is set when not scrubbing. In that case I want to catch "event" of
573  * stopping scrubbing */
574  if (scrubbing) {
575  return true;
576  }
577  return false;
578 }
struct AnimData * BKE_animdata_from_id(struct ID *id)
Definition: anim_data.c:96
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
Definition: anim_sys.c:637
@ ADT_RECALC_ALL
Definition: BKE_animsys.h:239
void BKE_animsys_evaluate_animdata(struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, const bool flush_to_original)
struct ViewLayer * BKE_view_layer_default_render(const struct Scene *scene)
struct Main * BKE_main_new(void)
Definition: main.c:45
void BKE_main_free(struct Main *mainvar)
Definition: main.c:53
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
void BLI_mutex_end(ThreadMutex *mutex)
Definition: threads.cc:416
void BLI_threadpool_remove(struct ListBase *threadbase, void *callerdata)
Definition: threads.cc:252
void BLI_condition_wait(ThreadCondition *cond, ThreadMutex *mutex)
Definition: threads.cc:607
void BLI_threadpool_init(struct ListBase *threadbase, void *(*do_thread)(void *), int tot)
Definition: threads.cc:159
void BLI_mutex_init(ThreadMutex *mutex)
Definition: threads.cc:396
pthread_cond_t ThreadCondition
Definition: BLI_threads.h:151
void BLI_condition_end(ThreadCondition *cond)
Definition: threads.cc:627
void BLI_threadpool_end(struct ListBase *threadbase)
Definition: threads.cc:289
void BLI_condition_notify_one(ThreadCondition *cond)
Definition: threads.cc:617
void BLI_condition_init(ThreadCondition *cond)
Definition: threads.cc:602
void BLI_mutex_lock(ThreadMutex *mutex)
Definition: threads.cc:401
void BLI_mutex_unlock(ThreadMutex *mutex)
Definition: threads.cc:406
void BLI_threadpool_insert(struct ListBase *threadbase, void *callerdata)
Definition: threads.cc:239
pthread_mutex_t ThreadMutex
Definition: BLI_threads.h:83
#define STREQ(a, b)
Depsgraph * DEG_graph_new(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, eEvaluationMode mode)
Definition: depsgraph.cc:281
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
@ DAG_EVAL_RENDER
Definition: DEG_depsgraph.h:62
void DEG_evaluate_on_framechange(Depsgraph *graph, float ctime)
void DEG_graph_free(Depsgraph *graph)
Definition: depsgraph.cc:314
void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph)
void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ SEQ_SCENE_STRIPS
@ SEQ_CACHE_ALL_TYPES
@ SEQ_CACHE_STORE_PREPROCESSED
@ SEQ_CACHE_STORE_RAW
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_VIEW_ENABLE
@ SEQ_CACHE_STORE_COMPOSITE
@ SEQ_CACHE_PREFETCH_ENABLE
#define MAXSEQ
@ SEQ_TYPE_META
@ SEQ_TYPE_SCENE
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void IMB_freeImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:211
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
@ SEQ_TASK_PREFETCH_RENDER
Definition: SEQ_render.h:37
Scene scene
bool seq_cache_is_full(void)
Definition: image_cache.c:1504
void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame)
Definition: image_cache.c:1195
struct ImBuf * seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type)
Definition: image_cache.c:1338
bool seq_cache_recycle_item(Scene *scene)
Definition: image_cache.c:1074
int count
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
void seq_prefetch_get_time_range(Scene *scene, int *start, int *end)
Definition: prefetch.c:198
void seq_prefetch_free(Scene *scene)
Definition: prefetch.c:343
bool seq_prefetch_job_is_running(Scene *scene)
Definition: prefetch.c:123
static void * seq_prefetch_frames(void *job)
Definition: prefetch.c:445
static void seq_prefetch_update_area(PrefetchJob *pfjob)
Definition: prefetch.c:239
bool SEQ_prefetch_need_redraw(Main *bmain, Scene *scene)
Definition: prefetch.c:561
void SEQ_prefetch_stop(Scene *scene)
Definition: prefetch.c:272
static PrefetchJob * seq_prefetch_job_get(Scene *scene)
Definition: prefetch.c:115
static bool seq_prefetch_job_is_waiting(Scene *scene)
Definition: prefetch.c:134
static bool seq_prefetch_do_skip_frame(PrefetchJob *pfjob, ListBase *seqbase)
Definition: prefetch.c:364
static void seq_prefetch_update_depsgraph(PrefetchJob *pfjob)
Definition: prefetch.c:215
static float seq_prefetch_cfra(PrefetchJob *pfjob)
Definition: prefetch.c:189
void SEQ_prefetch_stop_all(void)
Definition: prefetch.c:261
static void seq_prefetch_do_suspend(PrefetchJob *pfjob)
Definition: prefetch.c:432
void seq_prefetch_start(const SeqRenderData *context, float timeline_frame)
Definition: prefetch.c:537
static void seq_prefetch_update_context(const SeqRenderData *context)
Definition: prefetch.c:288
static PrefetchJob * seq_prefetch_start_ex(const SeqRenderData *context, float cfra)
Definition: prefetch.c:500
Sequence * seq_prefetch_get_original_sequence(Sequence *seq, Scene *scene)
Definition: prefetch.c:164
static bool seq_prefetch_is_playing(Main *bmain)
Definition: prefetch.c:94
static AnimationEvalContext seq_prefetch_anim_eval_context(PrefetchJob *pfjob)
Definition: prefetch.c:193
static void seq_prefetch_update_scene(Scene *scene)
Definition: prefetch.c:321
static void seq_prefetch_init_depsgraph(PrefetchJob *pfjob)
Definition: prefetch.c:220
static void seq_prefetch_resume(Scene *scene)
Definition: prefetch.c:334
static bool seq_prefetch_is_cache_full(Scene *scene)
Definition: prefetch.c:178
struct PrefetchJob PrefetchJob
static bool seq_prefetch_need_suspend(PrefetchJob *pfjob)
Definition: prefetch.c:426
static bool seq_prefetch_is_scrubbing(Main *bmain)
Definition: prefetch.c:104
static void seq_prefetch_free_depsgraph(PrefetchJob *pfjob)
Definition: prefetch.c:206
static Sequence * sequencer_prefetch_get_original_sequence(Sequence *seq, ListBase *seqbase)
Definition: prefetch.c:145
SeqRenderData * seq_prefetch_get_original_context(const SeqRenderData *context)
Definition: prefetch.c:171
ImBuf * SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown)
Definition: render.c:1964
void SEQ_render_new_render_data(Main *bmain, struct Depsgraph *depsgraph, Scene *scene, int rectx, int recty, int preview_render_size, int for_render, SeqRenderData *r_context)
Definition: render.c:211
int seq_get_shown_sequences(ListBase *seqbasep, int timeline_frame, int chanshown, Sequence **seq_arr_out)
Definition: render.c:335
struct SELECTID_Context context
Definition: select_engine.c:47
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Definition: sequencer.c:350
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Definition: sequencer.c:232
ListBase seqbase
struct PrefetchJob * prefetch_job
ListBase * seqbasep
void * next
Definition: DNA_ID.h:274
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
ListBase screens
Definition: BKE_main.h:161
bool stop
Definition: prefetch.c:91
ListBase threads
Definition: prefetch.c:76
bool waiting
Definition: prefetch.c:90
struct PrefetchJob * next
Definition: prefetch.c:65
ThreadCondition prefetch_suspend_cond
Definition: prefetch.c:74
int num_frames_prefetched
Definition: prefetch.c:86
struct Main * bmain_eval
Definition: prefetch.c:68
struct ListBase * seqbasep_cpy
Definition: prefetch.c:82
float cfra
Definition: prefetch.c:85
struct PrefetchJob * prev
Definition: prefetch.c:65
struct Scene * scene_eval
Definition: prefetch.c:70
struct Depsgraph * depsgraph
Definition: prefetch.c:71
struct ListBase * seqbasep
Definition: prefetch.c:81
struct Scene * scene
Definition: prefetch.c:69
struct SeqRenderData context_cpy
Definition: prefetch.c:80
bool running
Definition: prefetch.c:89
struct SeqRenderData context
Definition: prefetch.c:79
ThreadMutex prefetch_suspend_mutex
Definition: prefetch.c:73
struct Main * bmain
Definition: prefetch.c:67
struct Editing * ed
struct RenderData r
struct Scene * scene
Definition: SEQ_render.h:43
bool is_prefetch_render
Definition: SEQ_render.h:53
eSeqTaskId task_id
Definition: SEQ_render.h:56
ListBase seqbase
#define G(x, y, z)