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-30 17:55:52 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-30 18:24:11 +0300
commit0f30edc20c6206b40216b162fa435d23562127f8 (patch)
treeec5e4345fd0d8a818ecfa44f37300435c877410a /source/blender/blenkernel/tracking_private.h
parent13ce25d24c9d667282784f34fd5e5e875b350c91 (diff)
Tracking: Make image accessor own what it needs
Previously image accessor was sharing array pointer for tracks access. Now it is possible to pass a temporary array valid only during the initialization process. Should be no functional changes.
Diffstat (limited to 'source/blender/blenkernel/tracking_private.h')
-rw-r--r--source/blender/blenkernel/tracking_private.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/tracking_private.h b/source/blender/blenkernel/tracking_private.h
index 5bd4baa536d..64db84d5ac3 100644
--- a/source/blender/blenkernel/tracking_private.h
+++ b/source/blender/blenkernel/tracking_private.h
@@ -132,14 +132,25 @@ struct libmv_FrameAccessor;
#define MAX_ACCESSOR_CLIP 64
typedef struct TrackingImageAccessor {
struct MovieCache *cache;
+
struct MovieClip *clips[MAX_ACCESSOR_CLIP];
int num_clips;
+
+ /* Array of tracks which are being tracked.
+ * Points to actual track from the `MovieClip` (or multiple of them).
+ * This accessor owns the array, but not the tracks themselves. */
struct MovieTrackingTrack **tracks;
int num_tracks;
+
struct libmv_FrameAccessor *libmv_accessor;
SpinLock cache_lock;
} TrackingImageAccessor;
+/* Clips are used to access images of an actual footage.
+ * Tracks are used to access masks associated with the tracks.
+ *
+ * NOTE: Both clips and tracks arrays are copied into the image accessor. It means that the caller
+ * is allowed to pass temporary arrays which are only valid during initialization. */
TrackingImageAccessor *tracking_image_accessor_new(MovieClip *clips[MAX_ACCESSOR_CLIP],
int num_clips,
MovieTrackingTrack **tracks,