|
Blender
V2.93
|
#include <memory.h>#include <stddef.h>#include <time.h>#include "MEM_guardedalloc.h"#include "DNA_scene_types.h"#include "DNA_sequence_types.h"#include "DNA_space_types.h"#include "IMB_colormanagement.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "BLI_blenlib.h"#include "BLI_endian_switch.h"#include "BLI_fileops.h"#include "BLI_fileops_types.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_mempool.h"#include "BLI_path_util.h"#include "BLI_threads.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_scene.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 "strip_time.h"Go to the source code of this file.
Classes | |
| struct | DiskCacheHeaderEntry |
| struct | DiskCacheHeader |
| struct | SeqDiskCache |
| struct | DiskCacheFile |
| struct | SeqCache |
| struct | SeqCacheItem |
| struct | SeqCacheKey |
Macros | |
| #define | DCACHE_FNAME_FORMAT "%d-%dx%d-%d%%(%d)-%d.dcf" |
| #define | DCACHE_IMAGES_PER_FILE 100 |
| #define | DCACHE_CURRENT_VERSION 1 |
| #define | COLORSPACE_NAME_MAX 64 /* XXX: defined in imb intern */ |
Typedefs | |
| typedef struct DiskCacheHeaderEntry | DiskCacheHeaderEntry |
| typedef struct DiskCacheHeader | DiskCacheHeader |
| typedef struct SeqDiskCache | SeqDiskCache |
| typedef struct DiskCacheFile | DiskCacheFile |
| typedef struct SeqCache | SeqCache |
| typedef struct SeqCacheItem | SeqCacheItem |
| typedef struct SeqCacheKey | SeqCacheKey |
Variables | |
| static ThreadMutex | cache_create_lock = BLI_MUTEX_INITIALIZER |
| #define COLORSPACE_NAME_MAX 64 /* XXX: defined in imb intern */ |
Definition at line 106 of file image_cache.c.
| #define DCACHE_CURRENT_VERSION 1 |
Definition at line 105 of file image_cache.c.
| #define DCACHE_FNAME_FORMAT "%d-%dx%d-%d%%(%d)-%d.dcf" |
Function: All images created during rendering are added to cache, even if the cache is already full. This is because:
Linking: We use links to reduce number of iterations over entries needed to manage cache. Entries are linked in order as they are put into cache. Only permanent (is_temp_cache = 0) cache entries are linked. Putting SEQ_CACHE_STORE_FINAL_OUT will reset linking
Only entire frame can be freed to release resources for new entries (recycling). Once again, this is to reduce number of iterations, but also more controllable than removing entries one by one in reverse order to their creation.
User can exclude caching of some images. Such entries will have is_temp_cache set.
Disk cache uses directory specified in user preferences For each cached non-temp image, image data and supplementary info are written to HDD. Multiple(DCACHE_IMAGES_PER_FILE) images share the same file. Each of these files contains header DiskCacheHeader followed by image data. Zlib compression with user definable level can be used to compress image data(per image) Images are written in order in which they are rendered. Overwriting of individual entry is not possible. Stored images are deleted by invalidation, or when size of all files exceeds maximum size specified in user preferences. To distinguish 2 blend files with same name, scene->ed->disk_cache_timestamp is used as UID. Blend file can still be copied manually which may cause conflict.
Definition at line 103 of file image_cache.c.
| #define DCACHE_IMAGES_PER_FILE 100 |
Definition at line 104 of file image_cache.c.
| typedef struct DiskCacheFile DiskCacheFile |
| typedef struct DiskCacheHeader DiskCacheHeader |
| typedef struct DiskCacheHeaderEntry DiskCacheHeaderEntry |
| typedef struct SeqCacheItem SeqCacheItem |
| typedef struct SeqCacheKey SeqCacheKey |
| typedef struct SeqDiskCache SeqDiskCache |
|
static |
Definition at line 494 of file image_cache.c.
References BLI_gzip_mem_to_file_at_pos(), file, DiskCacheHeaderEntry::offset, ImBuf::rect, ImBuf::rect_float, and DiskCacheHeaderEntry::size_raw.
Referenced by seq_disk_cache_write_file().
|
static |
Definition at line 830 of file image_cache.c.
References Sequence::cache_flag, Editing::cache_flag, Scene::ed, scene, SeqCacheKey::seq, SEQ_CACHE_OVERRIDE, and SEQ_CACHE_STORE_FINAL_OUT.
Referenced by seq_cache_put_ex().
|
static |
Definition at line 508 of file image_cache.c.
References BLI_ungzip_file_to_mem_at_pos(), file, DiskCacheHeaderEntry::offset, ImBuf::rect, ImBuf::rect_float, and DiskCacheHeaderEntry::size_raw.
Referenced by seq_disk_cache_read_file().
|
static |
Definition at line 1182 of file image_cache.c.
References BLI_mempool_alloc(), context, SeqCache::keys_pool, seq_cache_populate_key(), and type.
Referenced by seq_cache_get(), and seq_cache_put().
|
static |
Definition at line 911 of file image_cache.c.
References Editing::cache_flag, RenderData::cfra, Scene::ed, NULL, Scene::r, scene, SEQ_CACHE_PREFETCH_ENABLE, seq_prefetch_get_time_range(), seq_prefetch_job_is_running(), and SeqCacheKey::timeline_frame.
Referenced by seq_cache_get_item_for_removal().
| void SEQ_cache_cleanup | ( | Scene * | scene | ) |
Definition at line 1251 of file image_cache.c.
References BLI_ghash_remove(), BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), SeqCache::hash, SeqCache::last_key, NULL, scene, seq_cache_get_from_scene(), seq_cache_keyfree(), seq_cache_lock(), seq_cache_unlock(), seq_cache_valfree(), and SEQ_prefetch_stop().
Referenced by screen_render_exec(), screen_render_invoke(), seq_cache_cleanup_all(), SEQ_relations_free_all_anim_ibufs(), and SEQ_relations_free_imbuf().
| void seq_cache_cleanup_all | ( | Main * | bmain | ) |
Definition at line 1245 of file image_cache.c.
References ListBase::first, Scene::id, ID::next, NULL, scene, Main::scenes, and SEQ_cache_cleanup().
| void seq_cache_cleanup_sequence | ( | Scene * | scene, |
| Sequence * | seq, | ||
| Sequence * | seq_changed, | ||
| int | invalidate_types, | ||
| bool | force_seq_changed_range | ||
| ) |
Definition at line 1274 of file image_cache.c.
References BLI_ghash_remove(), BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), SeqCache::bmain, SeqCache::disk_cache, Sequence::enddisp, SeqCache::hash, SeqCache::last_key, SeqCacheKey::link_next, SeqCacheKey::link_prev, NULL, scene, SeqCacheKey::seq, seq_cache_get_from_scene(), seq_cache_keyfree(), seq_cache_lock(), seq_cache_relink_keys(), SEQ_CACHE_STORE_COMPOSITE, SEQ_CACHE_STORE_FINAL_OUT, SEQ_CACHE_STORE_PREPROCESSED, SEQ_CACHE_STORE_RAW, seq_cache_unlock(), seq_cache_valfree(), seq_disk_cache_invalidate(), seq_disk_cache_is_enabled(), Sequence::startdisp, SeqCacheKey::timeline_frame, and SeqCacheKey::type.
Referenced by SEQ_relations_invalidate_cache_in_range(), sequence_do_invalidate_dependent(), and sequence_invalidate_cache().
Definition at line 1144 of file image_cache.c.
References BLI_ghash_new(), BLI_mempool_create(), BLI_MEMPOOL_NOP, BLI_mutex_init(), BLI_mutex_lock(), BLI_mutex_unlock(), SeqCache::bmain, Editing::cache, cache_create_lock, Editing::disk_cache_timestamp, Scene::ed, SeqCache::hash, SeqCache::items_pool, SeqCache::iterator_mutex, SeqCache::keys_pool, SeqCache::last_key, MEM_callocN, NULL, scene, seq_cache_hashcmp(), seq_cache_hashhash(), and time.
Referenced by seq_cache_get(), and seq_cache_put().
| void seq_cache_destruct | ( | Scene * | scene | ) |
Definition at line 1223 of file image_cache.c.
References BLI_freelistN(), BLI_ghash_free(), BLI_mempool_destroy(), BLI_mutex_end(), Editing::cache, SeqCache::disk_cache, Scene::ed, SeqDiskCache::files, SeqCache::hash, SeqCache::items_pool, SeqCache::iterator_mutex, SeqCache::keys_pool, MEM_freeN, NULL, SeqDiskCache::read_write_mutex, scene, seq_cache_get_from_scene(), seq_cache_keyfree(), and seq_cache_valfree().
Referenced by SEQ_editing_free().
Definition at line 776 of file image_cache.c.
References Sequence::start.
Referenced by seq_disk_cache_delete_invalid_files().
| void seq_cache_free_temp_cache | ( | Scene * | scene, |
| short | id, | ||
| int | timeline_frame | ||
| ) |
Definition at line 1195 of file image_cache.c.
References BLI_ghash_remove(), BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), Sequence::enddisp, SeqCacheKey::frame_index, SeqCache::hash, SeqCacheKey::is_temp_cache, scene, SeqCacheKey::seq, seq_cache_get_from_scene(), seq_cache_keyfree(), seq_cache_lock(), seq_cache_timeline_frame_to_frame_index(), seq_cache_unlock(), seq_cache_valfree(), SeqCacheKey::task_id, and SeqCacheKey::type.
Referenced by seq_prefetch_frames(), and SEQ_render_give_ibuf().
| struct ImBuf* seq_cache_get | ( | const SeqRenderData * | context, |
| Sequence * | seq, | ||
| float | timeline_frame, | ||
| int | type | ||
| ) |
Definition at line 1338 of file image_cache.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), Editing::cache, context, SeqCache::disk_cache, Scene::ed, NULL, SeqDiskCache::read_write_mutex, scene, seq_cache_allocate_key(), seq_cache_create(), seq_cache_get_ex(), seq_cache_get_from_scene(), seq_cache_lock(), seq_cache_populate_key(), seq_cache_put_ex(), seq_cache_recycle_item(), SEQ_CACHE_STORE_FINAL_OUT, seq_cache_unlock(), seq_disk_cache_create(), seq_disk_cache_is_enabled(), seq_disk_cache_read_file(), seq_prefetch_get_original_context(), seq_prefetch_get_original_sequence(), type, and SeqCacheKey::type.
Referenced by seq_cache_put(), seq_prefetch_do_skip_frame(), SEQ_render_give_ibuf(), seq_render_strip(), and seq_render_strip_stack().
|
static |
Definition at line 886 of file image_cache.c.
References BLI_ghash_lookup(), SeqCache::hash, SeqCacheItem::ibuf, IMB_refImBuf(), and NULL.
Referenced by seq_cache_get().
Definition at line 781 of file image_cache.c.
References Editing::cache, Scene::ed, NULL, and scene.
Referenced by SEQ_cache_cleanup(), seq_cache_cleanup_sequence(), seq_cache_destruct(), seq_cache_free_temp_cache(), seq_cache_get(), seq_cache_get_item_for_removal(), SEQ_cache_iterate(), seq_cache_lock(), seq_cache_populate_key(), seq_cache_put(), seq_cache_put_ex(), seq_cache_recycle_item(), seq_cache_recycle_linked(), seq_cache_set_temp_cache_linked(), seq_cache_unlock(), and seq_disk_cache_create().
|
static |
Definition at line 1015 of file image_cache.c.
References BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), SeqCache::hash, SeqCacheItem::ibuf, SeqCacheKey::is_temp_cache, SeqCacheKey::link_next, NULL, scene, seq_cache_choose_key(), seq_cache_get_from_scene(), seq_cache_recycle_linked(), and SeqCacheKey::timeline_frame.
Referenced by seq_cache_recycle_item().
|
static |
Definition at line 808 of file image_cache.c.
Referenced by seq_cache_is_full().
|
static |
Definition at line 755 of file image_cache.c.
References Freestyle::a, SeqCacheKey::context, SeqCacheKey::frame_index, SeqCacheKey::seq, seq_cmp_render_data(), and SeqCacheKey::type.
Referenced by seq_cache_create().
|
static |
Definition at line 743 of file image_cache.c.
References SeqCacheKey::context, SeqCacheKey::frame_index, SeqCacheKey::seq, seq_hash_render_data(), and SeqCacheKey::type.
Referenced by seq_cache_create().
| bool seq_cache_is_full | ( | void | ) |
Definition at line 1504 of file image_cache.c.
References MEM_get_memory_in_use, and seq_cache_get_mem_total().
Referenced by seq_cache_recycle_item(), and seq_prefetch_is_cache_full().
| void SEQ_cache_iterate | ( | struct Scene * | scene, |
| void * | userdata, | ||
| bool | callback_initvoid *userdata, size_t item_count, | ||
| bool | callback_itervoid *userdata, struct Sequence *seq, int timeline_frame, int cache_type | ||
| ) |
Definition at line 1476 of file image_cache.c.
References BLI_ghash_len(), BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), SeqCache::hash, SeqCache::last_key, NULL, scene, SeqCacheKey::seq, seq_cache_get_from_scene(), seq_cache_lock(), seq_cache_unlock(), SeqCacheKey::timeline_frame, SeqCacheKey::type, and ImBuf::userdata.
Referenced by draw_cache_view().
|
static |
Definition at line 813 of file image_cache.c.
References BLI_mempool_free(), SeqCacheKey::cache_owner, and SeqCache::keys_pool.
Referenced by SEQ_cache_cleanup(), seq_cache_cleanup_sequence(), seq_cache_destruct(), seq_cache_free_temp_cache(), seq_cache_put_ex(), and seq_cache_recycle_linked().
|
static |
Definition at line 790 of file image_cache.c.
References BLI_mutex_lock(), SeqCache::iterator_mutex, scene, and seq_cache_get_from_scene().
Referenced by SEQ_cache_cleanup(), seq_cache_cleanup_sequence(), seq_cache_free_temp_cache(), seq_cache_get(), SEQ_cache_iterate(), seq_cache_put(), and seq_cache_recycle_item().
|
static |
Definition at line 1164 of file image_cache.c.
References SeqCacheKey::cache_owner, context, SeqCacheKey::context, SeqCacheKey::frame_index, SeqCacheKey::is_temp_cache, SeqCacheKey::link_next, SeqCacheKey::link_prev, NULL, SeqCacheKey::seq, seq_cache_get_from_scene(), seq_cache_timeline_frame_to_frame_index(), SeqCacheKey::task_id, SeqCacheKey::timeline_frame, type, and SeqCacheKey::type.
Referenced by seq_cache_allocate_key(), and seq_cache_get().
| void seq_cache_put | ( | const SeqRenderData * | context, |
| Sequence * | seq, | ||
| float | timeline_frame, | ||
| int | type, | ||
| ImBuf * | i | ||
| ) |
Definition at line 1429 of file image_cache.c.
References BLI_assert, BLI_mutex_lock(), BLI_mutex_unlock(), Editing::cache, context, SeqCache::disk_cache, Scene::ed, IMB_freeImBuf(), SeqCacheKey::is_temp_cache, NULL, SeqDiskCache::read_write_mutex, scene, seq_cache_allocate_key(), seq_cache_create(), seq_cache_get(), seq_cache_get_from_scene(), seq_cache_lock(), seq_cache_put_ex(), seq_cache_unlock(), seq_disk_cache_create(), seq_disk_cache_enforce_limits(), seq_disk_cache_is_enabled(), seq_disk_cache_write_file(), seq_prefetch_get_original_context(), seq_prefetch_get_original_sequence(), and type.
Referenced by seq_cache_put_if_possible(), SEQ_render_give_ibuf(), seq_render_preprocess_ibuf(), seq_render_scene_strip(), and seq_render_strip_stack().
|
static |
Definition at line 846 of file image_cache.c.
References BLI_ghash_reinsert(), BLI_mempool_alloc(), SeqCacheItem::cache_owner, get_stored_types_flag(), SeqCache::hash, SeqCacheItem::ibuf, IMB_refImBuf(), SeqCacheKey::is_temp_cache, SeqCache::items_pool, SeqCache::last_key, SeqCacheKey::link_next, SeqCacheKey::link_prev, NULL, scene, seq_cache_get_from_scene(), seq_cache_keyfree(), SEQ_CACHE_STORE_FINAL_OUT, seq_cache_valfree(), and SeqCacheKey::type.
Referenced by seq_cache_get(), and seq_cache_put().
| bool seq_cache_put_if_possible | ( | const SeqRenderData * | context, |
| Sequence * | seq, | ||
| float | timeline_frame, | ||
| int | type, | ||
| ImBuf * | ibuf | ||
| ) |
Definition at line 1404 of file image_cache.c.
References Editing::cache, context, Scene::ed, SeqCache::last_key, NULL, scene, seq_cache_put(), seq_cache_recycle_item(), seq_cache_set_temp_cache_linked(), seq_prefetch_get_original_context(), seq_prefetch_get_original_sequence(), and type.
Referenced by SEQ_render_give_ibuf().
| bool seq_cache_recycle_item | ( | Scene * | scene | ) |
Definition at line 1074 of file image_cache.c.
References scene, seq_cache_get_from_scene(), seq_cache_get_item_for_removal(), seq_cache_is_full(), seq_cache_lock(), seq_cache_recycle_linked(), and seq_cache_unlock().
Referenced by seq_cache_get(), seq_cache_put_if_possible(), and seq_prefetch_is_cache_full().
|
static |
Definition at line 972 of file image_cache.c.
References BLI_ghash_haskey(), BLI_ghash_remove(), SeqCache::hash, SeqCacheKey::link_next, SeqCacheKey::link_prev, next, NULL, scene, seq_cache_get_from_scene(), seq_cache_keyfree(), and seq_cache_valfree().
Referenced by seq_cache_get_item_for_removal(), and seq_cache_recycle_item().
|
static |
Definition at line 899 of file image_cache.c.
References SeqCacheKey::link_next, and SeqCacheKey::link_prev.
Referenced by seq_cache_cleanup_sequence().
|
static |
Definition at line 1098 of file image_cache.c.
References SeqCacheKey::is_temp_cache, SeqCacheKey::link_next, SeqCacheKey::link_prev, next, scene, and seq_cache_get_from_scene().
Referenced by seq_cache_put_if_possible().
|
static |
Definition at line 764 of file image_cache.c.
References SEQ_CACHE_STORE_RAW, seq_give_frame_index(), Sequence::start, and type.
Referenced by seq_cache_free_temp_cache(), and seq_cache_populate_key().
|
static |
Definition at line 799 of file image_cache.c.
References BLI_mutex_unlock(), SeqCache::iterator_mutex, scene, and seq_cache_get_from_scene().
Referenced by SEQ_cache_cleanup(), seq_cache_cleanup_sequence(), seq_cache_free_temp_cache(), seq_cache_get(), SEQ_cache_iterate(), seq_cache_put(), and seq_cache_recycle_item().
|
static |
Definition at line 819 of file image_cache.c.
References BLI_mempool_free(), SeqCacheItem::cache_owner, SeqCacheItem::ibuf, IMB_freeImBuf(), and SeqCache::items_pool.
Referenced by SEQ_cache_cleanup(), seq_cache_cleanup_sequence(), seq_cache_destruct(), seq_cache_free_temp_cache(), seq_cache_put_ex(), and seq_cache_recycle_linked().
|
static |
Definition at line 720 of file image_cache.c.
References Freestyle::a, SeqRenderData::bmain, SeqRenderData::motion_blur_samples, SeqRenderData::motion_blur_shutter, SeqRenderData::preview_render_size, Scene::r, SeqRenderData::rectx, SeqRenderData::recty, SeqRenderData::scene, SeqRenderData::view_id, and RenderData::views_format.
Referenced by seq_cache_hashcmp().
|
static |
Definition at line 211 of file image_cache.c.
References BLI_addtail(), BLI_split_dirfile(), BLI_strncpy(), DiskCacheFile::cache_type, DCACHE_FNAME_FORMAT, DCACHE_IMAGES_PER_FILE, DiskCacheFile::dir, file, DiskCacheFile::file, FILE_MAX, FILE_MAXDIR, SeqDiskCache::files, MEM_callocN, DiskCacheFile::path, DiskCacheFile::rectx, DiskCacheFile::recty, DiskCacheFile::render_size, DiskCacheFile::start_frame, and DiskCacheFile::view_id.
Referenced by seq_disk_cache_get_files(), and seq_disk_cache_write_file().
|
static |
Definition at line 547 of file image_cache.c.
References B_ENDIAN, BLI_strncpy(), ImBuf::channels, DiskCacheHeaderEntry::colorspace_name, DCACHE_IMAGES_PER_FILE, DiskCacheHeaderEntry::encoding, ENDIAN_ORDER, DiskCacheHeader::entry, SeqCacheKey::frame_index, DiskCacheHeaderEntry::frameno, IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), DiskCacheHeaderEntry::offset, ImBuf::rect, DiskCacheHeaderEntry::size_compressed, DiskCacheHeaderEntry::size_raw, ImBuf::x, and ImBuf::y.
Referenced by seq_disk_cache_write_file().
|
static |
Definition at line 180 of file image_cache.c.
Referenced by seq_disk_cache_create(), seq_disk_cache_enforce_limits(), and seq_disk_cache_get_project_dir().
|
static |
Definition at line 185 of file image_cache.c.
References USER_SEQ_DISK_CACHE_COMPRESSION_HIGH, USER_SEQ_DISK_CACHE_COMPRESSION_LOW, and USER_SEQ_DISK_CACHE_COMPRESSION_NONE.
Referenced by seq_disk_cache_write_file().
Definition at line 1122 of file image_cache.c.
References BLI_mutex_init(), BLI_mutex_lock(), BLI_mutex_unlock(), SeqDiskCache::bmain, cache_create_lock, SeqCache::disk_cache, Editing::disk_cache_timestamp, Scene::ed, MEM_callocN, NULL, SeqDiskCache::read_write_mutex, scene, seq_cache_get_from_scene(), seq_disk_cache_base_dir(), seq_disk_cache_get_files(), seq_disk_cache_handle_versioning(), and SeqDiskCache::timestamp.
Referenced by seq_cache_get(), and seq_cache_put().
|
static |
Definition at line 406 of file image_cache.c.
References BLI_fopen(), BLI_make_existing_file(), DCACHE_CURRENT_VERSION, file, and direntry::path.
Referenced by seq_disk_cache_handle_versioning().
|
static |
Definition at line 288 of file image_cache.c.
References BLI_delete(), BLI_remlink(), file, SeqDiskCache::files, MEM_freeN, and SeqDiskCache::size_total.
Referenced by seq_disk_cache_delete_invalid_files(), seq_disk_cache_enforce_limits(), and seq_disk_cache_write_file().
|
static |
Definition at line 448 of file image_cache.c.
References BLI_path_slash_ensure(), DiskCacheFile::cache_type, DiskCacheFile::dir, FILE_MAX, SeqDiskCache::files, ListBase::first, DiskCacheFile::next, scene, seq_cache_frame_index_to_timeline_frame(), seq_disk_cache_delete_file(), seq_disk_cache_get_dir(), DiskCacheFile::start_frame, and STREQ.
Referenced by seq_disk_cache_invalidate().
|
static |
Definition at line 296 of file image_cache.c.
References BLI_exists(), BLI_freelistN(), BLI_mutex_lock(), BLI_mutex_unlock(), SeqDiskCache::files, DiskCacheFile::path, SeqDiskCache::read_write_mutex, seq_disk_cache_base_dir(), seq_disk_cache_delete_file(), seq_disk_cache_get_files(), seq_disk_cache_get_oldest_file(), seq_disk_cache_size_limit(), and SeqDiskCache::size_total.
Referenced by seq_cache_put().
|
static |
Definition at line 369 of file image_cache.c.
References BLI_filename_make_safe(), BLI_path_append(), BLI_strncpy(), FILE_MAX, Scene::id, MAX_ID_NAME, Sequence::name, ID::name, direntry::path, PRId64, scene, seq_disk_cache_get_project_dir(), SEQ_NAME_MAXSTR, and SeqDiskCache::timestamp.
Referenced by seq_disk_cache_delete_invalid_files(), and seq_disk_cache_get_file_path().
|
static |
Definition at line 322 of file image_cache.c.
References BLI_strcasecmp(), SeqDiskCache::files, ListBase::first, DiskCacheFile::next, NULL, direntry::path, and DiskCacheFile::path.
Referenced by seq_disk_cache_update_file(), and seq_disk_cache_write_file().
|
static |
Definition at line 386 of file image_cache.c.
References BLI_path_append(), SeqCacheKey::context, DCACHE_FNAME_FORMAT, DCACHE_IMAGES_PER_FILE, FILE_MAXFILE, SeqCacheKey::frame_index, direntry::path, SeqRenderData::preview_render_size, SeqRenderData::rectx, SeqRenderData::recty, SeqRenderData::scene, SeqCacheKey::seq, seq_disk_cache_get_dir(), SeqCacheKey::type, and SeqRenderData::view_id.
Referenced by seq_disk_cache_read_file(), and seq_disk_cache_write_file().
|
static |
Definition at line 233 of file image_cache.c.
References BLI_file_attributes(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_is_dir(), BLI_path_extension(), BLI_path_slash_ensure(), BLI_split_dirfile(), BLI_strncpy(), file, FILE_ATTR_ANY_LINK, FILE_MAX, FILENAME_IS_CURRPAR, DiskCacheFile::fstat, NULL, direntry::path, direntry::s, seq_disk_cache_add_file_to_list(), and SeqDiskCache::size_total.
Referenced by seq_disk_cache_create(), and seq_disk_cache_enforce_limits().
|
static |
Definition at line 598 of file image_cache.c.
References DCACHE_IMAGES_PER_FILE, DiskCacheHeader::entry, SeqCacheKey::frame_index, and DiskCacheHeaderEntry::frameno.
Referenced by seq_disk_cache_read_file().
|
static |
Definition at line 273 of file image_cache.c.
References SeqDiskCache::files, ListBase::first, DiskCacheFile::fstat, DiskCacheFile::next, and NULL.
Referenced by seq_disk_cache_enforce_limits().
|
static |
Definition at line 358 of file image_cache.c.
References BKE_main_blendfile_path(), BLI_path_append(), BLI_split_file_part(), BLI_strncpy(), SeqDiskCache::bmain, FILE_MAX, direntry::path, and seq_disk_cache_base_dir().
Referenced by seq_disk_cache_get_dir(), and seq_disk_cache_handle_versioning().
|
static |
Definition at line 417 of file image_cache.c.
References BLI_delete(), BLI_exists(), BLI_fopen(), BLI_is_dir(), BLI_path_append(), BLI_strncpy(), DCACHE_CURRENT_VERSION, file, FILE_MAX, direntry::path, seq_disk_cache_create_version_file(), and seq_disk_cache_get_project_dir().
Referenced by seq_disk_cache_create().
|
static |
Definition at line 475 of file image_cache.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), Editing::cache, DCACHE_IMAGES_PER_FILE, SeqCache::disk_cache, Scene::ed, Sequence::enddisp, SeqDiskCache::read_write_mutex, scene, seq_disk_cache_delete_invalid_files(), and Sequence::startdisp.
Referenced by seq_cache_cleanup_sequence().
|
static |
Definition at line 204 of file image_cache.c.
References Main::name, and SEQ_CACHE_DISK_CACHE_ENABLE.
Referenced by seq_cache_cleanup_sequence(), seq_cache_get(), and seq_cache_put().
|
static |
Definition at line 655 of file image_cache.c.
References BLI_file_touch(), BLI_fopen(), BLI_make_existing_file(), DiskCacheHeaderEntry::colorspace_name, SeqCacheKey::context, DiskCacheHeader::entry, file, FILE_MAX, IB_rect, IB_rectfloat, IMB_allocImBuf(), IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_assign_rect_colorspace(), IMB_freeImBuf(), inflate_file_to_imbuf(), NULL, direntry::path, SeqRenderData::rectx, SeqRenderData::recty, seq_disk_cache_get_file_path(), seq_disk_cache_get_header_entry(), seq_disk_cache_read_header(), seq_disk_cache_update_file(), and DiskCacheHeaderEntry::size_raw.
Referenced by seq_cache_get().
|
static |
Definition at line 519 of file image_cache.c.
References B_ENDIAN, BLI_assert, BLI_endian_switch_uint64(), DCACHE_IMAGES_PER_FILE, DiskCacheHeaderEntry::encoding, ENDIAN_ORDER, DiskCacheHeader::entry, file, DiskCacheHeaderEntry::frameno, DiskCacheHeaderEntry::offset, DiskCacheHeaderEntry::size_compressed, and DiskCacheHeaderEntry::size_raw.
Referenced by seq_disk_cache_read_file(), and seq_disk_cache_write_file().
|
static |
Definition at line 199 of file image_cache.c.
Referenced by seq_disk_cache_enforce_limits().
|
static |
Definition at line 336 of file image_cache.c.
References BLI_assert, BLI_stat(), DiskCacheFile::fstat, direntry::path, seq_disk_cache_get_file_entry_by_path(), and SeqDiskCache::size_total.
Referenced by seq_disk_cache_read_file(), and seq_disk_cache_write_file().
|
static |
Definition at line 609 of file image_cache.c.
References BLI_fopen(), BLI_make_existing_file(), deflate_imbuf_to_file(), DiskCacheHeader::entry, file, FILE_MAX, DiskCacheFile::fstat, direntry::path, seq_disk_cache_add_file_to_list(), seq_disk_cache_add_header_entry(), seq_disk_cache_compression_level(), seq_disk_cache_delete_file(), seq_disk_cache_get_file_entry_by_path(), seq_disk_cache_get_file_path(), seq_disk_cache_read_header(), seq_disk_cache_update_file(), seq_disk_cache_write_header(), and DiskCacheHeaderEntry::size_compressed.
Referenced by seq_cache_put().
|
static |
Definition at line 541 of file image_cache.c.
References file.
Referenced by seq_disk_cache_write_file().
|
static |
Definition at line 729 of file image_cache.c.
References Freestyle::a.
Referenced by seq_cache_hashhash().
|
static |
Definition at line 174 of file image_cache.c.
Referenced by seq_cache_create(), and seq_disk_cache_create().