diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-03-15 17:45:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-03-15 17:50:40 +0300 |
commit | e08180fdab8925328ed505333f6e5a721b18e0b4 (patch) | |
tree | cdd34dca3ae3af8b281db6bea4fefc3d5d588756 /source/blender/editors/space_clip | |
parent | 2156841c8ca8e754e073ceb14912c7529af891bf (diff) |
Fix slow tracking of long sequences
The performance issue was noticeable when tracking a lot of tracks
which are using keyframe pattern matching. What was happening is that
at some cache gets filled in and the furthest away frame gets removed
from the cache: the frame at marker's keyframe gets removed and needs
to be re-read from disk on the next tracking step.
This change makes it so frames at markers' keyframes are not removed
from cache during tracking.
Steps to easily reproduce:
- Set cache size to 512 Mb.
- Open image sequence in clip editor
- Detect features
- Track all markers
Originally was reported by Rik, thanks!
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_track.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c index f9cbce40deb..d5223d57490 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.c +++ b/source/blender/editors/space_clip/tracking_ops_track.c @@ -211,6 +211,8 @@ static void track_markers_startjob( TrackMarkersJob *tmj = (TrackMarkersJob *)tmv; int framenr = tmj->sfra; + BKE_autotrack_context_start(tmj->context); + while (framenr != tmj->efra) { if (tmj->delay > 0) { /* Tracking should happen with fixed fps. Calculate time |