diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-01-25 23:39:56 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-01-26 00:06:46 +0300 |
commit | b45e71e22cc704a9169abe0b74dabc8be668b00b (patch) | |
tree | 2c4392a09f559037960d720a94387c7168aa6bd2 /source/blender/sequencer | |
parent | 597eaeaa1154938f1bc1dd9db71e3ee25ca37f8c (diff) |
VSE: Build proxies only for slow movies
This change applies only for automatic proxy building, when strip
is added to timeline. Manual building process is not affected.
Don't build proxy file if movie is already fast enough to seek.
To determine seek performance, check if whole GOP can be decoded
in 100 milliseconds.
To consider some variation in GOP size, large number of packets are
read, assuming that each packet will produce 1 frame. While this is not
technically correct, it does give quite accurate estimate of maximum GOP
size.
This test will ensure consistent performance on wide array of machines.
Check should be done in order of few milliseconds.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11671
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r-- | source/blender/sequencer/SEQ_proxy.h | 3 | ||||
-rw-r--r-- | source/blender/sequencer/intern/proxy.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/sequencer/SEQ_proxy.h b/source/blender/sequencer/SEQ_proxy.h index 7bfe932ff1c..164b279245c 100644 --- a/source/blender/sequencer/SEQ_proxy.h +++ b/source/blender/sequencer/SEQ_proxy.h @@ -42,7 +42,8 @@ bool SEQ_proxy_rebuild_context(struct Main *bmain, struct Scene *scene, struct Sequence *seq, struct GSet *file_list, - struct ListBase *queue); + struct ListBase *queue, + bool build_only_on_bad_performance); void SEQ_proxy_rebuild(struct SeqIndexBuildContext *context, short *stop, short *do_update, diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index cc0ea0634a3..5982f89a287 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -415,7 +415,8 @@ bool SEQ_proxy_rebuild_context(Main *bmain, Scene *scene, Sequence *seq, struct GSet *file_list, - ListBase *queue) + ListBase *queue, + bool build_only_on_bad_performance) { SeqIndexBuildContext *context; Sequence *nseq; @@ -476,7 +477,8 @@ bool SEQ_proxy_rebuild_context(Main *bmain, context->size_flags, context->quality, context->overwrite, - file_list); + file_list, + build_only_on_bad_performance); } if (!context->index_context) { MEM_freeN(context); |