Blender
V3.3
|
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sequence_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_listbase.h"
#include "BLI_threads.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_debug.h"
#include "DEG_depsgraph_query.h"
#include "SEQ_channels.h"
#include "SEQ_iterator.h"
#include "SEQ_prefetch.h"
#include "SEQ_relations.h"
#include "SEQ_render.h"
#include "SEQ_sequencer.h"
#include "image_cache.h"
#include "prefetch.h"
#include "render.h"
Go to the source code of this file.
Classes | |
struct | PrefetchJob |
Typedefs | |
typedef struct PrefetchJob | PrefetchJob |
typedef struct PrefetchJob PrefetchJob |
|
static |
Definition at line 425 of file prefetch.c.
References LISTBASE_FOREACH, SEQ_collection_remove_strip(), SEQ_query_all_strips_recursive(), SEQ_SCENE_STRIPS, and SEQ_TYPE_SCENE.
Referenced by seq_prefetch_must_skip_frame().
|
static |
Definition at line 178 of file prefetch.c.
References BKE_animsys_eval_context_construct(), PrefetchJob::depsgraph, and seq_prefetch_cfra().
Referenced by seq_prefetch_frames().
|
static |
Definition at line 174 of file prefetch.c.
References PrefetchJob::cfra, and PrefetchJob::num_frames_prefetched.
Referenced by seq_prefetch_anim_eval_context(), seq_prefetch_frames(), seq_prefetch_get_time_range(), seq_prefetch_need_suspend(), seq_prefetch_scene_strip_is_rendered(), seq_prefetch_seq_has_disk_cache(), and seq_prefetch_update_depsgraph().
|
static |
Definition at line 455 of file prefetch.c.
References BLI_condition_wait(), BLI_mutex_lock(), BLI_mutex_unlock(), Editing::cache_flag, Scene::ed, PrefetchJob::prefetch_suspend_cond, PrefetchJob::prefetch_suspend_mutex, PrefetchJob::scene, SEQ_CACHE_PREFETCH_ENABLE, seq_prefetch_need_suspend(), seq_prefetch_update_area(), PrefetchJob::stop, and PrefetchJob::waiting.
Referenced by seq_prefetch_frames().
Definition at line 468 of file prefetch.c.
References ADT_RECALC_ALL, BKE_animdata_from_id(), BKE_animsys_evaluate_animdata(), Editing::cache_flag, RenderData::cfra, channels(), PrefetchJob::context, PrefetchJob::context_cpy, Scene::ed, RenderData::efra, Scene::id, IMB_freeImBuf(), NULL, PrefetchJob::num_frames_prefetched, Editing::prefetch_job, Scene::r, PrefetchJob::running, PrefetchJob::scene, SeqRenderData::scene, PrefetchJob::scene_eval, SEQ_active_seqbase_get(), seq_cache_free_temp_cache(), SEQ_CACHE_PREFETCH_ENABLE, SEQ_channels_displayed_get(), SEQ_editing_get(), seq_prefetch_anim_eval_context(), seq_prefetch_cfra(), seq_prefetch_do_suspend(), seq_prefetch_must_skip_frame(), seq_prefetch_update_area(), seq_prefetch_update_depsgraph(), SEQ_render_give_ibuf(), PrefetchJob::stop, and SeqRenderData::task_id.
Referenced by seq_prefetch_start_ex().
Definition at line 339 of file prefetch.c.
References BKE_main_free(), BLI_condition_end(), BLI_mutex_end(), BLI_threadpool_end(), BLI_threadpool_remove(), PrefetchJob::bmain_eval, Scene::ed, MEM_freeN, NULL, Editing::prefetch_job, PrefetchJob::prefetch_suspend_cond, PrefetchJob::prefetch_suspend_mutex, scene, seq_prefetch_free_depsgraph(), seq_prefetch_job_get(), SEQ_prefetch_stop(), and PrefetchJob::threads.
Referenced by SEQ_editing_free().
|
static |
Definition at line 191 of file prefetch.c.
References DEG_graph_free(), PrefetchJob::depsgraph, NULL, and PrefetchJob::scene_eval.
Referenced by seq_prefetch_free(), and seq_prefetch_update_scene().
SeqRenderData* seq_prefetch_get_original_context | ( | const SeqRenderData * | context | ) |
Definition at line 156 of file prefetch.c.
References blender::compositor::context, PrefetchJob::context, and seq_prefetch_job_get().
Referenced by seq_cache_get(), seq_cache_put(), and seq_cache_put_if_possible().
For cache context swapping.
Definition at line 150 of file prefetch.c.
References Scene::ed, scene, Editing::seqbase, and sequencer_prefetch_get_original_sequence().
Referenced by seq_cache_get(), seq_cache_put(), seq_cache_put_if_possible(), and seq_prefetch_update_active_seqbase().
Definition at line 183 of file prefetch.c.
References PrefetchJob::cfra, scene, seq_prefetch_cfra(), and seq_prefetch_job_get().
Referenced by seq_cache_choose_key().
|
static |
Definition at line 205 of file prefetch.c.
References BKE_view_layer_default_render(), PrefetchJob::bmain_eval, Editing::cache_flag, DAG_EVAL_RENDER, DEG_debug_name_set(), DEG_get_evaluated_scene(), DEG_graph_build_for_render_pipeline(), DEG_graph_new(), PrefetchJob::depsgraph, Scene::ed, scene, PrefetchJob::scene, PrefetchJob::scene_eval, and seq_prefetch_update_depsgraph().
Referenced by seq_prefetch_start_ex(), and seq_prefetch_update_scene().
Definition at line 163 of file prefetch.c.
References scene, PrefetchJob::scene, seq_cache_is_full(), seq_cache_recycle_item(), and seq_prefetch_job_get().
Referenced by seq_prefetch_need_suspend().
Definition at line 81 of file prefetch.c.
References ListBase::first, and Main::screens.
Referenced by SEQ_prefetch_need_redraw(), and seq_prefetch_start().
Definition at line 91 of file prefetch.c.
References ListBase::first, and Main::screens.
Referenced by SEQ_prefetch_need_redraw(), seq_prefetch_need_suspend(), and seq_prefetch_start().
|
static |
Definition at line 102 of file prefetch.c.
References Scene::ed, NULL, Editing::prefetch_job, and scene.
Referenced by seq_prefetch_free(), seq_prefetch_get_original_context(), seq_prefetch_get_time_range(), seq_prefetch_is_cache_full(), seq_prefetch_job_is_running(), seq_prefetch_job_is_waiting(), seq_prefetch_resume(), seq_prefetch_start_ex(), SEQ_prefetch_stop(), seq_prefetch_update_context(), and seq_prefetch_update_scene().
Definition at line 110 of file prefetch.c.
References PrefetchJob::running, scene, and seq_prefetch_job_get().
Referenced by seq_cache_choose_key(), SEQ_prefetch_need_redraw(), and seq_prefetch_start().
Definition at line 121 of file prefetch.c.
References scene, seq_prefetch_job_get(), and PrefetchJob::waiting.
Referenced by SEQ_prefetch_need_redraw().
|
static |
Definition at line 438 of file prefetch.c.
References channels(), query_scene_strips(), SEQ_collection_free(), and seq_prefetch_scene_strip_is_rendered().
Referenced by seq_prefetch_frames().
Definition at line 585 of file prefetch.c.
References Editing::cache_flag, Scene::ed, scene, SEQ_CACHE_VIEW_ENABLE, seq_prefetch_is_playing(), seq_prefetch_is_scrubbing(), seq_prefetch_job_is_running(), and seq_prefetch_job_is_waiting().
Referenced by seq_prefetch_wm_notify().
|
static |
Definition at line 449 of file prefetch.c.
References PrefetchJob::bmain, RenderData::efra, Scene::r, PrefetchJob::scene, seq_prefetch_cfra(), seq_prefetch_is_cache_full(), and seq_prefetch_is_scrubbing().
Referenced by seq_prefetch_do_suspend().
Definition at line 330 of file prefetch.c.
References BLI_condition_notify_one(), PrefetchJob::prefetch_suspend_cond, scene, seq_prefetch_job_get(), and PrefetchJob::waiting.
Referenced by seq_prefetch_start().
|
static |
Definition at line 390 of file prefetch.c.
References channels(), count, Sequence::flag, MAXSEQ, PrefetchJob::scene_eval, seq_get_shown_sequences(), SEQ_ITERATOR_FOREACH, seq_prefetch_cfra(), seq_prefetch_seq_has_disk_cache(), SEQ_relations_render_loop_check(), SEQ_SCENE_STRIPS, SEQ_TYPE_META, SEQ_TYPE_SCENE, Sequence::seqbase, and Sequence::type.
Referenced by seq_prefetch_must_skip_frame().
|
static |
Definition at line 358 of file prefetch.c.
References PrefetchJob::context_cpy, IMB_freeImBuf(), NULL, seq_cache_get(), SEQ_CACHE_STORE_FINAL_OUT, SEQ_CACHE_STORE_PREPROCESSED, SEQ_CACHE_STORE_RAW, and seq_prefetch_cfra().
Referenced by seq_prefetch_scene_strip_is_rendered().
void seq_prefetch_start | ( | const SeqRenderData * | context, |
float | timeline_frame | ||
) |
Definition at line 561 of file prefetch.c.
References bool, Editing::cache_flag, blender::compositor::context, Scene::ed, ListBase::first, G, if(), scene, SEQ_CACHE_ALL_TYPES, SEQ_CACHE_PREFETCH_ENABLE, seq_prefetch_is_playing(), seq_prefetch_is_scrubbing(), seq_prefetch_job_is_running(), seq_prefetch_resume(), seq_prefetch_start_ex(), and Editing::seqbasep.
Referenced by SEQ_render_give_ibuf().
|
static |
Definition at line 524 of file prefetch.c.
References BKE_main_new(), BLI_condition_init(), BLI_mutex_init(), BLI_threadpool_init(), BLI_threadpool_insert(), BLI_threadpool_remove(), PrefetchJob::bmain, PrefetchJob::bmain_eval, PrefetchJob::cfra, blender::compositor::context, MEM_callocN, PrefetchJob::num_frames_prefetched, PrefetchJob::prefetch_suspend_cond, PrefetchJob::prefetch_suspend_mutex, PrefetchJob::running, PrefetchJob::scene, seq_prefetch_frames(), seq_prefetch_init_depsgraph(), seq_prefetch_job_get(), seq_prefetch_update_active_seqbase(), seq_prefetch_update_context(), seq_prefetch_update_scene(), PrefetchJob::stop, PrefetchJob::threads, and PrefetchJob::waiting.
Referenced by seq_prefetch_start().
Use also to update scene and context changes This function should almost always be called by cache invalidation, not directly.
Definition at line 254 of file prefetch.c.
References BLI_condition_notify_one(), PrefetchJob::prefetch_suspend_cond, PrefetchJob::running, scene, seq_prefetch_job_get(), and PrefetchJob::stop.
Referenced by SEQ_cache_cleanup(), seq_prefetch_free(), SEQ_prefetch_stop_all(), SEQ_relations_free_imbuf(), sequence_invalidate_cache(), sequencer_delete_exec(), sequencer_meta_make_exec(), sequencer_meta_separate_exec(), sequencer_meta_toggle_exec(), sequencer_separate_images_exec(), and sequencer_split_exec().
Definition at line 246 of file prefetch.c.
References G, Scene::id, ID::next, scene, and SEQ_prefetch_stop().
Referenced by WM_jobs_kill_all().
|
static |
Definition at line 316 of file prefetch.c.
References NULL, MetaStack::parseq, PrefetchJob::scene, PrefetchJob::scene_eval, SEQ_editing_get(), SEQ_meta_stack_active_get(), seq_prefetch_get_original_sequence(), SEQ_seqbase_active_set(), Sequence::seqbase, and Editing::seqbase.
Referenced by seq_prefetch_start_ex().
|
static |
Definition at line 224 of file prefetch.c.
References RenderData::cfra, PrefetchJob::cfra, PrefetchJob::num_frames_prefetched, Scene::r, and PrefetchJob::scene.
Referenced by seq_prefetch_do_suspend(), and seq_prefetch_frames().
|
static |
Definition at line 270 of file prefetch.c.
References PrefetchJob::bmain, PrefetchJob::bmain_eval, blender::compositor::context, PrefetchJob::context, PrefetchJob::context_cpy, PrefetchJob::depsgraph, SeqRenderData::is_prefetch_render, PrefetchJob::scene, PrefetchJob::scene_eval, seq_prefetch_job_get(), SEQ_render_new_render_data(), SEQ_TASK_PREFETCH_RENDER, and SeqRenderData::task_id.
Referenced by seq_prefetch_start_ex().
|
static |
Definition at line 200 of file prefetch.c.
References DEG_evaluate_on_framechange(), PrefetchJob::depsgraph, and seq_prefetch_cfra().
Referenced by seq_prefetch_frames(), and seq_prefetch_init_depsgraph().
Definition at line 303 of file prefetch.c.
References scene, PrefetchJob::scene, seq_prefetch_free_depsgraph(), seq_prefetch_init_depsgraph(), and seq_prefetch_job_get().
Referenced by seq_prefetch_start_ex().
|
static |
Definition at line 132 of file prefetch.c.
References LISTBASE_FOREACH, Sequence::name, NULL, SEQ_TYPE_META, Sequence::seqbase, and STREQ.
Referenced by seq_prefetch_get_original_sequence().