Page MenuHome

[WIP]VSE: Store RAW images in cache by default
Needs ReviewPublic

Authored by Richard Antalik (ISS) on Nov 5 2020, 11:14 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Strip without any processing can put single image into cache using
SEQ_CACHE_STORE_RAW and SEQ_CACHE_STORE_FINAL_OUT keys. This doesn't
increase memory usage however.

There was bug in memory usage counting. The code was removed and
function MEM_get_memory_in_use() is used instead.

If strip does perform processing, and this processing is very fast, we
could keep only SEQ_CACHE_STORE_RAW image or vice versa. But since
proxy raw images are not put into cache, this can cause problem when
prefetching is enabled, and no image is put into cache. Prefetching
always runs, untill cache is full.


We could check if heuristcs mentioned above will leave cache empty. in such case we would simply ensure that SEQ_CACHE_STORE_FINAL_OUT is stored.

However cost itself isn't enough to calculate real framerate because of UI overhead, whish is significant at higher framerates.
It is not easy measure UI overhead, in addition video codecs may behave differently during playback and scrubbing or random access.

I don't think I can implement this optimization well enough.


Caching raw images by default should be done after D9414 is implemented to conserve memory.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D9481 (branched from master)
Build Status
Buildable 11275
Build 11275: arc lint + arc unit

Event Timeline

Richard Antalik (ISS) requested review of this revision.Nov 5 2020, 11:14 PM
Richard Antalik (ISS) created this revision.
  • Use PIL_check_seconds_timer() for cost calcuation. Using clock() was too imprecise.
Richard Antalik (ISS) edited the summary of this revision. (Show Details)Nov 16 2020, 7:52 AM
Richard Antalik (ISS) edited the summary of this revision. (Show Details)