Tweaks to movie clip prefetching after discussion with Sebastian

Don't use sequencer's Frames Prefetch option and rather fill the
whole cache with frames.

Since movie clip is not "classical" prefetcher (it doesn't do
anything while playing back) and main purpose is to speed up
reading for further tracking and so, such a change seems logical.
This commit is contained in:
Sergey Sharybin
2013-03-21 07:47:38 +00:00
parent 3725089b6b
commit 1769319ce2
2 changed files with 2 additions and 6 deletions

View File

@@ -1040,7 +1040,7 @@ static int prefetch_get_final_frame(const bContext *C)
int end_frame;
/* check whether all the frames from prefetch range are cached */
end_frame = min_ii(sc->user.framenr + U.prefetchframes - 1, EFRA);
end_frame = EFRA;
if (clip->len)
end_frame = min_ii(end_frame, clip->len);
@@ -1059,10 +1059,6 @@ static bool prefetch_check_early_out(const bContext *C)
if (clip->prefetch_ok)
return true;
/* prefetch is disabled in user preferences */
if (U.prefetchframes == 0)
return true;
clip_len = BKE_movieclip_get_duration(clip);
/* check whether all the frames from prefetch range are cached */

View File

@@ -3431,7 +3431,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
RNA_def_property_range(prop, 0, 500);
RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback");
RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback (sequencer only)");
prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "memcachelimit");