Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/prefetch.c
| Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | static bool seq_prefetch_do_skip_frame(Scene *scene) | ||||
| SeqRenderData *ctx = &pfjob->context_cpy; | SeqRenderData *ctx = &pfjob->context_cpy; | ||||
| ImBuf *ibuf = NULL; | ImBuf *ibuf = NULL; | ||||
| /* Disable prefetching 3D scene strips, but check for disk cache. */ | /* Disable prefetching 3D scene strips, but check for disk cache. */ | ||||
| for (int i = 0; i < count; i++) { | for (int i = 0; i < count; i++) { | ||||
| if (seq_arr[i]->type == SEQ_TYPE_SCENE && (seq_arr[i]->flag & SEQ_SCENE_STRIPS) == 0) { | if (seq_arr[i]->type == SEQ_TYPE_SCENE && (seq_arr[i]->flag & SEQ_SCENE_STRIPS) == 0) { | ||||
| int cached_types = 0; | int cached_types = 0; | ||||
| ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); | ibuf = BKE_sequencer_cache_get( | ||||
| ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, NULL, false); | |||||
| if (ibuf != NULL) { | if (ibuf != NULL) { | ||||
| cached_types |= SEQ_CACHE_STORE_FINAL_OUT; | cached_types |= SEQ_CACHE_STORE_FINAL_OUT; | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| ibuf = NULL; | ibuf = NULL; | ||||
| } | } | ||||
| ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); | ibuf = BKE_sequencer_cache_get( | ||||
| ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_FINAL_OUT, NULL, false); | |||||
| if (ibuf != NULL) { | if (ibuf != NULL) { | ||||
| cached_types |= SEQ_CACHE_STORE_COMPOSITE; | cached_types |= SEQ_CACHE_STORE_COMPOSITE; | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| ibuf = NULL; | ibuf = NULL; | ||||
| } | } | ||||
| ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_PREPROCESSED, false); | ibuf = BKE_sequencer_cache_get( | ||||
| ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_PREPROCESSED, NULL, false); | |||||
| if (ibuf != NULL) { | if (ibuf != NULL) { | ||||
| cached_types |= SEQ_CACHE_STORE_PREPROCESSED; | cached_types |= SEQ_CACHE_STORE_PREPROCESSED; | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| ibuf = NULL; | ibuf = NULL; | ||||
| } | } | ||||
| ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_RAW, false); | ibuf = BKE_sequencer_cache_get(ctx, seq_arr[i], cfra, SEQ_CACHE_STORE_RAW, NULL, false); | ||||
| if (ibuf != NULL) { | if (ibuf != NULL) { | ||||
| cached_types |= SEQ_CACHE_STORE_RAW; | cached_types |= SEQ_CACHE_STORE_RAW; | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| ibuf = NULL; | ibuf = NULL; | ||||
| } | } | ||||
| if ((cached_types & (SEQ_CACHE_STORE_RAW | SEQ_CACHE_STORE_PREPROCESSED)) != 0) { | if ((cached_types & (SEQ_CACHE_STORE_RAW | SEQ_CACHE_STORE_PREPROCESSED)) != 0) { | ||||
| continue; | continue; | ||||
| ▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines | |||||