Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-11-25 12:40:17 +0300
committerSergey Sharybin <sergey@blender.org>2021-01-18 18:38:40 +0300
commit0ca0d3366d4c79949914e229858f0a5477b9e6ec (patch)
treeb89cd6245af0ac3d379cbb4bd85ff0ece27b967d /source/blender/makesdna/DNA_tracking_types.h
parentf508292277d7a12c04b2cb2655622683ee4fef54 (diff)
Tracking: Re-write marker request function
There are two main things. First, remove the marker index caching. Thins makes it possible to safely use function from a threaded environment. Second, replace linear search with binary search, which speeds up random lookup. There is no measurable difference in the stabilization which had a comment about caching nature of track lookup. The random lookup complexity changed from O(N) to O(log N). In practice this also unlikely to be measurable, but thread-safety worth it.
Diffstat (limited to 'source/blender/makesdna/DNA_tracking_types.h')
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 908b06da2ce..5a8bbdc08a1 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -141,7 +141,7 @@ typedef struct MovieTrackingTrack {
/** Count of markers in track. */
int markersnr;
/** Most recently used marker. */
- int last_marker;
+ int _pad;
/** Markers in track. */
MovieTrackingMarker *markers;