84 if (scene && scene->ed) {
85 return scene->ed->prefetch_job;
132 if (match !=
nullptr) {
178 *r_start = pfjob->
cfra;
220 if (cfra > pfjob->
cfra) {
221 int delta = cfra - pfjob->
cfra;
231 if (cfra < pfjob->cfra) {
241 scene =
static_cast<Scene *
>(scene->id.next))
273 context->preview_render_size,
284 context->preview_render_size,
314 if (ms_orig !=
nullptr) {
348 scene->ed->prefetch_job =
nullptr;
353 bool can_have_final_image)
359 if (ibuf !=
nullptr) {
365 if (ibuf !=
nullptr) {
370 if (!can_have_final_image) {
375 if (ibuf !=
nullptr) {
387 bool is_recursive_check)
391 pfjob->
scene_eval, channels, seqbase, cfra, 0);
397 pfjob, &seq->channels, &seq->seqbase, scene_strips,
true))
410 for (
Sequence *seq_scene : scene_strips) {
526 if (context->scene->ed) {
535 pfjob->
scene = context->scene;
539 pfjob->
bmain = context->bmain;
560 Scene *scene = context->scene;
564 if (!context->is_prefetch_render && !context->is_proxy_render) {
565 bool playing = context->is_playing;
566 bool scrubbing = context->is_scrubbing;
586 bool playing = screen->animtimer !=
nullptr;
587 bool scrubbing = screen->scrubbing;
595 if (running && !playing && !suspended && showing_cache) {
AnimData * BKE_animdata_from_id(const ID *id)
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)
bScreen * CTX_wm_screen(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
Main * BKE_main_new(void)
void BKE_main_free(Main *bmain)
#define LISTBASE_FOREACH(type, var, list)
void BLI_mutex_end(ThreadMutex *mutex)
void BLI_threadpool_remove(struct ListBase *threadbase, void *callerdata)
void BLI_condition_wait(ThreadCondition *cond, ThreadMutex *mutex)
void BLI_threadpool_init(struct ListBase *threadbase, void *(*do_thread)(void *), int tot)
void BLI_mutex_init(ThreadMutex *mutex)
pthread_cond_t ThreadCondition
void BLI_condition_end(ThreadCondition *cond)
void BLI_threadpool_end(struct ListBase *threadbase)
void BLI_condition_notify_one(ThreadCondition *cond)
void BLI_condition_init(ThreadCondition *cond)
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
void BLI_threadpool_insert(struct ListBase *threadbase, void *callerdata)
pthread_mutex_t ThreadMutex
Depsgraph * DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
void DEG_graph_free(Depsgraph *graph)
void DEG_evaluate_on_framechange(Depsgraph *graph, float frame, DepsgraphEvaluateSyncWriteback sync_writeback=DEG_EVALUATE_SYNC_WRITEBACK_NO)
void DEG_graph_build_for_render_pipeline(Depsgraph *graph)
void DEG_debug_name_set(Depsgraph *depsgraph, const char *name)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
@ SEQ_CACHE_STORE_PREPROCESSED
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_PREFETCH_ENABLE
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
@ SEQ_TASK_PREFETCH_RENDER
ListBase * SEQ_channels_displayed_get(Editing *ed)
void IMB_freeImBuf(ImBuf *)
ImBuf * seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type)
void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame)
bool seq_cache_recycle_item(Scene *scene)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void seq_prefetch_get_time_range(Scene *scene, int *r_start, int *r_end)
void seq_prefetch_free(Scene *scene)
bool seq_prefetch_job_is_running(Scene *scene)
static bool seq_prefetch_must_skip_frame(PrefetchJob *pfjob, ListBase *channels, ListBase *seqbase)
static void seq_prefetch_update_area(PrefetchJob *pfjob)
bool SEQ_prefetch_need_redraw(const bContext *C, Scene *scene)
void SEQ_prefetch_stop(Scene *scene)
static PrefetchJob * seq_prefetch_start_ex(const SeqRenderData *context, float cfra)
static bool seq_prefetch_job_is_waiting(Scene *scene)
static void seq_prefetch_job_scrubbing_set(Scene *scene, bool is_scrubbing)
static void seq_prefetch_update_depsgraph(PrefetchJob *pfjob)
static float seq_prefetch_cfra(PrefetchJob *pfjob)
static void seq_prefetch_do_suspend(PrefetchJob *pfjob)
void seq_prefetch_start(const SeqRenderData *context, float timeline_frame)
static void seq_prefetch_update_context(const SeqRenderData *context)
static bool seq_prefetch_seq_has_disk_cache(PrefetchJob *pfjob, Sequence *seq, bool can_have_final_image)
static Sequence * sequencer_prefetch_get_original_sequence(Sequence *seq, ListBase *seqbase)
static PrefetchJob * seq_prefetch_job_get(Scene *scene)
static void seq_prefetch_update_active_seqbase(PrefetchJob *pfjob)
void SEQ_prefetch_stop_all()
static void * seq_prefetch_frames(void *job)
static AnimationEvalContext seq_prefetch_anim_eval_context(PrefetchJob *pfjob)
static void seq_prefetch_update_scene(Scene *scene)
static blender::VectorSet< Sequence * > query_scene_strips(ListBase *seqbase)
Sequence * seq_prefetch_get_original_sequence(Sequence *seq, Scene *scene)
static void seq_prefetch_init_depsgraph(PrefetchJob *pfjob)
static void seq_prefetch_resume(Scene *scene)
static bool seq_prefetch_scene_strip_is_rendered(PrefetchJob *pfjob, ListBase *channels, ListBase *seqbase, blender::Span< Sequence * > scene_strips, bool is_recursive_check)
static bool seq_prefetch_is_cache_full(Scene *scene)
static bool seq_prefetch_need_suspend(PrefetchJob *pfjob)
static void seq_prefetch_free_depsgraph(PrefetchJob *pfjob)
SeqRenderData * seq_prefetch_get_original_context(const SeqRenderData *context)
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)
ImBuf * SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown)
Vector< Sequence * > seq_get_shown_sequences(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int chanshown)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
void SEQ_seqbase_active_set(Editing *ed, ListBase *seqbase)
Editing * SEQ_editing_get(const Scene *scene)
MetaStack * SEQ_meta_stack_active_get(const Editing *ed)
bool SEQ_relations_render_loop_check(Sequence *seq_main, Sequence *seq)
struct PrefetchJob * prefetch_job
SeqRenderData context_cpy
ThreadCondition prefetch_suspend_cond
int num_frames_prefetched
ThreadMutex prefetch_suspend_mutex
struct SequencerCacheOverlay cache_overlay