diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-03-15 17:45:09 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:30:48 +0300 |
commit | 472488d871d1e44f438f64c343cb754e89ac85e6 (patch) | |
tree | 4f56e32062abf95c9e5ba5411865c76b4fd0a908 /source/blender/editors/space_clip/tracking_ops_track.c | |
parent | 1c84bca515181defded3a12f4fc5aadc18242b4e (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/tracking_ops_track.c')
-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 |